/********************************************************************************
'	@ ÇÁ·ÎÁ§Æ®¸í : SUN OBT »çÀÌÆ®

'	@ ÆäÀÌÁö¸í    : /Script/jsEssensialFunction.js

'	@ ±â    ´É      : ÇÊ¼ö js º¸°ü

'	@ ÀÌ    ·Â      : 2006.02.21 ±è¿Ï. ÃÖÃÊ »ý¼º
					  2006.03.31 ÃÖ¿ì¼®. ÇÃ·¹½Ã ³×ºñ°ÔÀÌ¼Ç ÇÔ¼ö ÀÛ¼º
						ÇØ´ç script¿¡ ´ëÇÑ ÁÖ¼®À» ¹Ýµå½Ã ¸í±âÇÒ °Í!!!
*********************************************************************************/

// ¸â¹ö °æ·Î

strMemberDir = "https://member.soulultimatenation.com.tw/";
strMediaDir = "http://Glog.soulultimatenation.com.tw/Main/";




 
//ÇÃ·¡½¬ ¿¬µ¿ ³×ºñ°ÔÀÌ¼Ç È£Ãâ ÇÔ¼ö
function fnGoMenu(strCode) {
	switch (strCode) {
		// °ÔÀÓÁ¤º¸(¿Ï·á)
		case 100 :
			location.href = "/GameInfo/Features/";
			break;
		case 110 :			
			location.href = "/GameInfo/Features/";
			break;
		case 120 :
			location.href = "/GameInfo/Scenario/";
			break;
		case 130 :
			location.href = "/GameInfo/Character/";
			break;
		case 131 :
			location.href = "/GameInfo/Character/";
			break;
		case 132 :
			location.href = "/GameInfo/Character/viewDragonKnight.asp";
			break;
		case 133 :
			location.href = "/GameInfo/Character/viewValkyrie.asp";
			break;
		case 134 :
			location.href = "/GameInfo/Character/viewElementalist.asp";
			break;
		case 135 :
			location.href = "/GameInfo/Character/viewShadow.asp";
			break;
		case 140 :
			location.href= "/GameInfo/World/";
			break;
		case 150 :
			location.href = "/GameInfo/System/";
			break;
			

		// °ÔÀÓ°¡ÀÌµå(¿Ï·á)
		case 200 :
			location.href = "/GameGuide/Beginner/";
			break;
		case 210 :
			location.href = "/GameGuide/Beginner/";
			break;
		case 220 :
			location.href = "/GameGuide/Install/";
			break;
		case 221 :
			location.href = "/GameGuide/Install/";
			break;
		case 222 :
			location.href = "/GameGuide/Install/viewInstallAndRun.asp";
			break;
		case 223 :
			location.href = "/GameGuide/Install/changePW.asp";
			break;
		case 224 :
			location.href = "/GameGuide/Install/modifyQA.asp";
			break;	
		case 230 :
			location.href = "/GameGuide/Interface/";
			break;
		case 231 :
			location.href = "/GameGuide/Interface/";
			break;
		case 232 :
			location.href = "/GameGuide/Interface/viewControl.asp";
			break;
		case 240 :
			location.href = "/GameGuide/GameStart/";
			break;
		case 241 :
			location.href = "/GameGuide/GameStart/";
			break;
		case 242 :
			location.href = "/GameGuide/GameSystem/";
			break;
		case 250 :
			location.href = "/GameGuide/Village/";
			break;
		case 251 :
			location.href = "/GameGuide/Village/";
			break;
		case 252 :
			location.href = "/GameGuide/Map/";
			break;
		case 253 :
			location.href = "/GameGuide/Skill/";
			break;
		case 254 :
			//alert("¾÷µ¥ÀÌÆ® ÁØºñÁßÀÔ´Ï´Ù");
			location.href = "/GameGuide/Item/";
			break;
		case 255 :
			location.href = "/GameGuide/Monster/";
			break;
		case 256 :
			location.href = "/GameGuide/CreateZone/";
			break;
		case 257 :
			location.href = "/GameGuide/Mission/";
			break;
		case 258 :
			location.href = "/GameGuide/Quest/";
			break;
		case 259 :
			location.href = "/GameGuide/ItemCombine/";
			break;		
		case 260 :
			location.href = "/GameGuide/Formula/";
			break;
		case 261 :
			location.href = "/GameGuide/Formula/";
			break;
		case 262 :
			location.href = "/GameGuide/Formula/viewBerserker.asp";
			break;
		case 263 :
			location.href = "/GameGuide/Formula/viewDragonKnight.asp";
			break;
		case 264 :
			location.href = "/GameGuide/Formula/viewValkyrie.asp";
			break;
		case 265 :
			location.href = "/GameGuide/Formula/viewElementalist.asp";
			break;	
		case 266 :
			location.href = "/GameGuide/Formula/viewShadow.asp";
			break;
		

		//´º½ºÀÌº¥Æ®(¿Ï·á)
		case 300 :
			location.href = "/News/Notice/";
			break;
		case 310 :
			location.href = "/News/Notice/";
			break;			
		case 320 :
			location.href = "/News/Press/";
			break;
		case 330 :
			location.href = "/News/Update/";
			break;
		case 340 :
			//alert("ÁØºñÁßÀÔ´Ï´Ù");
			location.href = "/News/NewsLetter/";
			break;
		case 350 :
			location.href = "/News/Event/";
			break;
		case 360 :
			location.href = "/News/Products/";
			break;
		
/*

		
		//Ä¿¹Â´ÏÆ¼(¿Ï·á)
		case 400 :
			location.href = "/Community/ThemeBoard/";
			break;
		case 410 :
			location.href = "/Community/ThemeBoard/";
			break;
		case 411 :
			location.href = "/Community/ThemeBoard/";
			break;			
		case 412 :
			location.href = "/Community/ThemeBoard/listCharacterBoard.asp";
			break;
		case 413 :
			location.href = "/Community/ThemeBoard/listCaptureBoard.asp";
			break;												
		case 414 :
			location.href = "/Community/ThemeBoard/listItemBoard.asp";
			break;
		case 415 :
			location.href = "/Community/ThemeBoard/listGuildBoard.asp";
			break;						
		case 420 :
			location.href = "/Community/Discussion/";
			break;
		case 430 :
			location.href = "/Community/MakingForum/";
			break;
		case 431 :
			location.href = "/Community/MakingForum/";
			break;			
		case 432 :
			location.href = "/Community/MakingColumn/";
			break;			
		case 433 :
			location.href = "/Community/IdeaBoard/";
			break;			
		case 434 :
			location.href = "/Community/GlobalWork/";
			break;																				
		case 440 :
			location.href = "/Community/ScreenArt/";
//			location.href = "/Community/ScreenArt/listScreenArt.asp";
			break;
		case 450 :
			location.href = "/Community/FanArt/";
			break;
		case 460 :
			location.href = "/Community/FanPage/";
			break;


*/

		
		//Ä¿¹Â´ÏÆ¼(¿Ï·á)
		case 400 :
			window.open('http://club.wpark.com.tw/');
			break;
		case 410 :
			window.open('http://club.wpark.com.tw/');
			break;
	
		case 420 :
			location.href = "/Community/ThemeBoard/";
			//location.href = "/Community/Discussion/";
			break;
		case 421 :
			location.href = "/Community/ThemeBoard/";
			//location.href = "/Community/Discussion/";
			break;
		case 422 :
			location.href = "/Community/ThemeBoard/listCharacterBoard.asp";
			//location.href = "/Community/Discussion/";
			break;
		case 423 :
			location.href = "/Community/ThemeBoard/listCaptureBoard.asp";
			//location.href = "/Community/Discussion/";
			break;
		case 430 :
			//location.href = "/Community/MakingForum/";
			location.href = "/Community/ThemeBoard/listCaptureBoard.asp";
			break;
		case 431 :
			location.href = "/Community/MakingForum/";
			break;			
		case 432 :
			location.href = "/Community/MakingColumn/";
			break;			
		case 433 :
			location.href = "/Community/IdeaBoard/";
			break;			
		case 434 :
			location.href = "/Community/GlobalWork/";
			break;																				
		case 440 :
			location.href = "/Community/FanPage/";
//			location.href = "/Community/ScreenArt/listScreenArt.asp";
			break;
		case 450 :
			location.href = "/SUN_Exchange/SelfTop.asp";
			break;
		case 460 :
			location.href = "/Community/ScreenArt/listScreenArt.asp";
			break;


		//ÀÚ·á½Ç(¿Ï·á)
		case 500 :
			location.href = "/PDS/DownLoad/";
			break;
		case 510 :
			location.href = "/PDS/DownLoad/";
			break;
		case 511 :
			location.href = "/PDS/DownLoad/";
			break;			
		case 512 :
			location.href = "/PDS/DownLoad/downloadDrivers.asp";
			break;			
		case 520 :
			location.href = "/PDS/VOD/";
			break;
		case 530 :
			location.href = "/PDS/OST/";
			break;
		case 531 :
			location.href = "/PDS/OST/";
			break;			
		case 532 :
			location.href = "/PDS/OST/aboutHoward.asp";
			break;			
		case 533 :
			location.href = "/PDS/OST/writeComment.asp";
			break;			
		case 540 :
			location.href = "/PDS/Wallpaper/";
			break;
		case 550 :
			location.href = "/PDS/Picture/";
			break;
		case 560 :
			location.href = "/PDS/FanSiteKit/";
			break;			


		//°í°´Áö¿ø(¿Ï·á)
/*
		case 621 :
			location.href = "/Customer/Inquiry/";
			break;			
		case 622 :
			location.href = "/Customer/Hacking/";
			break;			
		case 623 :
			location.href = "/Customer/BadUserReport/";
			break;	
		case 624 :
			location.href = "/Customer/Declare/";
			break;								
*/
		case 600 :
			location.href = "/Customer/Service/";
			break;
		case 610 :
			location.href = "/Customer/Service/";
			break;			
		case 620 :
			location.href = "/Customer/Faq/";
			break;
		case 630 :
	        window.open( 'http://www.wpark.com.tw/ServiceCenter/ASK/Declaration_NotUser.asp');
			break;
		case 640 :
			window.open( 'http://www.wpark.com.tw/ServiceCenter/ASK/Declaration_NotUser.asp');
			break;
		case 650 :
			window.open( 'http://www.wpark.com.tw/ServiceCenter/FromDownload/');
			//window.open('/Customer/download/showfile.asp?Fname=«È¤áªA°È¶Ç¯uªí¡B¦P·N®Ñ.doc','','left=10000,top=10000,width=1,height=1');
			//location.href = "/Customer/«È¤áªA°È¶Ç¯uªí¡B¦P·N®Ñ.doc";
			break;
		case 660 :
			location.href = "/Customer/Policy/";
			break;
		case 670 :
			location.href = strMemberDir + "Customer/BlockList/";
			break;		
	
	
	
		//¸¶ÀÌÆú´õ
		case 700 :					
			location.href = strMemberDir + "MyFolder/PersonalLog/";
			break;
		case 710 :
			location.href = strMemberDir + "MyFolder/PersonalLog/";			
			break;
		case 720 :			
			window.open( 'https://ssl.wpark.com.tw/GameAccount/');
			break;
		case 730 :			
			location.href = strMemberDir + "MyFolder/ModifyInformation/";
			break;
		case 740 :
			window.open( 'https://ssl.wpark.com.tw/gameAccount/');			
			break;	
		case 750 :
			window.open( 'https://ssl.wpark.com.tw/gameAccount/');			
			break;
		case 760 :
			location.href = "http://www.soulultimatenation.com.tw/MyFolder/Exchange/default.asp";			
			break;
			
		
		
				
		// flash character

		case 810 :
			fnOpenWindow('/Common/FlashPopupView.asp?iFN=1','MainFlash', 'width=752,height=492')		
			break;
		case 820 :
			fnOpenWindow('/Common/FlashPopupView.asp?iFN=2','MainFlash', 'width=752,height=492')		
			break;
		case 830 :
			fnOpenWindow('/Common/FlashPopupView.asp?iFN=3','MainFlash', 'width=752,height=492')		
			break;
		case 840 :
			fnOpenWindow('/Common/FlashPopupView.asp?iFN=4','MainFlash', 'width=752,height=492')		
			break;


		//not GNB
		case 900 :
			location.href = "/default.asp";
			break;
		case 910 :			
			//window.open(strMediaDir, "Media", "toolbar=yes, status=yes, scrollbars=yes, resizable=yes, location=yes, menubar=yes") ;
			location.href = strMediaDir;
			break;
		case 920 :
			alert("·Ç³Æ¤¤.");break;
			location.href = "";
			break;
		case 930 :
			alert("·Ç³Æ¤¤.");break;
			location.href = "";
			break;						
		case 940 :
			location.href = "/siteinfo/sitemap.asp";
			break;							
		
		case 991 :
			window.open( 'http://www.wpark.com.tw/BulletinAndEvent/Event/readEvent.asp?no=27');
			break;
		case 992 :
			location.href = "http://www.soulultimatenation.com.tw/News/Event/readEvent.asp?iC=142&iPN=1&tC=-1";
			break;
		case 993 :
			location.href = "http://www.soulultimatenation.com.tw/News/Event/readEvent.asp?iC=134&iPN=1&tC=-1";
			break;
		case 994 :
			window.open( 'http://www.wpark.com.tw/BulletinAndEvent/Event/readEvent.asp?no=29');
			break;
		case 995 :
			location.href = "http://www.soulultimatenation.com.tw/News/Event/readEvent.asp?iC=143&iPN=1&tC=-1";
			break;
		case 996 :
			location.href = "http://www.soulultimatenation.com.tw/News/Event/readEvent.asp?iC=144&iPN=1&tC=131";
			break;
		case 997 :
			window.open( 'http://www.wpark.com.tw/BulletinAndEvent/Event/readEvent.asp?no=24');
			break;
		case 998 :
			location.href = "http://www.soulultimatenation.com.tw/News/Event/readEvent.asp?iC=140&iPN=1&tC=1";
			break;
		case 999 :
			location.href = "http://www.soulultimatenation.com.tw/News/Event/readEvent.asp?iC=139&iPN=1&tC=1";
			break;

        //ºÎ°¡¼­ºñ½º
		case 1000 :
			location.href = "/ItemMall/";
			break;
		case 1001 :
			window.open('http://ssl.wpark.com.tw/Payment/PaymentSelectForm.asp');
			break;
		case 1002 :
			location.href = "http://www.soulultimatenation.com.tw/itemMall/service/";
			break;
		case 1003 :
			location.href = "http://www.soulultimatenation.com.tw/ItemMall/ItemCatalog/";
			break;
		case 1004 :
			location.href = "https://payment.soulultimatenation.com.tw/Payment/Cash/CashHistoryListForm.asp";
			break;
		case 1005 :
			location.href = "https://payment.soulultimatenation.com.tw/Payment/Coupon";
			break;
		case 1006 :
			location.href = "https://payment.soulultimatenation.com.tw/Event/20071022_Instant/Log.asp";
			break;

		case 1010 : 
			//¹«·áÄ³½ÃÃæÀü¼Ò
			fnOpenWindow('/ItemMall/Common/popFreeCash.asp','winFreeCash','width=365,height=395,scrollbars=no');
			break;


		default :
			location.href = "/";

	}
}


//Footer ÆÐ¹Ð¸® »çÀÌÆ® ÀÌµ¿ ÇÔ¼ö
function fnGoFamilySite(value) {
	if (value != "") {
		window.open(value, 'family', '');
	}
}

	
//ÆË¾÷Ã¢À» »çÀÌÁî¿¡ ¸Â°Ô ¶ç¿î´Ù 2005.07.04 Á¤Àç¿ì
function fnOpenWindow(strUrl, strWinName, strFeature) {
	window.open(strUrl, strWinName, strFeature);
}


//·Î±×ÀÎ ¸Þ¼¼Áö È£ÃâÈÄ ·Î±×ÀÎÆäÀÌÁö ÀÌµ¿ 2005.07.01 ÃÖ¿ì¼®
function fnChkLogin(strLoginLocation)
{
	//	alert('·|­û¥\¯à©|¥¼¶}©ñ');

	if(confirm("»Ý­nµn¤J·|­û¡A½Ð°Ý­n«e©¹µn¤J­¶­±¶Ü?"))
		self.location=strLoginLocation;


}


//´Ù¿î·Îµå ÈÄ Æ÷Ä¿½Ì ÀüÈ¯À¸·Î ÀÎÇØ ÇÃ·¡½¬¿¡¼­ fnGoMenu ÇÔ¼ö È£Ãâ½Ã ¿¡·¯³ª´Â°ÍÀ» ¹æÁöÇÔ.. -> ÀÓ½ÃÀû »ç¿ë  2005.08.25 ½ÉÀÇÁØ
//window.openÀ¸·Î ÀüÈ¯
//function fnDown(strFileName) {
//	document.all.iFrmDownLoad.src = "/Common/download.asp?sFN="+strFileName;
//}
//document.write("<iframe style=\"display:none\" width=\"0\" height=\"0\" name=\"iFrmDownLoad\" id=\"iFrmDownLoad\"></iframe>");


//F5Å° ¸·±â
document.onkeydown = function() {
	if (event.keyCode == 116) {
		event.keyCode = 505;
	}
	if (event.keyCode == 505) { 
		return false;
	}
}


// ¿ÞÂÊ ÀÚ¹Ù½ºÅ©¸³Æ® ¸Þ´º ÃÊ±âÈ­

// ·Ñ¿À¹ö
function over() {
         var targetid, srcElement, targetElement;
		 var submenus;
         srcElement=window.event.srcElement.parentElement;

        if(event.srcElement.parentElement.className.indexOf("outline") >= 0) 
          {
           targetid=srcElement.id + "d";

			 submenus = document.all.submenupanel;
			 var child;

			 for (i = 0; i < submenus.children.length; i++) {
				child = submenus.children.item(i);
				if (child.id == targetid) {
					child.style.display = "";
				}else{
					child.style.display = "none";
				}
			 }

        }

}

function Over() {
	if(event.srcElement.className == "rollover") {
		var srcPath = event.srcElement.src;
		var newSrcPath = srcPath.replace(".gif", "on.gif");
		event.srcElement.src = newSrcPath;
	}
}

function Out() {
	if(event.srcElement.className == "rollover") {
		var srcPath = event.srcElement.src;
		var newSrcPath = srcPath.replace("on.gif", ".gif");
		event.srcElement.src = newSrcPath;
	}
}


function fnInitLeftMenu() {
	document.body.attachEvent("onmouseover", Over);
	document.body.attachEvent("onmouseout", Out);
}

document.onmouseover=over;