/*********************************************************************************************************
	onload function
**********************************************************************************************************/
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

// left menu image mouseover func
	function leftMenuImageFunc(whichpic,flag){
		var leftMenu = document.getElementById("leftMenu");
		var imgs = leftMenu.getElementsByTagName("img");
		var source = whichpic.getAttribute("src");

		if(flag == 0) source = source.replace(".gif","_on.gif");
		else source = source.replace("_on.gif",".gif");
	
		whichpic.setAttribute("src",source)
	
		return false;
	}



// footer select box func
	function goUrl(){
		var gurl = document.getElementById("referSite");
		var realURL = gurl.options[gurl.selectedIndex].value;
		if(realURL != ""){
			window.open(realURL,"ReferSite");
		}
	}

// flash view
function viewFlashFunc(src,w,h,mode){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + w + '" height="' + h + '">');
	document.write('	<param name="movie" value="' + src + '">');
	document.write('	<param name="quality" value="high">');
	document.write('	<param name="wmode" value="' + mode + '">');
	document.write('	<embed src="' + src + '" quality="high" wmode="' + mode + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>');
	document.write('</object>');
}
// top flash view
function topFlashFunc(src,w,h,mode,menucd){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + w + '" height="' + h + '">');
	document.write('	<param name="movie" value="' + src + '">');
	document.write('	<param name="quality" value="high">');
	document.write('	<param name="wmode" value="' + mode + '">');
	document.write('	<param name="flashVars" value="menuCd=' + menucd + '">');
	document.write('	<embed src="' + src + '" quality="high" flashVars="menuCd=' + menucd + '" wmode="' + mode + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>');
	document.write('</object>');
}

// GNB ÇÃ·¡½¬ ¸µÅ© °æ·Î...
function pageMove(flag){
	var flag = flag.split("_");
	if(flag[0] == "a"){
		if(flag[1] == "1"){
			document.location.href = "/intro/vision.asp";
		} else if(flag[1] == "2"){
			document.location.href = "/intro/greeting.asp";
		} else if(flag[1] == "3"){
			document.location.href = "/intro/prCenter.asp";
		} else if(flag[1] == "4"){
			document.location.href = "/intro/guide.asp";
		} 
	} else if(flag[0] == "b"){
		if(flag[1] == "1"){
			document.location.href = "/noble/residence/intro.asp";
		} else if(flag[1] == "2"){
			document.location.href = "/noble/nursing/intro.asp";
		} else if(flag[1] == "3"){
			document.location.href = "/noble/sportCulture/sportsCenterIntro.asp";
		} else if(flag[1] == "4"){
			document.location.href = "/noble/care/intro.asp";
		} else if(flag[1] == "5"){
			document.location.href = "/noble/child/nursery.asp";
		} else if(flag[1] == "6"){
			document.location.href = "/noble/feast/foodGuide.asp";
		} else if(flag[1] == "7"){
			document.location.href = "/noble/tour/tour01.asp";
		}
	} else if(flag[0] == "c"){
		if(flag[1] == "1"){
			document.location.href = "/enter/residenceExpense.asp";
		} else if(flag[1] == "2"){
			document.location.href = "/enter/nursingExpense.asp";
		}
	} else if(flag[0] == "d"){
		if(flag[1] == "1"){
			document.location.href = "/newsinfo/notice.asp";
		} else if(flag[1] == "2"){
			document.location.href = "/newsinfo/sportCultureEnterNews.asp";
		} else if(flag[1] == "3"){
			document.location.href = "/newsinfo/volunteerInvitationForm.asp";
		} else if(flag[1] == "4"){
			document.location.href = "/newsinfo/sitemap.asp";
		} else if(flag[1] == "5"){
			document.location.href = "/newsinfo/applyInfoForm.asp";
		}
	} else if(flag[0] == "e"){
		if(flag[1] == "1"){
			document.location.href = "/consulting/consultingInfo.asp";
		}
	}
}


// µ¿È£È¸ ¹× ÀÌº¥Æ® - ¹è¿ò°ú ±³·ùÀÇ Àå µ¿È£È¸ È°µ¿ Func
	function cultureLeisureLearning(flag){
		if(flag == "1"){
			window.open("/noble/residence/cultureLeisureLearning_pop01.asp","pop","width=680,height=637");
		} else if(flag == "2"){
			window.open("/noble/residence/cultureLeisureLearning_pop02.asp","pop","width=680,height=637");
		} else if(flag == "3"){
			window.open("/noble/residence/cultureLeisureLearning_pop03.asp","pop","width=680,height=637");
		} else {
			window.open("/noble/residence/cultureLeisureLearning_pop04.asp","pop","width=680,height=637");
		}
	}

// µ¿È£È¸ ¹× ÀÌº¥Æ® - ¹è¿ò°ú ±³·ùÀÇ Àå µ¿È£È¸ È°µ¿ Func
	function roomintro(){
		window.open('/noble/residence/roomILUIntro_pop01.asp','pop','width=680,height=504');
	}
