/*-------------------------------------------------------------------------
::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 = '
'; strLink+= ''; strLink+= ''; if(menuNames[idx] == thisMenu) strLink+= menuNames[idx]+ ''; else strLink+= menuNames[idx]+ ''; strLink+= '