function isIE() { if (window.navigator.userAgent.indexOf('MSIE') != -1) { return true; } else { return false; } } function setContentHeight() { var leftobj = getObject("leftside"); var contentobj = getObject("content"); var navheight = 0; var visualheight = 0; if(getObject("navigation")) navheight = getObject("navigation").clientHeight; if(getObject("visual")) visualheight = getObject("visual").clientHeight; //alert(leftobj.clientHeight + "," + contentobj.clientHeight + "," +navheight + "," +visualheight); if(leftobj && contentobj) { if(leftobj.clientHeight > (contentobj.clientHeight + navheight + visualheight)) { contentobj.style.height = leftobj.clientHeight - navheight - visualheight - 30 + "px"; //alert(contentobj.style.height); } } } function setDataOver(tr) { for(var i=0; i < tr.cells.length; i++) { tr.cells[i].style.backgroundColor='#e9effc'; } } function setDataOut(tr) { for(var i=0; i < tr.cells.length; i++) { tr.cells[i].style.backgroundColor=''; } } var isPopMenuShow = false; function Line() { this.Left = new Point(); this.Right = new Point(); } function Point() { this.x=0; this.y=0; } var mouseXY = new Point(); function Square() { this.top=0; this.left=0; this.right=0; this.bottom=0; } function windowInfo() { this.top=0; this.left=0; this.width=0; this.height=0; } function getMousePos(evt) { var e = evt || window.event; if(navigator.appName == "Netscape"){ mouseXY.x = e.pageX; mouseXY.y = e.pageY; } else { mouseXY.x = e.x; mouseXY.y = e.y; } alert(mouseXY.x); } function copyAreaData(ischecked, goodstype, des) { if(ischecked == true) { var src1 = document.getElementById(goodstype + "_takearea11"); var src2 = document.getElementById(goodstype + "_takearea21"); var src3 = document.getElementById(goodstype + "_takearea31"); if(src1.selectedIndex > 0 && src2.selectedIndex > 0 && src3.selectedIndex > 0) { var des1 = document.getElementById(goodstype + "_takearea1" + des); var des2 = document.getElementById(goodstype + "_takearea2" + des); var des3 = document.getElementById(goodstype + "_takearea3" + des); des1.selectedIndex = src1.selectedIndex; changeCategory2(des2, des3, des1.selectedIndex, null, null); des2.selectedIndex = src2.selectedIndex; changeCategory3(des3, des1.selectedIndex, des2.selectedIndex, null, null); des3.selectedIndex = src3.selectedIndex; } else { alert("Á¢¼öÁö¿ª 1,2,3ÀÌ ¸ðµÎ ¼±ÅõǾî ÀÖ¾î¾ß ÇÕ´Ï´Ù."); } } } function copyData(src, des) { if(src.value.trim() != "") { des.value=src.value; } } function copyData2(ischecked, src1, des1, src2, des2) { if(ischecked == true && src1.value.trim() != "") { des1.value=src1.value; } if(ischecked == true && src2.value.trim() != "") { des2.value=src2.value; } } function getLength(str) { return(str.length+(escape(str)+"%u").match(/%u/g).length-1); } //usage : variable.trim String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/gi, ""); } //usage : variable.replaceAll String.prototype.replaceAll = function(str1, str2) { var temp_str = ""; if (this.trim() != "" && str1 != str2) { temp_str = this.trim(); while (temp_str.indexOf(str1) > -1) { temp_str = temp_str.replace(str1, str2); } } return temp_str; } function onlyNumber(evt) { var IE = isIE(); var evt = IE?window.event : evt; var ikeycode = IE?evt.keyCode:evt.keyCode; var icharcode = IE?evt.keyCode:evt.charCode; //FF°¡ control key¿Í char key ¸¦ ±¸ºÐÇϳ×..¤Ð.¤Ð if(ikeycode == 0 && icharcode > 0) ikeycode = icharcode; if ( ikeycode != 9 && ikeycode != 37 && ikeycode != 39 && ikeycode != 46 && ikeycode != 8 && (ikeycode < 48 || 57 < ikeycode) ) { if(IE) evt.returnValue=false; else evt.preventDefault(); return; } } function onlyAlphaNumeric(evt) { var IE = isIE(); var evt = IE?window.event : evt; var ikeycode = IE?evt.keyCode:evt.keyCode; var icharcode = IE?evt.keyCode:evt.charCode; if(ikeycode == 0 && icharcode > 0) ikeycode = icharcode; if ( !(icharcode >= 48 && 57 >= icharcode) && !(icharcode >= 65 && 90 >= icharcode) && !(icharcode >= 97 && 122 >= icharcode)) { if(IE) evt.returnValue=false; else evt.preventDefault(); return; } } function onlyFloat(evt) { var IE = isIE(); var evt = IE?window.event : evt; var ikeycode = IE?evt.keyCode:evt.keyCode; var icharcode = IE?evt.keyCode:evt.charCode; if ( ikeycode != 46 && (ikeycode < 48 || 57 < ikeycode )) { if(IE) evt.returnValue=false; else evt.preventDefault(); return; } } function noPaste(evt) { var IE = isIE(); var evt = IE?window.event : evt; if(IE) evt.returnValue=false; else evt.preventDefault(); } function GetStrByte(val) { val = parseInt(val, 10); if(val == "NaN") return "0 B"; if(val < 1024) return val + " B"; else if(val >= 1024 && val < 1024 * 1024) return parseInt(val/1024, 10) + "." + parseInt((val%1024)/100, 10) + " KB"; else if(val >= 1024 * 1024 && val < 1024 * 1024 * 1024) return parseInt(val/1024/1024, 10) + "." + parseInt((val%1024)/100, 10) + " MB"; else return parseInt(val/1024/1024/1024, 10) + "." + parseInt((val%1024)/100, 10) + " GB"; } /* check mail format */ function CheckEmail(str) { str = str.trim(); var filter=/^.+@.+\..{2,3}$/ if (filter.test(str)) return true; else return false; } /* µÎ°³ÀÇ ¹®ÀÚ¿­ »çÀÌÀÇ ¹®ÀåÀ» °ËÃâÇØ ³»´Â ÇÔ¼ö */ function str_extract_java(value, start, end) { var tmp; var stStr = eval("/"+start+"/"); var endStr = eval("/["+end+" ]+/g"); if ((value.search(stStr)) == -1) return value; tmp = value.split(start); tmp = tmp[1]; tmp = tmp.replace(endStr, ""); return tmp; } function setJustCookie( name, value ) { document.cookie = name + "=" + value + "; path=/;" } function setCookie( name, value, expiredays ) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } function getCookie( name ) { var nameOfCookie = name + "="; var x = 0; while ( x <= document.cookie.length ) { var y = (x+nameOfCookie.length); if ( document.cookie.substring( x, y ) == nameOfCookie ) { if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; return unescape( document.cookie.substring( y, endOfCookie ) ); } x = document.cookie.indexOf( " ", x ) + 1; if ( x == 0 ) break; } return ""; } function GetCookie(sName) { var aCookie = document.cookie.split(';'); for (var i=0; i < aCookie.length; i++) { var aCrumb = aCookie[i].split('='); if (sName == trim(aCrumb[0])) { return unescape(aCrumb[1]); } } return null; } function IsNumber(t) { var i,j; var Digit = '1234567890' astr = Digit; //0À϶§.. false°¡ ¸®ÅϵǼ­.. if(t == "0") return(true); if(t.length == 0) return(false); if (astr.length > 1) { for(i=0;i= ' ' && ch <= '/') || (ch >= ':' && ch <= '@') || (ch >= '[' && ch <= '`') || (ch >= '{' && ch <= '~')) return(true); } return(false); } function IsAlphaNumeric(t) { var i,j; for(i=0;i= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) j=0; else return(false); } return(true); } function IsHangul(str) { for (i = 0; i < str.length; i++) { ch = str.substring(i, i+1); if (ch < ' ' || ch > '~') return(true); } return(false); } function SetNextFocus(thisobj, nextobj, len) { if(thisobj.value.length == len) nextobj.focus(); } // Áֹεî·Ï¹øÈ£ üũ function CheckJoomin(ssn) { var key = "234567892345"; var total = 0; ssn = ssn.replaceAll("-", ""); if(ssn.length == 0) return false; for(var i=0; i<12; i++) { total = total + ssn.charAt(i)*key.charAt(i); } total = 11 - (total % 11); switch(total) { case 11: total=1; break; case 10: total=0; break; default: total=total; break; } if(ssn.charAt(12) != total) { return false; } return true; } // »ç¾÷ÀÚµî·Ï¹øÈ£ üũ function CheckBizNo(vencode) { /* if (vencode.length == 10) return true; else return false; */ vencode = vencode.trim(); vencode = vencode.replaceAll("-", ""); if (vencode.length != 10) return false; if(vencode == "") return false; //¾Æ·¡ÀÇ ·ÎÁ÷¿¡¼­ 888-88-88888ÀÌ¸é ¹«Á¶°Ç Åë°úµÇ¹Ç·Î, 888-88-88888 ÀÌ¸é ¿À·ùó¸® if(vencode == "8888888888") return false; var sum = 0; var getlist =new Array(10); var chkvalue =new Array("1","3","7","1","3","7","1","3","5"); for(var i=0; i<10; i++) { getlist[i] = vencode.substring(i, i+1); } for(var i=0; i<9; i++) { sum += getlist[i]*chkvalue[i]; } sum = sum + parseInt((getlist[8]*5)/10, 10); sidliy = sum % 10; sidchk = 0; if(sidliy != 0) { sidchk = 10 - sidliy; } else { sidchk = 0; } if(sidchk != getlist[9]) { return false; } return true; } function hexa(numb){ var k=0; var kk=0; var str = ""; k = numb; while(1) { kk = k % 16; k = Math.floor(k/16); str = convert(kk) + str; if (k == 0) break; } //str = convert(kk) + str; return(str); } function convert(nr) { var chr; if (nr==10){chr="A"} else if (nr==11){chr="B"} else if (nr==12){chr="C"} else if (nr==13){chr="D"} else if (nr==14){chr="E"} else if (nr==15){chr="F"} else {chr=nr;} return(chr); } function imgStrSize(val) { // ÷ºÎÆÄÀÏ´ç 10M·Î Á¦ÇÑ //À̹ÌÁö Å©±â °è»ê if(val > 1024 && val < 1048576) { strFileSize = Math.round(eval(val)/1000)+"KB"; } else if(val<1024) { strFileSize = eval(val)+"B"; } else { intMB = (eval(val)/1000)/1000 ; intMB = Math.round(intMB*100)/100 strFileSize = intMB+"MB"; } return strFileSize; } function imgReSize(imgWidth, imgHeight, maxWidth, imgObj) { if(imgWidth > maxWidth) { heightValue = parseInt((maxWidth * imgHeight)/imgWidth, 10); widthValue = maxWidth; } else { heightValue = imgHeight; widthValue = imgWidth; } imgObj.style.width = widthValue; imgObj.style.height = heightValue; } function imgReSizeFixed(imgWidth,imgHeight,maxWidth,maxHeight, imgObj) { if (imgWidth > maxWidth) { widthValue = maxWidth; } else { widthValue = imgWidth; } WidthRate = (widthValue / imgWidth) ; if (imgHeight > maxHeight) { heightValue = maxHeight ; } else { heightValue = imgHeight ; } HeightRate = (heightValue / imgHeight) ; if (maxWidth == 0) { WidthRate = 100; } if (maxHeight == 0) { HeightRate = 100; } if (HeightRate < WidthRate) { widthValue = imgWidth * HeightRate ; heightValue = imgHeight * HeightRate ; } else { widthValue = imgWidth * WidthRate; heightValue = imgHeight * WidthRate; } imgObj.style.width = widthValue; imgObj.style.height = heightValue; } function getmulticontent(source, maxlength, separate_str) { var content_size = getLength(source); var multicontent = ""; if(maxlength >= content_size) { return source; } var oldpos = 0; var j=0; var i=0; while(i < content_size) { if(source.charCodeAt(i) < 256) { j++; } else { j += 2; } i++; if(j >= maxlength) { if(j > maxlength) i--; scontent = source.substring(oldpos, i); if(scontent.length) multicontent += scontent + separate_str; oldpos = i; j=0; } } multicontent = multicontent.substring(0, multicontent.length - separate_str.length); return multicontent; } function MoveItems(sourceObj, targetObj, iscopy, dupcheck, removeitemonduple) { var newOpt; var isduple = false; var dupleindex = new Array(); var selindex = sourceObj.selectedIndex; for(var k=0; k < targetObj.options.length; k++) targetObj.options[k].selected = false; var cnt = sourceObj.options.length; for(var k=0; k < cnt; k++) { dupleindex[k] = 0; if(sourceObj.options[k].value != "" && sourceObj.options[k].selected) { var srcval = sourceObj.options[k].value; /* Áߺ¹Ã¼Å© ½ÃÀÛ */ isduple = false; if(dupcheck == true) { for(var j=0; j < targetObj.options.length; j++) { if(targetObj.options[j].value == srcval) { isduple = true; dupleindex[k] = 1; } } } if(isduple == true) continue; /* Áߺ¹Ã¼Å© ³¡ */ var fnm = sourceObj.options[k].text; var newOpt2 = new Option(fnm, srcval); var selcnt = targetObj.options.length; targetObj.options[selcnt]=newOpt2; targetObj.options[selcnt].selected = true; } } if(iscopy == "N") { for(var k=cnt-1 ; k >= 0; k--) { if(sourceObj.options[k].value != "" && sourceObj.options[k].selected && (dupleindex[k] == 0 || (dupleindex[k] == 1 && removeitemonduple == true))) { sourceObj.remove(k); } } } if(selindex == sourceObj.options.length) selindex = sourceObj.options.length -1; if(selindex != -1) sourceObj.options[selindex].selected = true; } function SetNumberFormat(obj, evt) { var str = obj.value; obj.value = GetNumberFormat(str.replaceAll(",", "")); } function GetNumberFormat(str) { str = String(str); var str2 = ""; var j = 0; var minus = str.substring(0, 1); if(minus == "-" && minus == str) return str; if(minus == "-") { str = str.substring(1, str.length); } for(i=str.length; i > 0 ;i--) { ch = str.substring(i, i-1); str2 = ch + str2; j++; if(j%3 == 0) str2 = "," + str2; } if(j%3 == 0) str2 = str2.substring(1, str2.length); if(minus == "-") str2 = minus + str2; return str2; } function SetDateFormat(obj, evt) { var IE = isIE(); var evt = IE?window.event : evt; var ikeycode = IE?evt.keyCode:evt.keyCode; var icharcode = IE?evt.keyCode:evt.charCode; //FF°¡ control key¿Í char key ¸¦ ±¸ºÐÇϳ×..¤Ð.¤Ð if(ikeycode == 0 && icharcode > 0) ikeycode = icharcode; var str = obj.value; obj.value = GetDateFormat(str.replaceAll("-", ""), str, ikeycode); } function GetDateFormat(str, orgstr, ikeycode) { var str2 = ""; var j = 0; var len = str.length; if(ikeycode == 8) { if(orgstr.length == 5) return str.substring(0, 4); if(orgstr.length == 4) return str.substring(0, 3); } if(len >= 4) { str2 = str.substring(0, 4); if(len >= 6) { var month = str.substring(4, 6); if(len == 6 && (parseInt(month, 10) < 1 || parseInt(month, 10) > 12)) { str2 += "-" + str.substring(4, 5); return(str2); } str2 += "-" + month; var day = str.substring(6); if(len == 8) { if(parseInt(day, 10) < 1 || parseInt(day, 10) > 31) { str2 += "-" + str.substring(6, 7); return(str2); } str2 += "-" + day; } else if(len == 7) { if(parseInt(day, 10) < 1 || parseInt(day, 10) > 31) { str2 += "-" + day; return(str2); } str2 += "-" + day; } } else str2 += "-" + str.substring(4); return str2; } else return str; } function SetBiznoFormat(obj) { var str = obj.value; obj.value = GetBiznoFormat(str.replaceAll("-", ""), str); } function GetBiznoFormat(str, orgstr) { var len = str.length; if(len <= 3) return str; else if(len <= 5) return str.substr(0, 3) + "-" + str.substr(3, 2); else if(len <= 10) return str.substr(0, 3) + "-" + str.substr(3, 2) + "-" + str.substr(5, 5); } function SetPostcodeFormat(obj) { var str = obj.value; obj.value = GetPostcodeFormat(str.replaceAll("-", ""), str); } function GetPostcodeFormat(str, orgstr) { var len = str.length; if(len < 3) return str; else return str.substr(0, 3) + "-" + str.substr(3, 3); } function getAreaLength(str) { if(str.substring(0, 2) == "02") return {arealen:2,maxlen:10}; else if(str.substring(0, 2) == "15") return {arealen:4,maxlen:8}; else { var areacode = str.substring(0, 3); if(areacode == "050" || areacode == "013" || areacode == "050") return {arealen:4,maxlen:12}; else return {arealen:3,maxlen:11}; } } function SetStudNoFormat(obj) { var str = obj.value; obj.value = GetStudNoFormat(str.replaceAll("-", ""), str); } function GetStudNoFormat(str, orgstr) { var str2 = ""; var j = 0; var len = str.length; if(len < 2) return str; var retstr = ""; if(str.substr(0, 2) == '20') { if(len > 4) { if(len < 10) retstr = str.substr(0, 4) + '-' + str.substr(4, len-4); else retstr = str.substr(0, 4) + '-' + str.substr(4, 5); } else return str; } else { if(len > 5) { if(len < 9) retstr = str.substr(0, 5) + '-' + str.substr(5, len-5); else { retstr = str.substr(0, 5) + '-' + str.substr(5, 3); } } else return str; } return retstr; } function SetTelFormat(obj) { var str = obj.value; obj.value = GetTelFormat(str.replaceAll("-", ""), str); } function GetTelFormat(str, orgstr) { var str2 = ""; var j = 0; var len = str.length; if(len < 2) return str; var noinfo = getAreaLength(str); if(len > noinfo.maxlen) str = str.substr(0, noinfo.maxlen); retstr = str.substr(0, noinfo.arealen); var telno = str.substr(noinfo.arealen); var tellen = telno.length; if(tellen == 0) return retstr; if(tellen < 8) { if(tellen <= 3) { retstr = retstr + "-" + telno.substr(0, len); } else { if(noinfo.maxlen == 8) { retstr = retstr + "-" + telno.substr(0, 4); } else { retstr = retstr + "-" + telno.substr(0, 3) + "-" + telno.substr(3); } } } else { retstr = retstr + "-" + telno.substr(0, 4) + "-" + telno.substr(4, 4); } return retstr; } function SetSSNFormat(obj) { var str = obj.value; obj.value = GetSSNFormat(str.replaceAll("-", ""), str); } function GetSSNFormat(str, orgstr) { var len = str.length; if(len < 7) return str; else return str.substr(0, 6) + "-" + str.substr(6, 7); } function SetCardFormat(obj) { var str = obj.value; obj.value = GetCardFormat(str.replaceAll("-", ""), str); } function GetCardFormat(str, orgstr) { var len = str.length; if(len < 4) return str; else if(len <= 8) return str.substr(0, 4) + "-" + str.substr(4, 4); else if(len <= 12) return str.substr(0, 4) + "-" + str.substr(4, 4) + "-" + str.substr(8, 4); else if(len <= 16) return str.substr(0, 4) + "-" + str.substr(4, 4) + "-" + str.substr(8, 4) + "-" + str.substr(12, 4); } function SetNextFocus(thisobj, nextobj, len) { if(thisobj.value.length == len) nextobj.focus(); } function SetClass(obj, stylename) { obj.className = stylename; } function getObject(oname) { return document.getElementById(oname); } function srhObject(obj, srhid) { if(obj.id == srhid) return obj; else if(obj == document.body) return document.body; srhObject(obj.parentNode, srhid); } function getXY(Obj) { //alert(Obj.offsetTop + "," + Obj.offsetLeft + "," + Obj.offsetParent.tagName); for (var sumTop=0,sumLeft=0;Obj!=document.body;sumTop+=Obj.offsetTop,sumLeft+=Obj.offsetLeft, Obj=Obj.offsetParent); return {left:sumLeft,top:sumTop} } function showFlash(url,w,h,id,bg,vars,win){ // Ç÷¡½Ã ÄÚµå Á¤ÀÇ var flashStr= ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""; // Ç÷¡½Ã ÄÚµå Ãâ·Â document.write(flashStr); } function ShowFlash(divid, swfpath, fwidth, fheight, extraParam) { var strFlash = ''; strFlash += ''; strFlash += ''; strFlash += ''; if(extraParam) strFlash += extraParam; strFlash += ''; strFlash += ''; divid.innerHTML = strFlash ; } function ShowFlash2(divid, swfpath, fwidth, fheight, extraParam) { var strFlash = ''; strFlash += ''; strFlash += ''; strFlash += ''; strFlash += ''; if(extraParam) strFlash += extraParam; strFlash += ''; strFlash += ''; divid.innerHTML = strFlash ; } function IsValidDate(datestr) { var MonthName = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); datestr = datestr.trim(); if (datestr.indexOf("-")!=-1){ var sdate = datestr.split("-") } else { var sdate = datestr.split("/") } if(sdate[0].length == 4) { //2006-08-22 if(sdate[1].length != 2 || sdate[2].length != 2) return false; var tmpmonth = parseInt(sdate[1] - 1, 10); datestr = MonthName[tmpmonth] + " " + parseInt(sdate[2], 10) + ", " + parseInt(sdate[0], 10); } else { //08-22-2006 if(sdate[0].length != 2 || sdate[1].length != 2) return false; var tmpmonth = parseInt(sdate[0] - 1, 10); datestr = MonthName[tmpmonth] + " " + parseInt(sdate[1], 10) + ", " + parseInt(sdate[2], 10); } var chkDate=new Date(Date.parse(datestr)); var cmpDate=chkDate.getYear()+"-"+ parseInt(chkDate.getMonth()+1, 10)+"-"+(chkDate.getDate()); var datestr2=(Math.abs(sdate[0]))+"-"+(Math.abs(sdate[1]))+"-"+(Math.abs(sdate[2])) if(datestr2 != cmpDate){ return false; } else { if(cmpDate == "NaN/NaN/NaN"){ return false; } else { return true; } } } function FillChr(str, fillch, len) { var str2 = String(str); var intlen = str2.length; if( intlen >= len ) return str; for(var i=0; i < len - intlen; i++) { str2 = fillch + str2; } return str2; } function GetValidDateFormat(datestr) { if(datestr == "") return datestr; if (datestr.indexOf("-")!=-1){ var sdate = datestr.split("-") } else { var sdate = datestr.split("/") } if(sdate[0].length == 4) { datestr = sdate[0] + "-" + FillChr(parseInt(sdate[1], 10), "0", 2) + "-" + FillChr(parseInt(sdate[2], 10), "0", 2); } else { datestr = sdate[2] + "-" + FillChr(parseInt(sdate[0], 10), "0", 2) + "-" + FillChr(parseInt(sdate[1], 10), "0", 2); } return datestr; } function iframe_reset() { dataobj=document.all? document.all.pagecontent : document.getElementById("pagecontent"); dataobj0=document.all? parent.document.all.clubmain : parent.document.getElementById("clubmain"); if(dataobj == null || dataobj0 == null ) return; dataobj.style.top=0; dataobj.style.left=0; pagelength=dataobj.offsetHeight; if(pagelength < 650) pagelength = 650; dataobj0.height = pagelength+20; } /* radio °´Ã¼Áß ¼±ÅÃµÈ °´Ã¼ÀÇ index¸¦ return */ function getRadioIdx(obj) { if( obj == undefined ) { return -1; } //radio Ç׸ñÀÌ Çϳª Àΰܿì, if(obj.length == undefined) { if(obj.checked == true) return 1; //Çϳª°¡ ¼±ÅõǾúÀ¸¸é.. else return -1; //¼±ÅõÇÁö ¾Ê¾ÒÀ¸¸é.. } for(var i=0; i < obj.length; i++) { if( obj[i].checked == true ) { return i; } } return -1; } /* radio °´Ã¼Áß ¼±ÅÃµÈ °´Ã¼ÀÇ value¸¦ return */ function getRadioValue(obj) { if( obj == undefined ) { alert('°´Ã¼°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.'); return ''; } //radio Ç׸ñÀÌ Çϳª Àΰܿì, if(obj.length == undefined) { if(obj.checked == true) return obj.value; //Çϳª°¡ ¼±ÅõǾúÀ¸¸é.. else return ''; //¼±ÅõÇÁö ¾Ê¾ÒÀ¸¸é.. } for(var i=0; i < obj.length; i++) { if( obj[i].checked == true ) { return obj[i].value; } } return ''; } function getCheckedCounter(obj) { if( obj == undefined ) return 0; var chkcnt = 0; for(var i=0; i < obj.length; i++) { if(obj[i].checked) chkcnt++; } return chkcnt; } function CheckFileType(str, exts) { str = str.trim(); if(str == "") return false; str = str.toLowerCase(); var extpos = str.lastIndexOf("."); var ext = str.substring(extpos+1); arrExts = exts.split(","); for(var i=0; i < arrExts.length; i++) { if(ext == arrExts[i].trim()) return true; } return false; } function innerText(htmlStr) { var strRegExp = /<\/?[^>]+>/gi; return htmlStr.replace(strRegExp, ""); } /*¶ó¿îµåÅ×À̺í*/ function roundTable(objID) { var obj = document.getElementById(objID); var Parent, objTmp, Table, TBody, TR, TD; var bdcolor, bgcolor, Space; var trIDX, tdIDX, MAX; var styleWidth, styleHeight; // get parent node Parent = obj.parentNode; objTmp = document.createElement('SPAN'); Parent.insertBefore(objTmp, obj); Parent.removeChild(obj); // get attribute bdcolor = obj.getAttribute('rborder'); bgcolor = obj.getAttribute('rbgcolor'); radius = parseInt(obj.getAttribute('radius'), 10); if (radius == null || radius < 1) radius = 1; else if (radius > 6) radius = 6; MAX = radius * 2 + 1; /* create table {{ */ Table = document.createElement('TABLE'); TBody = document.createElement('TBODY'); Table.cellSpacing = 0; Table.cellPadding = 0; for (trIDX=0; trIDX < MAX; trIDX++) { TR = document.createElement('TR'); Space = Math.abs(trIDX - parseInt(radius), 10); for (tdIDX=0; tdIDX < MAX; tdIDX++) { TD = document.createElement('TD'); styleWidth = '1px'; styleHeight = '1px'; if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null; else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null; else if (radius > 2) { if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px'; if (Math.abs(trIDX - radius) == 1) styleHeight = '2px'; } if (styleWidth != null) TD.style.width = styleWidth; if (styleHeight != null) TD.style.height = styleHeight; if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor; else if (tdIDX > Space && Space < MAX - tdIDX - 1) TD.style.backgroundColor = bgcolor; if (Space == 0 && tdIDX == radius) TD.appendChild(obj); TR.appendChild(TD); } TBody.appendChild(TR); } /* }} */ Table.appendChild(TBody); // insert table and remove original table Parent.insertBefore(Table, objTmp); } function PlayWAV( divobj, strurl ) { var strhtml = ""; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; strhtml += "\n"; divobj.innerHTML = strhtml; } function isValidRGB(color) { if(IsAlphaNumeric(color) == false) return false; for(i=0;i 'F') return false; } return true; } function removeRow(oTable, curTr) { for(var i=0; i <= oTable.rows.length; i++) { if(oTable.rows[i] == curTr) { oTable.rows[i].removeNode(true); break; } } } function getCurTrNo(oTable, curTr) { for(var i=0; i <= oTable.rows.length; i++) { if(oTable.rows[i] == curTr) { return i; break; } } return -1; } function getCurTr() { if (!e) var e=window.event; var S=e.srcElement; var curTr=S.parentElement.parentElement; return curTr; } /** * Function : ±âÁØÀÏÀÇ »ó´ëÀûÀÎ ³âµµ¸¦ °è»êÇÑ ³¯Â¥¸¦ ±¸ÇÑ´Ù. * @param : bastDt - ±âÁØÀÏ * : n - »ó´ëÀû ³âµµ¼ö * @return : String - °è»êµÈ ÀÏÀÚ */ function relativeYear(bastDt, n) { return relativeMonth(bastDt, n*12); } /** * Function : ±âÁØÀÏÀÇ »ó´ëÀûÀÎ °³¿ù¸¦ °è»êÇÑ ³¯Â¥¸¦ ±¸ÇÑ´Ù. * @param : bastDt - ±âÁØÀÏ * : n - »ó´ëÀû °³¿ù¼ö * @return : String - °è»êµÈ ÀÏÀÚ */ function relativeMonth(bastDt, n) { var oldDate, newLastDate; var oDestDate = null; //±âÁØÀÏ Å¸ÀÔÀÌ Date °´Ã¼ if (typeof bastDt == "object") { oDestDate = bastDt; } //±âÁØÀÏ Å¸ÀÔÀÌ String °´Ã¼ else { oDestDate = castDateType( bastDt ); } // ÇöÀç ÀÏÀÚ¸¦ ¹é¾÷ÇØ µÎ°í 1ÀÏ·Î ¼¼ÆÃÇÑ ÈÄ »ó´ëÀûÀÎ °³¿ù °è»êÈÄ ´Ù½Ã ÇöÀçÀÏÀÚ¸¦ º¹¿øÇÑ´Ù. // ÀÌÀ¯) ±¸ÇÏ´Â »ó´ëÀÏÀÚÀÇ ³â¿ùÀÇ ¸¶Á÷¸· ÀÏÀÚ°¡ ÇöÀçÀÇ ÀÏÀÚº¸´Ù ÀûÀ» °æ¿ì // »ó´ëÀÏÀÚÀÇ ¸¶Áö¸·ÀÏÀÚ·Î ¼¼ÆÃÇØ¾ß ÇÔ // ¿¹> 20050731 ÀÇ ÇÑ´ÞÀüÀ» ÀÏÀÚ´Â 20050631(X) °¡ ¾Æ´Ï°í 20050630 ÀÌ´Ù. oldDate = oDestDate.getDate(); oDestDate.setDate(1); //»ó´ëÀûÀÎ °³¿ù °è»ê oDestDate.setMonth( oDestDate.getMonth() + n ); //»ó´ëÀûÀÎ ³â¿ùÀÇ ¸¶Áö¸· ÀÏÀÚ¿Í ÀÌÀü ³â¿ù ÀÏÀÚ¸¦ ºñ±³ÇÑ ÈÄ Å¸´çÇÑ ÀÏÀÚ¸¦ ¼¼ÆÃ //¿¹> 20050731 ÀÇ ÇÑ´ÞÀüÀ» ÀÏÀÚ´Â 20050631(X) °¡ ¾Æ´Ï°í 20050630 ÀÌ´Ù. var nTmp = oDestDate.getYear().toString(); if ( nTmp.length == 2 ) { nTmp = "19" + nTmp; } newLastDate = getDaysInMonth( eval(nTmp), oDestDate.getMonth()+1 ); if(oDestDate.getMonth()+1 == 2) { //2¿ù´Þ¿¡ ´ëÇØ¼­.. if(oldDate > getDaysInMonth(eval(nTmp), oDestDate.getMonth()+1)) { oDestDate.setDate(newLastDate); } else { oDestDate.setDate(oldDate - 1); } } else { if ( oldDate > newLastDate ) { oDestDate.setDate(newLastDate); } else oDestDate.setDate(oldDate - 1); } if ( bastDt.length == 6 ) { return castStrType( oDestDate, "yyyyMM" ); } else { return castStrType( oDestDate ); } } /** * Function : ±âÁØÀÏÀÇ »ó´ëÀûÀÎ ÀÏÀÚ¸¦ °è»êÇÑ ³¯Â¥¸¦ ±¸ÇÑ´Ù. * @param : bastDt - ±âÁØÀÏ * : n - »ó´ëÀû ÀÏÀÚ¼ö * @return : String - °è»êµÈ ÀÏÀÚ */ function relativeDate(bastDt, n) { var oDestDate = null; //±âÁØÀÏ Å¸ÀÔÀÌ Date °´Ã¼ if (typeof bastDt == "object") { oDestDate = bastDt; } //±âÁØÀÏ Å¸ÀÔÀÌ String °´Ã¼ else { oDestDate = castDateType( bastDt ); } oDestDate.setDate(oDestDate.getDate() + n); return castStrType( oDestDate ); } /** * Function : String Çü½ÄÀ» Date Çü½ÄÀ¸·Î º¯È¯ * @param : strDate - String Çü½ÄÀÇ ³¯Â¥. * @return : Date - º¯È¯µÈ Date Çü½ÄÀÇ °´Ã¼ */ function castDateType( strDate ) { /* if ( !isValidDate( strDate ) ) { dialogError("À¯È¿ÇÑ ÀÏÀÚ Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.(¿¹:20058010)"); return null; } */ var dtRtn = null; if ( strDate.length == 6 ) { strDate += "01"; } //Æ÷¸ËÀ» °¡Áø ÇüÅ·ΠÀü´ÞµÇ¾úÀ» °æ¿ì. (¿¹ 2005.01.01) if ( strDate.length == 10 ) { var aDate = strDate.split( strDate.substring(4, 5) ); dtRtn = new Date(aDate[0], eval(aDate[1])-1, aDate[2]); } //Æ÷¸ËÀÌ ¾ø´Â ÇüÅ·ΠÀü´ÞµÇ¾úÀ» °æ¿ì. (¿¹ 20050101) else if (strDate.length == 8 ) { var year = eval(strDate.substring(0, 4)); var month = eval(strDate.substring(4, 6)); var date = eval(strDate.substring(6, 8)); dtRtn = new Date(year, month-1, date); } else { throw "ºÎÀûÇÕÇÑ ³¯Â¥ Çü½ÄÀÔ´Ï´Ù.(" + strDate + ")"; } return dtRtn; } /** * Function : Date Çü½ÄÀ» String Çü½ÄÀ¸·Î º¯È¯ * @param : dtDate - Date Çü½ÄÀÇ ³¯Â¥. * : delm - ³¯Â¥ÀÇ Æ÷¸Ë ±¸ºÐÀÚ (¿¹ '.' -> 2005.08.01 ) * @return : String - º¯È¯µÈ String Çü½ÄÀÇ °´Ã¼ */ function castStrType( dtDate, format ) { var re = ""; var delm = "-"; if ( format == null ) { format = "yyyyMMdd"; } for (var i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i= 0; k--) { obj.remove(k); } } function addListItem(obj, val, txt) { var newOpt = new Option(txt, val); var selcnt = obj.options.length; obj.options[selcnt]=newOpt; }