    function updateSiteDescription(siteabbr,title,desc) {
        //update image - siteabbr is 5 chars
        document.getElementById('site_desc_image').setAttribute("src", 'images/sitedesc/' + siteabbr + '_site_desc.jpg');
        //update title 
        document.getElementById('sidebar_header_wide').innerHTML = '<h3>' + title + '</h3>';
        //update description
        document.getElementById('image-description').innerHTML = desc;
    }

    function refreshCurrentPic24() {
        if (!document.getElementById('ctl00_ContentPlaceHolderMain_image_main')) return true;
        var site = document.location.search.substring(1).split('=')[1];
        var placeholder = document.getElementById('ctl00_ContentPlaceHolderMain_image_main');
        if (placeholder.nodeName != "IMG") return true;
        placeholder.setAttribute("src", 'images/photos-24/' + site + '_24.jpg');
        return false;
    }

    function openNewWindow(theURL,winName,features) {
	  window.open(theURL,winName,features);
    }

    function openHiResWindow() {
      var site = document.location.search.substring(1).split('=')[1];
      window.open('images/photos-large/' + site + '_large.jpg', site, 'status=yes,scrollbars=yes,resizable=yes,width=700,height=500');
    }

    function openZipWindow() {
        var site = document.location.search.substring(1).split('=')[1];
        window.open('images/photos-zip/' + site + '.zip', site, 'status=yes,scrollbars=yes,resizable=yes,width=700,height=500');
    }

    function openRealTimeWindow() {
        var site = document.location.search.substring(1).split('=')[1];
        window.location='fstemplate.aspx?site=' + site;
    }

    function open24HourWindow() {
        var site = document.location.search.substring(1).split('=')[1];
        window.location='24.aspx?site=' + site;
    }

    function openN100Window() {
        var site = document.location.search.substring(1).split('=')[1];
        window.location = 'n100.aspx?site=' + site;
    }

    function openW126Window() {
        var site = document.location.search.substring(1).split('=')[1];
        window.location = 'w126.aspx?site=' + site;
    }
    
    function openPristineWindow() {
        var site = document.location.search.substring(1).split('=')[1];
        window.open('images/pristine/' + site + '_pristine_large.jpg', site, 'status=yes,scrollbars=yes,resizable=yes,width=700,height=500');
    }
    
   	function standard() {
		document.getElementById("meteorology-metric").style.display="none";
		document.getElementById("meteorology-standard").style.display="block";
	}
	
	function metric() {
		document.getElementById("meteorology-metric").style.display="block";
		document.getElementById("meteorology-standard").style.display="none";
	}

	function currentstandard() {
	    document.getElementById("currentMeteorology-metric").style.display = "none";
	    document.getElementById("currentMeteorology-standard").style.display = "block";
	}

	function currentmetric() {
	    document.getElementById("currentMeteorology-metric").style.display = "block";
	    document.getElementById("currentMeteorology-standard").style.display = "none";
	}
	
	function togglezoom() {
		// hide other layers
		document.getElementById("mapit").style.display="none";
		document.getElementById("landmarks").style.display="none";
		// check status of zoom and toggle
		if (document.getElementById("image_main").style.display != "none") {
			document.getElementById("image_main").style.display="none";
			document.getElementById("image_zoomed").style.display="block";
		} else {
			document.getElementById("image_main").style.display="block";
			document.getElementById("image_zoomed").style.display="none";
		}
	}
	
	function togglelandmarks_old() {
		// hide higher layers, show image_main
		document.getElementById("mapit").style.display="none";
		document.getElementById("image_main").style.display="block";
		document.getElementById("image_zoomed").style.display="none";
	// check status of landmarks and toggle
		if (document.getElementById("landmarks").style.display != "block") {
			document.getElementById("landmarks").style.display="block";
		} else {
			document.getElementById("landmarks").style.display="none";
		}
	}

	function togglelandmarks24_old() {
	    // hide higher layers, show image-main
	    document.getElementById("mapit").style.display = "none";
	    document.getElementById("image_pristine").style.display = "block";
	    // check status of landmarks and toggle
	    if (document.getElementById("landmarks").style.display != "block") {
	        document.getElementById("landmarks").style.display = "block";
	    } else {
	        document.getElementById("landmarks").style.display = "none";
	    }
	}

	function togglelandmarks() {
	    // highest layer, leave all lower layers as they are
	    // check status of map and toggle
	    if (document.getElementById("landmarks").style.display != "block") {
	        document.getElementById("landmarks").style.display = "block";
	    } else {
	        document.getElementById("landmarks").style.display = "none";
	    }
	}

	function togglelandmarks24() {
	    // highest layer, leave all lower layers as they are
	    // check status of map and toggle
	    if (document.getElementById("landmarks").style.display != "block") {
	        document.getElementById("landmarks").style.display = "block";
	       
	    } else {
	    document.getElementById("landmarks").style.display = "none";
	   
	    }
	}
	
	function togglemap() {
	    // highest layer, leave all lower layers as they are
	    // check status of map and toggle
	    if (document.getElementById("mapit").style.display != "block") {
	        document.getElementById("mapit").style.display = "block";
	      
	    } else {
	    document.getElementById("mapit").style.display = "none";
	    }
	}

	function togglemap24() {
	    // highest layer, leave all lower layers as they are
	    // check status of map and toggle
	    if (document.getElementById("mapit").style.display != "block") {
	        document.getElementById("mapit").style.display = "block";
	    } else {
	    document.getElementById("mapit").style.display = "none";
	   
	    }
	}
	
	function resetimages() {
		// reset all layers to default status
		document.getElementById("image_main").style.display="block";
		document.getElementById("image_zoomed").style.display="none";
		document.getElementById("mapit").style.display="none";
		document.getElementById("landmarks").style.display="none";
	}

	function resetimages24() {
	    // reset all layers to default status
	    document.getElementById("image_pristine").style.display = "block";
	    document.getElementById("mapit").style.display = "none";
	    document.getElementById("landmarks").style.display = "none";
	}
