﻿function addLoadEvent(func){
	var oldonload = window.onload;
	if(typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}


function initialhide(){
	hide("upforbid");
	hide("chartByProgram");

}

function hide(section){

	if (!document.getElementById) return false;
	if (!document.getElementById(section)) return false;

	document.getElementById(section).style.display="none";
}

function show(section){
	if (!document.getElementById) return false;
	if (!document.getElementById(section)) return false;

	document.getElementById(section).style.display="block";
}

function switchTab(tabOn,tabOff){
	if (!document.getElementById) return false;
	if (!document.getElementById(tabOn)) return false;
	if (!document.getElementById(tabOff)) return false;
	
	document.getElementById(tabOn).className="selected";
	document.getElementById(tabOff).className="";
}

addLoadEvent(initialhide);