// Copyright 2006-2007 javascript-array.com

var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 







// sIFR font replacement

/*document.write('<script src="sifr.js" type="text/javascript"></script>');
document.write('<script src="sifr-addons.js" type="text/javascript"></script>');*/

// Flash file import

function writeFlash(url, w, h, bgcolor, wmode) {
    if (url!='') {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'" id="flashID" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="'+url+'" />');
		if (wmode==true) {
			document.write('<param name="wmode" value="transparent" />');
				} else {
					document.write('');
					}
		document.write('<param name="quality" value="high" />');
		document.write('<param name="bgcolor" value="'+bgcolor+'" />');
		document.write('<embed src="'+url+'" quality="high" bgcolor="'+bgcolor+'"')
		if (wmode==true) {
			document.write(' wmode="transparent"');
				} else {
					document.write('');
					}
		document.write('width="'+w+'" height="'+h+'" name="flashID" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
    } else {
        document.write("Flash object not found");
    }
}
/* <script language="javascript">writeFlash('flash/name.swf', '325', '425', '#FFFFFF', true);</script> */

// Flash video import

function writeFlashVideo(player, skin, url, w, h, auto, rew) {
	 if (url!='') {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" id="FLVPlayer">');
		document.write('<param name="movie" value="'+player+'" />');
		document.write('<param name="salign" value="lt" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="scale" value="noscale" />');
		document.write('<param name="FlashVars" value="&MM_ComponentVersion=1&skinName='+skin+'&streamName='+url+'&autoPlay='+auto+'&autoRewind='+rew+'" />');
		document.write('<embed src="'+player+'" flashvars="&MM_ComponentVersion=1&skinName='+skin+'&streamName='+url+'&autoPlay='+auto+'&autoRewind='+rew+'" quality="high" scale="noscale" width="'+w+'" height="'+h+'" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
		} else {
        document.write("Flashvideo object not found");
    }
}


        var imgErr = function(imgObj){ 
        imgObj.parentNode.innerHTML = ""; 
        }
