function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

/* skripta za css menu */

/*    startList = function() {
        if (document.all&&document.getElementById) {
            navRoot = document.getElementById("dmenu");
            for (i=0; i<navRoot.childNodes.length; i++) {
                node = navRoot.childNodes[i];
                if (node.nodeName=="LI") {
                    node.onmouseover=function() {
                        this.className+=" over";
                    }
                    node.onmouseout=function() {
                        this.className=this.className.replace(" over", "");
                    }
                }
            }
        }
    }
    window.onload=startList;*/

function menuFix() {
	var sfEls = document.getElementById("dmenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
		this.className+=(this.className.length>0? " ": "") + "over";
		}
		// event added to keep menu items from disappearing
		sfEls[i].onMouseDown=function() {
		this.className+=(this.className.length>0? " ": "") + "over";
		}
		// event added to keep menu items from disappearing
		sfEls[i].onMouseUp=function() {
		this.className+=(this.className.length>0? " ": "") + "over";
		}
		sfEls[i].onmouseout=function() {
		this.className=this.className.replace(new RegExp("( ?|^)over\\b"), "");
		}
	}
}
window.onload=menuFix;