var openedMenu = null;
var submenuTimer;
var crossFadeDuration = 3;

function menuOvr(id){
	if (openedMenu && openedMenu != id){
		CloseMenu(id);
	}
	OpenMenu(id);
}

function OpenMenu(id){
	if ( document.getElementById ){
		//document.images.SlideShow.style.filter="blendTrans(duration=2)";
		document.getElementById( id ).style.visibility = 'visible';
	}else if ( document.all ){
		document.all( id ).style.visibility = 'visible';
	}else if ( document.layers ){
		document.layers[ id ].visibility = 'show';
	}
	clearTimeout(submenuTimer);
	openedMenu = id;
}

function CloseMenu(){
	if ( document.getElementById ){
		document.getElementById( openedMenu ).style.visibility = 'hidden';
	}else if ( document.all ){
		document.all( openedMenu ).style.visibility = 'hidden';
	}else if ( document.layers ){
		document.layers[ openedMenu ].visibility = 'hide';
	}
	openedMenu = null;
}


<!--

var arrayID = new Array();

function ctrlMenu(idName){

	if(arrayID[idName]=="1"){
		noneLayer(idName);
		arrayID[idName]="0";
	}else{
		blockLayer(idName);
		arrayID[idName]="1";
	}

}

function blockLayer(idName){

	if ( document.getElementById )
		document.getElementById( idName ).style.display   = 'block'
	else if ( document.all ) document.all( idName ).style.display = 'block'

}

function noneLayer(idName){

	if ( document.getElementById )
		document.getElementById( idName ).style.display   = 'none'
	else if ( document.all ) document.all( idName ).style.display = 'none'

}

// -->

function audio(audioId){

	if (navigator.appVersion.indexOf("MSIE") != -1)	{
		var audioSrc = "mms://wmedia.hkedcity.net/archive/09/Boundless/pirate/" + audioId + ".wma";

		var au_Idiom =
		"<object width=\"90%\" height=\"45\" classid=\"clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6\" type=\"application/x-oleobject\" title=\"\"> " +
		"<param name=\"autostart\" value=\"false\" />  " +
		"<param name=\"loop\" value=\"false\" />  " +
		"<param name=\"showcontrols\" value=\"true\" />  " +
		"<param name=\"url\" value=\"" + audioSrc + "\" /><embed width=\"320\" height=\"304\" autostart=\"false\" loop=\"false\" showcontrols=\"true\" src=\"" + audioSrc + "\" filename=\"" + audioSrc + "\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" type=\"application/x-mplayer2\"></embed></object>";

//
//		var au_Idiom =
//		"<object>"+
//		"<embed src=\"" + audioSrc +  "\" width=90% height=\"45\" loop=\"false\" autostart=\"false\">"+
//		"</embed>"+
//		"</object>";

		document.write(au_Idiom);
	}
}

function showAudio(id){

	var audioSrc = "mms://wmedia.hkedcity.net/archive/09/Boundless/pirate/" + id + ".wma";

	if (navigator.appVersion.indexOf("MSIE") != -1)	{
//		var objDiv = document.getElementById('div_audio_' + id);
//
//		var embedded_obj =
//		"<object>"+
//		"<embed src=\"" + audioSrc + "\" width=\"90%\" Height=\"45\" loop=\"false\" autostart=\"false\">"+
//		"</embed>"+
//		"</object>";
//
//		objDiv.innerHTML = '';
//		objDiv.insertAdjacentHTML('beforeEnd', embedded_obj);
	}
	else	{
		var object_obj = document.createElement('object');

		var embedded_obj = document.createElement('embed');
		embedded_obj.setAttribute('width','90%');
		embedded_obj.setAttribute('height','45');
		embedded_obj.setAttribute('src',audioSrc);
		embedded_obj.setAttribute('loop','false');
		embedded_obj.setAttribute('autostart','false');

		object_obj.appendChild(embedded_obj);

		var div = document.getElementById('div_audio_' + id);
		div.innerHTML = '';
		div.appendChild(object_obj);
	}

}


<!-- function embedIdiom(){

// var au_Idiom =
// "<div id=Layer1 style=\"position:absolute; z-index:1; left:1px; top:1px; height: 350; width: 150; visibility: visible\"> "+
// "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"150\" height=\"350\">"+
// "<param name=movie value=orifront.swf>"+
// "<param name=quality value=high>"+
// "<param name=\"wmode\" value=\"transparent\">"+
// "<embed src=\"orifront.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"150\" height=\"350\">"+
// "</embed>"+
// "</object>";

// document.write(au_Idiom);
// }// -->
