//µð·ºÅä¸®¸í »Ì±â
var xurl = document.location.href;
var yurl = xurl.split("/");
var dept1 = yurl[3].split(".");
var dept1 = dept1[0].toLowerCase();
if ( yurl[4] != null ){
	var dept2 = yurl[4].split(".");
	var dept2 = dept2[0].toLowerCase();
}

// ÀÌ¹ÌÁö Ã¼ÀÎÁö
function MM_swapImage() {
	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 MM_findObj(n, d) { //v4.0
	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 && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImgRestore() {
	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 open_scroll_no(xurl, tar, wid, hei){
	set = 'width='+wid+',height='+hei+',left=20,top=20,toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no'
	window.open(xurl,tar,set);
}
function open_scroll_no2(idx, tar, wid, hei){
	set = 'width='+wid+',height='+hei+',left=20,top=20,toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no'
	window.open('pop_ad.asp?idx='+idx,tar,set);
}
function open_scroll_yes(xurl, tar, wid, hei){
	set = 'width='+wid+',height='+hei+',left=20,top=20,toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no'
	window.open(xurl,tar,set);
}

// flash
function flash_wf(flash_name,flash_width,flash_height,flash_id,wmd){
	document.write(" \
		<Object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' id='"+flash_id+"' ALIGN=''> \
		<PARAM NAME=movie VALUE='"+flash_name+"'> \
		<PARAM NAME=quality VALUE=high> \
	");
	if( wmd == '1' ){
		document.write(" \
			<PARAM NAME=wmode VALUE=transparent> \
		");
	}
	if( wmd == '1' ){
		document.write(" \
			<EMBED src='"+flash_name+"' wmode=transparent quality=high  WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' NAME='"+flash_id+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \
		");
	}else{
		document.write(" \
			<EMBED src='"+flash_name+"' quality=high  WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' NAME='"+flash_id+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \
		");
	}
	document.write(" \
		</EMBED> \
		</OBJECT> \
	");
}

//¸Þ´º¸µÅ©
function CH_menu(obj){
	switch (obj){
		// HOME
		case "000" :
			location.href = "/";
		break;
		// COMPANY
		case "100" :
			location.href = "/company/";
		break;
		case "101" :
			location.href = "/company/index.asp";
		break;
		case "102" :
			location.href = "/company/overview.asp";
		break;
		case "103" :
			location.href = "/company/history.asp";
		break;
		case "104" :
			location.href = "/company/policy.asp";
		break;
		// HOUSE WEDDING
		case "200" :
			location.href = "/house/";
		break;
		case "201" :
			location.href = "/house/index.asp";
		break;
		case "202" :
			location.href = "/house/place.asp";
		break;
		case "203" :
			location.href = "/house/system.asp";
		break;
		// MARIZIN WEDDING
		case "300" :
			location.href = "/marizin/";
		break;
		// CYBER PRESSROOM
		case "400" :
			location.href = "/cyber/";
		break;
		case "401" :
			location.href = "/cyber/index.asp";
		break;
		case "402" :
			location.href = "/cyber/news.asp";
		break;
		// RECRUIT
		case "500" :
			location.href = "/recruit/";
		break;
		case "501" :
			location.href = "/recruit/index.asp";
		break;
		case "501_1" :
			location.href = "/recruit/index.asp";
		break;
		case "501_2" :
			location.href = "/recruit/marizin.asp";
		break;
		case "502" :
			location.href = "/recruit/people.asp";
		break;
		case "503" :
			location.href = "/recruit/recruit.asp";
		break;
		// MEMBERSHIP
		case "600" :
			location.href = "/member/";
		break;
		case "601" :
			location.href = "/member/index.asp";
		break;
		case "602" :
			location.href = "/member/join.asp";
		break;
		case "603" :
			location.href = "/member/member.asp";
		break;
		case "604" :
			location.href = "/member/leave.asp";
		break;
		case "605" :
			location.href = "/member/search_id.asp";
		break;
		case "606" :
			location.href = "/member/search_pass.asp";
		break;
		case "607" :
			location.href = "/member/logout_ok.asp";
		break;
		// CONTACT US
		case "700" :
			location.href = "/contactus/";
		break;
		case "701" :
			location.href = "/contactus/index.asp";
		break;
		case "702" :
			location.href = "/contactus/faq.asp";
		break;
		case "703" :
			location.href = "/contactus/partner.asp";
		break;
		case "703_1" :
			location.href = "/contactus/partner.asp";
		break;
		case "703_2" :
			location.href = "/contactus/partner_propose.asp";
		break;
		case "704" :
			location.href = "/contactus/ask.asp";
		break;
		//SITEMAP
		case "800" :
			location.href = "/sitemap/";
		break;
		//ÇØ¿ÜÃ¤ÇÃ
		case "900" :
			location.href = "#";
		break;
	}
}

function uf_OnlyEnglishNumber(field) {
   for (var i=0; i < field.value.length; i++) {
		if ( ( (field.value.charAt(i) < "0") || (field.value.charAt(i) > "9") ) &&
		   ( ( (field.value.charAt(i) < "A") || (field.value.charAt(i) > "Z") ) &&
			 ( (field.value.charAt(i) < "a") || (field.value.charAt(i) > "z") ) ) )	{
			 return true;
		}
   }
}

function uf_KoreanCheck(field) {
	if ( field.value.search(/[¤¡-¤¾|¤¿-¤Ó|°¡-Èþ]/) != -1 ) {
		 return true;
	}
}

function uf_SelectNumber(field) {
   for (var i=0; i < field.value.length; i++){
		if ( ( (field.value.charAt(i) < "0") || (field.value.charAt(i) > "9") ) ) {
			 return true;
		}
   }
}


