function navSendUrl(where) {
	window.location=where;
}

var activeSub=0;
var SubNum=0;

function reDo(){ window.location.reload() }
    window.onresize = reDo;

    //Define global variables
	    var timerID = null;
		var timerOn = false;
		var timecount = 1000;
		var what = null;
		var newbrowser = true;
		var check = false;
		//Add or remove main drop down menus here
		var mainmenus = new Array('1','2','3');

    	function init(){
    	//set-up and browser sniffer
          if (document.layers) {
          //  alert ("Running Netscape 4");
          	layerRef="document.layers";
          	styleSwitch="";
          	visibleVar="show";
			screenSize = window.innerWidth;
			what ="ns4";
		
          }else if(document.all){
                      // alert ("Running IE");
                        layerRef="document.all";
                        styleSwitch=".style";
                        visibleVar="visible";
			screenSize = document.body.clientWidth + 18;
			what ="ie";

		  }else if(document.getElementById){
            //  alert ("Running Netscape 6");
                 layerRef="document.getElementByID";
                 styleSwitch=".style";
                 visibleVar="visible";
			what="moz";
		  
		  }else{
		  	//alert("Older than 4.0 browser.");
                layerRef="document.layers";
                styleSwitch=".style";
                visibleVar="visible";
				what="none";
				newbrowser = false;
		  }
		check = true;
  	 	}

	// Turns the layers on and off
        function showLayer(layerName){
		//make the menu buttons rollover (only if it is one of the primary layers being turned on)
			layernum=layerName.charAt(5);
			layerchange="document.nav0" + layernum;
			eval(layerchange).src="/images/nav/nav0" + layernum + "_on.gif";
	//Turn the layers on and off
		if(check){
        		if (what =="none"){
        			return;
        			}
	        	else if (what == "moz"){
        			document.getElementById(layerName).style.visibility=visibleVar;
        			}
				else if (what == "ns4"){
        			document.layerName.visibility=visibleVar;
        		} else {
                  	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility=visibleVar');
			}
		 } else {
			// alert ("Please wait for the page to finish loading.");
        		return;
		}
	}

        function hideLayer(layerName){
			if(check){
        		if (what =="none"){
        			return;
        			}
        		else if (what == "moz"){
        			document.getElementById(layerName).style.visibility="hidden";
        			}
				else if (what == "ns4"){
        			document.layerName.visibility="hidden";
        			}
        		else{
                  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
				}
        	}
        	else {
        		return;
			}
        }


	function hideAll(){
		for (var i=0; i < mainmenus.length; i++) {
				hideLayer("layer" + mainmenus[i]);
				//make the rollovers rolloff
				obj = "document.nav0" + mainmenus[i];
				eval(obj).src="/images/nav/nav0" + mainmenus[i] + ".gif";
			}
	if (sectname=="someonespecial") document.nav01.src="/images/nav/nav01_on.gif";
	if (sectname=="certaintime") document.nav02.src="/images/nav/nav02_on.gif";
	if (sectname=="specificevent") document.nav03.src="/images/nav/nav03_on.gif";
	}


		function navroll(whichnav, state) {
		//Makes the menu system roll on(1) and off(0)
			if (state==0) {
			//Main menu rolloff
				whichnav.className='navoff';
			}
			if (state==1) {
			//Main menu rollon
				whichnav.className='navon';

			}
		}

		function startTime() {
	        if (timerOn == false) {
                timerID=setTimeout( "hideAll()" , timecount);
                timerOn = true;
	        }
		}


		function stopTime() {
	        if (timerOn) {
    	        clearTimeout(timerID);
                timerID = null;
                timerOn = false;
	        }
		}

		function onLoad(){
			init();
		}
		
function rollon(which) {
	eval("document."+which).src="/images/nav/" + which + "_on.gif";
}

function rolloff(which) {	
	eval("document."+which).src="/images/nav/" + which + ".gif";
}