var pub="http://www.nhncorp.com";
var recruit="http://recruit.nhncorp.com";

function callURL(_turl){
	window.top.location.href = _turl;
}

function page_go(num){
switch(num){
case 0: url= pub+"/main/index.html"
break;
case 1: url=pub+"/en/main/index.html" //ENGLISH
break;
case 10: url= pub+"/company/company_info.html"
break;
case 11: url= pub+"/company/company_info.html"
break;
case 12: url= pub+"/company/company_ci.html"
break;
case 13: url= pub+"/company/vision.html"
break;
case 14: url= pub+"/company/business.html"
break;
case 15: url= pub+"/company/social.html"
break;
case 16: url= pub+"/company/contactus.html"
break;
case 17: url= pub+"/company/01company_relation.html"
break
case 18: url= pub+"/audit/index.html"
break
case 19: url= pub+"/proposal/guide.nhn"
break
case 20: url= pub+"/service/naver.html"
break
case 21: url= pub+"/service/naver.html"
break
case 22: url=pub+"/service/hangame.html"
break
case 23: url=pub+"/service/naver_junior.html"
break
case 24: url=pub+"/service/happybean.html"
break
case 30: url=pub+"/global/index.html"
break
case 31: url=pub+"/global/japan.html"
break
case 32: url=pub+"/global/china.html"
break
case 33: url=pub+"/global/usa.html"
break
case 40: url=pub+"/pr/pressList.html"
break
case 41: url=pub+"/pr/pressList.html"
break
case 42: url=pub+"/pr/speechList.html"
break
case 43: url=pub+"/pr/ad_naver.html"
break
case 44: url=pub+"/pr/tour_01.html"
break
case 50: url=pub+"/ir/shareholding01.nhn"
break
case 51: url=pub+"/ir/shareholding01.nhn"
break
case 52: url=pub+"/ir/ir_01.html"
break
case 53: url=pub+"/ir/ir_02.html"
break
case 54: url =pub+"/ir/finance01.nhn"
break
case 55: url =pub+"/ir/schedule01.nhn"
break
case 56: url =pub+"/ir/library02.nhn"
break
case 57: url =pub+"/ir/ir_coverage01.html"
break
case 60: url=recruit+"/main/main.html"
break
case 61: url=recruit+"/main/recruit_01.html"
break
case 62: url=recruit+"/main/recruit_02.html"
break
case 63: url=recruit+"/main/recruit_03.html"
break
case 64: url =recruit+"/main/recruit_index.html"
break
case 65: url =recruit+"/recruit_apply.jsp"
break
case 66: url =recruit+"/main/faqList.jsp"
break
case 67: url ="javascript:MM_openBrWindow('"+pub+"/recruit/pop_recruit.html','privacy','width=560,height=660')"
break
case 68: url =recruit+"/main/qa.html"
break
case 69 : url = recruit + "/main/recruit_result.html"
break
case 91: url=pub+"/company/contactus.html"
break
case 92: url=pub+"/sitemap/sitemap.html"
break
case 93: url=pub+"/en/main/index.html" //ENGLISH
break
case 94: url="http://audit.nhncorp.com/audit/ethicsLineCenter.html"
break
case 95: url=pub+"/company/customer.html"
break
case 96: url="javascript:popup('"+pub+"/inquiry/pop_audit.html','audit',576,660,'yes')"
break
}
	if ( num >= 60 && num <= 69 ){
		window.top.location.href = url;
	}else{
		location.href = url;
	}
}
//------------------------------------------------------

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openWin(url) {
        window.open(url, "viewWin");
}

function goRelSub(stat){
	tarimg  = pub+'/img/common/location_on.gif' ;																												
	tarimg2 = pub+'/img/common/location_off.gif' ;		
	
	if (stat == 1){ 
		document.all.divQuick.style.visibility = "visible"; 
		document.all.rp_quick.src = tarimg ;
	}
	else if (stat == 0){ 
		document.all.divQuick.style.visibility = "hidden"; 
		document.all.rp_quick.src = tarimg2 ;
	}	
}

function openPrivacy(){
	url = recruit + '/privacy/popup.html';
	window.open(url,"popup","width=705, height=600, top=100, left=100, scrollbars=yes");
}

//COMMON HTML =======================================================
function TopNavi() {
document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='940' height='300'>");
document.writeln("<param name='allowScriptAccess' value='always' />");
document.writeln("<param name='movie' value='"+pub+"/img/common/sub.swf'>");
document.writeln("<param name='quality' value='high'><param name='flashvars' value='mainNum="+mainNum+"&subNum="+subNum+"'>");
document.writeln("<embed src='"+pub+"/img/common/sub.swf' flashvars='mainNum="+mainNum+"&subNum="+subNum+"' quality='high' allowScriptAccess='always' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='940' height='300'></embed>");
document.writeln("</object>");
}
function TopNaviAll() {
	document.writeln("<div style=\"height:300px;padding:0px;margin:0px;\">");
	TopNavi();
	document.writeln("</div>");
}
function ci() {
	document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='605' height='240'>");
	document.writeln("<param name='allowScriptAccess' value='always' />");
	document.writeln("<param name='movie' value='"+pub+"/img/common/new_ci.swf'>");
	document.writeln("<param name='quality' value='high'>");
	document.writeln("<embed src='/img/common/new_ci.swf' quality='high' allowScriptAccess='always' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='605' height='240'></embed>");
	document.writeln("</object>");
}

function Footer() {
	document.writeln("<tr valign='bottom'>");
	document.writeln("	<td colspan='4' style='padding-left:22px;'>");
	document.writeln("		<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
	document.writeln("		<tr><td height='65'></td></tr>");
	document.writeln("		<tr><td bgcolor='#CCCCCC' colspan='2' style=\"height:1px;\"></td></tr>");
	document.writeln("		<tr>");
	document.write("			<td style='padding-top:10px;'>");
	document.write("<img src='"+pub+"/img/inc/bottom/ft_btn_04.gif' width='238' height='9' border='0' align='absmiddle'>");
	document.write("<a href=javascript:page_go(16);><img src='"+pub+"/img/inc/bottom/ft_btn_01.gif' width='42' height='9' border='0'></a>");
	document.write("<img src='"+pub+"/img/inc/bottom/ft_btn_split.gif' width='10' height='9'>");
	document.write("<a href=javascript:page_go(19);><img src='"+pub+"/img/inc/bottom/ft_btn_06.gif' width='31' height='9' border='0'></a>");
	document.write("<img src='"+pub+"/img/inc/bottom/ft_btn_split.gif' width='10' height='9'>");
	document.write("<a href=javascript:page_go(92); target='_self'><img src='"+pub+"/img/inc/bottom/ft_btn_02.gif' width='40' height='9' border='0'></a>");
	document.write("<img src='"+pub+"/img/inc/bottom/ft_btn_split.gif' width='10' height='9'>");
	document.write("<a href='javascript:page_go(94);' target='_self'><img src='"+pub+"/img/inc/bottom/ft_btn_03.gif' width='66' height='9' border='0'></a>");
	document.write("<img src='"+pub+"/img/inc/bottom/ft_btn_split.gif' width='10' height='9'>");
	document.write("<a href='javascript:openPrivacy();'><img src='"+pub+"/img/inc/bottom/ft_btn_05.gif' width='61' height='9' border='0'></a>");
	document.write("<br><br style='line-height:10px;'>");
	document.write("<img src='"+pub+"/img/inc/bottom/ft_btn_address.gif' width='334' height='42' border='0' align='absmiddle' usemap='#Map'>");
	document.write("<map name='Map'><area shape='rect' coords='245,31,332,42' href='mailto:info@nhncorp.com'></map>");
	document.write("</td>");
	document.write("<td align='right' valign='top'  style='padding-bottom:3;padding-top:5px;'>");
	document.write("<a href='http://www.naver.com/' target='_blank'><img src='"+pub+"/img/inc/naver.gif' width='48' height='24'   align='absmiddle'></a");
	document.write("><img src='"+pub+"/img/inc/line.gif' width='11' height='24' align='absmiddle'");
	document.write("><a href='http://www.hangame.com/' target='_blank'><img src='"+pub+"/img/inc/hangame.gif' width='66' height='24'  align='absmiddle'></a");
	document.write("><img src='"+pub+"/img/inc/line.gif' width='11' height='24' align='absmiddle'");
	document.write("><a href='http://jr.naver.com/' target='_blank'><img src='"+pub+"/img/inc/juniver.gif' width='59' height='24'   align='absmiddle'></a");
	document.write("><img src='"+pub+"/img/inc/line.gif' width='11' height='24' align='absmiddle'");
	document.write("><a href='http://happybean.naver.com/' target='_blank'><img src='"+pub+"/img/inc/happybean.gif' width='36' height='24'  align='absmiddle'></a");
	document.write("><img src='"+pub+"/img/inc/line.gif' width='11' height='24' align='absmiddle'");
	document.write("><a href='http://me2day.net/' target='_blank'><img src='"+pub+"/img/inc/me2day.gif' width='48' height='24'   align='absmiddle'></a>");
	document.write("</td>");
	document.writeln("		</tr>");
	document.writeln("		<tr><td height='20'></td></tr>");
	document.writeln("		</table>");
	document.writeln("	</td>");
	document.writeln("</tr>");

}

function ComInfo(){
document.writeln("		<table width='240' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("		<tr><td height='25'></td></tr>");
document.writeln("		<tr><td><a href='"+pub+"/img/company/NHNinfo_kr.pdf' target='_blank'><img src='"+pub+"/img/common/btn_brochure.gif' width='113' height='24' ></a></td></tr>");
document.writeln("		<tr><td height='10'></td></tr>");
document.writeln("		<tr><td><a href='http://www.adobe.com/products/acrobat/readstep2.html' target='_blank'><img src='"+pub+"/img/common/btn_acrobat.gif' width='88' height='24'  hspace='5'></a></td></tr>");
document.writeln("		</table>");
}
		
function CommonRight_main() {
document.writeln("		<table width='240' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("		<tr><td height='5'></td></tr>");
document.writeln("		<tr>");
document.writeln("			<td width='79'><a onfocus='blur()' onmouseover='goRelSub(1)' onmouseout='goRelSub(0)'><img src='"+pub+"/img/common/location_off.gif' name='rp_quick' width='79' height='20' border='0' align='absmiddle' style='cursor:hand'></a></td>");
document.writeln("			<td width='62'><img src='"+pub+"/img/common/loc_02.gif' width='62' height='20'></td>");
document.writeln("			<td width='44'><a href=javascript:page_go(0);><img src='"+pub+"/img/common/loc_03.gif' width='44' height='20' border='0'></a></td>");
document.writeln("			<td width='3'><img src='"+pub+"/img/common/loc_04.gif' width='3' height='20'></td>");
document.writeln("			<td width='52'><a href=javascript:page_go(1)><img src='"+pub+"/img/common/loc_05.gif' width='52' height='20' border='0'></a></td>");
document.writeln("		</tr>");
document.writeln("		</table>");
document.writeln("		<div id='divQuick' style='position:absolute;top:435;left:690;width:79;visibility:hidden' onmouseover='goRelSub(1)' onmouseout='goRelSub(0)'>");
document.writeln("		<table width='79' cellpadding='0' cellspacing='0' border='0' bgcolor='#FFFFFF' style='border:0px'>");
document.writeln("		<tr><td><a href='http://www.nhncorp.jp' target='_blank' onfocus='blur()'><img src='"+pub+"/img/common/location_list1.gif' width='79' height='20' border='0'></a></td></tr>");
document.writeln("		<tr><td><a href='http://www.nhnusainc.com' target='_blank' onfocus='blur()'><img src='"+pub+"/img/common/location_list2.gif' width='79' height='20' border='0'></a></td></tr>");
document.writeln("		<tr><td><!--a href='http://www.nhncorp.cn' target='_blank' onfocus='blur()'--><img src='"+pub+"/img/common/location_list3.gif' width='79' height='20' border='0'><!--/a--></td></tr>");
document.writeln("		</table>");
document.writeln("		</div>");

document.writeln("              <table width='240' border='0' cellspacing='0' cellpadding='0'>");
document.writeln("              <tr><td height='5'></td></tr>");
document.writeln("              <tr><td><a href='http://diary.naver.com/' target='_blank'><img src='"+pub+"/img/common/diary_naver.jpg' width='240' height='35'></a></td></tr>");
document.writeln("              </table>");

}

document.writeln ('<script language="javascript" src="'+pub+'/commonRight.js">\</script>');

function TopButton() {
document.writeln("		<div id='STATICMENU' style='width:55px; position:relative; z-index:1;'> ");
document.writeln("		<table border='0' cellpadding='0' cellspacing='0'><tr><td><img src='"+pub+"/img/common/btn_top_bg1.gif'></td></tr>");
document.writeln("		<tr>");
document.writeln("			<td><a href='#'><img src='"+pub+"/img/common/btn_top.gif' alt='top' border='0'></a></td>");
document.writeln("		</tr>");
document.writeln("		<tr><td><img src='"+pub+"/img/common/btn_top_bg2.gif'></td></tr>");
document.writeln("		</table>");
document.writeln("		</div>");
}
//=====================================================================

//1Depth Menu rollOn 
function ImgPreLoad(imgTitle, imageNum) {
		imageNum++;
		rollOn = new Array(imageNum);
		rollOff = new Array(imageNum);
		for (j = 1; j <= imageNum; j++) {
			if (j < 10) {
				tmp = "0";
			} else {
				tmp ="";
			}
			rollOn[j] = new Image();
			rollOn[j].src = imgTitle + tmp + j + "_on.gif";
			rollOff[j] = new Image();
			rollOff[j].src = imgTitle + tmp + j + ".gif";
		}
	}
	function imgOn(Num) {
    if (rollOn[Num] != null) {	
				document["B"+Num].src = rollOn[Num].src;
		}
	}
	function imgOff(Num) {
		if (rollOn[Num] != null) {
			if (Num != _MCurrentOn) {
				document["B"+Num].src = rollOff[Num].src;
			}
      else {  
      document["B"+Num].src = rollOn[Num].src;
      }
		}
	}
	
var stmnLEFT = 0; // left position
var stmnGAP1 = 40; // header margin
var stmnGAP2 = -140; // top margin beftore 60
var stmnBASE = 40; // default position
var stmnActivateSpeed = 1; // move speed
var stmnScrollSpeed = 1; // scroll speed

var stmnTimer;

function RefreshStaticMenu()
{
		var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;

		stmnStartPoint = parseInt(STATICMENU.style.top, 10);
		stmnEndPoint = document.body.scrollTop + stmnGAP2;
		if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;

		stmnRefreshTimer = stmnActivateSpeed;

		if ( stmnStartPoint != stmnEndPoint ) {
				stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
				STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
				stmnRefreshTimer = stmnScrollSpeed;
		}

		stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}



function InitializeStaticMenu()
{
				STATICMENU.style.top = document.body.scrollTop + stmnBASE;
				RefreshStaticMenu();

		STATICMENU.style.left = stmnLEFT;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

//Popup 		
function popup(Fn,Win, X, Y, Scroll){
l = (screen.width) ?	(screen.width- X) / 2	: 0;
t = (screen.height) ?	(screen.height- Y) / 2 : 0;	
	NewWindow=window.open(Fn,Win,'width='+X+',height='+Y+',top='+t+',left='+l+',scrollbars='+Scroll+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no');
}


function allblur() {
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
}
document.onfocusin = allblur;

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_swapImgRestore() { //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_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];}
}

<!-- rolling_banner Click -->
function goLink(addr)
{
	window.open(addr,'rolling_banner');
}

<!-- Loading Message -->
function hiddenLoadingMsg() {
        layerRef                = 'document.all';
        styleSwitch     = '.style';
        layerID                 = 'LOADINGMESSAGE';
        eval(layerRef + '["' + layerID + '"]' + styleSwitch + '.visibility="hidden"');
}

function viewLoadingMsg(v_width,v_height) {
        document.writeln ("<DIV ID='LOADINGMESSAGE' STYLE='position:absolute; visibility:visible'>");
        document.writeln ("<table border='0' width='" + v_width + "' height='" + v_height + "' cellspacing='0' cellpadding='0' align='left'>");
        document.writeln ("<tr>");
        document.writeln ("<td width='100%' align='center' valign='top' bgcolor='#FFFFFF' style='PADDING-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-BOTTOM: 0px; COLOR: #FFFFFF; PADDING-TOP: 100px;' background='"+pub+"/img/common/blank.gif'>");
        document.writeln ("<img src='"+pub+"/img/common/loading.gif'>");
        document.writeln ("</td>");
        document.writeln ("</tr>");
        document.writeln ("</table>");
        document.writeln ("</DIV>");
}

function getPrint(){
	window.print();
}
