this.focus(); function getElementPosition(elemID) { var offsetTrail = document.getElementById(elemID); var offsetLeft = 0; var offsetTop = 0; while (offsetTrail) { offsetLeft += offsetTrail.offsetLeft; offsetTop += offsetTrail.offsetTop; offsetTrail = offsetTrail.offsetParent; } if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") { offsetLeft += document.body.leftMargin; offsetTop += document.body.topMargin; } return {left:offsetLeft, top:offsetTop}; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 0) { //// alert('here'); // fillSelect('catID3', arrValues, document.forms[formName].elements(selectName), formName); // } // // if (selectName.indexOf('3') > 0) { //// alert('here'); // fillSelect('catID4', arrValues, document.forms[formName].elements(selectName), formName); // } } else { s.parentElement.style.display = 'none'; } } function _fillSelect(selectName, arrValues, indexEl, formName) { if (formName == "") formName = "catEditFrm" d = document.forms[formName]; s = d.elements(selectName); // alert(indexEl); if (indexEl.options && indexEl.options.length) { var index = indexEl.options[indexEl.selectedIndex].value; // alert(selectName + " - " + index) s.options.length = 0; var k = 0; for (var i in arrValues[index]) { s.options[k++] = new Option(arrValues[index][i], i); } if (index == 0 || !k) { s.parentElement.style.display = 'none'; } else s.parentElement.style.display = 'inline'; if (selectName.indexOf('2') > 0) { fillSelect('catID3', arrValues, document.forms[formName].elements(selectName), formName); } } else s.parentElement.style.display = 'none'; } function popUp(urlToOpen) { var x = (screen.width-800)/2; y = (screen.height-600)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "width=800,height=600, toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } function gE(elName) { // alert(document.getElementById(elName)); return document.getElementById(elName); } function ToggleMandatoryOrderDetails(el){ if(el.value == 1){ gE('judicialPersonInfo').style.display = 'none'; gE('physicalPersonInfo').style.display = ''; } else{ gE('judicialPersonInfo').style.display = ''; gE('physicalPersonInfo').style.display = 'none'; } } function ClearEmail(elem){ if(elem.value=='adresa de email') elem.value = ""; } function show_flash(id) { document.getElementById(id).outerHTML = document.getElementById(id).outerHTML; } var OpenWin; function imgPopup(file, pwidth, pheight, title) { var content = ''; var x = (screen.width-pwidth)/2; y = (screen.height-pheight)/2; //y = 10; width = (pwidth > 1024) ? 1024 : pwidth + 50; height = (pheight > 768) ? 768 : pheight + 50; content += '' + title + ''; content += ''; content += '
'; if(OpenWin) OpenWin.close(); if(pwidth > 1024 || pheight > 768) OpenWin = this.open('', "CtrlWindow", "width=" + width + ",height=" + height + " toolbar=no, menubar=no, location=no, scrollbars=no, statusbar=no, resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); else OpenWin = this.open('', "CtrlWindow", "width=" + width + ",height=" + height + " toolbar=no, menubar=no, location=no, scrollbars=no, statusbar=no, resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); OpenWin.document.write(content); OpenWin.focus(); }