



    //Define global variables

	   var  timerID = null;
		var timerOn = false;
		var timecount = 1000;
		var what = null;
		var newbrowser = true;
		var totalLayers = 9 // total # of divs PLUS 1



    	function init(){
    	// alert ("Running Init");
          if (document.layers) {
                      //  alert ("Running Netscape 4");
                        layerRef="document.layers";
                        styleSwitch="";
                        blockVar="show";
			screenSize = window.innerWidth;
			what ="ns4";


          }else if(document.getElementById){
                     // alert ("Running Mozilla");
                        layerRef="document.getElementById";
                        styleSwitch=".style";
                        blockVar="block";
			what="moz";

		  }  else{
		  	//alert("Older than 4.0 browser.");
			what="none";
			newbrowser = false;



		  }


	
  	 	}



	// Turns the layers on and off
        function showLayer(layerName){

        			document.getElementById(layerName).style.display="block";
					
       
        		
		 }
        	

        function hideLayer(layerName){

					
					
        			document.getElementById(layerName).style.display="none";
					
        			}

     


		function hideAll(){

			for (i=1; i<totalLayers; i++){
			thelayer = ('nav'+i);
			
			hideLayer(thelayer);

		}


				}


		function startTime() {
			
	        if (timerOn == false) {
                timerID=setTimeout( "hideAll()" , timecount);
                timerOn = true;

	        }

		}


		function stopTime() {
	        if (timerOn) {
    	        clearTimeout(timerID);
                timerID = null;
                timerOn = false;
	        }
		}


window.onload=init();

