	//check browser
	var isNS4 = (document.layers) ? true : false;
	var isIE4 = (document.all && !document.getElementById) ? true : false;
	var isIE5 = (document.all && document.getElementById) ? true : false;
	var isNS6 = (!document.all && document.getElementById) ? true : false;
	var lastLayer1 = null;
	var lastLayer2 = null;
	var lastSelectLayer = null;
	
	var shiftPixels = 0;
	

	//////////////////////////////////////////////////////////////////////////////
	//	  layer	mechanisms for menu
	//////////////////////////////////////////////////////////////////////////////
	function triggerOff()
	{
		//check if lastlayer is not null
		if(lastLayer1 != null)
		{
			//call turn off function
			singleOff(lastLayer1);
		}

		//check if lastlayer is not null
		if(lastLayer2 != null)
		{
			//call turn off function
			singleOff(lastLayer2);
		}

		if(lastSelectLayer != null)
		{
			//call turn off function
			selectsingleOff(lastSelectLayer);
		}		
			
	}


        function triggerOn(target1,target2,selecttarget)
        {
        	if (lastLayer1 != null)
        		singleOff(lastLayer1);
        	if (lastLayer2 != null)
        		singleOff(lastLayer2);

        	lastLayer1 = target1;
        	lastLayer2 = target2;
        	lastSelectLayer= selecttarget;

        	if (isIE5 || isNS6)
                {
                	document.getElementById(target1).style.visibility = 'visible';
                	document.getElementById(target2).style.visibility = 'visible';

			if (selecttarget) {              	
                	  document.getElementById(selecttarget).style.visibility = 'hidden';
			}
			
                	document.getElementById('main_div').style.visibility = 'visible';
		}
		else if (isIE4)
		{
                        eval("document.all." + target1 + ".style.visibility = 'visible'");
                        eval("document.all." + target2 + ".style.visibility = 'visible'");
                        
                        if (selecttarget) { 
                          eval("document.all." + selecttarget + ".style.visibility = 'hidden'");
                        }

                        eval("document.all.main_div.style.visibility = 'visible'");
		}
		else if (isNS4)
		{
			//make visible
                        eval ("document." + target1 + ".visibility = 'visible'");
                        eval ("document." + target2 + ".visibility = 'visible'");
                        
                        if (selecttarget) { 
                         eval ("document." + selecttarget + ".visibility = 'hidden'");
                        }
                        
                        eval ("document.main_div.visibility = 'visible'");
		}
	} // end triggerOn

         // Enter the ID of each layer/div
        function singleOff(id)
        {

		if (isIE5 || isNS6)
		{
                        document.getElementById(id).style.visibility = 'hidden';
                        document.getElementById('main_div').style.visibility = 'hidden';
		}

		else if (isIE4)
		{
                	eval("document.all." + id +".style.visibility = 'hidden'");
                	eval("document.all.main_div.style.visibility = 'hidden'");
		}

		else if (isNS4)
		{
                        eval ("document." + id + ".visibility = 'hidden'");
                        eval ("document.main_div.visibility = 'hidden'");
		}
	}	

         // Enter the ID of each layer/div
        function selectsingleOff(id)
        {

		if (isIE5 || isNS6)
		{
                        document.getElementById(id).style.visibility = 'visible';
		}

		else if (isIE4)
		{
                	eval("document.all." + id +".style.visibility = 'visible'");
		}

		else if (isNS4)
		{
                        eval ("document." + id + ".visibility = 'visible'");
		}
	}

