﻿function g_OpenErrorMessage(strTemp){var strImsi;if(strTemp==null)strImsi=window.document.all.errorMessage.value;else{strImsi=g_XmlMsgT(strTemp)};strImsi=g_setReplace(strImsi,"#","\n");window.showModalDialog(COMMON_PATH+"/Htmls/ErrorMessage.htm",strImsi,"dialogWidth:500px;dialogHeight:290px;status=no;scroll=auto")};function g_OpenInformation(strInfo){var strImsi;if(strInfo==null)strImsi=window.document.all.informationMessage.value;else{strImsi=g_XmlMsgT(strInfo)};strImsi=g_setReplace(strImsi,"#","\n");try{window.showModalDialog(COMMON_PATH+"/Htmls/InformationMessage.htm",strImsi,"dialogWidth:500px;dialogHeight:290px;status=no;scroll=no")};catch(Exception){alert("팝업을 허용해주세요")}};function g_OpenConfirm(strConform){var strImsi;if(strConform==null)strImsi=window.document.all.confirmMessage.value;else{strImsi=g_XmlMsgT(strConform)};strImsi=g_setReplace(strImsi,"#","\n");var res=window.showModalDialog(COMMON_PATH+"/Htmls/ConfirmMessage.htm",strImsi,"dialogWidth:500px;dialogHeight:290px;status=no;scroll=no");return res};function g_OpenScriptAlert(strTemp){var strImsi;if(strTemp==null)strImsi=window.document.all.errorMessage.value;else{strImsi=g_XmlMsgT(strTemp)};strImsi=g_setReplace(strImsi,"#","\n");alert(strImsi)};function g_OpenScriptConfirm(strConform){var strImsi;if(strConform==null)strImsi=window.document.all.confirmMessage.value;else{strImsi=g_XmlMsgT(strConform)};strImsi=g_setReplace(strImsi,"#","\n");return confirm(strImsi);};function g_OpenDialog(sUrl,sFrame,sFeature){return window.open(sUrl,sFrame,sFeature)};function g_OpenModalDialog(sUrl,sArg,sFeature){var strReturn="";strReturn=window.showModalDialog(WEB_PATH+sUrl,sArg,sFeature);return strReturn};function g_WindowDevOnLoad(){var objError=eval("document.all.errorMessage");if(objError.value.length>0){g_OpenScriptAlert(objError.value)};var objInfo=eval("document.all.informationMessage");if(objInfo.value.length>0){g_OpenScriptAlert(objInfo.value)};var objConfirm=eval("document.all.confirmMessage");if(objConfirm.value.length>0){return g_OpenScriptConfirm(objConfirm.value)};try{eval("FormLoad")()};catch(exception){};window.status=""};function g_WindowOnLoad(){var objError=eval("document.all.errorMessage");if(objError.value.length>0){g_MovePage(ERRORPAGE);};var objInfo=eval("document.all.informationMessage");if(objInfo.value.length>0){g_OpenScriptAlert(objInfo.value)};var objConfirm=eval("document.all.confirmMessage");if(objConfirm.value.length>0){return g_OpenScriptConfirm(objConfirm.value)};try{eval("FormLoad")()};catch(exception){};window.status=""};function g_ActiveObjectTag(){try{var gObj=document.getElementsByTagName("OBJECT");for(var i=0;i<gObj.length;i++){if(gObj[i].previousSibling==null){gObj[i].outerHTML=gObj[i].outerHTML}}};catch(exception){}};function g_PreventNavigateBack(){var strTagType;if(window.event.keyCode==8){if(window.event.srcElement.tagName.toUpperCase()=="INPUT"){strTagType=window.event.srcElement.getAttribute("type").toUpperCase();if(strTagType=="TEXT"||strTagType=="PASSWORD"||strTagType=="FILE")return}else if(window.event.srcElement.tagName.toUpperCase()=="TEXTAREA"){return}else{window.event.returnValue=false}}};function g_PreventRightMouse(){window.event.returnValue=false};function g_OpenCommonPopup(objList,strUrl,sFeature,strPortletID){var objArr=new Array();objArr=objList.split("|");var strArg="?";for(i=0;i<objArr.length;i++){var vobj=eval("document.all."+objArr[i]+strPortletID);strArg=strArg+objArr[i]+"="+vobj.value+"&"};strUrl=strUrl+strArg;var returnValue=window.showModalDialog(COMMON_PATH+"/html/ModalDialog.html",strUrl,sFeature);if(returnValue!=undefined){var valueArr=new Array();valueArr=returnValue.split("|");for(i=0;i<(objArr.length);i++){var obj=eval("window.document.all."+objArr[i]+strPortletID);obj.value=valueArr[i]}}};function g_XmlMsgT(messageID){var regBool=false;var xmlMsg=messageID;if(!(/[a-zA-Z_]{3,3}\d{3,3}$/.test(messageID))){regBool=false}else{regBool=true};if(regBool){var XmlUrl=COMMON_PATH+"/xml/Message.xml";var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.load(XmlUrl);if(xmlDoc.readyState!=4&&!xmlDoc.parseError){return xmlMsg};var oXmlDoc=xmlDoc.documentElement;var strXQry="//message[@code='"+messageID+"'][@display_yn='Y']";var msgNode=oXmlDoc.selectSingleNode(strXQry);if(msgNode!=null){xmlMsg=msgNode.text}};return xmlMsg};function g_MovePage(linkURL){self.location.href=linkURL};function g_MovePage2(linkURL){parent.parent.location.href=linkURL};function g_MovePage3(linkURL){parent.parent.parent.location.href=linkURL};function g_TargetURL(frm,url){var tag=document.createElement("input");tag.setAttribute("type","hidden");tag.setAttribute("name","hidTargetUrl");tag.setAttribute("value",url);frm.appendChild(tag);frm.gSubmit.click()};