﻿
    function getAbsX(elt) { return parseInt(elt.x) ? elt.x :
        getAbsPos(elt,"Left"); }
    function getAbsY(elt) { return parseInt(elt.y) ? elt.y :
        getAbsPos(elt,"Top"); }
          function getAbsPos(elt,which) {
        var iPos = 0;
        while (elt != null) {
            iPos += elt["offset" + which];
            elt = elt.offsetParent;
        }
        return iPos;
    }
    
    
    /*TOP LVL MENU*/
    function ShowAdo(){
        var divAdo=document.getElementById("divAdo");
        divAdo.style.zIndex=100000000;
        if(document.all){
            divAdo.style.left='0px';
        }
        divAdo.style.display='block';
        
    }
    function HideAdo(){
        var divAdo=document.getElementById("divAdo");
        document.getElementById("divAdo").style.display='none';            
       
    }
   
 function HighLightCurrentCat(){
 
    var tabs=document.getElementById("headerZone").className.split('-');
    if(tabs.length>1){
        var id=tabs[1];
        if(document.getElementById("linkMenu_"+id)){
            document.getElementById("linkMenu_"+id).className+="on";
        }
    }
    
 }   

/*LVL 2 MENU*/

   


function ShowLvl2(){
	var li=$j(this);
	var divToShow=li.children().get()[1];
	
	if(divToShow.getElementsByTagName('ul').length!=0){
		
		if(!document.all){  
			divToShow.style.top=new Number(this.offsetHeight) + 'px';
		}
		
		var div_lvl2 = $j('#new_nav_leve2').get(0);
		
		if(((div_lvl2.offsetLeft+div_lvl2.offsetWidth)-180)<this.offsetLeft){
			divToShow.style.left=new Number(this.offsetLeft-3-(180-this.offsetWidth)) + 'px';
		}
		
		$j(divToShow).bgIframe();
		$j(divToShow).show();
		
	}
	li.removeClass("subMenu");
	li.addClass("subMenuOn");
}
function HideLvl2(){
    var li=$j(this);
    var divToShow=li.children().get()[1];
    if(divToShow.getElementsByTagName('ul').length!=0){
        $j(divToShow).hide();
    }
    li.removeClass("subMenuOn");
    li.addClass("subMenu");
}


$j(document).ready(function(){	
	$j(".subMenu").each(function(){
	    $j(this).hoverIntent(ShowLvl2,HideLvl2);
	});
	
}); // close document.ready



    function HighLightSubMenu(li){
        if (document.all && window.print && /MSIE [56]/.test(navigator.userAgent))
        {
            li.className="highLight";
        }
    }
    function UnHighLightSubMenu(li){
        if (document.all && window.print && /MSIE [56]/.test(navigator.userAgent))
        {
            li.className="";
        }
    }




