hzoomWin = null;


//================================================================
//Scripts for Tab panels (SR3.5)
//===============================================================
var tabCount = 1; //initialy only one tab

/*
* Changes the tab-button i to be aktive and the other tab-buttons
* to be inaktive. 0 < i < number of tab-buttons - 1
*/
function changeActiveTab(i) {
	for( j=0; j < tabCount; ++j )
	{
		if( i==j ) { activateTab(j); }
		else { deactivateTab(j); }
	}
}

/*
* Activates the tab-button i and shows it's content panel.
*/
function activateTab(i) {
	var obj = document.getElementById( "tab-bg:"+i );
	if(obj) {obj.className="current";}
	document.getElementById( "tab-body:"+i ).style.display='block';
}

/*
* Deactivates the tab-button i and hides it's content panel.
*/
function deactivateTab(i) {
	var obj = document.getElementById( "tab-bg:"+i );
	if(obj) {obj.className="nix";}
	document.getElementById( "tab-body:"+i ).style.display='none';
}

/*
* Call this function before calling any other function.
* Set parameter i to the number of tab-buttons when calling.
* Initialises the script.
*/
function initTabScript(i) {
	tabCount = i;
}
