
function handleOut(elname) {
    // hides all popups, parameter is the div name
    // function called on onmouseout of hyperlink parameter

    d = document.getElementById(elname) ;
    d.style.left = "-2650px";
   try {
		MM_swapImgRestore();   
   }
   catch (ErrorObject)
   {
   }

}

function setLyr(obj1,lyr)
{
   	obj = document.getElementById (obj1) ;
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	
	var x = document.getElementById(lyr);	
	
	var finy = 0;
	var finx = 0;	 
	finx = newX + 0;	  
	finy = newY + 37;                	    
	  
	finx = newX - 150;		
	finy = newY - 208;		
	
	
		if (lyr == "Tab1")
	{
		MM_swapImage('btnb','','images/btn_roll_b_on.gif',1);
		
	}
	if (lyr == "Tab2")
	{
		MM_swapImage('btnc','','images/btn_roll_c_on.gif',2);
		
	}
	if (lyr == "Tab3")
	{
		MM_swapImage('btnd','','images/btn_roll_d_on.gif',3);
		
	}
	if (lyr == "Tab4")
	{
		MM_swapImage('btne','','images/btn_roll_e_on.gif',4);
		
	}
	if (lyr == "Tab5")
	{
		MM_swapImage('btnf','','images/btn_roll_f_on.gif',5);
		
	}
	if (lyr == "Tab6")
	{
		MM_swapImage('btng','','images/btn_roll_g_on.gif',6)
		
	}
	if (lyr == "Tab8")
	{
		MM_swapImage('btnh','','images/btn_roll_h_on.gif',8)
		
	}
	if (lyr == "Tab9")
	{
		MM_swapImage('btni','','images/btn_roll_i_on.gif',9)
		
	}
	if (lyr == "Tab10")
	{
		MM_swapImage('btnj','','images/btn_roll_j_on.gif',10)
		
	}
	if (lyr == "Tab11")
	{
		MM_swapImage('btnk','','images/btn_roll_k_on.gif',11)
		
	}
	if (lyr == "Tab12")
	{
		MM_swapImage('btnl','','images/btn_roll_l_on.gif',12)
		
	}
	
	
	if (lyr == "Tab7")
	{
		MM_swapImage('resources','','images/btn_roll_a_on.gif',7);
		
		
	}
	
	if (BrowserDetect.version == "7")
	{
		finx = (newX - 100) ;
		finy = newY - 175;
	}
	
	if (BrowserDetect.version == "6")
	{
		finx = (newX - 175) ;
		finy = newY - 220;
	}
	
	if (BrowserDetect.browser == "Firefox")
	{
		finx = (newX - 100) ;
		finy = newY -200;
	}

	
	
	//set final position
	 x.style.top =  finy + 'px';
	 x.style.left = finx + 'px';

	
	 
}
function findPosX(obj)
  { //recursively searches through dom to get x postion
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {//recursively searches through dom to get y postion
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
