function launch2(file,ww,wh,wind) {
	var v=parseInt(navigator.appVersion);
	isNetscape=navigator.appName.indexOf('Netscape')>=0;
	isExplorer=navigator.appName.indexOf('Explorer')>=0;
	positionCode='';
	if(v>=4){
		sw =screen.width;           
		sh =screen.height;
		wbx=Math.round((sw-ww)*0.50);  
		wby=Math.round((sh-wh)/3);
		if(isExplorer) positionCode='left='+wbx+',top='+wby+',';
		if(isNetscape) positionCode='screenX='+wbx+',screenY='+wby+',';
	}
	params='scrollbars=1,location=1,status=1,width='+ww+',height='+wh+','+positionCode+'offscreenBuffering=0,alwaysRaised=yes,resizable=yes';
	wind=window.open(file,wind,params);
	wind.focus();
};

function launch(file,ww,wh) {
	var v=parseInt(navigator.appVersion);
	isNetscape=navigator.appName.indexOf('Netscape')>=0;
	isExplorer=navigator.appName.indexOf('Explorer')>=0;
	positionCode='';
	if(v>=4){
		sw =screen.width;           
		sh =screen.height;
		wbx=Math.round((sw-ww)*0.50);  
		wby=Math.round((sh-wh)/3);
		if(isExplorer) positionCode='left='+wbx+',top='+wby+',';
		if(isNetscape) positionCode='screenX='+wbx+',screenY='+wby+',';
	}
	params='scrollbars=1,width='+ww+',height='+wh+','+positionCode+'offscreenBuffering=0,alwaysRaised=yes,resizable=no';
	zoom=window.open(file,'zoom',params);
};
function mover(what) {
	tmp = what.style.backgroundColor; what.style.backgroundColor = "#B9B9B9";
};
function mout(what) {
	what.style.backgroundColor = tmp;
};
//--------------

function getObject(id) {
	if (document.layers)
		return document.layers[id];
	else if (document.all)
		return document.all[id];
	else if (document.getElementById(id))
		return document.getElementById(id);
	
	return null;
};

function getStyle(id) {
	var object = getObject(id);
	return object.className;
};

function setStyle(id, style) {
	var object = getObject(id);
	object.className = style;
};

function triggerStyle(id, style1, style2) {
	if (getStyle(id) == style1)
		setStyle(id, style2);
	else
		setStyle(id, style1);
};

//pārslēgt elementa redzamību
var x=1;
function toggle(elem) {
	if(x==0) { document.getElementById(elem).style.display = 'none'; x=1; }
	else { document.getElementById(elem).style.display = ''; x=0; };
};