function IS_ENTER (obj, event) { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { return true; } else { return false; } } function OpenWindow(sURL, width, height, etc) { var top = (screen.height-height)/2; var left = (screen.width -width )/2; window.open(sURL, "", "top="+top+", left="+left+", width="+width+", height="+height+","+ "scrollbar=auto, "+etc); } function OpenModal(sURL, curVal, width, height, etc) { var top = (screen.height-height)/2; var left = (screen.width -width )/2; newVal = showModalDialog(sURL, curVal, 'dialogHeight:'+height+'px; dialogWidth:'+width+'px; scrolling:no; resizable:no; status:no'); return newVal; } function resizeDialogToContent() { var s_w = screen.width; var s_h = screen.height; var dw = window.dialogWidth; while (isNaN(dw)) { dw = dw.substr(0,dw.length-1); } difw = dw - this.document.body.clientWidth; window.dialogWidth = this.document.body.scrollWidth+difw+'px'; var dh = window.dialogHeight; while (isNaN(dh)) { dh = dh.substr(0,dh.length-1); } difh = dh - this.document.body.clientHeight; window.dialogHeight = this.document.body.scrollHeight+difh+'px'; window.dialogTop = (s_h - this.document.body.scrollHeight+difh) /2 window.dialogLeft = (s_w - this.document.body.scrollWidth+difw) /2 }