function go_menu(fnum, snum) {
	
	//company
	if(fnum == 1) {
		switch(snum) {
			case 1:
				 document.location.href = "/ngames_kor/company/01games.php?fnum=1&snum=1";
			break;
			
			case 2:
				 document.location.href = "/ngames_kor/company/02vision.php?fnum=1&snum=2";
			break;
			
			case 3:
				document.location.href = "/ngames_kor/company/03history.php?fnum=1&snum=3";
			break;
			
			case 4:
				document.location.href = "/ngames_kor/company/04organization.php?fnum=1&snum=4";
			break;
			
			case 5:
				document.location.href = "/ngames_kor/company/05awards.php?fnum=1&snum=5";
			break;
			
			case 6:
				 document.location.href = "/ngames_kor/company/06partner.php?fnum=1&snum=6";
			break;
			
			case 7:
				document.location.href = "/ngames_kor/company/07address.php?fnum=1&snum=7";
			break;
			
			case 8:
				document.location.href = "/ngames_kor/company/08sitemap.php?fnum=1&snum=8";
			break;
		}
	// Games
	}else if(fnum == 2) {
		
		switch(snum) {
			case 1:
				 document.location.href = "/ngames_kor/games/01intro.php?fnum=2&snum=1";
			break;
			
			case 2:
				 document.location.href = "/ngames_kor/games/02publishing.php?fnum=2&snum=2";
			break;
			
			case 3:
				document.location.href = "/ngames_kor/games/03development.php?fnum=2&snum=3";
			break;
			
			case 4:
				document.location.href = "/ngames_kor/games/04webgames.php?fnum=2&snum=4";
			break;
			
			case 5:
				document.location.href = "/ngames_kor/games/05globalbiz.php?fnum=2&snum=5";
			break;
			
			case 6:
				 document.location.href = "/ngames_kor/games/06pcbang.php?fnum=2&snum=6";
			break;
		}
	// PR	
	}else if(fnum == 3) {
		switch(snum) {
			case 1:
				 document.location.href = "/ngames_kor/board/board_list.php?pageno=1&menu=pr&bbs_name=pr_pressnews&fnum=3&snum=1";
			break;
			
			case 2:
				 document.location.href = "/ngames_kor/board/board_list.php?pageno=1&menu=pr&bbs_name=pr_nstory&fnum=3&snum=2";
			break;
			
			case 3:
				document.location.href = "/ngames_kor/pr/03screen.php?fnum=3&snum=3";
			break;
		}
	// IR
	}else if(fnum == 4) {
		switch(snum) {
			case 0:
				 document.location.href = "/ngames_kor/ir/00main.php?first=1&fnum=4&snum=0";
			break;
			case 1:
				 document.location.href = "/ngames_kor/ir/01company.php?fnum=4&snum=1";
			break;
			
			case 2:
				 document.location.href = "/ngames_kor/ir/02service.php?fnum=4&snum=2";
			break;
			
			case 3:
				 document.location.href = "/ngames_kor/ir/03stockinfo.php?fnum=4&snum=3";
			break;
			
			case 4:
				document.location.href = "/ngames_kor/ir/04stockholders.php?fnum=4&snum=4";
			break;
			
			case 5:
				document.location.href = "/ngames_kor/ir/05actual_results.php?fnum=4&snum=5";
			break;
			
			case 6:
				document.location.href = "/ngames_kor/ir/05actual_results_year.php?fnum=4&snum=6";
			break;
			
			case 7:
				document.location.href = "/ngames_kor/ir/06finance.php?fnum=4&snum=7";
			break;
			
			case 8:
				document.location.href = "/ngames_kor/ir/06finance_year.php?fnum=4&snum=8";
			break;
			
			case 9:
				document.location.href = "/ngames_kor/ir/06finance_02.php?fnum=4&snum=9";
			break;
			
			case 10:
				document.location.href = "/ngames_kor/ir/06finance_02_year.php?fnum=4&snum=10";
			break;
			
			case 11:
				document.location.href = "/ngames_kor/ir/06finance_03.php?fnum=4&snum=11";
			break;
			
			case 12:
				document.location.href = "/ngames_kor/ir/06finance_03_year.php?fnum=4&snum=12";
			break;
			
			case 13:
				document.location.href = "/ngames_kor/board/board_list.php?pageno=1&menu=ir&bbs_name=ir_bzreport&acro=disp&fnum=4&snum=13";
			break;
			
			case 14:
				document.location.href = "/ngames_kor/ir/08announcement.php?fnum=4&snum=14";
			break;
			
			case 15:
				document.location.href = "/ngames_kor/board/board_list.php?pageno=1&menu=ir&bbs_name=ir_result&acro=disp&fnum=4&snum=15";
			break;
			
			case 16:
				document.location.href = "/ngames_kor/board/board_list.php?pageno=1&menu=ir&bbs_name=ir_presentation&acro=disp&fnum=4&snum=16";
			break;
			
			case 17:
				document.location.href = "/ngames_kor/board/board_list.php?pageno=1&menu=ir&bbs_name=ir_faq&fnum=4&snum=17";
			break;
			
		}
	}
}

function movePage(pageno, param){
  document.fo.pageno.value = pageno;
  document.fo.action = param;
  document.fo.submit();
}

function home() {
	location.href = "/ngames_kor/";
}

function ir_home() {
	location.href = "/ngames_kor/ir/index.php";
}

function eng_home() {
	location.href = "/ngames_eng/";
}

function neofamily(a) {
	
	if(a == 0) {
		location.href="/";
	}else if(a == 1) {				
		window.open("http://www.neowizgames.com","","");		// ³×¿ÀÀ§Áî°ÔÀÓÁî
	}else if(a == 2) {
		window.open("http://www.neowizbugs.com","","");  	   // ÀÎÅÍ³Ý
	}else if(a == 3) {
		popReady();												// INS
	}else if(a == 4) {	
		popReady();												// ÀÎº£½ºÆ® ¸ÕÆ®
	}else if(a == 5) {
		popReady();												// ÀÌ¿£¾¾
	}else if(a == 6) {
		window.open("http://www.neowizbugs.com","","");			// ÀÎÅÍ³Ý 
	}else if(a == 7) {
		window.open("http://magictree.neowiz.com","","");		// ¸¶¹ý³ª¹«
	}else if(a == 8) {
		window.open("http://www.pmang.com","","");				// ÇÇ¸Á
	}else if(a == 9) {
		window.open("http://pcbang.pmang.com/pcb/index.nwz","","");				// ³×¿ÀÀ§Áî PC¹æ
	}else if(a == 10) {
		window.open("http://www.sayclub.com","","");				// ¼¼ÀÌÅ¬·´
	}else if(a == 11) {
		window.open("http://www.neowizbugs.com","","");				// ¹÷½º
	}else if(a == 12) {
		window.open("http://www.neowiz.com","","");		// ³×¿ÀÀ§Áî
	}else if(a == 13) {
		window.open("https://neoin.neowiz.com","","");		// Ã¤¿ë»çÀÌÆ®
	}
}

function popReady() {
	alert('ÁØºñÁßÀÔ´Ï´Ù.');
} 

function p_info(){
	
	 	var w = 500;
        var h = 572;
        var LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
        var TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
        var win2 = window.open('http://www.neowiz.com/kor/company/privacy2.html','ready2', 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+'');
        win2.focus();


}

function inner_info() { 
        var w = 500;
        var h = 572;
        var LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
        var TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
        var win2 = window.open('http://www.neowiz.com/kor/company/inner_info.html','ready3', 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+'');
        win2.focus(); 
}   


function pmang_site(str) {
	
	if(str == 1) {
		window.open("http://ava.pmang.com","","");		
	}else if(str == 2) {
	 	window.open("http://crossfire.pmang.com","","");		
	}else if(str == 3) {
	 	window.open("http://specialforce.pmang.com","","");		
	}else if(str == 4) {
	 	window.open("http://s4.pmang.com/s4_home.nwz?ssn=323","","");		
	}else if(str == 5) {
		window.open("http://nbaso.pmang.com/nbaso_home.nwz?ssn=327","","");		
	}else if(str == 6) {
		window.open("http://fifaonline.pmang.com/fifaonline_home.nwz?ssn=321","","");		
	}else if(str == 7) {
		window.open("http://raycity.pmang.com/raycity_home.nwz?ssn=314","","");		
	}else if(str == 8) {
		window.open("http://slugger.pmang.com/slugger_home.nwz?ssn=309","","");		
	}else if(str == 9) {
		window.open("http://www.pmang.com/warlord/warlord_home.nwz?ssn=319","","");		
	}else if(str == 10) {
		window.open("http://dekaron.pmang.com","","");		
	}else if(str == 11) {
		window.open("http://silkroad.pmang.com","","");		
	}else if(str == 12) {
		window.open("http://tenvi.pmang.com","","");		
	}else if(str == 13) {
		window.open("http://debut.pmang.com","","");		
	}else if(str == 14) {
		window.open("http://r2beat.pmang.com","","");		
	}else if(str == 15) {
		window.open("http://pokipoki.pmang.com","","");		
	}else if(str == 16) {
		window.open("http://pmang.sayclub.com/perfectko/perfectko_home.nwz?ssn=324","","");		
	}else if(str == 17) {
		window.open("http://www.pmang.com/hardboiled/hardboiled_home.nwz?ssn=310","","");		
	}

}

function pmang_webgame(str) {	
	
	if(str == 1) {
		window.open("http://www.pmang.com/game_casual_top.nwz?ssn=38","","");		
	}else if(str == 2) {
	 	window.open("http://www.pmang.com/game_casual_top.nwz?ssn=60","","");		
	}else if(str == 3) {
	 	window.open("http://www.pmang.com/game_casual_top.nwz?ssn=12","","");		
	}else if(str == 4) {
	 	window.open("http://www.pmang.com/game_casual_top.nwz?ssn=16","","");		
	}else if(str == 5) {
		window.open("http://www.pmang.com/game_casual_top.nwz?ssn=5","","");		
	}else if(str == 6) {
		window.open("http://pmang.sayclub.com/game_casual_top.nwz?ssn=321","","");		
	}else if(str == 7) {
		window.open("http://www.pmang.com/casual_top.nwz?ssn=57","","");		
	}else if(str == 8) {
		window.open("http://pmang.sayclub.com/game_casual_top.nwz?ssn=31","","");		
	}else if(str == 9) {
		window.open("http://pmang.sayclub.com/game_casual_top.nwz?ssn=30","","");		
	}

}

function popTodayClose(value) {
	SetCookie('pop_games','pop_games',1);
	document.getElementById(value).style.display="none";
}

function popClose(value) {
	document.getElementById(value).style.display="none";
}

function SetCookie(name, value, expiredays) {
    var todayDate = new Date();
    todayDate.setDate(todayDate.getDate() + expiredays);
    document.cookie = name + "=" + escape( value ) + "; path=/; domain=neowizgames.com; expires=" + todayDate.toGMTString() + ";"
}

function GetCookie(sName) {
    var aCookie = document.cookie.split("; ");
    for (var i=0; i < aCookie.length; i++) {
      var aCrumb = aCookie[i].split("=");
      if (sName == aCrumb[0]) {
        if(aCrumb.length == 2)
          return unescape(aCrumb[1]);
      }
    }
    return "";
}

// Popup
function openWin() { 
    var coo = GetCookie("pop_games");
    if(coo != "pop_games") {
    	document.getElementById('open_recruit').style.display = "";		
    }
}