var ids=new Array('menu1','menu2');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
 
function pw(url){
var rndURL = (1000*Math.random());
h=350;
w=350;
newWindow = window.open(url,'','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=no,menuBar=no,scrollBars=NO');
newWindow.focus(); 
}
function fs(url){
var rndURL = (1000*Math.random());
h=screen.height;
w=screen.width;
newWindow = window.open(url,'','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=no,menuBar=no,scrollBars=NO');
newWindow.focus(); 
}

function pw2(url){
var rndURL = (1000*Math.random());
h=550;
w=170;
newWindow = window.open(url,'','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=no,menuBar=no,scrollBars=Yes');
newWindow.focus(); 
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

function ShowHide(id, visibility) {
obj = document.getElementsByTagName("div");
obj[id].style.visibility = visibility;
}

function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.form1.picture.options[document.form1.picture.selectedIndex].value
}
function potvrda(pitanje,url) {
//	alert(url);
	var answer = confirm(pitanje)
	if (answer){
	 
		window.location =url; 
	}
	else{
		 
	}
}
function maliprozor(url){
var rndURL = (1000*Math.random());
w=850;
h=650;

newWindow = window.open(url,'','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=no,menuBar=no,scrollBars=YES');
newWindow.focus(); 
}