var currentPanel;
function showPanel(panelNum){
	//hide visible panel, show selected panel, set tab
              if (currentPanel != null) {
		hidePanel();
	}
	document.getElementById('panel'+panelNum).style.visibility = 'visible';
	currentPanel = panelNum;
	setState(panelNum);
}
function hidePanel(){
	//hide visible panel, unhilite tab
	document.getElementById('panel'+currentPanel).style.visibility = 'hidden';
	document.getElementById('tab'+currentPanel).style.backgroundColor = '';
	document.getElementById('tab'+currentPanel).style.color = '';
}
function changeFrame(){
	//hide visible panel, unhilite tab
	document.getElementById('mainFrame').style.overflow = 'visible';
}
function changeFrame2(){
	//hide visible panel, unhilite tab
	document.getElementById('mainFrame').style.overflow = 'hidden';
}
function showFrame(){
	//hide visible panel, show selected panel, set tab
              if (currentPanel != null) {
		hidePanel();
	}
	document.getElementById('mainFrame').style.visibility = 'visible';

}
function setState(tabNum){
	if(tabNum==currentPanel){
		document.getElementById('tab'+tabNum).style.backgroundColor = '';
		document.getElementById('tab'+tabNum).style.color = '';
	}else{
		document.getElementById('tab'+tabNum).style.backgroundColor = '';
		document.getElementById('tab'+tabNum).style.color = '';
	}
}
function hover(tab){
	tab.style.backgroundColor = '';
}
function changeClass(id, newClass) {

identity=document.getElementById(id);

identity.className=newClass;

}

function toggleVis() {

	document.getElementById('mainFrame').style.overflow = 'hidden';

}


function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=500,left = 250,top = 100');");
}

function changeFrameVis(){
	//hide visible panel, unhilite tab
	document.getElementById('fadetable').style.visibility = 'hidden';
}

