//새로바뀐 wincampus 스크립트
var _JV="AMZ2011011101";//script Version
var _UD='undefined';var _UN='unknown';var _mset=0;
function _IX(s,t){return s.indexOf(t)}
function _GV(b,a,c,d){ var f = b.split(c);for(var i=0;i<f.length; i++){ if( _IX(f[i],(a+d))==0) return f[i].substring(_IX(f[i],(a+d))+(a.length+d.length),f[i].length); }	return ''; }
function _XV(b,a,c,d,e){ var f = b.split(c);var g='';for(var i=0;i<f.length; i++){ if( _IX(f[i],(a+d))==0){ try{eval(e+"=f[i].substring(_IX(f[i],(a+d))+(a.length+d.length),f[i].length);");}catch(_e){}; continue;}else{ if(g) g+= '&'; g+= f[i];}; } return g;};
function _NOB(a){return (a!=_UD&&a>0)?new Object(a):new Object()}
function _NIM(){return new Image()}
function _IL(a){return a!=_UD?a.length:0}
function _ILF(a){ var b = 0; try{eval("b = a.length");}catch(_e){b=0;}; return b; }
function _VF(a,b){return a!=_UD&&(typeof a==b)?1:0}
function _LST(a,b){if(_IX(a,b)) a=a.substring(0,_IL(a));return a}
function _CST(a,b){if(_IX(a,b)>0){ a=a.substring(_IX(a,b)+_IL(b),_IL(a)); }else{ a='';};return a}
function _UL(a){a=_LST(a,'#');if(_IX(a,'://') > 0 ) a=_CST(a,'://');return a}
function _AA(a){return new Array(a?a:0)}
_DC = document.cookie ;
function _AGC(nm) { var cn = nm + "="; var nl = cn.length; var cl = _DC.length; var i = 0; while ( i < cl ) { var j = i + nl; if ( _DC.substring( i, j ) == cn ){ var val = _DC.indexOf(";", j ); if ( val == -1 ) val = _DC.length; return unescape(_DC.substring(j, val)); }; i = _DC.indexOf(" ", i ) + 1; if ( i == 0 ) break; } return ''; }
function _ASC( nm, val, exp ){var expd = new Date(); if ( exp ){ expd.setTime( expd.getTime() + ( exp * 1000 )); document.cookie = nm+"="+ escape(val) + "; expires="+ expd.toGMTString() +"; path="; }else{ document.cookie = nm + "=" + escape(val);};}
function SetUID() {     var newid = ''; var d = new Date(); var t = Math.floor(d.getTime()/1000); newid = 'UID-' + t.toString(16).toUpperCase(); for ( var i = 0; i < 16; i++ ){ var n = Math.floor(Math.random() * 16).toString(16).toUpperCase(); newid += n; }       return newid; }
var _FCV = _AGC("ACEFCID"); if ( !_FCV ) { _FCV = SetUID(); _ASC( "ACEFCID", _FCV , 86400 * 30 * 12 ); _FCV=_AGC("ACEFCID");}

var _AIO = _NIM(); //
var _AIU = _NIM(); //
var _AIW = _NIM(); //
var _AIX = _NIM(); //
var _AIB = _NIM(); //
var __hdki_xit = _NIM();
var EL_GCD = 'BP2J3648577368'; // gcode

var _gX='/?xuid='+EL_GCD+'&sv='+_JV,_gF='/?fuid='+EL_GCD+'&sv='+_JV,_gU='/?uid='+EL_GCD+'&sv='+_JV+"&FCV="+_FCV,_gE='/?euid='+EL_GCD+'&sv='+_JV,_gW='/?wuid='+EL_GCD+'&sv='+_JV,_gO='/?ouid='+EL_GCD+'&sv='+_JV,_gB='/?buid='+EL_GCD+'&sv='+_JV;

function _IDV(a){return (typeof a!=_UD)?1:0}
if(!_IDV(EL_GUL)) var EL_GUL ='dgc9.acecounter.com';
if(!_IDV(EL_GPT)) var EL_GPT ='8080';
var _d=_rf=_fwd=_arg=_xrg=_av=_bv=_rl=_ak=_xrl=_cd=_cu=_bz='',_sv=11,_tz=20,_ja=_sc=_ul=_ua=_UA=_os=_vs=_UN,_je='n',_bR='blockedReferrer';
_tz = Math.floor((new Date()).getTimezoneOffset()/60) + 29 ;if( _tz > 24 ) _tz = _tz - 24 ;
// Javascript Variables
if(!_IDV(_amt)) var _amt=0 ;
if(!_IDV(_id)) var _id='' ;
if(!_IDV(_pk)) var _pk='' ;
if(!_IDV(_pd)) var _pd='';
if(!_IDV(_ct)) var _ct='';
if(!_IDV(_ll)) var _ll='';
if(!_IDV(_ag)) var _ag=0;
if(!_IDV(_mr)) var _mr = _UN;
if(!_IDV(_gd)) var _gd=_UN;
if(!_IDV(_jn)) var _jn='';
if(!_IDV(_jid)) var _jid='' ;
if(!_IDV(_id)) var _id='' ;
if(!_IDV(_skey)) var _skey='';
if(!_IDV(_ud1)) var _ud1='';
if(!_IDV(_ud2)) var _ud2='';
if(!_IDV(_ud3)) var _ud3='';
if( !_ag ){ _ag = 0 ; }else{ _ag = parseInt(_ag); }
if( _ag < 0 || _ag > 150 ){ _ag = 0; }
if( _gd != 'man' && _gd != 'woman' ){ _gd =_UN;};
if( _mr != 'married' && _mr != 'single' ){ _mr =_UN;};
if( _jn != 'join' && _jn != 'withdraw' ){ _jn ='';};
if( _id != '' ){ _mset|=1 };
if( _jid != '' ){ _mset|=2 };
_je = (navigator.javaEnabled()==true)?'1':'0';_bn=navigator.appName;
if(_bn.substring(0,9)=="Microsoft") _bn="MSIE";
_bN=(_bn=="Netscape"),_bI=(_bn=="MSIE"),_bO=(_IX(navigator.userAgent,"Opera")>-1);if(_bO)_bI='';

_bz=navigator.appName; _pf=navigator.platform; _av=navigator.appVersion; _bv=parseFloat(_av) ;
if(_bI){_cu=navigator.cpuClass;}else{_cu=navigator.oscpu;};

if((_bn=="MSIE")&&(parseInt(_bv)==2)) _bv=3.01;_rf=document.referrer;var _prl='';var _frm=false;
function _WO(a,b,c){window.open(a,b,c)}

function ACEF_Tracking(a,b,c,d,e,f){ if(!_IDV(b)){var b = 'FLASH';}; if(!_IDV(e)){ var e = '0';};if(!_IDV(c)){ var c = '';};if(!_IDV(d)){ var d = '';}; var a_org=a; b = b.toUpperCase(); var b_org=b;	if(b_org=='FLASH_S'){ b='FLASH'; }; if( typeof CU_rl == 'undefined' ) var CU_rl = _PT(); if(_IDV(EL_GCD)){ var _AF_rl = document.URL; if(a.indexOf('://') < 0 && b_org != 'FLASH_S' ){ var _AT_rl  = ''; if( _AF_rl.indexOf('?') > 0 ){ _AF_rl = _AF_rl.substring(0,_AF_rl.indexOf('?'));}; var spurl = _AF_rl.split('/') ;	for(var ti=0;ti < spurl.length ; ti ++ ){ if( ti == spurl.length-1 ){ break ;}; if( _AT_rl  == '' ){ _AT_rl  = spurl[ti]; }else{ _AT_rl  += '/'+spurl[ti];}; }; var _AU_arg = ''; if( a.indexOf('?') > 0 ){ _AU_arg = a.substring(a.indexOf('?'),a.length); a = a.substring(0,a.indexOf('?')); }; var spurlt = a.split('/') ; if( spurlt.length > 0 ){ a = spurlt[spurlt.length-1];}; a = _AT_rl +'/'+a+_AU_arg;	_AF_rl=document.URL;}; _AF_rl = _AF_rl.substring(_AF_rl.indexOf('//')+2,_AF_rl.length); if( typeof f == 'undefined' ){ var f = a }else{f='http://'+_AF_rl.substring(0,_AF_rl.indexOf('/')+1)+f}; var _AS_rl = CU_rl+'/?xuid='+EL_GCD+'&url='+escape(_AF_rl)+'&xlnk='+escape(f)+'&fdv='+b+'&xidx='+e+'&'; var _AF_img = new Image(); _AF_img.src = _AS_rl; if( b_org == 'FLASH' && a_org != '' ){ if(c==''){ window.location.href = a_org; }else{ if(d==''){ window.open(a_org,c);}else{ window.open(a_org,c,d); };};	};} ; }
function _RPS(a,b,c){var d=a.indexOf(b),e=b.length>0?c.length:1; while(a&&d>=0){a=a.substring(0,d)+c+a.substring(d+b.length);d=a.indexOf(b,d+e);}return a}
function _PT(){return location.protocol=="https:"?"https://"+EL_GUL:"http://"+EL_GUL+":"+EL_GPT}
function _EL(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false)}else if(a.attachEvent){a.attachEvent("on"+b,c)} }
function _NA(a){return new Array(a?a:0)}
function _ER(a,b,c,d){_xrg=_PT()+_gW+"&url="+escape(_UL(document.URL))+"&err="+((typeof a=="string")?a:"Unknown")+"&ern="+c+"&bz="+_bz+"&bv="+_vs+"&RID="+Math.random()+"&";
if(_IX(_bn,"Netscape") > -1 || _bn == "Mozilla"){ setTimeout("_AIW.src=_xrg;",1); } else{ _AIW.src=_xrg; } }
function _PL(a){if(!_IL(a))a=_UL(document.URL);
_arg = _PT()+_gU;
if( typeof _ERR !=_UD && _ERR == 'err'){ _arg = _PT()+_gE;};
if( _ll.length > 0 ) _arg += "&md=b";
_AIU.src = _arg+"&url="+escape(a)+"&ref="+escape(_rf)+"&cpu="+_cu+"&bz="+_bz+"&bv="+_vs+"&os="+_os+"&dim="+_d+"&cd="+_cd+"&je="+_je+"&jv="+_sv+"&tz="+_tz+"&ul="+_ul+"&ad_key="+escape(_ak)+"&skey="+_RPS(escape(_skey),"+","%2B")+"&age="+_ag+"&gender="+_gd+"&marry="+_mr+"&join="+_jn+"&mset="+_mset+"&udf1="+_ud1+"&udf2="+_ud2+"&udf3="+_ud3+"&amt="+_amt+"&frwd="+_fwd+"&pd="+_RPS(escape(_pd),"+","%2B")+"&ct="+_RPS(escape(_ct),"+","%2B")+"&ll="+_RPS(escape(_ll),"+","%2B")+"&RID="+Math.random()+"&";
setTimeout("",300);
}
_EL(window,"error",_ER); //window Error
if( typeof window.screen == 'object'){_sv=12;_d=screen.width+'*'+screen.height;_sc=_bI?screen.colorDepth:screen.pixelDepth;if(_sc==_UD)_sc=_UN;}
_ro=_NA();if(_ro.toSource||(_bI&&_ro.shift))_sv=13;
if( top && typeof top == 'object' &&_ILF(top.frames)){eval("try{_rl=top.document.URL;}catch(_e){_rl='';};"); if( _rl != document.URL ) _frm = true;};
if(_frm){ eval("try{_prl = top.document.URL;}catch(_e){_prl=_bR;};"); if(_prl == '') eval("try{_prl=parent.document.URL;}catch(_e){_prl='';};");
if( _IX(_prl,'#') > 0 ) _prl=_prl.substring(0,_IX(_prl,'#'));
_prl=_LST(_prl,'#');
if( _IX(_rf,'#') > 0 ) _rf=_rf.substring(0,_IX(_rf,'#'));
_prl=_LST(_prl,'/');_rf=_LST(_rf,'/');
if( _rf == '' ) eval("try{_rf=parent.document.URL;}catch(_e){_rf=_bR;}");
if(_rf==_bR||_prl==_bR){ _rf='',_prl='';}; if( _rf == _prl ){ eval("try{_rf=top.document.referrer;}catch(_e){_rf='';}");
if( _rf == ''){ _rf = 'bookmark';};if( _IX(document.cookie,'ACEN_CK='+escape(_rf)) > -1 ){ _rf = _prl;}
else{
if(_IX(_prl,'?') > 0){ _ak = _prl.substring(_IX(_prl,'?')+1,_prl.length); _prl = _ak; }
if( _IX(_prl.toUpperCase(),'OVRAW=') >= 0 ){ _ak = 'src=overture&kw='+_GV(_prl.toUpperCase(),'OVRAW','&','=')+'&OVRAW='+_GV(_prl.toUpperCase(),'OVRAW','&','=')+'&OVKEY='+_GV(_prl.toUpperCase(),'OVKEY','&','=')+'&OVMTC='+_GV(_prl.toUpperCase(),'OVMTC','&','=').toLowerCase() };
if(_IX(_prl,'gclid=') >= 0 ){ _ak='src=adwords'; }; if(_IX(_prl,'DWIT=') >= 0 ){_ak='src=dnet_cb';};
if( _IX(_prl,"rcsite=") >= 0 &&  _IX(_prl,"rctype=") >= 0){ _prl += '&'; _ak = _prl.substring(_IX(_prl,'rcsite='),_prl.indexOf('&',_IX(_prl,'rcsite=')+7))+'-'+_prl.substring(_IX(_prl,'rctype=')+7,_prl.indexOf('&',_IX(_prl,'rctype=')+7))+'&'; };
if( _GV(_prl,'src','&','=') ) _ak += '&src='+_GV(_prl,'src','&','='); if( _GV(_prl,'kw','&','=') ) _ak += '&kw='+_GV(_prl,'kw','&','='); if(_prl.length>0){ _prl = _XV(_prl,'FWDRL','&','=','_rf'); _rf = unescape(_rf); _ak = _XV(_ak,'FWDRL','&','=','_prl'); }; if( typeof FD_ref=='string' && FD_ref != '' ) _rf = FD_ref;
_fwd = _GV(_prl,'FWDIDX','&','=');
document.cookie='ACEN_CK='+escape(_rf)+';path=/;';
};
if(document.URL.indexOf('?') > 0 && ( _IX(_ak,'rcsite=') < 0 && _IX(_ak,'NVAR=') < 0 && _IX(_ak,'src=') < 0 && _IX(_ak,'source=') < 0) ) _ak =document.URL.substring(document.URL.indexOf('?')+1,document.URL.length); };
}
else{
_rf=_LST(_rf,'#');_ak=_CST(document.URL,'?');
if( _IX(_ak,"rcsite=") > 0 &&  _IX(_ak,"rctype=") > 0){
    _ak += '&';
    _ak = _ak.substring(_IX(_ak,'rcsite='),_ak.indexOf('&',_IX(_ak,'rcsite=')+7))+'-'+_ak.substring(_IX(_ak,'rctype=')+7,_ak.indexOf('&',_IX(_ak,'rctype=')+7))+'&';
}
}
_rl=document.URL;
var _trl = _rl.split('?'); if(_trl.length>1){ _trl[1] = _XV(_trl[1],'FWDRL','&','=','_rf'); _rf = unescape(_rf); _fwd = _GV(_trl[1],'FWDIDX','&','='); _rl=_trl.join('?');
_ak = _XV(_ak,'FWDRL','&','=','_prl');
}; if( typeof FD_ref=='string' && FD_ref != '' ) _rf = FD_ref;
if( _rf.indexOf('googlesyndication.com') > 0 ){
var _rf_idx = _rf.indexOf('&url=');  if( _rf_idx > 0 ){ var _rf_t = unescape(_rf.substring(_rf_idx+5,_rf.indexOf('&',_rf_idx+5)));  if( _rf_t.length > 0 ){ _rf = _rf_t ;};  };  };
_rl = _UL(_rl); _rf = _UL(_rf);

if( typeof _rf_t != 'undefined' && _rf_t != '' ) _rf = _rf_t ;
if( typeof _ak_t != 'undefined' && _ak_t != '' ) _ak = _ak_t ;

if( typeof _rf==_UD||( _rf == '' )) _rf = 'bookmark' ;_cd=(_bI)?screen.colorDepth:screen.pixelDepth;
_UA = navigator.userAgent;_ua = navigator.userAgent.toLowerCase();
if (navigator.language){  _ul = navigator.language.toLowerCase();}else if(navigator.userLanguage){  _ul = navigator.userLanguage.toLowerCase();};

_st = _IX(_UA,'(') + 1;_end = _IX(_UA,')');_str = _UA.substring(_st, _end);_if = _str.split('; ');_cmp = _UN ;

if(_bI){ _cmp = navigator.appName; _str = _if[1].substring(5, _if[1].length); _vs = (parseFloat(_str)).toString();}
else if ( (_st = _IX(_ua,"opera")) > 0){ _cmp = "Opera" ;_vs = _ua.substring(_st+6, _ua.indexOf('.',_st+6)); }
else if ((_st = _IX(_ua,"firefox")) > 0){_cmp = "Firefox"; _vs = _ua.substring(_st+8, _ua.indexOf('.',_st+8)); }
else if ((_st = _IX(_ua,"netscape6")) > 0){ _cmp = "Netscape"; _vs = _ua.substring(_st+10, _ua.length);
if ((_st = _IX(_vs,"b")) > 0 ) { _str = _vs.substring(0,_IX(_vs,"b")); _vs = _str ;  };}
else if ((_st = _IX(_ua,"netscape/7")) > 0){  _cmp = "Netscape";  _vs = _ua.substring(_st+9, _ua.length);  if ((_st = _IX(_vs,"b")) > 0 ){ _str = _vs.substring(0,_IX(_vs,"b")); _vs = _str;};
}
else{
if (_IX(_ua,"gecko") > 0){ if(_IX(_ua,"safari")>0){ _cmp = "Safari";_ut = _ua.split('/');for( var ii=0;ii<_ut.length;ii++) if(_IX(_ut[ii],'safari')>0){ _vst = _ut[ii].split(' '); _vs = _vst[0];} }else{ _cmp = navigator.vendor;  } } else if (_IX(_ua,"nav") > 0){ _cmp = "Netscape Navigator";}else{ _cmp = navigator.appName;}; _av = _UA ;
}
if (_IX(_vs,'.')<0){  _vs = _vs + '.0'}
_bz = _cmp;

var aff_ssn={uid:EL_GCD,g:EL_GUL,p:EL_GPT,s:_JV,rl:_rl,m:[],run:aff_ssn?aff_ssn.uid:this.uid};
function BP2J3648577368(){
var f={e:function(s,t){return s.indexOf(t);},f:function(o){var a;a=o;if(a.tagName=='A'){return a;}else{a = a.parentNode;};if(a.tagName=='A'){return a;}else{a = a.parentNode;};if(a.tagName=='A'){return a;}else{a = a.parentNode;};if(a.tagName=='A'){return a;}else{a = a.parentNode;};if(a.tagName=='A'){return a;};},ea:function(c,f){var wd;if(c=='click'){wd=window.document;}else{wd=window;}if(wd.addEventListener){wd.addEventListener(c,f,false)}else if(wd.attachEvent){wd.attachEvent("on"+c,f)} } };
var p={h:location.host,p:(location.protocol=='https:')?"https://"+aff_ssn.g:"http://"+aff_ssn.g+":"+aff_ssn.p,s:'/?xuid='+aff_ssn.uid+'&sv='+aff_ssn.s,u:function(){var r=document.URL;r=r.replace('#','');return r+'';},ol:new Image(0,0),xL:function(x){if(typeof(Amz_T_e)==s.u){p.ol.src=p.p+p.s+'&url='+escape(aff_ssn.rl)+'&xlnk='+escape(x)+'&xidx=0&';aff_ssn.m.push(p.ol);} } };
var s={Lp:'a.tagName=="B" || a.tagName=="I" || a.tagName== "U" || a.tagName== "FONT" || a.tagName=="I" || a.tagName=="STRONG"'  ,f:'function',	j:'javascript:',u:'undefined'};
var c={Run:function(){f.ea('click',this.ec);},ec:function(e){var ok='';var m = document.all ? event.srcElement : e.target;var a=m;var o=m.tagName;if(o=="A" || o=="AREA" || o=="IMG" || eval(s.Lp)){ok=c.lc(m);if(ok.length != 0){p.xL(unescape(ok));};	};},lc:function(o){try{var ar='';var obj;obj=f.f(o);if(typeof obj==s.u){return '';};ar = String(obj.href);if(ar.length == 0){return '';};ar=ar.replace(/\n|\s|#/g,'');ar=ar.replace(/'|"/g,' ');if(f.e(ar,'void(') == -1 && f.e(ar,'void0') == -1){	return ar;}else{return s.j + 'void(0)';};return '';}catch(er){return '';} } };
if(p.u().charAt(0) == 'h'){if(aff_ssn.uid!=aff_ssn.run){c.Run(); } };
};eval(aff_ssn.uid + '();');

if( _IX(_pf,_UD) >= 0 || _pf ==  '' ){ _os = _UN ;}else{ _os = _pf ; };
if( _IX(_os,'Win32') >= 0 ){if( _IX(_av,'98')>=0){ _os = 'Windows 98';}else if( _IX(_av,'95')>=0 ){ _os = 'Windows 95';}else if( _IX(_av,'Me')>=0 ){ _os = 'Windows Me';}else if( _IX(_av,'NT')>=0 ){ _os = 'Windows NT';}else{ _os = 'Windows';};if( _IX(_ua,'nt 5.0')>=0){ _os = 'Windows 2000';};if( _IX(_ua,'nt 5.1')>=0){_os = 'Windows XP';if( _IX(_ua,'sv1') > 0 ){_os = 'Windows XP SP2';};};if( _IX(_ua,'nt 5.2')>=0){_os ='Windows Server 2003';};if( _IX(_ua,'nt 6.0')>=0){_os ='Windows Vista';};if( _IX(_ua,'nt 6.1')>=0){_os ='Windows 7';};};
_pf_s = _pf.substring(0,4);if( _pf_s == 'Wind'){if( _pf_s == 'Win1'){_os = 'Windows 3.1';}else if( _pf_s == 'Mac6' ){ _os = 'Mac';}else if( _pf_s == 'MacO' ){ _os ='Mac';}else if( _pf_s == 'MacP' ){_os='Mac';}else if(_pf_s == 'Linu'){_os='Linux';}else if( _pf_s == 'WebT' ){ _os='WebTV';}else if(  _pf_s =='OSF1' ){ _os ='Compaq Open VMS';}else if(_pf_s == 'HP-U' ){ _os='HP Unix';}else if(  _pf_s == 'OS/2' ){ _os = 'OS/2' ;}else if( _pf_s == 'AIX4' ){ _os = 'AIX';}else if( _pf_s == 'Free' ){ _os = 'FreeBSD';}else if( _pf_s == 'SunO' ){ _os = 'SunO';}else if( _pf_s == 'Drea' ){ _os = 'Drea'; }else if( _pf_s == 'Plan' ){ _os = 'Plan'; }else{ _os = _UN; };};
if( _cu == 'x86' ){ _cu = 'Intel x86';}else if( _cu == 'PPC' ){ _cu = 'Power PC';}else if( _cu == '68k' ){ _cu = 'Motorola 680x';}else if( _cu == 'Alpha' ){ _cu = 'Compaq Alpa';}else if( _cu == 'Arm' ){ _cu = 'ARM';}else{ _cu = _UN;};if( _d == '' || typeof _d==_UD ){ _d = '0*0';}

_PL(_rl); // Site Logging

//새로바뀐 wincampus 스크립트


// NHN Conversion Tracking System Gathering Script V.11.20100308
if( typeof _TGCD == 'undefined'){
var _TGCD = 'AB4A365023241685'; var _JV="AMZ2011071401"; var _TGUL = 'cts6.acecounter.com';var _TGPT='80';
var _bn=navigator.appName; var _UD='undefined';var _UN='unknown'; var _TDC = document.cookie ;
function _TIDV(a){return (typeof a!=_UD)?1:0}; function _TIX(s,t){return s.indexOf(t)};function _TGV(b,a,c,d){ var f = b.split(c);for(var i=0;i<f.length; i++){ if( _TIX(f[i],(a+d))==0) return f[i].substring(_TIX(f[i],(a+d))+(a.length+d.length),f[i].length); }	return ''; };function _XV(b,a,c,d,e){ var f = b.split(c);var g='';for(var i=0;i<f.length; i++){ if( _TIX(f[i],(a+d))==0){ try{eval(e+"=f[i].substring(_TIX(f[i],(a+d))+(a.length+d.length),f[i].length);");}catch(_e){}; continue;}else{ if(g) g+= '&'; g+= f[i];}; } return g;};
function _TNOB(a){return (a!=_UD&&a>0)?new Object(a):new Object()}; function _TNIM(){return new Image()}; function _TIL(a){return a!=_UD?a.length:0};function _TILF(a){ var b = 0; try{eval("b = a.length");}catch(_e){b=0;}; return b; };
 function _LST(a,b){if(_TIX(a,b)) a=a.substring(0,_TIL(a));return a}; function _CST(a,b){if(_TIX(a,b)>0) a=a.substring(_TIX(a,b)+_TIL(b),_TIL(a));return a}; function _UL(a){a=_LST(a,'#');a=_CST(a,'://');return a}; function _AA(a){return new Array(a?a:0)};
function _TAGC(nm) { var cn = nm + "="; var nl = cn.length; var cl = _TDC.length; var i = 0; while ( i < cl ) { var j = i + nl; if ( _TDC.substring( i, j ) == cn ){ var val = _TDC.indexOf(";", j ); if ( val == -1 ) val = _TDC.length; return unescape(_TDC.substring(j, val)); }; i = _TDC.indexOf(" ", i ) + 1; if ( i == 0 ) break; } return ''; }; function _TASC( nm, val, exp ,dm ){var expd = new Date(); if ( exp ){ expd.setTime( expd.getTime() + ( exp * 1000 )); document.cookie = nm+"="+ escape(val) + "; expires="+ expd.toGMTString() +"; path=/; domain="+dm+"; "; }else{ document.cookie = nm + "=" + escape(val)+"; path=/; domain="+dm+"; ";};}; function SetUID() {     var newid = ''; var d = new Date(); var t = Math.floor(d.getTime()/1000); newid = 'UID-' + t.toString(16).toUpperCase(); for ( var i = 0; i < 16; i++ ){ var n = Math.floor(Math.random() * 16).toString(16).toUpperCase(); newid += n; }       return newid; };
var _TFCV = _TAGC("CTSFCID"); if ( !_TFCV ) { _TFCV = SetUID(); _TASC( "CTSFCID", _TFCV , 86400 * 30 * 12 , _CDM ); _TFCV=_TAGC("CTSFCID");}
var _NIU = _TNIM(); var _d=_rf=_fwd=_arg=_bv=_rl=_Tak=_xrl=_rft='',_je='n',_bR='blockedReferrer';
if( !_TIDV(_CDM)) var _CDM = document.domain; if( _CDM == '' ) var _CDM = document.domain; if( !_TIDV(_RFL)) var _RFL = ''; if( !_TIDV(_CNM)) var _CNM = ''; if( !_TIDV(_CNV)) var _CNV = ''; if( typeof _CNV == 'string' ) _CNV = _CNV.replace(/[^0-9]/g,'');
function _S_TAG(s){ var o = new RegExp(); o= /[<][^>]*[>]/gi; return s.replace(o,""); }
function _G_TAG(n,a,d){ var b=document.getElementsByTagName(n);if( b.length <= 0 ) return ''; for(var c=0;c<b.length; c++ ){ if( typeof b[c].innerHTML != _UD && _TIX(b[c].innerHTML.toString().replace(/ /g,''),a) >= 0 ){ if( typeof b[c+d].innerHTML != _UD ){ return b[c+d].innerHTML; };};}; return '';};
if( typeof _CNM == _UD || _CNM == '' ){ if( _CNV == '' && document.URL.indexOf('orderend') > 0){ /* for Makeshop */ try{ _CNV=document.getElementById('mk_totalprice').innerHTML;}catch(_e){}; if(_CNV.replace(/[^0-9]/g,'')=='') _CNV = _G_TAG('b','결제금액',1); _CNV = _S_TAG(_CNV); _CNV = _CNV.replace(/[^0-9]/g,''); }; if( _CNV == '' && document.URL.indexOf('cart_result') > 0){ /* Whois */ var _CNVT = _G_TAG('td','결제금액',0); _CNVT = _CNVT.toLowerCase(); _CNV = _CNVT.substring(_CNVT.indexOf('결제금액')+1,_CNVT.indexOf('</td>',_CNVT.indexOf('결제금액')+5)); _CNV = _S_TAG(_CNV); _CNV = _CNV.replace(/[^0-9]/g,''); }; if( _CNV == '' && document.URL.indexOf('order_result') > 0){ /* Cafe24 */ var _CNVT = _G_TAG('td','총구매액',0); _CNVT = _CNVT.toLowerCase(); _CNV = _CNVT.substring(_CNVT.indexOf('총구매액'),_CNVT.indexOf('</b>',_CNVT.indexOf('총구매액'))); _CNV = _S_TAG(_CNV); _CNV = _CNV.replace(/[^0-9]/g,''); }; if(document.URL.indexOf('url=Orderresult') > 0){ /* Cafe24 II*/ _CNV=(function(){var obj = document.getElementsByTagName('td');var innerTextLen = -1;var targetK;for(var k in obj){try{if(innerTextLen<0) {innerTextLen=obj[k].innerHTML.length;targetK=k;};if(obj[k].innerHTML.indexOf('총 주문합계 금액')<0) continue;if(innerTextLen>obj[k].innerHTML.length) {innerTextLen = obj[k].innerHTML.length;targetK=k;};}catch(_e){};};return(obj[++targetK].innerHTML.replace(/[^0-9]/g,''));})();};	if(document.URL.indexOf('order_end.php') > 0){ /* Godomall */ var _CNV= _S_TAG('b','원',0);_CNV = _CNV.replace(/[^0-9]/g,'');}; if(typeof EL_amt != _UD) { if(EL_amt>0) { var _CNV= EL_amt; _CNV = _CNV.replace(/[^0-9]/g,''); }; }; if( typeof ovt_amount != _UD && ovt_amount != ''){ _CNV = ovt_amount ;}; if( _CNV != '' ){ _CNM = "구매완료"; }; };
_je = (navigator.javaEnabled()==true)?'1':'0';_bn=navigator.appName; if(_bn.substring(0,9)=="Microsoft") _bn="MSIE";
_bN=(_bn=="Netscape"),_bI=(_bn=="MSIE"),_bO=(_TIX(navigator.userAgent,"Opera")>-1);if(_bO)_bI=''; if((_bn=="MSIE")&&(parseInt(_bv)==2)) _bv=3.01;_rf=document.referrer;var _prl='';var _frm=false;
function _TPT(){return location.protocol=="https:"?"https://"+_TGUL:"http://"+_TGUL+":"+_TGPT}; function _NA(a){return new Array(a?a:0)};
function CTS_PL(a){if(!_TIL(a))a=_UL(document.URL); _arg = _TPT()+'/?ouid='+_TGCD+'&sv='+_JV+"&FCV="+_TFCV; _NIU.src = _arg+"&url="+escape(a)+"&ref="+escape(_rf)+"&je="+_je+"&ad_key="+escape(_Tak)+"&dm="+_CDM+"&dvt="+_DVT+"&cnm="+escape(_CNM)+"&cnv="+_CNV+"&rft="+escape(_rft)+"&RID="+Math.random()+"&"; setTimeout("",300); };
if( top && typeof top == 'object' &&_TILF(top.frames)){eval("try{_rl=top.document.URL;}catch(_e){_rl='';};"); if( _rl != document.URL ) _frm = true;};
if(_frm){ eval("try{_prl = top.document.URL;}catch(_e){_prl=_bR;};"); if(_prl == '') eval("try{_prl=parent.document.URL;}catch(_e){_prl='';};");
if( _TIX(_prl,'#') > 0 ) _prl=_prl.substring(0,_TIX(_prl,'#')); _prl=_LST(_prl,'#'); if( _TIX(_rf,'#') > 0 ) _rf=_rf.substring(0,_TIX(_rf,'#')); _prl=_LST(_prl,'/');_rf=_LST(_rf,'/');
if( _rf == '' ) eval("try{_rf=parent.document.URL;}catch(_e){_rf=_bR;}"); if(_rf==_bR||_prl==_bR){ _rf='',_prl='';}; if( _rf == _prl ){ eval("try{_rf=top.document.referrer;}catch(_e){_rf='';}");
if( _rf == ''){ _rf = 'bookmark';};if( _TIX(document.cookie,'CTSN_CK='+escape(_rf)) > -1 ){ _rf = _prl;} else{ if(_TIX(_prl,'?') > 0){ _prl = _prl.substring(_TIX(_prl,'?')+1,_prl.length); };
if( _TIX(_prl,'NVAR=') >= 0 ){ _Tak = 'NVAR='+_TGV(_prl,'NVAR','&','=')+'&NVKWD='+_TGV(_prl,'NVKWD','&','=')+'&NVADKWD='+_TGV(_prl,'NVADKWD','&','=')+'&NVADID='+_TGV(_prl,'NVADID','&','='); };
document.cookie='CTSN_CK='+escape(_rf)+';path=/;'; };};} else{ _rf=_LST(_rf,'#'); };
if(document.URL.indexOf('NVAR=')>0 && ( _TIX(_Tak,'NVAR=') < 0 ) ){ _prl =document.URL.substring(document.URL.indexOf('?')+1,document.URL.length); _Tak = 'NVAR='+_TGV(_prl,'NVAR','&','=')+'&NVKWD='+_TGV(_prl,'NVKWD','&','=')+'&NVADKWD='+_TGV(_prl,'NVADKWD','&','=')+'&NVADID='+_TGV(_prl,'NVADID','&','='); }; _rl=document.URL; var _trl = _rl.split('?'); if(_trl.length>1){ _trl[1] = _XV(_trl[1],'FWDRL','&','=','_rf'); _rf = unescape(_rf); _fwd = _TGV(_trl[1],'FWDIDX','&','='); _rl=_trl.join('?'); }; if( _RFL != '' ) _rf = _RFL; _rl = _UL(_rl); _rf = _UL(_rf); if( _rl.length > 1023 ) _rl = _rl.substring(0,1023);if( _rf.length > 512 ) _rf = _rf.substring(0,512); _CKURL = _TAGC("CTSCKURL"); _CKURLC = _TAGC("CTSCKURLC"); var _DVT = '1'; _rf_dm = _rf.split('/');
if( _CKURL != _Tak && _Tak != '' && (_rf_dm.length > 0 && _rf_dm[0].indexOf(_CDM) < 0) ) _TASC( "CTSCKURL", _Tak , 86400 * 15 , _CDM );
var _CKDVT = _TAGC("CTSCKDVT"); if( _CKDVT == '' ){ if( _CKURL != '' && ( _CKURLC =='' || _TGV(_CKURLC,'CTSREF','&','=') == '' ) ){ _DVT = '2';}; if( _Tak != '' && (_rf_dm.length > 0 && _rf_dm[0].length > 0 && _rf_dm[0].indexOf(_CDM) < 0) ) _DVT = '1' ; _TASC( "CTSCKDVT", _DVT , 0 , _CDM ); }else{ _DVT = _CKDVT; }; if( _Tak == '' ) _Tak = _CKURL; if( _CKURLC == '' && _Tak != '' && (_rf_dm.length > 0 && _rf_dm[0].indexOf(_CDM) < 0) ){	_Tak += '&CTSREF='+_rf; _TASC( "CTSCKURLC", _Tak , 0 , _CDM ); };
if( _CNM != '' ){ _rft = _TGV(_CKURLC,'CTSREF','&','='); }; if( typeof _rf==_UD||( _rf == '' )) _rf = 'bookmark' ;
if(_CDM=='none'){CTS_PL(_rl);}else{ if( _Tak != '' ) CTS_PL(_rl); };
}
//NHN Conversion Tracking System Gathering Script End


var openWin = null;
var openTree = null;
var isIE = false;
var isNC = false;
var ThisDomain = document.domain;
var ThisCompanyCD = "WING";

if (ThisDomain == "gbpost.winglishphone.com")
{
    ThisCompanyCD = "GBPS";
}

if (ThisDomain == "dev.winglishphone.com")
{
    ThisCompanyCD = "OXP";
}


//document.domain = "winglishphone.com";
/*
 if (navigator.appName.indexOf("Netscape") != -1) {
 isIE = false;
 isNC = true;
 }
 else if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1) {
 isIE = true;
 isNC = false;
 }
 else {
 isIE = false;
 isNC = false;
 }
 */
function web_js_errortrap(msg, url, line)
{
    alert(msg + "\n" + url + "\n" + line + " Line");
    return true;
}
onerror = web_js_errortrap;

function web_form_submit(form, action, method, target, msg)
{
    if (!is_null(msg))
        if (!confirm(msg))
            return false;

    if (!is_null(action)) form.action = action;
    if (!is_null(method)) form.method = method;
    if (!is_null(target)) form.target = target;
    return( form.submit() );
}

function is_valid_char(form)
{
    var comp = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
    var string = form.id.value;
    var len = string.length;
    for (i = 0; i < len; i++)
    {
        if (comp.indexOf(string.substring(i, i + 1)) < 0)
        {
            alert("허용된 문자가 아닙니다. 다시 입력해 주십시오");
            form.id.value = "";
            form.id.focus();
            return true;
        }
    }
}

function web_form_reset(form)
{
    form.reset();
}

function web_window_open00(url, name)
{
    openWin = window.open(url, name);
    openWin.focus();
}

function web_window_open(url, name, option)
{
    var opt = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,left=0,top=0';
    if (!is_null(option))
        opt = opt + ',' + option;

    if (!openWin || openWin.closed)
    {
        openWin = window.open(url, name, opt);
        openWin.focus();
    }
    else
    {
        openWin = window.open(url, name, opt);
        openWin.focus();
    }
}

function web_window_open2(url, name, option)
{
    var opt = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0';
    if (!is_null(option))
        opt = opt + ',' + option;

    if (!openWin || openWin.closed)
    {
        openWin = window.open(url, name, opt);
        openWin.focus();
    }
    else
    {
        openWin = window.open(url, name, opt);
        openWin.focus();
    }
}

function web_window_open3(url, name, option)
{
    var opt = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=0,top=0';
    if (!is_null(option))
        opt = opt + ',' + option;

    if (!openWin || openWin.closed)
    {
        openWin = window.open(url, name, opt);
        openWin.focus();
    }
    else
    {
        openWin = window.open(url, name, opt);
        openWin.focus();
    }
}


function web_window_close()
{
    if (openWin && !openWin.closed)
    {
        self.window.focus();
        openWin.close();
    }
}

function web_tree_open(url, name, option)
{
    var opt = 'toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0';
    if (!is_null(option))
        opt = opt + ',' + option;

    if (!openTree || openTree.closed)
    {
        openTree = window.open(url, name, opt);
        openTree.focus();
    }
    else
    {
        openTree = window.open(url, name, opt);
        openTree.focus();
    }
}

function web_tree_close()
{
    if (openTree && !openTree.closed)
    {
        self.window.focus();
        openTree.close();
    }
}

function is_null(string)
{
    if (string == "")
        return  true;
    return  false;
}

function is_space(string)
{
    for (var i = 0; i < string.length; i++)
        if (string.charAt(i) != ' ')
            return  false;
    return  true;
}


function is_numeric(string)
{
    if (is_null(string))
        return false;

    for (var i = 0; i < string.length; i++) {
        if (string.charAt(i) >= '0' && string.charAt(i) <= '9')
            continue;
        else
            return    false;
    }
    return    true;
}

function is_alnum(string)
{
    if (is_null(string))
        return  false;

    for (var i = 0; i < string.length; i++) {
        if (string.charAt(i) >= '0' && string.charAt(i) <= '9')
            continue;
        else if (string.charAt(i) >= 'a' && string.charAt(i) <= 'z')
            continue;
        else if (string.charAt(i) >= 'A' && string.charAt(i) <= 'Z')
                continue;
            else
                return  false;
    }
    return  true;
}

function is_num(string)
{
    if (is_null(string))
        return false;

    for (var i = 0; i < string.length; i++) {
        if (string.charAt(i) >= '0' && string.charAt(i) <= '9')
            continue;
        else
            return    false;
    }
    return    true;
}

function is_char(string)
{
    if (is_null(string))
        return  false;
    var flag = true;
    var ch = "\0";

    for (var i = 0; i < string.length; i++)
    {
        ch = string.charAt(i);
        if (ch >= '0' && ch <= '9')
            flag = false;
        else if (ch == '~' || ch == '`' || ch == '\\' ||
                 ch == '-' || ch == '_' || ch == '|' || ch == '+' ||
                 ch == '=' || ch == ',' || ch == '.' || ch == '/' ||
                 ch == '<' || ch == '>' || ch == '?' || ch == '!' ||
                 ch == '@' || ch == '#' || ch == '$' || ch == '%' ||
                 ch == '^' || ch == '&' || ch == '*' || ch == '(' ||
                 ch == ')' || ch == '\"' || ch == '[' || ch == '(')
            flag = false;
    }
    return  flag;
}

function is_spcl(string)
{
    if (is_null(string))
        return  false;

    var flag = true;
    var ch = "\0";

    for (var i = 0; i < string.length; i++)
    {
        ch = string.charAt(i);
        if (ch == '~' || ch == '`' || ch == '\\' ||
            ch == '-' || ch == '_' || ch == '|' || ch == '+' ||
            ch == '=' || ch == ',' || ch == '.' || ch == '/' ||
            ch == '<' || ch == '>' || ch == '?' || ch == '!' ||
            ch == '@' || ch == '#' || ch == '$' || ch == '%' ||
            ch == '^' || ch == '&' || ch == '*' || ch == '(' ||
            ch == ')' || ch == '\"' || ch == '[' || ch == '(')
            continue;
        else
            return  false;
    }
    return  true;
}

function is_ImageFile(file_name)
{
    var type;

    if (is_null(file_name) || is_space(file_name))
        return false;

    type = get_FileType(file_name);

    if (type == 'JPG' || type == 'GIF')
        return true;
    else return false;
}

function is_TextFile(file_name)
{
    var type;

    if (is_null(file_name) || is_space(file_name))
        return false;

    type = get_FileType(file_name);

    if (type == 'TXT')
        return true;
    else return false;
}

function is_length(string, len)
{
    var bitwise = 0x80;
    var han = bitwise.toString(2);
    var str_len = 0;

    for (var i = 0; i < string.length; i ++) {
        var ch_x = string.charCodeAt(i);

        if (ch_x & han)
            str_len += 2;
        else
            str_len++;
    }

    /***********
     if( str_len == len )
     return 0;
     else if( str_len > len )
     return 1;
     else
     return -1;
     **************/

    return( str_len - len );
}

function get_FileType(file_name)
{
    var type = file_name.split('.');
    var len = type.length;

    if (len == 0) return '';

    return( type[len - 1].toUpperCase() );
}

function check_password(string, len)
{
    var num_count = 0;
    var alpha_count = 0;

    if (string.length < len)
        return false;

    for (var i = 0; i < string.length; i++) {
        if (string.charAt(i) >= '0' && string.charAt(i) <= '9')
            num_count++;
        else
            alpha_count++;
    }

    if (num_count == 0 || alpha_count == 0)
        return false;

    return true;
}

function check_year(year)
{
    if (parseInt(year, 10) < 1 || parseInt(year, 10) > 9999)
        return    false;
    return    true;
}

function check_month(month)
{
    if (parseInt(month, 10) < 1 || parseInt(month, 10) > 12)
        return    false;
    return    true;
}

function check_day(year, month, day)
{
    var i_year = parseInt(year, 10);

    if (!check_year(year))
        return false;

    if (!check_month(month))
        return false;

    if (parseInt(day, 10) < 1 || parseInt(day, 10) > 31)
        return false;

    if (month == 4 || month == 6 || month == 9 || month == 11)
        if (day == 31)
            return false;

    if (month == 2) {
        var g = parseInt(i_year / 4);
        if (isNaN(g))
            return false;

        if (day > 29)
            return false;

        if (day == 29 && ( ( i_year / 4 ) != parseInt(i_year / 4) ))
            return false;
    }
    return    true;
}

function check_date(year, month, day)
{
    if (!check_day(year, month, day))
        return false;
    return true;
}

function comp_date(s_year, s_month, s_day, e_year, e_month, e_day)
{
    var f_year = parseInt(s_year, 10);
    var f_month = parseInt(s_month, 10);
    var f_day = parseInt(s_day, 10);
    var t_year = parseInt(e_year, 10);
    var t_month = parseInt(e_month, 10);
    var t_day = parseInt(e_day, 10);

    if (f_year > t_year)
        return false;
    else if (f_year == t_year && f_month > t_month)
        return false;
    else if (f_year == t_year && f_month == t_month && f_day > t_day)
            return false;

    return true;
}

// IMAGE LIBRARY

function MakeArray(n)
{
    this.length = n;
    for (var i = 1; i <= n; i++)
        this[i] = new Image();

    return this;
}

function ms_on(name)
{
    var num = name.split("_");

    document[name].src = image_on[num[1]].src;
    self.status = mesg[num[1]];

    return true;
}

function ms_on_2(name, image_num)
{
    document[name].src = image_on[image_num].src;
    self.status = mesg[image_num];

    return true;
}

function ms_off(name)
{
    var num = name.split("_");

    document[name].src = image_off[num[1]].src;
    self.status = "";

    return true;
}

function ms_off_2(name, image_num)
{
    document[name].src = image_off[image_num].src;
    self.status = "";

    return true;
}

function go_location(name, proc, wait)
{
    var command;

    if (is_null(name) || is_space(name)) {
        command = "location = '" + proc + "';";
    }
    else if (name == "top") {
        command = name + ".location = '" + proc + "';";
    }
    else if (name == "menu" || name == "main") {
            command = "top." + name + ".location = '" + proc + "';";
        }
        else {
            command = "top.main." + name + ".location = '" + proc + "';";
        }

    setTimeout(command, wait * 100);
}

/******************************************************************************/
/* LIST 화면의 PAGE 이동과 관련한 Library                                     */
/******************************************************************************/
/**********
 page_out  = new MakeArray(4);
 page_over = new MakeArray(4);
 page_msg  = new Array(4);

 page_out[1].src = "/image/arr_prev_b.gif"
 page_over[1].src = "/image/arr_prev_c.gif"
 page_msg[1] = "이전 PAGE";

 page_out[2].src = "/image/arr_next_b.gif"
 page_over[2].src = "/image/arr_next_c.gif"
 page_msg[2] = "다음 PAGE";

 page_out[3].src = "/image/arr_first_b.gif"
 page_over[3].src = "/image/arr_first_c.gif"
 page_msg[3] = "처음 PAGE";

 page_out[4].src = "/image/arr_last_b.gif"
 page_over[4].src = "/image/arr_last_c.gif"
 page_msg[4] = "마지막 PAGE";

 function page_on( name )
 {
 var pos;

 if( name == '_PREV' )       pos = 1;
 else if( name == '_NEXT' )  pos = 2;
 else if( name == '_FIRST' ) pos = 3;
 else if( name == '_LAST' )  pos = 4;
 else
 {
 return false;
 }

 document[name].src = page_over[pos].src;
 self.status = page_msg[pos];
 return true;
 }

 function page_off( name )
 {
 var pos;

 if( name == '_PREV' )       pos = 1;
 else if( name == '_NEXT' )  pos = 2;
 else if( name == '_FIRST' ) pos = 3;
 else if( name == '_LAST' )  pos = 4;
 else
 {
 return false;
 }

 document[name].src = page_out[pos].src;
 self.status = '';
 return true;
 }
 *******/

//특수 Character를 Hex 값으로 변경
function str_chg(str)
{
    src = new String("");
    tar = new String("");

    src = str;

    for (i = 0; i < src.length; i++)
    {
        if (src.charAt(i) == "&")
            tar += "%26";
        else if (src.charAt(i) == "%")
            tar += "%25";
        else if (src.charAt(i) == "\"")
                tar += "%22";
            else if (src.charAt(i) == "\r")
                    tar += "%0D";
                else if (src.charAt(i) == "\n")
                        tar += "%0A";
                    else if (src.charAt(i) == "+")
                            tar += "%2B";
                        else if (src.charAt(i) == ":")
                                tar += "%3A";
                            else if (src.charAt(i) == "#")
                                    tar += "%23";
                                else if (src.charAt(i) == " ")
                                        tar += "";
                                    else
                                        tar += src.charAt(i);
    }
    return tar;
}

//해당 Name, Value, Expire의 Cookie생성
function setCookie(name, value, expire, path, domain, secure)
{
    document.cookie = name + "=" + escape(value)
            + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
            + ((path == null) ? "" : ("; path=" + path))
            + ((domain == null) ? "" : ("; domain=" + domain))
            + ((secure == true) ? "; secure" : "");
}

// 해당 Name의 Cookie Value를 return
function getCookie(Name)
{
    var search = Name + "=";

    if (document.cookie.length > 0)    // if there are any cookies
    {
        offset = document.cookie.indexOf(search);

        if (offset != -1)    // if cookie exists
        {
            offset += search.length;

            end = document.cookie.indexOf(";", offset);

            if (end == -1)
                end = document.cookie.length;

            return unescape(document.cookie.substring(offset, end));
        }
    }
}

//해당 Name의 Cookie를 삭제
function delCookie(name, msg, path)
{
    var today = new Date();

    //과거시간 만들기 1000분전으로
    today.setTime(today.getTime() - 1000000);

    //name정보 찾기
    var value = getCookie(name);
    if (value != "")
    {
        document.cookie = name + "=" + escape(value) +
                          "; expires=" + today.toGMTString() +
                          ((path == null) ? "" : ("; path=" + path));
    }

    alert(msg);
}

function is_login_null_field(form)
{

    if (is_null(form.id.value) || is_space(form.id.value))
    {
        alert("아이디를 입력하여 주십시오");
        form.id.focus();
        return true;
    }

    else if (is_null(form.pw.value) || is_space(form.pw.value))
    {
        alert("비밀번호를 입력하여 주십시오");
        form.pw.focus();
        return true;
    }
}

function is_valid_char(form)
{
    var comp = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
    var string = form.id.value;
    var len = string.length;
    for (i = 0; i < len; i++)
    {
        if (comp.indexOf(string.substring(i, i + 1)) < 0)
        {
            alert("허용된 문자가 아닙니다. 다시 입력해 주십시오");
            form.id.value = "";
            form.id.focus();
            return true;
        }
    }
}

function cinit(str) {
    if (document.all.view != null) {
        //document.all.containerTop.bgColor = document.all.view.bgcolor;
        document.all.container.bgColor = document.all.view.bgcolor;
        //document.all.containerBottom.bgColor = document.all.view.bgcolor;
    } else {
        var setBG ;
        switch (str) {
            case 1 : setBG = "#f8f8f8";
                break;
            case 2 : setBG = "#E9EDF8";
                break;
            case 3 : setBG = "#F8F0E9";
                break;
            case 4 : setBG = "#E9F8EA";
                break;
            case 5 : setBG = "#FDD92E";
                break;
            case 6 : setBG = "#F3F3EE";
                break;
            case 7 : setBG = "#f8f8f8";
                break;
            case 8 : setBG = "#F3F3EE";
                break;
            case 9 : setBG = "#ffffff";
                break;
            default: setBG = "#f8f8f8";
                break;
        }
        //document.all.containerTop.bgColor = setBG;
        document.all.container.bgColor = setBG;
        //document.all.containerBottom.bgColor = setBG;
    }
}

//2005.08.29일 추가내용

/*25)날짜 select box선택시 이벤트*/
function SelectMonth(sform, syear, smon, sday) {

    myform = sform;		// FORM 이름변경(script이동시)
    myform_s = sform + ".";
    var end_day = new Array();
    end_day[0] = 31;
    end_day[1] = 28;
    end_day[2] = 31;
    end_day[3] = 30;
    end_day[4] = 31;
    end_day[5] = 30;
    end_day[6] = 31;
    end_day[7] = 31;
    end_day[8] = 30;
    end_day[9] = 31;
    end_day[10] = 30;
    end_day[11] = 31;
    var year = parseInt(this.eval(myform_s + syear + ".value"), 10);
    var mon = parseInt(this.eval(myform_s + smon + ".value"), 10) - 1;

    if (select_YYYYMMDD_LeapYear(year) == 1) {        // true이면 윤년이므로 2월달은 28일이된다
        end_day[1] = 29;
    } else {
        end_day[1] = 28;
    }

    var s_sday = myform_s + sday + ".options.length = end_day[mon]";
    this.eval(s_sday);

    for (var i = 0; i < end_day[mon]; i++) {
        if (i < 9) {
            var tmp_val = "0" + (i + 1);
            this.eval(myform_s + sday + ".options[i].value = tmp_val");
        } else {
            this.eval(myform_s + sday + ".options[i].value = i + 1");
        }
        this.eval(myform_s + sday + ".options[i].text = i + 1");
    }
    if (this.eval(myform_s + sday + ".options.selectedIndex") == -1) {
        this.eval(myform_s + sday + ".options.selectedIndex = end_day[mon] - 1");
    }
}


// 년, 월, 일 셀렉트 박스를 생성하는 스크립트
// 출처 : 
function select_YYYYMMDD_LeapYear(year) {
    var flag = 0;
    if ((parseInt(year, 10) % 4) == 0) {                // 4년마다 윤년이고
        flag = 1;
        if ((parseInt(year, 10) % 100) == 0) {        // 그중 100년마다 윤년이 아니고,
            flag = 0;
            if ((parseInt(year, 10) % 400) == 0) {    // 그중 400년마다 윤년이다
                flag = 1;
            }
        }
    }
    return flag;
}

/*
 ' ------------------------------------------------------------------
 ' Function    : fc_chk_byte(aro_name)
 ' Description : 입력한 글자수를 체크
 ' Argument    : Object Name(글자수를 제한할 컨트롤)
 ' Return      :
 ' ------------------------------------------------------------------
 */
function fc_chk_byte(aro_name, ari_max)
{

    var ls_str = aro_name.value; // 이벤트가 일어난 컨트롤의 value 값
    var li_str_len = ls_str.length;  // 전체길이

    // 변수초기화
    var li_max = ari_max; // 제한할 글자수 크기
    var i = 0;  // for문에 사용
    var li_byte = 0;  // 한글일경우는 2 그밗에는 1을 더함
    var li_len = 0;  // substring하기 위해서 사용
    var ls_one_char = ""; // 한글자씩 검사한다
    var ls_str2 = ""; // 글자수를 초과하면 제한할수 글자전까지만 보여준다.

    for (i = 0; i < li_str_len; i++)
    {
        // 한글자추출
        ls_one_char = ls_str.charAt(i);

        // 한글이면 2를 더한다.
        if (escape(ls_one_char).length > 4)
        {
            li_byte += 2;
        }
        // 그밗의 경우는 1을 더한다.
        else
        {
            li_byte++;
        }

        // 전체 크기가 li_max를 넘지않으면
        if (li_byte <= li_max)
        {
            li_len = i + 1;
        }
    }

    // 전체길이를 초과하면
    if (li_byte > li_max)
    {
        alert(li_max + " Byte를 초과 입력할수 없습니다. \n 초과된 내용은 자동으로 삭제 됩니다. ");
        ls_str2 = ls_str.substr(0, li_len - 1);
        aro_name.value = ls_str2;

    }
    aro_name.focus();
}

function goZip(sN, gubun) {
    goZip(sN, gubun, '', '', '');
}

//우편번호 검색
function goZip(sN, gubun, zipCd1, zipCd2, addr1) {
    var width_ = 510;
    var height_ = 500;
    var left_ = screen.width;
    var top_ = screen.height;

    left_ = left_ / 2 - (width_ / 2);
    top_ = top_ / 2 - (height_ / 2);

    var urlname = "/servlet/Search?fact=QASearchAddr&sN=" + sN + "&gubun=" + gubun + "&zipcd1=" + zipCd1 + "&zipcd2=" + zipCd2 + "&addr1=" + addr1;
    window.open(urlname, "zipCheck", "height=" + height_ + ",width=" + width_ + ",left=" + left_ + ",top=" + top_ + ", status=no, menubar=no, resizable=no, scrollbars=yes, directoris=no");
}

//우편번호 검색
function goZipF(zipCd1, zipCd2, addr1) {
    var urlname = "/servlet/Search?fact=QASearchAddrF&zipcd1=" + zipCd1 + "&zipcd2=" + zipCd2 + "&addr1=" + addr1;
    window.open(urlname, "zipCheck", "width=495, height=500, top=300, left=300, status=no, menubar=no, resizable=no, scrollbars=yes, directoris=no");
}

function loadFocus(frm) {
    frm.focus();
}

//사용자 달력
function calendarF(str) {
    calendarF(str, '');
}

function calendarF(str, str2) {
    var url = "/inc/calendar.jsp?mode=" + str + "&mode2=" + str2;
    window.open(url, "windate", "top=100. left=100, menubar=0,  status=0, width=220, height=235");
}


var letters = 'ghijklabvwxyzBCDEFef)_+|<>?:mnQRSTU~!@#$%^VWXYZ`1234567opGHIJKLu./;' + "'" + '[]MNOP890-=' + '\\' + '&*(A{},cdqrst ' + "\n";
var split = letters.split("");
var num = '';
var c = '';
var encrypted = '';
var decrypted = '';

function encrypt(it) {
    var b = '0';
    var chars = it.split("");
    encrypted = '';
    while (b < it.length) {
        c = '0';
        while (c < letters.length) {
            if (split[c] == chars[b])
            {
                if (c == "0") {
                    c = "";
                }
                if (eval(c + 10) >= letters.length)
                {
                    num = eval(10 - (letters.length - c));
                    encrypted += split[num];
                }
                else {
                    num = eval(c + 10);
                    encrypted += split[num];
                }
            }
            c++;
        }
        b++;
    }

    return encrypted;
}

function decrypt(it)
{
    var b = '0';
    var chars = it.split("");
    decrypted = '';
    while (b < it.length) {
        c = '0';
        while (c < letters.length)
        {
            if (split[c] == chars[b])
            {
                if (c == "0") {
                    c = "";
                }
                if (eval(c - 10) < 0)
                {
                    num = eval(letters.length - (10 - c));
                    decrypted += split[num];
                } else {
                    num = eval(c - 10);
                    decrypted += split[num];
                }
            }
            c++;
        }
        b++;
    }
    return  decrypted;
}


function goBoard(url) {
    var frm = document.all.ClubForm;

    frm.action = url;

    frm.submit();
}

//display설정 변경
function changeTb(tbName, tbCount, tbNum) {
    var a;
    for (i = 1; i <= tbCount; i++) {

        a = eval("document.all." + tbName + i);

        if (i != tbNum) {
            a.style.display = 'none';
        }
        else {
            a.style.display = 'block';
        }
    }
}

function Goto_Menu(flag1, flag2) {
    switch (flag1) {
        //로고클릭시
        case("M00"):
            switch (flag2) {
                case("S00"):
                    location.href = "/index.jsp";
                    break;
            }
            break;
        //윈글리쉬폰 클릭시
        case("M01"):
            switch (flag2) {
                case("S00"):
                    location.href = "/winphone/sub01_01.jsp";
                    break;
                case("S01"):
                    location.href = "/winphone/sub01_01.jsp";
                    break;
                case("S02"):
                    location.href = "/winphone/sub01_02.jsp";
                    break;
                case("S03"):
                    location.href = "/winphone/sub01_03.jsp";
                    break;
                case("S04"):
                    location.href = "/winphone/sub01_04.jsp";
                    break;
                case("S05"):
                    location.href = "/winphone/sub01_05.jsp";
                    break;
                case("S06"):
                    location.href = "/winphone/sub01_06.jsp";
                    break;
                case("S07"):
                    location.href = "/winphone/sub01_07.jsp";
                    break;
            }
            break;
        //전화영어 클릭시
        case("M02"):
            switch (flag2) {
                case("S00"):
                    location.href = "/contents/sub02_01.jsp";
                    break;
                case("S01"):
                    location.href = "/contents/sub02_01.jsp";
                    break;
                case("S02"):
                    location.href = "/contents/sub02_01_business.jsp";
                    break;
                case("S03"):
                    location.href = "/contents/sub02_07.jsp";
                    break;
                case("S04"):
                    location.href = "/contents/sub02_05.jsp";
                    break;
            }
            break;
        //화상영어 클릭시
        case("M03"):
            switch (flag2) {
                case("S00"):
                    location.href = "/contents/sub02_03.jsp";
                    break;
                case("S01"):
                    location.href = "/contents/sub02_03.jsp";
                    break;
                case("S02"):
                    location.href = "/contents/sub02_04.jsp";
                    break;
            }
            break;
        //영자신문 클릭시
        case("M04"):
            switch (flag2) {
                case("S00"):
                    location.href = "/engpaper/sub03_01.jsp";
                    break;
                case("S01"):
                    location.href = "/engpaper/sub03_01.jsp";
                    break;
                case("S02"):
                    location.href = "/engpaper/sub03_02.jsp";
                    break;
                case("S03"):
                    location.href = "/engpaper/sub03_03.jsp";
                    break;
            }
            break;
        //수강신청 클릭시
        case("M05"):
            switch (flag2) {
                case("S00"):
                    location.href = "/lecture/LectureIntro.jsp";
                    break;
                case("S01"):
                    location.href = "/lecture/LectureIntro.jsp";
                    break;
                case("S02"):
                    location.href = "/Lecture.do?fact=QALecture&LectureGubun=1&PageCode=AP0020101";
                    break;
                case("S03"):
                    location.href = "/Lecture.do?fact=QALecture&LectureGubun=3&PageCode=AP00301";
                    break;
            }
            break;
        //교재안내 클릭시
        case("M06"):
            switch (flag2) {
                case("S00"):
                    location.href = "/contents/sub05_01.jsp";
                    break;
                case("S01"):
                    location.href = "/contents/sub05_01.jsp";
                    break;
                case("S02"):
                    location.href = "/contents/sub05_01_business.jsp";
                    break;
                case("S03"):
                    location.href = "/contents/sub05_06.jsp";
                    break;
                case("S04"):
                    location.href = "/contents/sub05_04.jsp";
                    break;
            }
            break;
        //마이페이지 클릭시
        case("M07"):
            switch (flag2) {
                case("S00"):
                    location.href = "/Myphone.do";
                    break;
                case("S01"):
                    location.href = "/Myphone.do";
                    break;
                case("S02"):
                    location.href = "/Myphone.do?fact=QAReport";
                    break;
                case("S03"):
                    location.href = "/Myphone.do?fact=QAMyHold";
                    break;
                case("S04"):
                    location.href = "/Myphone.do?fact=QAMyLectureNow";
                    break;
                case("S05"):
                    location.href = "/User.do?fact=UForMemberRegist";
                    break;
            }
            break;
        //Phone Cafe Click
        case("M08"):
            switch (flag2) {
                case("S01"):
                    location.href = "/Board.do?fact=QACBoard&tblname=CACALL&PageCode=CA00201";
                    break;
                case("S02"):
                    location.href = "/cafe/freecontents/freecontents.jsp";
                    break;
            }
            break;
        // RightTopMenu Click
        case("M09"):
            switch (flag2) {
                case("S01"):
                    location.href = "/customer/bqna/bqna_01.jsp";
                    break;
                case("S02"):
                    location.href = "/Board.do?fact=QACBoard&tblname=CUNOT&PageCode=CU00100&CompanyCD=" + ThisCompanyCD;
                    break;
                case("S03"):
                    location.href = "/company/sitemap.jsp";
                    break;
            }
            break;
    }
}

function Goto_Menu_GB(flag1, flag2) {
    switch (flag1) {
        //로고클릭시
        case("M00"):
            switch (flag2) {
                case("S00"):
                    location.href = "/index.jsp";
                    break;
            }
            break;
        //윈글리쉬폰 클릭시
        case("M01"):
            switch (flag2) {
                case("S00"):
                    location.href = "/winphone/sub01_01.jsp";
                    break;
                case("S01"):
                    location.href = "/winphone/sub01_01.jsp";
                    break;
                case("S02"):
                    location.href = "/winphone/sub01_02.jsp";
                    break;
                case("S03"):
                    location.href = "/winphone/sub01_03.jsp";
                    break;
                case("S04"):
                    location.href = "/winphone/sub01_04.jsp";
                    break;
                case("S05"):
                    location.href = "/winphone/sub01_05.jsp";
                    break;
                case("S06"):
                    location.href = "/winphone/sub01_07.jsp";
                    break;
            }
            break;
        //전화영어 클릭시
        case("M02"):
            switch (flag2) {
                case("S00"):
                    location.href = "/contents/sub02_01.jsp";
                    break;
                case("S01"):
                    location.href = "/contents/sub02_01.jsp";
                    break;
            }
            break;
        //전화 일본어
        case("M03"):
            switch (flag2) {
                case("S00"):
                    web_window_open00("http://gbpost.winglishphone.com/japan/", '_blank');
                    return false;
                    break;
            }
            break;
        //전화 중국어
        case("M04"):
            switch (flag2) {
                case("S00"):
                    web_window_open00("http://gbpost.winglishphone.com/china/", '_blank');
                    return false;
                    break;
            }
            break;
        //수강신청 클릭시
        case("M05"):
            switch (flag2) {
                case("S00"):
                    location.href = "/lecture/LectureIntro.jsp";
                    break;
                case("S01"):
                    location.href = "/lecture/LectureIntro.jsp";
                    break;
                case("S02"):
                    location.href = "/Lecture.do?fact=QALecture&LectureGubun=1&PageCode=AP00201";
                    break;
                case("S03"):
                    location.href = "/Lecture.do?fact=QALecture&LectureGubun=3&PageCode=AP00301";
                    break;
            }
            break;
        //마이페이지 클릭시
        case("M06"):
            switch (flag2) {
                case("S00"):
                    location.href = "/Myphone.do";
                    break;
                case("S01"):
                    location.href = "/Myphone.do";
                    break;
                case("S02"):
                    location.href = "/Myphone.do?fact=QAReport";
                    break;
                case("S03"):
                    location.href = "/Myphone.do?fact=QAMyHold";
                    break;
                case("S04"):
                    location.href = "/Myphone.do?fact=QAMyLectureNow";
                    break;
                case("S05"):
                    location.href = "/User.do?fact=UForMemberRegist";
                    break;
            }
            break;
        //Phone Cafe Click
        case("M07"):
            switch (flag2) {
                case("S01"):
                    location.href = "/Board.do?fact=QACBoard&tblname=CACALL&PageCode=CA00201";
                    break;
                case("S02"):
                    location.href = "/cafe/freecontents/freecontents.jsp";
                    break;
            }
            break;
        // RightTopMenu Click
        case("M08"):
            switch (flag2) {
                case("S01"):
                    location.href = "/customer/bqna/bqna_01.jsp";
                    break;
                case("S02"):
                    location.href = "/Board.do?fact=QACBoard&tblname=CUNOT&PageCode=CU00100&CompanyCD=" + ThisCompanyCD;
                    break;
                case("S03"):
                    location.href = "/company/sitemap.jsp";
                    break;
            }
            break;
    }
}

//원격지원 서비스
function remote() {
    //window.open("http://www.winglish.com/remote/default.asp", "idoctor", "width=450,height=495,resize=1,scrollbars=no,status=0,left=0,top=10");
    window.open("http://113366.com/winglish", "idoctor", "width=471,height=521,resize=1,scrollbars=no,status=0,left=0,top=10");
    //window.open("http://www.822.co.kr","anysupport","width=600,height=500,resize=1,scrollbars=no,status=0,left=0,top=10");
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
    if (init == true) with (navigator) {
        if ((appName == "Netscape") && (parseInt(appVersion) == 4)) {
            document.MM_pgW = innerWidth;
            document.MM_pgH = innerHeight;
            onresize = MM_reloadPage;
        }
    }
    else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function bt(id, after)
{
    eval(id + '.filters.blendTrans.stop();');
    eval(id + '.filters.blendTrans.Apply();');
    eval(id + '.src="' + after + '";');
    eval(id + '.filters.blendTrans.Play();');
}

function MM_swapimgindexRestore() { //v3.0
    var i,x,a = document.MM_sr;
    for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_preloadImages() { //v3.0
    var d = document;
    if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i,j = d.MM_p.length,a = MM_preloadImages.arguments;
        for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) {
                d.MM_p[j] = new Image;
                d.MM_p[j++].src = a[i];
            }
    }
}

function MM_findObj(n, d) { //v4.01
    var p,i,x;
    if (!d) d = document;
    if ((p = n.indexOf("?")) > 0 && 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 < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
    if (!x && d.getElementById) x = d.getElementById(n);
    return x;
}

function MM_swapImage() { //v3.0
    var i,j = 0,x,a = MM_swapImage.arguments;
    document.MM_sr = new Array;
    for (i = 0; i < (a.length - 2); i += 3)
        if ((x = MM_findObj(a[i])) != null) {
            document.MM_sr[j++] = x;
            if (!x.oSrc) x.oSrc = x.src;
            x.src = a[i + 2];
        }
}

function stringCheck(obj)
{
    var str = obj.value;
    var err = 0;

    for (var i = 0; i < str.length; i++)
    {
        var chk = str.substring(i, i + 1);
        if (!chk.match(/[0-9]|[a-z]|[A-Z]/))
        {
            err = err + 1;
        }
    }
    if (err > 0)
    {
        alert("특수문자는 사용할수 없습니다");
        obj.focus();
    }
}


//==============================================================
//Prototype Base Function Lib
function loadAjaxXML(url, pars, fncSuccess, fncFailure) {
    var myAjax = new Ajax.Request(
            url,
    {
        method: 'get',
        parameters: pars,
        onSuccess: fncSuccess,
        onFailure: fncFailure
    });
}
// Ajax Process Fail Function
function AjaxFail()
{
    alert("처리에 실패하였습니다.");
}
//전화영어 로고클릭시 메뉴
function goto_home_new() {
    document.location.href = "/index.jsp";

}

//전화영어 리뉴얼 상단 플래쉬 메뉴
function goto_menu_new(parm01, parm02) {
    //alert("1");
    switch (parm01) {
        case 1 : //윈글리쉬폰
                /*
            if (parm02 == 0) location.href = "/new/winglishphone/QAWinglishPhone.jsp";
            if (parm02 == 1) location.href = "/new/winglishphone/QAWinglishPhone.jsp";
            if (parm02 == 2) location.href = "/new/winglishphone/QAWinglishPhoneLearnSystem.jsp";
            if (parm02 == 3) location.href = "/new/winglishphone/QAWinglishPhoneSupport.jsp";
            if (parm02 == 4) location.href = "/new/winglishphone/QAWinglishPhoneMgmtSystem.jsp";
            if (parm02 == 5) location.href = "/new/winglishphone/QAWinglishPhoneEduCenter.jsp";
            if (parm02 == 6) location.href = "/new/winglishphone/QAWinglishIntro.jsp";
            */
            if (parm02 == 0) location.href = "/new/winglishphone/QAWinglishPhone.jsp";
            if (parm02 == 1) location.href = "/new/winglishphone/QAWinglishPhone.jsp";
            if (parm02 == 2) location.href = "/new/winglishphone/QAWinglishPhoneLearnSystem.jsp";
            if (parm02 == 3) location.href = "/new/winglishphone/QAWinglishPhoneMgmtSystem.jsp";
            if (parm02 == 4) location.href = "/new/winglishphone/QAWinglishPhoneEduCenter.jsp";
            if (parm02 == 5) location.href = "/new/winglishphone/QAWinglishIntro.jsp";
            

            break;
        case 2 : //윈글리쉬폰체험
            if (parm02 == 0) goWinglishPhoneExp();
            break;
        case 3 : //시니어
            if (parm02 == 0) location.href = "/new/contents/QAPhoneProgram.jsp?kind=S";
            if (parm02 == 1) location.href = "/new/contents/QAPhoneProgram.jsp?kind=S";
            if (parm02 == 2) location.href = "/Contents.do?fact=QAPhoneCurriculum&kind=S&PageCode=SP00100&CourseMenu=1";
            if (parm02 == 3) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=S&PageCode=SP00200&CourseMenu=1&CourseGb=1&CourseIdx=1";
            if (parm02 == 4) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=S&PageCode=SP00300&CourseMenu=2&CourseGb=3&CourseIdx=8";
            if (parm02 == 5) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=S&PageCode=SP00500&CourseMenu=3&CourseGb=1&CourseIdx=15";
            if (parm02 == 6) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=S&PageCode=SP00700&CourseMenu=4&CourseGb=1&CourseIdx=26";
            if (parm02 == 7) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=S&PageCode=SP00800&CourseMenu=5&CourseGb=1&CourseIdx=29";
            if (parm02 == 8) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=S&PageCode=SP00900&CourseMenu=11&CourseGb=1&CourseIdx=42";

            break;
        case 4 : //주니어
            if (parm02 == 0) location.href = "/new/contents/QAPhoneProgram.jsp?kind=J";
            if (parm02 == 1) location.href = "/new/contents/QAPhoneProgram.jsp?kind=J";
            if (parm02 == 2) location.href = "/Contents.do?fact=QAPhoneCurriculum&kind=J&PageCode=JP00100&CourseMenu=6";
            if (parm02 == 3) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=J&PageCode=JP00200&CourseMenu=6&CourseGb=2&CourseIdx=31";
            if (parm02 == 4) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=J&PageCode=JP00300&CourseMenu=7&CourseGb=1&CourseIdx=32";
            if (parm02 == 5) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=J&PageCode=JP00400&CourseMenu=9&CourseGb=2&CourseIdx=35";
            if (parm02 == 6) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=J&PageCode=JP00500&CourseMenu=8&CourseGb=1&CourseIdx=36";
            if (parm02 == 7) location.href = "/Contents.do?fact=QAPhoneCourseProgram&kind=J&PageCode=JP00600&CourseMenu=10&CourseGb=2&CourseIdx=39";                
            break;
        case 5 : //레벨테스트
            if (parm02 == 0) location.href = "/LevelTest.do?fact=CForLevelTest&ClassGubun=T&PageCode=LV00201";
            if (parm02 == 1) location.href = "/LevelTest.do?fact=CForLevelTest&ClassGubun=T&PageCode=LV00201";
            if (parm02 == 2) location.href = "/LevelTest.do?fact=LevelTestIntro";
            if (parm02 == 3) location.href = "/LevelTest.do?fact=QForLevelTestResult";
            if (parm02 == 4) location.href = "/LevelTest.do?fact=LevelTestRecSenior";
            if (parm02 == 5) alert("준비중입니다.");return false; //location.href = "/LevelTest.do?fact=LevelTestFreeExp";
            break;
        case 6 : //수강신청
            if (parm02 == 0) location.href = "/Course.do?fact=QACourseAdult&TVKind=T";
            if (parm02 == 1) location.href = "/Course.do?fact=QACourseAdult&TVKind=T";
            if (parm02 == 2) location.href = "/Course.do?fact=QACourseJunior&TVKind=T";
            if (parm02 == 3) location.href = "/Course.do?fact=BuySeniorBook";
            if (parm02 == 4) location.href = "/new/course/intro/FreeLectureInfo.jsp";
            if (parm02 == 5) location.href = "/Course.do?fact=SugangReqIntro";
            if (parm02 == 6) location.href = "/NBoard.do?fact=QACBoard&tblname=CUQNA&PageCode=AP00700&CompanyCD=WING";
            if (parm02 == 7) location.href = "/Course.do?fact=QAFaqList&tblname=CUFAQ&PageCode=AP00800&faq_gubun=all";
            break;
        case 7 : //마이페이지
            if (parm02 == 0) location.href = "/NMyPhone.do?fact=QAMyPhoneSummary";
            if (parm02 == 1) location.href = "/NMyPhone.do?fact=QAMyPhone";
            if (parm02 == 2) location.href = "/NMyPhone.do?fact=QAMyFitCourse";
            if (parm02 == 3) location.href = "/NCBoard.do?fact=QACBoard&Division=Diary&PageCode=MY01000";
            //if (parm02 == 4) location.href = "/NMyPhone.do?fact=QAFreeStudy&PageCode=MY01300";
            if (parm02 == 4) location.href = "/new/course/intro/FreeLectureInfo.jsp";
            if (parm02 == 5) location.href = "/NBoard.do?fact=QAMBoard&tblname=COLEC&PageCode=MY01400";
            if (parm02 == 6) location.href = "/NMyPhone.do?fact=QAMyBills&PageCode=MY01700";
            if (parm02 == 7) location.href = "/NUser.do?fact=UForMemberRegist";
            if (parm02 == 8) goLearnGuideMain("/new/learnGuide/12.html");

            break;
        case 8 : //커뮤니티
            if (parm02 == 0) location.href = "/new/community/QACafeMain.jsp";
            if (parm02 == 1) location.href = "/NBoard.do?fact=QACBoard&tblname=COLEC&PageCode=CL00200";
            if (parm02 == 2) location.href = "/NBoard.do?fact=QACBoard&tblname=CACALL&PageCode=CL00500";
            if (parm02 == 3) location.href = "/new/community/FreeClinicMain.jsp?gubun=lc&PageCode=CL01900";
            if (parm02 == 4) location.href = "/new/community/QAFreeContents.jsp?gubun=lc&PageCode=CL00700";
            if (parm02 == 5) location.href = "/NEvent.do?fact=QAEvent&menu_gb=ING&PageCode=CL01500";
            break;
    }
    return false;
}

function goWinglishPhoneExp()
{
    if (!openWin || openWin.closed)
    {
        openWin = window.open("/new/experience/exp_main.jsp", "exp", "toolbar=no,location=no,directories=no,status=no, width=1045, height=768, menubar=no,scrollbars=yes,resizable=no,left=0,top=0");
        openWin.focus();
    }
    else
    {
        openWin = window.open("/new/experience/exp_main.jsp", "exp", "toolbar=no,location=no,directories=no,status=no, width=1045, height=768, menubar=no,scrollbars=yes,resizable=no,left=0,top=0");
        openWin.focus();
    }
}

function goLearnGuideMain(url)
{
    if (!openWin || openWin.closed)
    {
        openWin = window.open(url, "guide", "toolbar=no,location=no,directories=no,status=no, width=1045, height=768, menubar=no,scrollbars=yes,resizable=no,left=0,top=0");
        openWin.focus();
    }
    else
    {
        openWin = window.open(url, "guide", "toolbar=no,location=no,directories=no,status=no, width=1045, height=768, menubar=no,scrollbars=yes,resizable=no,left=0,top=0");
        openWin.focus();
    }
}

function goPage(url)
{
    opener.location.href = url;
}

function send(tblname, PageCode, brdNo, company_cd) {
    //alert("tblname " +tblname);
    //alert("PageCode " +PageCode);
    //alert("brdNo " +brdNo);
    //alert("company_cd " +company_cd);
    /*
    var division = "";
    alert("1");
    if (tblname == 'COLEC') {          //오늘의 수업후기
        alert("2");
        viewBoard(tblname, PageCode, brdNo, 'WING');
    } else if (tblname == 'letter') {  //Thanks Teacher
        alert("3");

        division = 'letter';
        viewCBoard(division, PageCode, brdNo);
    }
    */
    if(tblname == 'COLEC'){
        document.location.href = "/NBoard.do?fact=QCBoard&brdno="+brdNo+"&PageCode="+PageCode+"&tblname="+tblname;
    }else if(tblname == 'letter'){
        document.location.href = "/NCBoard.do?fact=QCBoardForCafe&num="+brdNo+"&PageCode="+PageCode+"&Division="+tblname;        
    }
}

function goColec() { //오늘의 수업후기 페이지로 이동
    document.location.href = "/NBoard.do?fact=QACBoard&tblname=COLEC&PageCode=CL00200";
    
}
function goLetter() { //Thanks Teacher
    document.location.href = "/NCBoard.do?fact=QACBoardForCafe&Division=letter&PageCode=CL00400";

}
function find_id_pw_pop() {

    var winopts = "width=500,height=580,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=10,left=10";

    window.open("https://www.winglish.com/login/find_id_pass_nojumin.asp","findmempop", winopts);

}


