<!--
function get_top_left(width, height){
	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 scroll = 0;
	var l = winL + winW/2 - width/2;
	var t = winT + winH/2 - height/2;
	
	
  	if(screen.width <= width){
  		width=screen.width;
  	}
  	if(screen.height <= height){
  		height=screen.height;
 	 	var t = 0;
  		var scroll = 1;
  	}
	return Array(t,l);
}

function openwin(uri,title,w,h){
		if(w){wwidth = w;}else{	wwidth = 380;}
		if(h){wheight = h; }else{ wheight = 380;}
		xy = get_top_left(wwidth, wheight);
		wleft = xy[1];
		wtop = xy[0];
		wnd = window.open(uri, "sendtofriend", "width="+wwidth+", height="+wheight+", left="+wleft+", top="+wtop+", toolbar=no, location=no, scrollbars=yes, status=no, menubar=no, resizable=no, directories=no");
	}

/* 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);
}

/* 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=auto,resizable=1,width='+width+',height='+height);
	mewin.focus();
}

/* 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 };
}

-->
