/****************************************

Change tabs

****************************************/


function setvisible(which) {
	for (var i = 0; i < numberoftabs; i++) {
		$('tab_' + i).className = (i == which) ? 'selected' : '';
		$('content_' + i).className = (i == which) ? 'visible' : 'invisible';
	}
	activetab = which;
	if (navigator.appName == 'Microsoft Internet Explorer') {
		objektum.setAttribute('activetab', activetab);
		objektum.save('odatastore');
	}
}


/****************************************

Load tab data, activate tab

****************************************/


function loadtabs() {
	if (!numberoftabs)
		numberoftabs = 5;
	if (navigator.appName == 'Microsoft Internet Explorer') {
		objektum.load('odatastore');
		activetab = objektum.getAttribute('activetab');
	}
	if (activetab === undefined || activetab === null) {
		activetab = 0;
	}
	if (whichtab !== undefined) {
		activetab = whichtab;
	}
	setvisible(activetab);
}