function reDo(){ window.location.reload() }
    window.onresize = reDo;


    //Define global variables

	    var timerID = null;
		var timerOn = false;
		var timecount = 500;
		var what = null;
		var newbrowser = true;
		var check = false;

    	function init(){
    	//  alert ("Running Init");
          if (document.layers) {
                      //  alert ("Running Netscape 4");
                        layerRef="document.layers";
                        styleSwitch="";
                        visibleVar="block";
			screenSize = window.innerWidth;
			what ="ns4";


          }else if(document.all){
                      //  alert ("Running IE");
                        layerRef="document.all";
                        styleSwitch=".style";
                        visibleVar="block";
			screenSize = document.body.clientWidth + 18;
			what ="ie";

		  }else if(document.getElementById){
                      //  alert ("Running Netscape 6");
                        layerRef="document.getElementByID";
                        styleSwitch=".style";
                        visibleVar="block";
			what="moz";
		  
		  }else{
		  	//alert("Older than 4.0 browser.");
			what="none";
			newbrowser = false;
		  }
		  
		check = true;
  	 	}

	// Turns the layers on and off
        function show1(layerName){
        	if(check){
        		if (what =="none"){
        			return;
        			}
	        	else if (what == "moz"){
        			document.getElementById(layerName).style.display="block";
        			}
        		else{
                  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="block"');
                  }
		 }
        	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.display="none";
        			}
        		else{
                  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="none"');
				}
        
        	}
        	else {// alert ("Please wait for the page to finish loading.");
        		return;}
        }


	function hideAll(){
//-----------------------------------------------------------------------SCHOOLS
        hideLayer('mapperleyplains');
        hideLayer('textBoxTopMapperley');
        hideLayer('textBoxMapperley');
        hideLayer('stChristophers');
        hideLayer('textBoxTopstChristophers');
        hideLayer('textBoxstChristophers');
        hideLayer('Northampton');
        hideLayer('textBoxTopNorthampton');
        hideLayer('textBoxNorthampton');
        hideLayer('stMatthews');
        hideLayer('textBoxTopstMatthews');
        hideLayer('textBoxstMatthews');
        hideLayer('Chesterfield');
        hideLayer('textBoxTopChesterfield');
        hideLayer('textBoxChesterfield');
        hideLayer('stAloysius');
        hideLayer('textBoxTopstAloysius');
        hideLayer('textBoxstAloysius');
        hideLayer('Mossbourne');
        hideLayer('textBoxTopMossbourne');
        hideLayer('textBoxMossbourne');
        hideLayer('Portway');
        hideLayer('textBoxTopPortway');
        hideLayer('textBoxPortway');
        hideLayer('Harefield');
        hideLayer('textBoxTopHarefield');
        hideLayer('textBoxHarefield');
        hideLayer('AmericanSchool');
        hideLayer('textBoxTopAmericanSchool');
        hideLayer('textBoxAmericanSchool');
        hideLayer('Lisbjergskole');
        hideLayer('textBoxTopLisbjergskole');
        hideLayer('textBoxLisbjergskole');
        hideLayer('Hague');
        hideLayer('textBoxTopHague');
        hideLayer('textBoxHague');
        hideLayer('Thuringia');
        hideLayer('textBoxTopThuringia');
        hideLayer('textBoxThuringia');
        hideLayer('Grundschule');
        hideLayer('textBoxTopGrundschule');
        hideLayer('textBoxGrundschule');
//-----------------------------------------------------------------------COLLEGES
        hideLayer('Derby');
        hideLayer('textBoxTopDerby');
        hideLayer('textBoxDerby');
        hideLayer('Telford');
        hideLayer('textBoxTopTelford');
        hideLayer('textBoxTelford');
        hideLayer('TrinityAll');
        hideLayer('textBoxTopTrinityAll');
        hideLayer('textBoxTrinityAll');
        hideLayer('Redcar');
        hideLayer('textBoxTopRedcar');
        hideLayer('textBoxRedcar');
        hideLayer('Imperial');
        hideLayer('textBoxTopImperial');
        hideLayer('textBoxImperial');
        hideLayer('Brockenhurst');
        hideLayer('textBoxTopBrockenhurst');
        hideLayer('textBoxBrockenhurst');
        hideLayer('Farnborough');
        hideLayer('textBoxTopFarnborough');
        hideLayer('textBoxFarnborough');
        hideLayer('Kennemer');
        hideLayer('textBoxTopKennemer');
        hideLayer('textBoxKennemer');
        hideLayer('TechnicalCollege');
        hideLayer('textBoxTopTechnicalCollege');
        hideLayer('textBoxTechnicalCollege');
        hideLayer('TechnicalCollegePuch');
        hideLayer('textBoxTopTechnicalCollegePuch');
        hideLayer('textBoxTechnicalCollegePuch');
        hideLayer('Hamilton');
        hideLayer('textBoxTopHamilton');
        hideLayer('textBoxHamilton');
//-----------------------------------------------------------------------UNIVERSITIES
        hideLayer('Hatchcroft');
        hideLayer('textBoxTopHatchcroft');
        hideLayer('textBoxHatchcroft');
        hideLayer('Hertfordshire');
        hideLayer('textBoxTopHertfordshire');
        hideLayer('textBoxHertfordshire');
        hideLayer('Portsmouth');
        hideLayer('textBoxTopPortsmouth');
        hideLayer('textBoxPortsmouth');
        hideLayer('Newcastle');
        hideLayer('textBoxTopNewcastle');
        hideLayer('textBoxNewcastle');
        hideLayer('Plymouth');
        hideLayer('textBoxTopPlymouth');
        hideLayer('textBoxPlymouth');
        hideLayer('Sheffield');
        hideLayer('textBoxTopSheffield');
        hideLayer('textBoxSheffield');
        hideLayer('EastLondon');
        hideLayer('textBoxTopEastLondon');
        hideLayer('textBoxEastLondon');
        hideLayer('Glasgow');
        hideLayer('textBoxTopGlasgow');
        hideLayer('textBoxGlasgow');
        hideLayer('Massey');
        hideLayer('textBoxTopMassey');
        hideLayer('textBoxMassey');
        hideLayer('Birmingham');
        hideLayer('textBoxTopBirmingham');
        hideLayer('textBoxBirmingham');
        hideLayer('London');
        hideLayer('textBoxTopLondon');
        hideLayer('textBoxLondon');
        hideLayer('Copenhagen');
        hideLayer('textBoxTopCopenhagen');
        hideLayer('textBoxCopenhagen');
        hideLayer('Singapore');
        hideLayer('textBoxTopSingapore');
        hideLayer('textBoxSingapore');
        hideLayer('WesternSydney');
        hideLayer('textBoxTopWesternSydney');
        hideLayer('textBoxWesternSydney');
	}