
String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/g, "");
}

String.prototype.num = function() {
	return (this.trim().replace(/[^0-9]/g, ""));
}

String.prototype.isJumin = function() {
	var arg = arguments[0] ? arguments[0] : "";
	var jumin = eval("this.match(/[0-9]{2}[01]{1}[0-9]{1}[0123]{1}[0-9]{1}" + arg + "[1234]{1}[0-9]{6}$/)");
	if(jumin == null) {
		return false;
	}else{
		jumin = jumin.toString().num().toString();
	}
	// »ý³â¿ùÀÏ Ã¼Å©
	var birthYY = (parseInt(jumin.charAt(6)) == (1 ||2)) ? "19" : "20";
	birthYY += jumin.substr(0, 2);
	var birthMM = jumin.substr(2, 2) - 1;
	var birthDD = jumin.substr(4, 2);
	var birthDay = new Date(birthYY, birthMM, birthDD);
	if(birthDay.getYear() % 100 != jumin.substr(0,2) || birthDay.getMonth() != birthMM || birthDay.getDate() != birthDD) {
		return false;
	}        
	var sum = 0;
	var num = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5]
	var last = parseInt(jumin.charAt(12));
	for(var i = 0; i < 12; i++) {
		sum += parseInt(jumin.charAt(i)) * num[i];
	}
	return ((11 - sum % 11) % 10 == last) ? true : false;
}


function Flash(url,id,w,h){
	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="+w+" height="+h+" id="+id+">\
	<param name='movie' value="+url+" />\
	<param name='wmode' value='transparent' />\
	<param name='allowScriptAccess' value='always' />\
	<param name='quality' value='high' />\
	<param name='menu' value='false' />\
	<embed src="+url+" width="+w+" height="+h+" name="+id+" allowScriptAccess='always' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
	</object>\
	");
}

var EmbedStr = "";
function GetFlash(url,x,y) 
{ 
	EmbedStr = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + x + "' height='" + y + "'>";
	EmbedStr += "<param name='allowScriptAccess' value='sameDomain' />";
	EmbedStr += "<param name='movie' value='" + url + "' />";
	EmbedStr += "<param name='quality' value='high' />";
	EmbedStr += "<param name='bgcolor' value='#ffffff' />";
	EmbedStr += "<param name='wmode' value='transparent' />";
	EmbedStr += "<embed src='" + url + "' quality='high' wmode='transparent' bgcolor='#ffffff' width='" + x + "' height='" + y + "' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	EmbedStr += "</object>";
	
	document.write(EmbedStr);
	return;
}

function goSearch(frm){
	if(frm.search_txt.value == ""){
		alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä');
		frm.search_txt.focus();
		return false;	
	}
}

function go_menu(num){
//	alert(num);
	switch(num){
		//
		case 1311 :
			document.location.href = '/member/login.asp'
		break;
		case 1312 :
			document.location.href = '/member/join.asp'
		break;
		case 1313 :
			document.location.href = '/member/find.asp'
		break;
		case 1314 :
			document.location.href = '/member/info0.asp'
		break;
		case 1315 :
			document.location.href = '/member/info1.asp'
		break;

		case 1211 :
			document.location.href = '/mypage/mypage.asp'
		break;
		case 1212 : //È¸¿øÁ¤º¸¼öÁ¤
			document.location.href = '/member/member_edit.asp'
		break;
		case 1213 : //È¸¿øÅ»Åð
			document.location.href = '/member/leave.asp'
		break;
		//
		case 1111 : //Á¤±â±¸µ¶½ÅÃ»
			document.location.href = '/subscribe/application.asp'
		break;
		case 1112 : //ÃÖ½ÅÈ£ ±¸¸Å
			document.location.href = '/subscribe/nowGraphy.asp'
		break;
		case 1113 : //°ú¿ùÈ£ ±¸¸Å
			document.location.href = '/subscribe/purchase.asp'
		break;
		//
		case 1411 : //»çÀÌÆ®¸Ê
			document.location.href = '/sitemap/sitemap.asp'
		break;
		//
		case 1011 : //¿Àµð¼Ç ½ÅÃ»ÇÏ±â
			document.location.href = '/audition/audition.asp'
		break;
		case 1013 :
			document.location.href = '/audition/audition_list.asp'
		break;
		// 
		case 911 :
			document.location.href = '/advertisement/advertisement.asp' //±¤°í¾È³»
		break;
		case 912 :
			document.location.href = '/advertisement/inquiry.asp'
		break;
		case 913 :
			document.location.href = '/advertisement/alliance.asp'
		break;
		
		// ABOUT GRAPHY
		case 811 : 
			document.location.href = '/about/introduction.asp'
		break;
		case 8121 : 
			document.location.href = '/about/notice.asp'
		break;
		case 8122 : 
			document.location.href = '/about/faq.asp'
		break;
		case 8123 : 
			document.location.href = '/about/qna.asp'
		break;
		case 813 : 
			document.location.href = '/about/contactus.asp'
		break;

// GALLERY
		case 110 :
			document.location.href = '/article/section2.asp?scode=S37' //°¶·¯¸® ¸ÞÀÎ
		break;

		case 111 :
			document.location.href = '/article/section2.asp?scode=S37' //½ºÅ¸°¶·¯¸®
		break;

		case 112 :
			document.location.href = '/article/section2.asp?scode=S35' //ÄÝ·º¼Ç ¸ÞÀÎ
		break;

		case 1121 :
			document.location.href = '/article/collection.asp?scode=S38' //
		break;
		case 1123 :
			document.location.href = '/article/section3.asp?scode=S40' //
		break;
		case 1124 :
			document.location.href = '/article/section3.asp?scode=S41' //
		break;
		case 1125 :
			document.location.href = '/article/section3.asp?scode=S42' //
		break;
		case 1126 :
			document.location.href = '/article/section3.asp?scode=S43' //
		break;
		case 1127 :
			document.location.href = '/article/section3.asp?scode=S44' //
		break;


		case 113 :
			//document.location.href = '/article/photo.asp?scode=S37' //Æ÷ÅäÀÍ;;;;
			document.location.href = '/article/section2.asp?scode=S37';
		break;

// HAIR
		case 210 :
			document.location.href = '/article/section.asp?scode=S02' //ÇÖÆ®·»µå
		break;

		case 211 :
			document.location.href = '/article/section2.asp?scode=S08' //ÇÖÆ®·»µå
		break;

		case 212 :
			document.location.href = '/article/section2.asp?scode=S09' // ½ºÅ¸½ºÅ¸ÀÏ
		break;

		case 213 :
			document.location.href = '/article/section2.asp?scode=S11' // ½ºÅ¸ÀÏ¸µ
		break;
		case 214 :
			document.location.href = '/article/section2.asp?scode=S13' // »ì·Õ
		break;
		case 215 :
			document.location.href = '/article/section2.asp?scode=S14' // ´º½º
		break;
		case 216 :
			document.location.href = '/article/section2.asp?scode=S24' // ¾ÆÀÌÅÛ
		break;
//		case 217 :
//			document.location.href = '/article/section2.asp?scode=S14' // ´º½º
//		break;

// Beauty
		case 310 :
			document.location.href = '/article/section.asp?scode=S03' //Çì¾î
		break;

		case 311 :
			document.location.href = '/article/section2.asp?scode=S15' //ÇÖÆ®·»µå
		break;

		case 312 :
			document.location.href = '/article/section2.asp?scode=S17' // ½ºÅ¸½ºÅ¸ÀÏ
		break;

		case 313 :
			document.location.href = '/article/section2.asp?scode=S18' // ÄÃ·¯¸µ
		break;
		case 314 :
			document.location.href = '/article/section2.asp?scode=S21' // ½ºÅ¸ÀÏ
		break;
		case 315 :
			document.location.href = '/article/section2.asp?scode=S23' // ºê·£µå
		break;
		case 316 :
			document.location.href = '/article/section2.asp?scode=S20' // »ì·Õ
		break;
		case 317 :
			document.location.href = '/article/section2.asp?scode=S21' // ´º½º
		break;

// ITEM
		case 410 :
			document.location.href = '/GraphyTv/';
		break;

		case 411 :
			document.location.href = '/GraphyTv/';
		break;

		case 412 :
			document.location.href = '/article/section2.asp?scode=S23' // ½ºÅ¸½ºÅ¸ÀÏ
		break;

		case 413 :
			document.location.href = '/article/section2.asp?scode=S24' // ÄÃ·¯¸µ
		break;

// TECHNIQUE
		case 510 :
			document.location.href = '/article/section.asp?scode=S05' //Çì¾î
		break;

		case 511 :
			document.location.href = '/article/section2.asp?scode=S25' //ÇÖÆ®·»µå
		break;

		case 512 :
			document.location.href = '/article/section2.asp?scode=S29' // ½ºÅ¸½ºÅ¸ÀÏ
		break;

		case 513 :
			document.location.href = '/article/section2.asp?scode=S27' // ÄÃ·¯¸µ
		break;
		case 514 :
			document.location.href = '/article/section2.asp?scode=S28' // ½ºÅ¸ÀÏ
		break;
		case 515 :
			document.location.href = '/article/section2.asp?scode=S29' // ºê·£µå
		break;

// FEATURE
		case 610 :
			document.location.href = '/article/section.asp?scode=S06' //PEOPLE
		break;
		case 611 :
			document.location.href = '/article/section2.asp?scode=S30' //PEOPLE
		break;
		case 6111 :
			document.location.href = '/article/section3.asp?scode=S45' //ÇÖÆ®·»µå
		break;
		case 6112 :
			document.location.href = '/article/section3.asp?scode=S46' //ÇÖÆ®·»µå
		break;
		case 6113 :
			document.location.href = '/article/section3.asp?scode=S47' //ÇÖÆ®·»µå
		break;
		case 6114 :
			document.location.href = '/article/section3.asp?scode=S48' //ÇÖÆ®·»µå
		break;


		case 612 :
			document.location.href = '/article/section2.asp?scode=S31' // ½ºÅ¸½ºÅ¸ÀÏ
		break;

		case 613 :
			document.location.href = '/article/section2.asp?scode=S32' // ÄÃ·¯¸µ
		break;
		case 614 :
			document.location.href = '/article/section2.asp?scode=S33' // ½ºÅ¸ÀÏ
		break;
		case 615 :
			document.location.href = '/article/section2.asp?scode=S34' // ºê·£µå
		break;
		case 616 :
			document.location.href = '/article/section2.asp?scode=S49' // NEW PLACE
		break;

		case 310 :
			document.location.href = '/article/section.asp?scode=S03' // ºäÆ¼
		break;

		case 410 :
			document.location.href = '/article/section.asp?scode=S04' // ¾ÆÀÌÅÛ
		break;

		case 510 :
			document.location.href = '/article/section.asp?scode=S05' // Å×Å©´Ð
		break;

		case 610 :
			document.location.href = '/article/section.asp?scode=S06' // feature
		break;
		
		case 710 :
			document.location.href = '/event/event_ing.asp' // event
		break;

		case 711 :
			document.location.href = '/event/event_ing.asp' // event
		break;
		case 712 :
			document.location.href = '/event/event_winner.asp' // event
		break;
		case 713 :
			document.location.href = '/event/event_end.asp' // event
		break;


	}
}
