
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
//var ns6=document.getElementById&&!document.all
var ns6=((document.getElementById&&!document.all)||window.opera)
var ns4=document.layers

var left_margin;
var top_margin;
if (ns6) top_margin = 194;
else if (ns4) top_margin = 194
else top_margin = 205;

function showMenu(el){
  if (!document.all&&!document.getElementById&&!document.layers) return

  clearhidemenu()
  hidemenu()

  linkobj = ie4? eval("document.all." + el) : ns6? document.getElementById(el) : ns4? eval("document." + el) : ""
  linkobj.thestyle = (ie4||ns6)? linkobj.style : linkobj
  menuobj = ie4? eval("document.all." + el + 'Popup') : ns6? document.getElementById(el + 'Popup') : ns4? eval("document." + el + "Popup") : ""
  if (window.menuobj) menuobj.thestyle = (ie4||ns6)? menuobj.style : menuobj

  left_margin = linkobj.offsetLeft + 0;
  top_margin = linkobj.offsetTop + 15;
  
  //if (window.menuobj) menuobj.thestyle.left=linkobj.offsetLeft
  if (window.menuobj) menuobj.thestyle.left=left_margin;
  //if (window.menuobj) menuobj.thestyle.top=top_margin;
  if (window.menuobj) menuobj.thestyle.top=top_margin;
  
  linkobj.thestyle.backgroundColor=''
  if (window.menuobj) menuobj.thestyle.visibility="visible"
  return false
}

function SshowMenu(el){

  if (!document.all&&!document.getElementById&&!document.layers) return

  Sclearhidemenu()
  Shidemenu()

  Slinkobj = ie4? eval("document.all." + el) : ns6? document.getElementById(el) : ns4? eval("document." + el) : ""
  Slinkobj.thestyle = (ie4||ns6)? Slinkobj.style : Slinkobj
  Smenuobj = ie4? eval("document.all." + el + 'Popup') : ns6? document.getElementById(el + 'Popup') : ns4? eval("document." + el + "Popup") : ""
  if (window.Smenuobj) Smenuobj.thestyle = (ie4||ns6)? Smenuobj.style : Smenuobj

  Sleft_margin = left_margin + Slinkobj.offsetLeft + 185;
  Stop_margin = top_margin + Slinkobj.offsetTop + 0;
  
  if (window.Smenuobj) Smenuobj.thestyle.left=Sleft_margin
  //if (window.Smenuobj) Smenuobj.thestyle.left=Sleft_margin;
  //if (window.Smenuobj) Smenuobj.thestyle.top=Slinkobj.offsetTop;
  if (window.Smenuobj) Smenuobj.thestyle.top=Stop_margin;
  
  Slinkobj.thestyle.backgroundColor=''
  if (window.Smenuobj) Smenuobj.thestyle.visibility="visible"
  if (window.menuobj) menuobj.thestyle.visibility="visible"
  return false
}

function Shidemenu(){
  if (window.Smenuobj) Smenuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
  if (window.Slinkobj) Slinkobj.thestyle.backgroundColor=''
}


function hidemenu(){
  if (window.menuobj) menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
  if (window.linkobj) linkobj.thestyle.backgroundColor=''
}


function delayhidemenu(){
  if (ie4||ns6||ns4) delayhide=setTimeout("hidemenu()",100)
}

function Sdelayhidemenu(){
  if (ie4||ns6||ns4) Sdelayhide=setTimeout("Shidemenu()",100)
}

function clearhidemenu(){
  if (window.delayhide) clearTimeout(delayhide)
}

function Sclearhidemenu(){
  if (window.Sdelayhide) clearTimeout(Sdelayhide)
}

if (ie4||ns6) document.onclick=hidemenu