// JScript ÆÄÀÏ // ---------------------------------------------------------------------------------------------------- // Mouse Over / Out // ---------------------------------------------------------------------------------------------------- function f_rowOver(evnt){ var context = evnt ? this : ((event.srcElement.tagName == "TD") ? event.srcElement.parentNode : event.srcElement); if (context && context.style) { with (context.style) { backgroundColor = "#F7F8FF"; //color = "#000000"; } } return false; } function f_rowOut(evnt) { var context = evnt ? this : ((event.srcElement.tagName == "TD") ? event.srcElement.parentNode : event.srcElement); if (context && context.style) { with (context.style) { backgroundColor = ""; //color = "#000000"; } } return false; } function go__PopMyhome(myid, skin, menu) { var url = "/Myhome.aspx?myid=" + myid + "&skin=" + skin; var w = 940; var h = 620; var nWin = window.open(url, "Myhome1", " location=0, toolbar=0, menubar=no, scrollbars=no, resizable=yes, status=yes, width=" + w + " , height=" + h + " "); nWin.focus(); } function go__PopMyhomeBlank(myid, skin, menu) { var url = "/Myhome.aspx?myid=" + myid + "&skin=" + skin; var w = 940; var h = 620; var nWin = window.open(url, "", " location=0, toolbar=0, menubar=no, scrollbars=no, resizable=yes, status=yes, width=" + w + " , height=" + h + " "); nWin.focus(); } function go__PopMyhomeBlankID(memid) { var url = "/Myhome.aspx?memid=" + memid; var w = 940; var h = 620; var nWinBlankID = window.open(url, "", " location=0, toolbar=0, menubar=no, scrollbars=no, resizable=yes, status=yes, width=" + w + " , height=" + h + " "); nWinBlankID.focus(); } function go__PopMyhomeID(memid) { var url = "/Myhome.aspx?memid=" + memid; var w = 940; var h = 620; var nWinBlankID = window.open(url, "Myhome1", " location=0, toolbar=0, menubar=no, scrollbars=no, resizable=yes, status=yes, width=" + w + " , height=" + h + " "); nWinBlankID.focus(); } function go__PopMyhomePopID(memid) { var url = "/Myhome.aspx?memid=" + memid; var w = 940; var h = 620; var nWinBlankID = window.open(url, "MyhomePop1", " location=0, toolbar=0, menubar=no, scrollbars=no, resizable=yes, status=yes, width=" + w + " , height=" + h + " "); nWinBlankID.focus(); } function getCheckEmail(strValue, allowBlank) { if (allowBlank) { if (strValue == "") { return true; } } if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(strValue)) { return true; } else { return false; } } String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } function gMakeNode(x1,node1,name1,text1) { if(text1==null) {text1 = "";} var node2 = x1.createElement(name1); if(text1.length > 0){ node2.text = text1; } node1.appendChild(node2); return node2; } function mhNameLINK(sMemNum, sMemID, sMyMemNum, obj) { var x_t = 0; var x_l = 0; var d_w = parseInt($("dv_Name_Div").style.width.replace(/px/g, '')); var d_h = parseInt($("dv_Name_Div").style.height.replace(/px/g, '')); var s_top = document.body.scrollTop; var s_left = document.body.scrollLeft; var w_h = document.body.offsetHeight; var w_w = document.body.offsetWidth; var e_x = window.event.clientX; var e_y = window.event.clientY; if (((e_y + d_h) - s_top) > w_h) { x_t = (e_y - d_h) + s_top; } else { x_t = e_y + s_top; } try { window.frames["dv_Name_Frame"].mem_id = sMemID; window.frames["dv_Name_Frame"].mem_num = sMemNum; window.frames["dv_Name_Frame"].getInfo(true); } catch(oEx) { } $("dv_Name_Div").style.left = e_x; $("dv_Name_Div").style.top = x_t; $("dv_Name_Div").style.display = "block"; try { window.frames["frmContents"].$("dv_Name_Div").style.display = "none"; } catch(oEx) { } try { if (window.parent != window) { window.parent.$("dv_Name_Div").style.display = "none"; } } catch(oEx) { } } function gBodyClick() { if (window.event.srcElement.className != "csNameDiv") { try { $("dv_Name_Div").style.display = "none"; } catch(oEx) { } try { window.frames["frmContents"].$("dv_Name_Div").style.display = "none"; } catch(oEx) { } try { window.parent.$("dv_Name_Div").style.display = "none"; } catch(oEx) { } } } function gViewXML(oXml,target) { var w = window.open("about:blank",target,"toolbar=no,location=no,scrollbars=yes,resizable=yes,width=800,height=600"); w.focus(); var oFrm = null; if (!document.fDebugForm) { oFrm = document.createElement("form"); //oFrm.setAttribute("name", "fDebugForm"); oFrm.setAttribute("method", "post"); oFrm.id = "fDebugForm"; oFrm.name = "fDebugForm"; var oTxt = document.createElement("textarea"); oTxt.setAttribute("name", "fTextArea"); //oTxt.setAttribute("style", "display:none;"); oTxt.id = "fTextArea"; oTxt.name = "fTextArea"; oTxt.style.display = "none"; oFrm.appendChild(oTxt) window.document.documentElement.appendChild(oFrm); } else { oFrm = $("fDebugForm"); } oFrm.fTextArea.value = oXml.xml; oFrm.action = "/Common/js/debugXML.aspx"; oFrm.target = target; oFrm.submit(); } function openPopUp(url, target, w, h, scroll) { var pW = parseInt(w, 10); var pH = parseInt(h, 10); var winWidth = window.screen.width; //ÇØ»óµµ°¡·Î var pL = parseInt((winWidth-pW)/2); var winHeight = window.screen.height; //ÇØ»óµµ¼¼·Î var pT = parseInt((winHeight-pH)/2); var sScroll = (typeof(scroll) == "undefined") ? "no" : ((scroll) ? "yes" : "no"); var sResizable = (typeof(scroll) == "undefined") ? "no" : ((scroll) ? "yes" : "no"); var nWin2 = window.open(url, target, " location=0, toolbar=0, menubar=no, scrollbars=" + sScroll + ", resizable=" + sResizable + ", status=yes, left=" + pL + ", top=" + pT + ", width=" + w + " , height=" + h + " "); nWin2.focus(); } function openPopUpImage(url, target, w, h, scroll) { var pL = 50; var pT = 50; var sScroll = (typeof(scroll) == "undefined") ? "no" : ((scroll) ? "yes" : "no"); var sResizable = (typeof(scroll) == "undefined") ? "no" : ((scroll) ? "yes" : "no"); var nWin2 = window.open(url, target, " location=0, toolbar=0, menubar=no, scrollbars=" + sScroll + ", resizable=" + sResizable + ", status=yes, left=" + pL + ", top=" + pT + ", width=" + w + " , height=" + h + " "); nWin2.focus(); } //------------- Modal Dialog ---------------- function jsDialog(url,w,h,mObject){ var strd = "dialogWidth:" + w + "px; dialogHeight:" + h + "px; center:yes; edge:raised; resizable:no; status:yes; help:no; scroll:no"; var stra = url; var rs = window.showModalDialog(stra, mObject, strd); if ((rs != "") && (rs != null)){ return mObject; } else{ return -1; } } function jsDialogLoction(url,w,h,l,t,mObject){ var strd = "dialogWidth:" + w + "px; dialogHeight:" + h + "px; left:" + l + "; top:" + t + "; edge:raised; resizable:no; status:yes; help:no; scroll:no"; var stra = url; var rs = window.showModalDialog(stra, mObject, strd); if ((rs != "") && (rs != null)){ return mObject; } else{ return -1; } } function gGetMaxKey(xm,node_name,key) { var xp = "//" + node_name + "[not(@" + key + " < //@" + key + ")]"; //xp = "//link[not(@link_key < //@link_key)]" var n = zXPath.selectSingleNode(xm.documentElement, xp, null); //var n = xm.selectSingleNode(xp) if(n == null) { return 1; } var max = n.getAttribute(key); max = (max == null) ? "0" : max; max = (isNaN(max)) ? "0" : max; return parseFloat(max,10) + 1; } function toUTF8(szInput) { var wch,x,uch="",szRet=""; for (x=0; x>6 | 0xC0).toString(16) + "%" + (wch & 0x3F | 0x80).toString(16); szRet += uch; } else { uch = "%" + (wch >> 12 | 0xE0).toString(16) + "%" + (((wch >> 6) & 0x3F) | 0x80).toString(16) + "%" + (wch & 0x3F | 0x80).toString(16); szRet += uch; } } return(szRet); } /* ********************** Byte ó¸® ½ÃÀÛ ********************** */ function Cut() { var cutstr = SubByteFromString(f.txt.value, parseInt(f.clen.value)); alert("["+cutstr+"]["+ByteLength(cutstr)+"]"); } function SubByteFromString(s, cutlen) { var pos = 0; var n = 0; for (var i = 0; i < s.length; i++) { n += (s.charCodeAt(i) > 128) ? 2 : 1; if(n > cutlen) { pos = i - 1; break; } else if(n == cutlen) { pos = i; break; } } if(pos == 0) return s; return s.substring(0, pos + 1); } function ByteLength(s) { var n = 0; for (var i = 0; i < s.length; i++) n += (s.charCodeAt(i) > 128) ? 2 : 1; return n; } function GetArr() { var s = f.area.value; var len = parseInt(f.clen2.value); var sArr = SubByteFromStringArray(s, len); var debstr = "Àüü¹ÙÀÌÆ®¼ö : "+ByteLength(s)+" ,Array°³¼ö : "+sArr.length+"\n"; for(var i = 0; i < sArr.length; i++) { debstr += "["+sArr[i]+"]["+ByteLength(sArr[i])+"]\n" } alert(debstr); } function SubByteFromStringArray(s, cutlen) { var oArray = new Array(); var totalLength = 0; var n = 0; var temp = s; while(n < 100000) { oArray[n] = SubByteFromString(temp.substring(totalLength), cutlen); totalLength += oArray[n].length; if(totalLength == s.length) break; n++; } return oArray; } /* ********************** Byte ó¸® Á¾·á ********************** */