function showTvrtke() { obj=document.getElementById("tvrtkeDiv"); obj.style.display=obj.style.display=="block" ? "none":"block"; } function showNewUser() { document.usersForm.ime.value="" document.usersForm.prezime.value="" document.usersForm.usernamee.value="" document.usersForm.epassword.value="" document.usersForm.epassword_rep.value="" document.usersForm.editID.value="" document.usersForm.rightsA.checked=false document.usersForm.rightsK.checked=false obj=document.getElementById("tvrtkeDiv"); obj.style.display=obj.style.display=="block" } document.oncontextmenu=rightClickFunc var mandatory=new Array() function chooseFirm(ID) { xajax_chooseFirm(ID) } function chooseUser(ID) { xajax_chooseUser(ID) } function setFieldFocus(f) { document.getElementById('ffield'+f).style.backgroundColor='#FEF5B8' } function removeFieldFocus(f) { document.getElementById('ffield'+f).style.backgroundColor='#ffffff' } function newFirm(f) { if (confirm("Jeste li sigurni da želite upisati navedene podatke?")) { load() xajax_newFirm(xajax.getFormValues(f)); } return false } function newUser(f) { if (confirm("Jeste li sigurni da želite upisati navedene podatke?")) { load() xajax_newUser(xajax.getFormValues(f)); } return false } var cmenuval function rightClickFunc(e) { if (cmenuval) { showSubmenu(e) return false } } function showSubmenu(e) { clearTimeout(sto) scrT=getScrollTop() scrT=parseInt(scrT) tx=document.all ? window.event.clientX : e.pageX+1 ty=document.all ? window.event.clientY+scrT : e.pageY+1 document.getElementById('submenu').style.left=tx+"px" document.getElementById('submenu').style.top=ty+"px" document.getElementById('submenu').style.display='block' } var sto function hideSubmenu() { document.getElementById('submenu').style.display='none' } function changeBGColor(c, obj) { obj.style.backgroundColor=c } var lastObjSM var reltosm function setCMenu(v, obj) { cmenuval=v c="#ffffff" if (v) { reltosm=obj.id c="#FEF5B8" if (lastObjSM!=obj) hideSubmenu() if (lastObjSM) changeBGColor('#ffffff', lastObjSM) lastObjSM=obj } else { } changeBGColor(c, obj) } function setSubmenu(i) { document.getElementById('submenu').innerHTML=i } function goSublink(l, s, rep, r, pre) { if (!s) s=0 if (!rep) rep=0 f=new Array() f[r]=reltosm if (r=="edit") { pageLoad(l, s, '', '', reltosm) } else if (r=="specials") { specials(l, s, reltosm) } else if (s) { pageLoad(l, s, '', 'search', '', f) } else if (rep) { if (!pre) xajax_loadPage(l, '', rep, '', '', f, '', '', '', '', '') if (pre) pageLoad(l, '', rep, '', '', '', '', '', '', 1, reltosm) } } function specials(l, s, reltosm) { hideSubmenu() load() xajax_specials(l, s, reltosm) } function getWinWidth() { if (window.innerWidth) { tinW=document.body.offsetWidth } else { tinW=document.body.clientWidth } return tinW } function getWinHeight() { if (window.innerWidth) { tinH=document.body.offsetHeight; } else { tinH=document.body.clientHeight; } return tinH } function getInnerWidth() { if (window.innerHeight) { dinW = window.innerWidth-16; } else if (document.body) { dinW = document.body.offsetWidth-20; } return dinW } function getInnerHeight() { if (window.innerHeight) { dinH = window.innerHeight-16; } else if (document.body) { dinH = self.screen.availHeight-20; } return dinH } var specialWindows=0 var specialWinParentHeight=0 function newWin(l, s, t, g) { specialWindows++ if (document.all) { divp=document.createElement("