function playFile(filename,type,width,height,title)
{
	if (type==100)
	playerOne = new FAVideo("divOne", filename ,width ,height ,{skinAutoHide: true, autoLoad: true, autoPlay: true, skinPath: "/favideo/skins/ClearOverAll.swf"});
	
	if (type==101)
	AudioPlayer.embed("divOne", {soundFile: '/files/feother/'+filename, titles: title, artists: ""});  
}

function toggleSubmenu(state)
{
	document.getElementById('menuDemoSub').style.display=(state==1) ? "block" : "none";	
}

window.onload=function()
{
	if (document.getElementById('menuDemo')!=null)
	{
		document.getElementById('menuDemo').onmouseout=function(e)
		{
			if (!e) var e = window.event;
			var target = e.relatedTarget || e.toElement;
				
			if (window.Node && Node.prototype && !Node.prototype.contains)
			{
				Node.prototype.contains = function (arg)
				{
		  			return !!(this.compareDocumentPosition(arg) & 16);
				};
			}	
			if (!this.contains(target) && target!=this)
			toggleSubmenu(2);
		}
		
//		document.getElementById('menuDemoSub').onmouseout=function(e)
//		{
//			if (!e) var e = window.event;
//			var target = e.relatedTarget || e.toElement;
//				
//			if (window.Node && Node.prototype && !Node.prototype.contains)
//			{
//				Node.prototype.contains = function (arg)
//				{
//		  			return !!(this.compareDocumentPosition(arg) & 16);
//				};
//			}	
//
//			if (!this.contains(target) && target!=this)
//			toggleSubmenu(2);
//		}

	}
}	

