function _getCenterXAlert(pWidth){ lCenter=window.innerWidth/2; return lCenter-(pWidth/2) } function _getCenterYAlert(pHeight){ lCenter=window.innerHeight/2; return lCenter-(pHeight/2) } function _alertClose(){ lColectionDiv=document.getElementsByTagName("div") document.body.removeChild(lColectionDiv[lColectionDiv.length-1]) document.body.removeChild(lColectionDiv[lColectionDiv.length-1]) if (this.after_close) this.after_close(); window.onkeydown=null } function alert(pMsg,pFunction,pAlertType,pTitle){ if (!pTitle) pTitle=".: :."; if (pAlertType=="") pAlertType="ok"; else if (pMsg!="") { if (pMsg.search("Error:")>-1 || pMsg.search("Error :")>-1) pAlertType="error" else if (pMsg.search("Warning")>-1) pAlertType="warning" else pAlertType="ok"; } this.overlay=document.createElement("div") this.overlay.setAttribute("style","background-color:#e6e6e6;opacity:0.5;position:absolute;top:0px;left:0px;width:100%;height:100%") this.overlay.style.height=parent.document.body.scrollHeight+((parent.document.body.scrollHeight-parent.document.body.offsetHeight-1)*5); document.body.appendChild(this.overlay) this.alert_window=document.createElement("div") lHTML="
"+pTitle+" | " lHTML+="|
" lHTML+=" | "+pMsg+" | "
lHTML+="
" lHTML+=" |