function karta(url){
var rndURL = (1000*Math.random());
h=650;
w=850;
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 promijeni(){
var h;
var w;
var rez_h;
 var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
w= myWidth;
h= myHeight; 
rez_h=h;
rez_w=w;
if( typeof( window.innerWidth ) == 'number' ) {
// alert("nonIE");

document.getElementById('nav').style.top=136 + 'px';
document.getElementById('nav').style.height=rez_h -100 + 'px';
document.getElementById('nav_scroll').style.height=rez_h -200+26 + 'px';
document.getElementById('karta').style.top=126+ 'px';
document.getElementById('karta').style.height=rez_h -200+56 + 'px';
document.getElementById('karta').style.width=rez_w -400+82 + 'px';
document.getElementById('info').style.width=rez_w -400+62 + 'px';
  }else{
// alert("IE");
document.getElementById('nav').style.top=136;
document.getElementById('nav').style.height=rez_h -100;
document.getElementById('nav_scroll').style.height=rez_h -200+26;
document.getElementById('karta').style.top=126;
document.getElementById('karta').style.height=rez_h -200+56;
document.getElementById('karta').style.width=rez_w -400+82;
document.getElementById('info').style.width=rez_w -400+62;

}
}
 function switchid(id){	
	hideallids();
	showdiv(id);
}


function linije1(){
	start2();
	}
function linije2(){
	hideall();
	start();
	}
function linije3(){
	start2();
	hideaktive();
	}
function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hideaktive(){
	//loop through the array and hide each element by id
	for (var i=0;i<idso.length;i++){
		hidediv(idso[i]);
	}		  
}
function start(){
	//loop through the array and hide each element by id
	for (var i=0;i<idso.length;i++){
		showdiv(idso[i]);
	}		  
}
function start2(){
	//loop through the array and hide each element by id
	for (var i=0;i<idsx.length;i++){
		showdiv(idsx[i]);
	}		  
}
function hideall(){
	
	//loop through the array and hide each element by id
	for (var i=0;i<idsx.length;i++){
		hidediv(idsx[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';
		}
	}
}



