<!--
/* CSS handeling function */
function set_class(placeholder) {
	if(document.all && document.getElementsByTagName){
		navRoot = document.getElementById(placeholder)
		list_items = navRoot.getElementsByTagName("LI");
		for(i=0; i<list_items.length; i++ ){
			node = list_items[i];
			node.onmouseover=function() { this.className+=" over"; }
			node.onmouseout=function() { this.className=this.className.replace(" over", ""); }
		}
	}
}

/* Poll voting + results on remote server */
function remote_vote(poll_vote){
	var service_url = "http://www.spletna.net/grabs/logistika/voting/index.php";
	if(poll_vote != false ){
		service_url += "?POLL_VOTE=" + poll_vote;
	}
		p_width	= 400;	p_height = 300;
		p_left	= (screen.width/2) - p_width/2;
		p_top	= (screen.height/2) - p_height/2 - 30;
	var w_config = 'toolbar=0,location=0,top='+p_top+',left='+p_left+',directories=0,status=0,'+'menubar=0,scrollbars=autoe,resizable=0,width='+p_width+',height='+p_height;
	
	hwnd = window.open(service_url, 'poll', w_config);
}

function open_window(url, width, height, scroll){
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
	  		winW = window.innerWidth;
	  		winH = window.innerHeight;
	 		winL = window.screenX;
	 		winT = window.screenY;
	 	}
	 	if (navigator.appName.indexOf("Microsoft")!=-1) {
	  		winW = document.body.offsetWidth;
	  		winH = document.body.offsetHeight;
	  		winL = window.screenLeft;
	  		winT = window.screenTop;
	 	}
	}
	
	var l = winL + winW/2 - width/2 - 100;
	var t = winT + winH/2 - height/2 - 100;
	
	mewin = window.open(url,'picture','toolbar=0,location=0,top='+t+',left='+l+',directories=0,status=0,menubar=0,scrollbars='+scroll+',resizable=0,width='+width+',height='+height);
	mewin.focus();
	
	return false;
}

function open_window1(url, width, height, scroll){
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
	  		winW = window.innerWidth;
	  		winH = window.innerHeight;
	 		winL = window.screenX;
	 		winT = window.screenY;
	 	}
	 	if (navigator.appName.indexOf("Microsoft")!=-1) {
	  		winW = document.body.offsetWidth;
	  		winH = document.body.offsetHeight;
	  		winL = window.screenLeft;
	  		winT = window.screenTop;
	 	}
	}
	
	var l = winL + winW/2 - width/2 - 100;
	var t = winT + winH/2 - height/2 - 100;
	
	mewin = window.open(url,'picture','toolbar=0,location=0,top='+t+',left='+l+',directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height);
	mewin.focus();
	
	return false;
}

function open_picture(pid){
	
	width = 160;
	height = 100;
	
	uri = "picture.php?ID="+pid;

	open_window(uri, width, height, 0);
	
	return false;
}


/* open gallery popup window */
function gallery_zoom(url,name,width,height){
  	var l = (screen.width - width) / 2;
  	if(screen.width <= width){
  		width=screen.width;
  	}
  	if(screen.height <= height){
  		height=screen.height;
 	 	var t = 0;
  		var scroll = 1;
  	}else{
  		var t = (screen.height - height) / 2;
  		var scroll = 1;
  	}
	mewin=window.open(url,name,'toolbar=0,location=0,top='+t+',left='+l+',directories=0,status=0,'+'menubar=0,scrollbars='+scroll+',resizable=1,width='+width+',height='+height);
}

/* rezise window to optimal width/height */
function setClientSize(W, H){
    window.resizeTo(W, H);


    var cp = document.createElement("div");
    cp.style.position = "absolute";
    cp.style.width = "0px";
    cp.style.height = "0px";
    cp.style.right = "0px";
    cp.style.bottom = "0px";

    document.body.appendChild(cp);

    var current_width = cp.offsetLeft;
    var current_height = cp.offsetTop;

    var dw = W - current_width;
    var dh = H - current_height;

    window.resizeBy(dw, dh);
	window.moveTo(((screen.width/2)-((W + dw)/2)),(((screen.height/2)-((H+dh)/2)-30)));

    document.body.removeChild(cp);

    return { missed_width: dw, missed_height: dh };
}

function toggle(obj,state){
	mysrc = obj.src;
	if(state == '1'){
		if(mysrc.indexOf("_over") == -1){
			obj.src = mysrc.replace(".gif","_over.gif");
		}
	}else{
		obj.src = mysrc.replace("_over","");
	}
}

function text(type){
	obj = document.getElementsByTagName("body")[0];
	switch(type){
		case 0: obj.style.fontSize = '9px'; break;
		case 1: obj.style.fontSize = '11px';break;
		case 2: obj.style.fontSize = '13px';break;
		default: break;
	}
}

onload = function(){
	if(document.getElementById("galerija")){
		document.getElementById("galerija").style.display = "none";
		document.getElementById("galerija").style.display = "block";
	}
}


document.oncontextmenu = function(e) { 
	if (typeof(e) != "undefined") {
		if (e.target.nodeName=="IMG" || e.target.id=="visual") {
/*			e.target.src="images/noise.png";
			e.target.style.background="url(images/noise.png)";*/
			return false;
		}
	} else if (event.srcElement.nodeName=="IMG" || event.srcElement.id=="visual") {
/*			event.srcElement.src="images/noise.png";
			event.srcElement.style.background="url(images/noise.png)";*/
			return false;	
	}
}
if (document.layers) {
	window.captureEvents(Event.MOUSEDOWN);
	window.onmousedown = function(e){
		if (typeof(e) != "undefined") {
			if (e.target.nodeName=="IMG" || e.target.id=="visual") {
/*				e.target.src="images/noise.png";
				e.target.style.background="url(images/noise.png)";*/
				return false;
			}
		} else if (event.srcElement.nodeName=="IMG" || event.srcElement.id=="visual") {
/*				event.srcElement.src="images/noise.png";
				event.srcElement.style.background="url(images/noise.png)";*/
				return false;	
		}
	}
} else {

}
 

-->