
var agt=navigator.userAgent.toLowerCase();
var is_safari = agt.indexOf("safari")!=-1;
function mainovr(div,name,status){
	if(is_safari){
		bHover=name; Act(div,name,false);window.status=status;}
	else{
		bHover=name;window.status=status;setTimeout('Act(\'' + div + '\', \'' + name + '\', false)',400);}
}
function findDiv(n, d) { 
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findDiv(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function tNav() { 
	var i,p,v,obj,args=tNav.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findDiv(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    if(v=='visible')setPosition(args[i]);    
    obj.visibility=v;} 
}
function hde(sect) {
  tNav('dom','','hide');tNav('host','','hide');tNav('sslhdr','','hide');tNav('em','','hide');tNav('eco','','hide');tNav('webs','','hide');showElement('SELECT');
}
function hideDD(sect) {
  tNav(sect,'','hide');hde(sect);
}
var secSet = null;
var activeTimer = null;
var bHover = '';
function Act(sect, windowStatusVal, bshow) {
	hde(sect);
	if ((bHover==windowStatusVal)||(bshow)){		
		tNav(sect,'','show');
		if (secSet != null) window.clearTimeout(secSet);		
		hideElement('SELECT', document.all[sect]); 
	}
}
function setPosition(sect)
{
  var obj, objstyle, overobj, len=0;
  overobj=findDiv(sect+"_td");
  obj=findDiv(sect);
  if (eval(overobj.offsetLeft+obj.offsetWidth) > overobj.offsetParent.offsetWidth){
	len = eval(overobj.offsetLeft+obj.offsetWidth)-overobj.offsetParent.offsetWidth;}
  if (obj.style) { objstyle=obj.style;
  objstyle.left = overobj.offsetLeft-len;}
}
function Tim(sect){
	if (secSet != null) window.clearTimeout(secSet);
	secSet = window.setTimeout('hideDD("' + sect + '")',500);
}

function hideElement( elmID, overDiv ) {
  if(document.all) {
    for(i = 0; i < document.all.tags( elmID ).length; i++) {
      obj = document.all.tags( elmID )[i];
      if(!obj || !obj.offsetParent) continue;
      // Find the element's offsetTop and offsetLeft relative to the BODY tag.
      objLeft   = obj.offsetLeft - overDiv.offsetParent.offsetLeft;
      objTop    = obj.offsetTop;
      objParent = obj.offsetParent;
      while(objParent.tagName.toUpperCase() != 'BODY') {
        objLeft  += objParent.offsetLeft;
        objTop   += objParent.offsetTop;
        objParent = objParent.offsetParent;}
      objHeight = obj.offsetHeight;
      objWidth  = obj.offsetWidth;            
      if((overDiv.offsetLeft + overDiv.offsetWidth) <= objLeft);
      else if((overDiv.offsetParent.offsetTop + overDiv.offsetHeight + 50) <= objTop);
      else if(overDiv.offsetTop >= eval(objTop + objHeight));
      else if(overDiv.offsetLeft >= eval(objLeft + objWidth));
      else {
        obj.style.visibility = 'hidden';
      }
    }
  }
}

function showElement(elmID) {
  if(document.all) {
    for(i = 0; i < document.all.tags( elmID ).length; i++) {
      obj = document.all.tags(elmID)[i];
      if(!obj || !obj.offsetParent) continue;
      obj.style.visibility = '';
    }
  }
}


