function f_GoMenu(code) {
	switch (code) {
		// flash URL
		//Announce
		case 100 :
			location.href = "../01-announce/";
			break;
		case 110 :			
			location.href = "../01-announce/index_02.php";
			break;
		case 120 :
			location.href = "../01-announce/index_02.php";
			break;
		case 130 :
			location.href = "../01-announce/index_02.php";
			break;
		//History
		case 200 :
			location.href = "../02-history/index_02.php";
			break;
		case 210 :
			location.href = "../02-history/index_03.php";
			break;
		case 220 :
			location.href = "../02-history/index.php";
			break;
		//Guide
		case 300 :	
			location.href = "../03-guide";
			break;
		case 310 :
			location.href = "../03-guide/index_02.php";
			break;
        case 320 :
			location.href = "../03-guide/index_03.php";
			break;
        case 330 :
			location.href = "../03-guide/index_04.php";
			break;
		case 340 :
			location.href = "../03-guide/index_05-1.php";
			break;
		case 350 :
			location.href = "../03-guide/index_06-1.php";
			break;
		//New Player
		case 400 :
			location.href = "../04-newplayer";
			break;
		case 410 :
			location.href = "../04-newplayer/index_02-1-1.php";
			break;
        case 420 :
			location.href = "../04-newplayer/index_03.php";
			break;
        case 430 :
			location.href = "../04-newplayer/index_04.php";
			break;
		//Item shop
		case 500 :
			location.href = "../preparing/";
			break;
		case 510 :
			location.href = "../preparing/";
			break;
		//Activities
		case 600 :
			location.href = "../preparing/";
			break;
		case 610 :
			location.href = "../preparing/";
			break;
        case 620 :
			location.href = "../preparing/";
			break;
        case 630 :
			location.href = "http://localhost/FC/preparing/";
			break;
		//Download
		case 700 :
			location.href = "../07-download";
			break;
		case 710 :
			location.href = "../07-download/index_02.php";
			break;
        case 720 :
			location.href = "../07-download/index_03.php";
			break;
		//support
		case 800 :
			location.href = "../08-support";
			break;
		case 810 :
			location.href = "../08-support/index_02.php";
			break;
        case 820 :
			location.href = "../08-support/index_03.php";
			break;
        case 830 :
			location.href = "../08-support/index_04.php";
			break;
        case 840 :
			location.href = "../08-support/index_05-1.php";
			break;
        case 850 :
			location.href = "https://www.runup.com.sg/service/";
			break;
		case 860 :
			location.href = "../08-support/index_07.php";
			break;
		case 870 :
			location.href = "../08-support/index_08.php";
			break;
		//bookmark
		case 900 :
			location.href ="javascript:window.external.AddFavorite(\'http://fo.runup.com.sg/\',\'Fantagetar Online - Singapore\')";
			break;
		case 1000 :
			location.href = "../top/top.php";
			break;
		//site map
		case 1100 :
			location.href = "#";
			break;
		default :
			location.href = "/";
	}
}

function f_GoViewList (frm, strUrl) { 
	eval(frm).action = strUrl;
	eval(frm).submit();
}

function f_GoPageNum (frm, strUrl,pageNum) { 
	eval(frm).action = strUrl;
	eval(frm).cP.value = pageNum;
	eval(frm).submit();
}

function f_ReadArticle(frm,cId){
	eval(frm).cIdx.value = cId;
	eval(frm).submit(); 
}

function f_GoMain()
{
	location.href="#";
}

function f_GoPage(strUrl)
{
	location.href = strUrl;
}

function f_GoLogin(strUrl)
{
	location.href = "#" + strUrl;
}

function f_GoOpenPage(strUrl)
{
	opener.location.href = strUrl;
}

//¶}±Òµøµ¡
function f_OpenWindow(strUrl, strWinName, strFeature) {
	window.open(strUrl, strWinName, strFeature);
}

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 MouseOver() {
	if(event.srcElement.className == "rollover") {
		var imgSrc = event.srcElement.src;
		var newImgSrc = imgSrc.replace(".gif", "_on.gif");
		event.srcElement.src = newImgSrc;
	}
}

function MouseOut() {
	if(event.srcElement.className == "rollover") {
		var imgSrc = event.srcElement.src;
		var newImgSrc = imgSrc.replace("_on.gif", ".gif");
		event.srcElement.src = newImgSrc;
	}
}

function f_Init() {
	document.body.attachEvent("onmouseover", MouseOver);
	document.body.attachEvent("onmouseout", MouseOut);
}
//document.onmouseover=over;

function processKey() 
{ 
	if( (event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82)) || 	(event.keyCode >= 112 && event.keyCode <= 123) || event.keyCode == 8) 
	{ 
		event.keyCode = 0; 
		event.cancelBubble = true; 
		event.returnValue = false; 
	} 
} 

//document.onkeydown = processKey; 

//if(parent.frames.length <= 0 ){top.location.href="http://";}