var panels = new Array('panel1', 'panel2', 'panel3', 'panel4');
var selectedTab;
function showPanel(tab, name)
{
if (selectedTab) 
{
selectedTab.style.paddingTop = '';
selectedTab.style.paddingBottom = '';
}
selectedTab = tab;
selectedTab.style.paddingTop = '6px';
for(i = 0; i < panels.length; i++)
{
document.getElementById(panels[i]).style.display = (name == panels[i]) ? 'block':'none';
}
return false;
}

sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" ie_does_hover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" ie_does_hover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



function switchMinmax (id) {

	arrMinmax = new Array ();
	arrMinmax[0] = "boxIntro";
	arrMinmax[1] = "boxTemp";
	arrMinmax[2] = "boxBar";
	arrMinmax[3] = "boxHum";
	arrMinmax[4] = "boxRain";
	arrMinmax[5] = "boxWinddir";
	arrMinmax[6] = "boxWind";
	arrMinmax[7] = "boxRietplas";
	arrMinmax[8] = "boxWindchill";
	arrMinmax[9] = "boxGrondwater";
	arrMinmax[10] = "boxDewpoint";
	arrMinmax[11] = "boxUV";
	arrMinmax[12] = "boxSolar";
	arrMinmax[13] = "boxOpbrengst";	
	arrMinmax[14] = "boxZonuren";
	arrMinmax[15] = "boxET";
	arrMinmax[16] = "boxGraaddagen";	
	arrMinmax[17] = "boxSchaatsen";	

	for(val in arrMinmax) {
		if (document.getElementById (arrMinmax[val])) {
			document.getElementById (arrMinmax[val]).style.display='none';
		}
	}
	if (document.getElementById (id)) {
		document.getElementById (id).style.display='';
	}
}

function switchPic (id) {

	arrPic = new Array ();
	arrPic[0] = "picDavis6152";
	arrPic[1] = "picIss";
	arrPic[2] = "picWindmeter";
	arrPic[3] = "picAnonemeter";
	arrPic[4] = "picTippingbucket";
	arrPic[5] = "picZonnemeter";
	arrPic[6] = "picDatalogger";
	arrPic[7] = "picWeatherlink";
	arrPic[8] = "picEnvoy";
	arrPic[9] = "picRepeater";
	arrPic[10] = "picDrijver";
	arrPic[11] = "picTempstation";

	for(val in arrPic) {
		if (document.getElementById (arrPic[val])) {
			document.getElementById (arrPic[val]).style.display='none';
		}
	}
	if (document.getElementById (id)) {
		document.getElementById (id).style.display='';
	}

}

function switchGraph (id) {

	arrGraph = new Array ();
	arrGraph[0] = "graphTemp";
	arrGraph[1] = "graphWindchill";
	arrGraph[2] = "graphBarometer";
	arrGraph[3] = "graphHumidity";
	arrGraph[4] = "graphWindspeed";
	arrGraph[5] = "graphWinddirection";
	arrGraph[6] = "graphHiwindspeed";
	arrGraph[7] = "graphRain";
	arrGraph[8] = "graphRainrate";

	for(val in arrGraph) {
		if (document.getElementById (arrGraph[val])) {
			document.getElementById (arrGraph[val]).style.display='none';
		}
	}
	if (document.getElementById (id)) {
		document.getElementById (id).style.display='';
	}
}