Ysf.Dom.quiet = true;

var browser = navigator.appName;

if( browser == "Microsoft Internet Explorer" )
{
	var bottom_value = -125;
}else{
	var bottom_value = -110;
}

PanelMenu = {
   timers: new Array (),
   elements: new Array (),
   offsetX: {'vertical': 0,  'horizontal': 154, 'default': 150, 'inverse': 130},
   offsetY: {'vertical': 19, 'horizontal': 100,  'default': 0, 'inverse': 50},
   
   enter: function (el) {
      var c = $child(el, 'ul');
      
      if (el.parentNode.parentNode.tagName.toLowerCase () == 'li') {
         this.hold(el.parentNode.parentNode);
      }
      if (c) {
         var r = el.parentNode.parentNode.parentNode;
         var orientation = 'default';
         if (r.tagName.toLowerCase () == 'map' && r.id == 'root-nav') {
         	orientation = 'vertical';
         } else if ($ancestor (el, 'map').id == 'root-nav') {
            orientation = 'inverse';
         } else if (r.tagName.toLowerCase () == 'map' && r.id == 'main-nav') {
            orientation = 'horizontal';
         }
         c.style.zIndex = 300;

         if( orientation == 'vertical' )
         {
	     	c.style.top = px(el.offsetTop + this.offsetY[orientation]);
	     	c.style.left = px(el.offsetLeft + this.offsetX[orientation] );			
	     }
	     else
	     {
	     	if( r.tagName.toLowerCase() == 'div'  )
	     	{
		     	c.style.top = px(el.offsetTop + this.offsetY[orientation]);
		     	c.style.left = px(el.offsetLeft + this.offsetX[orientation] - 33);
			}
	     	else
	     	{
		     	c.style.top = px(el.offsetTop + this.offsetY[orientation] - 54);
		     	c.style.left = px(el.offsetLeft + this.offsetX[orientation] + 20);
	     	}
	     }

		if( $ancestor (el, 'map').id && $ancestor (el, 'map').id == 'main-nav' )
		{
	     	c.style.top = px(el.offsetTop + this.offsetY[orientation] + 0);

	     	if( el.parentNode.parentNode.tagName.toLowerCase() != 'map' )
	     	{
	     		c.style.left = px(el.offsetLeft + this.offsetX[orientation] - 0);
	     	}
		}

	     c.style.display = 'block';
	  }
   },
   
   hold: function (el) {
      if (this.timers[el.id]) {
         clearTimeout(this.timers[el.id]);
      }
      if (el.parentNode.parentNode.tagName.toLowerCase () == 'li') {
         this.hold(el.parentNode.parentNode);
      }
   },
   
   exit: function (el) {
      this.elements[el.id] = el;
      this.timers[el.id] = setTimeout('PanelMenu.close(\'' + el.id + '\')', 100);
   },
   
   close: function (id) {
      el = this.elements[id];
      var c = $child(el, 'ul');
      if (c) {
         c.style.display = 'none';
      }
   }
};

Ysf.Dom.quiet = true;

var browser = navigator.appName;

if( browser == "Microsoft Internet Explorer" )
{
	var bottom_value = -125;
}else{
	var bottom_value = -110;
}

PanelMenuSecond = {
   timers: new Array (),
   elements: new Array (),
   offsetX: {'vertical': 0,  'horizontal': 114, 'default': 153, 'inverse': 130},
   offsetY: {'vertical': 33, 'horizontal': 100,  'default': 0, 'inverse': -12},
   
   enter: function (el) {
      var c = $child(el, 'ul');
      
      if (el.parentNode.parentNode.tagName.toLowerCase () == 'li') {
         this.hold(el.parentNode.parentNode);
      }
      if (c) {
         var r = el.parentNode.parentNode.parentNode;
         var orientation = 'default';
         if (r.tagName.toLowerCase () == 'map' && r.id == 'root-nav') {
         	orientation = 'vertical';
         } else if ($ancestor (el, 'map').id == 'root-nav') {
            orientation = 'inverse';
         } else if (r.tagName.toLowerCase () == 'map' && r.id == 'main-nav') {
            orientation = 'horizontal';
         }
         c.style.zIndex = 300;
	     c.style.top = px(el.offsetTop + this.offsetY[orientation]);
	     c.style.left = px(el.offsetLeft + this.offsetX[orientation]);
	     c.style.display = 'block';
	  }
   },
   
   hold: function (el) {
      if (this.timers[el.id]) {
         clearTimeout(this.timers[el.id]);
      }
      if (el.parentNode.parentNode.tagName.toLowerCase () == 'li') {
         this.hold(el.parentNode.parentNode);
      }
   },
   
   exit: function (el) {
      this.elements[el.id] = el;
      this.timers[el.id] = setTimeout('PanelMenuSecond.close(\'' + el.id + '\')', 100);
   },
   
   close: function (id) {
      el = this.elements[id];
      var c = $child(el, 'ul');
      if (c) {
         c.style.display = 'none';
      }
   }
};

var showhidetimer = "undefined";
 
function showsubhilite(divId){
	var i;
	var divElement = document.getElementById(divId);
	divElement.style.display = "block";
}

function hidesubhilite(divId){
   var i;
   var divElement = document.getElementById(divId); 
   divElement.style.display = "none";
}

function hidesubhilitewithdelay(divId){
	showhidetimer = setTimeout('hidesubhilite(\'' + divId + '\')', 1000)
}

function clearhide(){
	clearTimeout(showhidetimer);
}

