function popUp(URL, width, height) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+width+",height="+height+"');");
}

function hideAll(counter){
	for (i=1;i<=counter;i++){
		document.getElementById('tab'+i).style.display = 'none';
		document.getElementById('tab'+i).style.visibility = 'hidden';
	}
}

function hide(layerid){
	if(document.getElementById('tab'+layerid).style.display == 'block'){
		document.getElementById('tab'+layerid).style.display = 'none';
		document.getElementById('tab'+layerid).style.visibility = 'hidden';
	}
}
function changeLayer(bez,layerid,counter){
	if (layerid==null || layerid==''){
		layerid = 1;
	}
	for (i=1;i<=counter;i++){
		document.getElementById(bez+i).style.display = 'none';
		document.getElementById(bez+i).style.visibility = 'hidden';
	}
	document.getElementById(bez+layerid).style.visibility = 'visible';
	document.getElementById(bez+layerid).style.display = 'block';		
}		
function showLayer(bez,layerid,counter){
	if (layerid==null || layerid==''){
		layerid = 1;
	}
	if (document.getElementById('tab'+layerid).style.display == 'block'){
		document.getElementById('tab'+layerid).style.visibility = 'hidden';
		document.getElementById('tab'+layerid).style.display = 'none';
	}
	else{
		document.getElementById('tab'+layerid).style.visibility = 'visible';
		document.getElementById('tab'+layerid).style.display = 'block';
	}	

}
function popUpSmall(url,winname){
	win = window.open(url,winname,'left=200,top=200,width=200,height=200,menubar=no,scrollbars=no,toolbar=no,resizable=no');
}

