﻿function getHttprequest(a,c){if(document.getElementById(c).style.display=="none"){document.getElementById(c).style.display=""}else{var b=null;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{b=new ActiveXObject("Microsoft.XMLHTTP")}b.open("GET",a,false);b.onreadystatechange=function(){if(b.readyState==4&&b.status==200&&b.statusText=="OK"){responseText=b.responseText}};b.send("");document.getElementById(c).innerHTML=b.responseText}}function Trm(a,d,c){Tstring="";Tempo=(c==2)?a:a.value;for(var b=0;b<Tempo.length;b++){Temp=Tempo.substring(b,b+1);if(Temp!=" "){Tstring+=Temp}}if(c==0||c==2){return Tstring}if(Tstring==""){alert(d);a.focus();return false}else{return true}}function addpt(f){mum2=f;if(f==""||f==0){return 0}var g=NumRtn(f)+" ";var b=g.length-1;var a=parseInt((b-1)/3);if(b>3){var d=b-(a*3);var e=g.substring(0,d);for(var c=0;c<a;c++){var e=e+","+g.substring(d,d+3);d=d+3}g=e}if(g.indexOf("-,")>=0){g=g.replace("-,","-")}return g}function alphaNum(a,c){Tstring="";for(var b=0;b<a.length;b++){Temp=a.substring(b,b+1);if((Temp>="0"&&Temp<="9")||Temp=="."||Temp=="-"){Tstring+=Temp}}if(Tstring==""){return 0}else{if(c==2){return Tstring}}return(c==0)?parseInt(Tstring):parseFloat(Tstring)}function NumRtn(a){if(a==""||a==0){return 0}a=a+" ";Rstr="";for(var b=0;b<a.length;b++){Jstr=a.charAt(b);if((Jstr>="0"&&Jstr<="9")||Jstr=="-"||Jstr=="."){Rstr+=Jstr}}return parseInt(Rstr)}function updown(c,b,a){c=parseInt(c);b=parseInt(b);if(b==0){b=1}if(a=="up"){Temp1=c%b;if(Temp1!=0){c=c-Temp1+b}}else{if(a=="down"){Temp1=c%b;if(Temp1!=0){c=c-Temp1}}else{Temp1=c%b;Temp2=b/2;if(Temp1==0){c=c}else{if(Temp1>=Temp2){c=c-Temp1+b}else{c=c-Temp1}}}}return c}function BVplayflash(d,e,a,b,g,c,f){document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+e+'" height="'+a+'" id="'+c+'">');document.write('<param name="movie" value="'+d+'" />');document.write('<param name="quality" value="'+g+'" />');document.write('<param name="wmode" value="'+f+'" />');document.write('<param name="bgcolor" value="'+b+'" />');document.write('<embed src="'+d+'" quality="'+g+'" wmode="'+f+'" bgcolor="'+b+'" width="'+e+'" height="'+a+'" name="'+c+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');document.write("</object>")}function mailTest(a){myRe=/^[\w\._-]+@[\w_-]+(\.\w+)+/;if(myRe.test(a)){return true}else{return false}}function overlab_check(a){Divname="overlab_"+a+"_rslt";if(a=="mail"){if(mailTest(document.getElementById("mail").value)==false){alert("메일주소 형식이 맞지 않습니다.");document.getElementById("mail").focus();return false}}if(document.getElementById(a).value==""){txt="";if(a=="mail"){txt="이메일을"}else{if(a=="Nname"){txt="닉네임을"}}alert(txt+" 입력해주세요.")}else{getHttprequest("/member/overlab_check.php?fdname="+a+"&val="+document.getElementById(a).value,Divname)}}function overlap_View(){var c=(document.getElementById?true:false);var b=((document.all&&!c)?true:false);var d=(document.layers?true:false);var a=navigator.appName=="Netscape";aa=a?window.pageYOffset:document.body.scrollTop;document.getElementById("overlap_div").style.top=aa;document.getElementById("overlap_div2").style.top=aa;document.getElementById("overlap_div").style.visibility="visible";document.getElementById("overlap_div2").style.visibility="visible";if(document.getElementById("overlap_div").style.visibility=="visible"){return 1}else{return 0}}function overlap_hidden(){document.getElementById("overlap_div").style.top=50;document.getElementById("overlap_div2").style.top=50;document.getElementById("overlap_div").style.visibility="hidden";document.getElementById("overlap_div2").style.visibility="hidden"}function ImageView(b,a){site="http://www.cartok.com/image_view.php?Img="+b;window.open(site,"","scrollbars=1,resizable=1")}function Roadtest_apply(a){site="/sangdam/roadtest.php?CM_id="+a;property="toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,copyhistory=no,width=560,height=370,left=500,top=50";window.open(site,"roadtest",property)};
