﻿var rootPath = '/';


function IsLoginUser() {
    return (UI_LOGIN == true);
}
function IsTester() {
    return (UI_TESTER == true);
}
function IsIssueOpen() {
    return (ISSUE_OPEN == true);
}

function menu(menuId) {
    switch(menuId) {
    	
		case 4:     // game store
		    location.href = rootPath + 'webshop.php';
		    break;
		case 5:     // game store
		    location.href = 'mailto:treskai@gmail.com';
		    break;
        case 0:     
            location.href = rootPath;
            break;
        case 901:     
            location.href = rootPath + 'agent/?id=19';
            break;
        case 902:     
            window.open('/show.aspx?articleid=101',"_blank");
            break;
        case 903:     
            location.href = rootPath + 'rank.php';
            break;
        case 101:
            location.href = rootPath + 'donasi.php';
            break;
        case 1001:     
            location.href = rootPath + 'register.php';
            break;
        case 1002:     
            location.href = rootPath + 'lostpassword.php';
            break;
        case 1:    
            location.href = rootPath + 'index.php';
		    break;
		case 11:     // 新闻公告
		    location.href = rootPath + 'more.php';
		    break;
	
		    
		case 20:     // 会员中心
		    location.href = rootPath + '';
		    break;
		case 21:     // 排行榜
		    location.href = rootPath + 'rank.php';
		    break;
		case 22:     // 推广员系统
		    location.href = rootPath + 'user.php';
		    break;
		case 23:     // 注册
		    location.href = rootPath + 'register.php';
		    break;
		case 24:     // 修改密码
		    location.href = rootPath + 'lostpassword.php';
		    break;
		case 25:     // 退出
		    location.href = rootPath + 'index.php';
		    break;
		    
		case 30:	
		case 31:	//在线转生
		    location.href = rootPath + 'user.php?option=reborn';
		    break;
		case 32: 	//升级装备
		    location.href = rootPath + 'user.php';
		    break;
		case 33: 	//在线洗点
		    location.href = rootPath + 'user.php?option=changepassword';
		    break;
		case 34:	//在线加点
		    location.href = rootPath + 'user.php?option=transaction';
		    break;
		case 35: 	//洗红
		    location.href = rootPath + 'user.php?option=resetchar';
		    break;
		case 36: 	//洗红
		    location.href = rootPath + 'user.php?option=goldtopoint';
		    break;
		case 37: 	//洗红
		    location.href = rootPath + 'user.php.php?option=transactionrecord';
		    break;
    		case 38: 	//洗红
		    location.href = rootPath + 'user.php.php?option=goldlockerfix';
		    break;
		case 40:     // 程式下载
		    location.href = rootPath + 'download.php';
		    break;
		case 41:     // 程式下载
		    location.href = rootPath + 'download.php';
		    break;
		case 42:     // 补丁下载
		    location.href = rootPath + 'download.php';
		    break;
		case 43:     // 截图
		    alert('暫未釋出!'); //location.href = rootPath + 'wallpaper.aspx';
		    break;
		    
		case 50: 
		    location.href = rootPath + 'webshop.php';
		    break;
		case 51:     // 商城
		    location.href = rootPath + 'webshop.php';
		    break;
		case 52:     // 商城
		    location.href = rootPath + 'webshop.php';
		    break;
		case 53:     // 商城
		    location.href = rootPath + 'webshop.php';
		    break;
		case 54:     // 商城
		    location.href = rootPath + 'webshop.php';
		    break;
		case 55:     // 商城
		    location.href = rootPath + 'webshop.php';
		    break;
		    
		case 60:      // 充值中心
		    location.href = rootPath + 'donasi.php';
		    break;
		case 61:      // 充值中心
		    location.href = rootPath + 'donasi.php';
		    break;
		case 62:      // 充值中心
		    window.open('http://maengila.net/',"_blank");
		    break;
		case 63:      // 充值中心
		    location.href = rootPath + 'donasi.php';
		    break;
		case 64:      // 充值中心
		    location.href = rootPath + 'donasi.php';
		    break;
		case 65:      // 充值中心
		    location.href = rootPath + 'donasi.php';
		    break;
	        case 391:     // 注册
		    location.href = rootPath + '';
		    break;
 		 case 392:     // 注册
		    location.href = rootPath + '';
		    break;
			case 981:     // 注册
		    location.href = rootPath + 'helpdesk.php';
		    break;
		case 1000:      
		    alert('');
		    break;
		    
		default:
		    location.href = rootPath +'';
		    break;
    }
}


function doNothing() { }