/*  Aperura finestre
---------------------------------------------*/
function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function wopen(url,w,h) {
 option="top=0,left=0,toolbar=no,scrollbars=auto,location=no,width="+w+",height="+h;
 newWindow= window.open("","",option);
 newWindow.document.write("<html>");
 newWindow.document.write("<head>");
 newWindow.document.write("<title>Image dettail</title>");
 newWindow.document.write("<meta htto-equiv=\"imagetoolbar\" content=\"no\"><meta http-equiv=\"autosize\" content=\"off\">");
 newWindow.document.write("</head>");
 newWindow.document.write("<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=\"#000000\">");
 newWindow.document.write("<div align=\center\"><a href=\"javascript:window.close()\"><img border=0 alt=\"\nClick for close window\n\" src="+url+" /></a></div>");
 newWindow.document.write("</body></html>");
}
/* jump menu
---------------------------------------------*/
function jumpMenu(targ,selObj,restore) {
  eval(targ+".location=\'"+selObj.options[selObj.selectedIndex].value+"\'");
  if (restore) selObj.selectedIndex=0;
}
/* ceck all ceckbox
<input type="checkbox" onClick="checkAll(this.form,this.checked);" />
---------------------------------------------*/
function checkAll(wotForm,wotState) {
    for (a=0; a<wotForm.elements.length; a++) {
        if (wotForm.elements[a].id.indexOf("delete_") == 0) {
            wotForm.elements[a].checked = wotState ;
        }
    }
}
/* Drop down menu
----------------------------*/
sfHover = function() {
    var sfEls = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");

        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);