﻿// return "id" object on all browsers
function getObject(id) {
	if(document.getElementById) {
		obj = document.getElementById(id);
	}
	else if(document.all) {
		obj = document.all.item(id);
	}
	else {
		obj = null;
	}
	return obj;
}
// show "pane#" and set "tab#" as active
function switchTab(id,box) {
	hideTab(box);
	if(box == 1) {
		activeTab1 = id;
	}
	else {
		activeTab2 = id;
	}
	if(id == 1 || id == 3) {
		getObject("tabsTable" + box).className = "activeLeft";
	}
	else {
		getObject("tabsTable" + box).className = "activeRight";
	}
	getObject("pane" + id).className = "tabPaneActive";
}
// hide active pane
function hideTab(box) {
	if(box == 1) {
		getObject("pane" + activeTab1).className = "tabPane";
	}
	else {
		getObject("pane" + activeTab2).className = "tabPane";
	}
}
// set initial tabs
activeTab1 = 1;
activeTab2 = 3;