/*Vadas */
function popupURL(pURL){html_PopUp(pURL,"winLov",800,600);}
function popupHeightURL(pURL){html_PopUp(pURL,"winLov",800,screen.height);}
function popupWidthURL(pURL){html_PopUp(pURL,"winLov",screen.width,600);}
function popupMaxURL(pURL){html_PopUp(pURL,"winLov",screen.width,screen.height);}


/* Vadas highlight checked row */
function highlight_row(checkBoxElemement,currentRowNum) {
    if(checkBoxElemement.checked==true) {
        for( var j = 0; j < checkBoxElemement.parentNode.parentNode.childNodes.length; j++ ) {
            if (checkBoxElemement.parentNode.parentNode.childNodes[j].tagName=='TD') {
                if(rowActive=='Y') {
                    rowStyle[currentRowNum] = rowStyleHover[currentRowNum];
                } else {
                    rowStyle[currentRowNum] = checkBoxElemement.parentNode.parentNode.childNodes[j].style.backgroundColor;                      
                }
                checkBoxElemement.parentNode.parentNode.childNodes[j].style.backgroundColor = '#ededd6';
            }    
        }
        rowStyleHover[currentRowNum] =  '#CEDFCE';
    } else {
        for( var j = 0; j < checkBoxElemement.parentNode.parentNode.childNodes.length; j++ ) {
            if (checkBoxElemement.parentNode.parentNode.childNodes[j].tagName=='TD') {                      
                checkBoxElemement.parentNode.parentNode.childNodes[j].style.backgroundColor =  rowStyle[currentRowNum];
                rowStyleHover[currentRowNum] =  rowStyle[currentRowNum];
                document.wwv_flow.x02.checked=false;
            }    
        }   
    }
}

function SubmitOnEnter (e) {
var characterCode 
  if(e && e.which){ //if which property of event object is supported (NN4)
    e = e
    characterCode = e.which //character code is contained in NN4's which property
  }
  else{
    e = event
    characterCode = e.keyCode //character code is contained in IE's keyCode property
  }

  if(characterCode == 13)  
    doSubmit('SEARCH');
}

function SubmitOnEnterWhat (E,whatSubmit) {
var characterCode 
  if(e && e.which){ //if which property of event object is supported (NN4)
    e = e
    characterCode = e.which //character code is contained in NN4's which property
  }
  else{
    e = event
    characterCode = e.keyCode //character code is contained in IE's keyCode property
  }

  if(characterCode == 13)  
    doSubmit(whatSubmit);
}

function addBookmark(title,url) {
if (navigator.appName == "Netscape"){
  alert('Ova knjiska oznaka (bookmark) ce se ucitavati u "Sidebaru".\r Da biste to izbjegli, uklonite kvacicu \"Load this bookmark in Sidebar\" u \r"properties"-ima dodane knjiske oznake (desni klik na "bookmark", i potom klik na "Properties").');
}
if (window.sidebar) {
  window.sidebar.addPanel(title, url,"");
} 
else if( document.all ) {
  window.external.AddFavorite( url, title);
} 
else if( window.opera && window.print ) {
  return true;
}
}


function setAsHomePage(home) {
if (navigator.appName == "Netscape"){
  alert("Firefox(Mozilla) ne dozvoljava ovu akciju!");
}
else {
	home.style.behavior='url(#default#homepage)';
	home.setHomePage('http://www2.sda.hr');
}
}

function confirmLogout(msg){
var confDel = msg;
if(confDel ==null){confDel= confirm("Zelite li se odjaviti iz sustava?");}
else{confDel= confirm(msg);}
if (confDel== true){return (true);}
else {return (false);}
}

