var Arr=new Array();
var Arr1=new Array();
var ArrSub=new Array();
var ArrLink=new Array();
var ArrSubLink=new Array();


function designMenu(mainMenuIdx,subMenuIdx)
{
var strTemp;
Arr[0]="&nbsp;<img src='../images/plus.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Customers";
//Arr[1]="&nbsp;<img src='../images/plus.gif' alt='' name='plus' width='5' height='5' border='0'  /> Inroamers";

//Arr[6]=" <img src='../images/redbox_link.gif' alt='' name='plus' width='5' height='5' border='0'  /> FAQs";
//Arr[7]=" <img src='../images/redbox_link.gif' alt='' name='plus' width='5' height='5' border='0'  /> Queries";
//Arr[9]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Buy now";

Arr1[0]="&nbsp;<img src='../images/minus.gif' alt='' name='plus' width='5' height='5' border='0'  /> <font style='text-color:red'> Airtel Customers</font>";
//Arr1[1]="&nbsp;<img src='../images/minus.gif' alt='' name='minus22' width='5' height='5' border='0'  /> <font style='text-color:red'> Inroamers</font>";

//Arr1[6]=" <img src='../images/redbox_link.gif' alt='' name='plus' width='5' height='5' border='0'  /><font style='text-color:red'> FAQs</font>";
//Arr1[7]=" <img src='../images/redbox_link.gif' alt='' name='plus' width='5' height='5' border='0'  /> <font style='text-color:red'> Queries</font>";
//Arr1[9]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> <font style='text-color:red'> Buy now</font>";

ArrLink[0]="../roaming/rom_postpaid.html";
//ArrLink[1]="../roaming/inroamers.html";





ArrSub[0]=new Array();
ArrSub[0][0]="<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Postpaid";
//ArrSub[0][0]="<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Prepaid";
ArrSub[0][1]="<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> SMS ";
ArrSub[0][2]="<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> GPRS";
//ArrSub[0][4]="<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3G";
//ArrSub[0][5]="<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Tariff";


ArrSubLink[0]=new Array();
ArrSubLink[0][0]="../roaming/rom_postpaid.html";
//ArrSubLink[0][1]="../roaming/rom_prepaid.html";
ArrSubLink[0][1]="../roaming/sms.html";
ArrSubLink[0][2]="../roaming/gprs.html";
//ArrSubLink[0][4]="../roaming/3g.html";
//ArrSubLink[0][5]="../roaming/tariff.html";

//ArrSub[1]=new Array();
//ArrSub[1][0]="<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> VAS Loyalty Program";



//ArrSubLink[1]=new Array();
//ArrSubLink[1][0]="inroamers.html";
//ArrSubLink[1][1]="#";



strTemp="";
for(i=0;i<Arr.length;i++)
{
	strTemp+="<div id='divMainMenu"+i+"' style='padding-top:0px'><table border='0' cellpadding='0' cellspacing='0' width='166' style='padding-top:0px;margin-left:-5px;'>";
    if(parseInt(mainMenuIdx)==parseInt(i))
	    strTemp+="<TR style='padding-left: 0px;border-collapse: collapse;background-image:url(../images/bg_leftnav_ebusiness.gif); background-position:bottom; background-color:#f3f3f3;'><TD style='cursor:hand;cursor:pointer;height:22px;padding-left:6px;' onclick='openPage("+i+",0)'>"+Arr1[i]+"</TD></TR>";
	else
	    strTemp+="<TR style='background-image:url(../images/bg_leftnav_ebusiness.gif); background-position:bottom; background-color:#f3f3f3;'><TD style='cursor:hand;cursor:pointer;height:22px;padding-left:6px;' onclick='openPage("+i+",0)'>"+Arr[i]+"</TD></TR>";
	strTemp+="</table></div><div id='divSubMenu"+i+"' style='margin-left:-4px;'></div>";
	
}
document.getElementById("divMenu").innerHTML=strTemp;
if(parseInt(mainMenuIdx)!=-1 && parseInt(subMenuIdx)!=-1)
	chkLink(mainMenuIdx);
}
function chkLink(mainIndex)
{
	var strSubTemp="";
	var objMainMenu=document.getElementById("divMainMenu"+mainIndex);
	var objSubMenu=document.getElementById("divSubMenu"+mainIndex);
//	alert(mainIndex);
//	alert(ArrSub[mainIndex].length);
	for(i=0;i<Arr.length;i++)
		document.getElementById("divSubMenu"+i).style.display="none";
	document.getElementById("divSubMenu"+mainIndex).style.display="block";

	for(i=0;i<ArrSub[mainIndex].length;i++)
	{
		strSubTemp+="<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
		strSubTemp+="<TR style='background-color:#f5f5f5;height:22px'><TD valign='top' width='10%'>&nbsp;</TD><TD  style='cursor:hand;cursor:pointer;padding-left:6px;' onclick='openPage1("+mainIndex+","+i+")'>"+ArrSub[mainIndex][i]+"</TD></TR>";
		strSubTemp+="</table>";	
		//alert(ArrSub[mainIndex][i]);
	}
	//alert(strSubTemp);
	objSubMenu.innerHTML=strSubTemp;
//	openPage(mainIndex,0)
//	document.getElementById("div"+mainIndex).style.display="none";
}
function openPage(mainMenuIdx,subMenuIdx)
{

	
		
			window.location.href=ArrLink[mainMenuIdx];
		
	
}

function openPage1(mainMenuIdx,subMenuIdx)
{



			window.location.href=ArrSubLink[mainMenuIdx][subMenuIdx];
	
	
}