/*------------------------------------------------------------------------- ::Copyright(C) 2003 Askey(QoStek) Corporation All rights reserved. ::File_Name : menu.js ::Purpose : JavaScript for switching 3 modes(CH/RG/CM) ::Description: ::Version : 1.0 ::Date : ::Author : Lenny Liang ::-------------------------------------------------------------------------*/ var currentMode = "RG"; var thisMenu ="Setup"; var menuNames; var menuLinks; var menuRgNames=new Array( "Setup", "Wireless", "Security", "Access Restrictions", "Applications
& Gaming", "Administration", "Status    "); var menuRgLinks=new Array( "BasicSetup", "BasicWirelessSettings", "SecurityFirewall", "AccessRestrictionsWebsiteBlocking", "Applications&GamingPortRangeForwarding", "AdministrationSecurity", "StatusGateway" ); var menuChNames=new Array( "Wireless", "Access Restrictions", "Administration", "Status    ", " ", " ", " "); var menuChLinks=new Array( "BasicWirelessSettings", "RgWebBlock", "RgSecurity", "RgStatus", "", "", ""); var menuCmNames=new Array( "Wireless", "Administration", "Status    ", " ", " ", " ", " "); var menuCmLinks=new Array( "BasicWirelessSettings", "RgSecurity", "CmStatus", "", "", "", "" ); function setCurrentMode(mode, setup, wireless) { currentMode = mode; if(currentMode == "RG" || currentMode == "CH-PLUS") { menuNames = menuRgNames; menuLinks = menuRgLinks; menuLinks[0] = setup; menuLinks[1] = wireless; } else if(currentMode == "CH") { menuNames = menuChNames; menuLinks = menuChLinks; menuLinks[0] = wireless; } else { menuNames = menuCmNames; menuLinks = menuCmLinks; menuLinks[0] = wireless; } } function setCurrentMenu(menu) { thisMenu = menu; } function getMenuItemByIndex(idx) { var strLink; if(menuNames[idx] == thisMenu) strLink = '\n'; else strLink = '\n'; strLink+= '

'; strLink+= ''; strLink+= ''; if(menuNames[idx] == thisMenu) strLink+= menuNames[idx]+ ''; else strLink+= menuNames[idx]+ ''; strLink+= ''; document.write(strLink); } function getMenuUpperBarByIndex(idx) { var strBar; var strGifBar = "UI_06"; var strColWidth = "80"; var strGifWidth = "83"; if(menuNames[idx] == thisMenu) strGifBar = "UI_07"; if(menuNames[idx] == "Applications
& Gaming" || menuNames[idx] == "Administration") { strColWidth = "121"; strGifWidth = "115"; } if(idx ==5 && currentMode != "RG") { strColWidth = "121"; strGifWidth = "115"; } strBar = ''; strBar+= ''; document.write(strBar); }