function openPopup(url,name,width,height) { var popupWin = top[name]; if (popupWin != null && typeof(popupWin) == 'object' && !popupWin.closed) { if (popupWin.document.location.href != url) { popupWin.document.location.href = url; } } else { popupWin = window.open(url, name, 'width=' + width + ',height=' + height + ',status=yes,menubar=yes,resizable=yes,scrollbars=yes,left=' + String((screen.width-width)/2) + ',top=' + String((screen.height-height)/2)); } popupWin.focus(); } function closePopup(url) { if (opener) { if (opener.closed) window.open(url, ""); self.close(); return false; } return true; } /*---------------------------------------*/ function outputBlock(elemId, blockId, type) { if (document.getElementById(elemId).checked || (document.getElementById(elemId).value != '' && type == 'text')) { $("#"+blockId).show(200); } else { $("#"+blockId).hide(200); } } function elemActive(elemId, blockId) { if (document.getElementById(elemId).checked) { document.getElementById(blockId).disabled = false; document.getElementById(blockId).focus(); } else { document.getElementById(blockId).disabled = true; } }