// JavaScript Document
function getFlashMovieObject(movieName)
{
  if (window.document[movieName])
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName];
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function showHideJSLayer(num,isShow){
	//show
	var div = document.getElementById("menuOverlay");
	div.style.visibility = "visible";

	var arg= num+'_'+(isShow?"on":"off");
	SWFObj = getFlashMovieObject("menuswf");
	SWFObj.SetVariable("JSShowHideMenu", arg);
}

function hideDiv(){
	var div = document.getElementById("menuOverlay");
	div.style.visibility = "hidden";
	SWFObj = getFlashMovieObject("menubaseswf");
	SWFObj.SetVariable("JSShowHideMenu", 'hide');
}



function getQueryString(name)
{
var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
if (reg.test(location.href))
return unescape(RegExp.$2.replace(/\+/g, " ")); return "";
}

function makeMenu(menuId){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="946" height="684"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash/index.swf?nocache=221" /><param name="quality" value="high" /><param name="FlashVars" value="id='+menuId+'"><embed src="flash/index.swf?nocache=221" width="946" height="684" align="middle" quality="high"  allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id='+menuId+'" /></object>');
}

