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'  /> General VAS";
Arr[1]="&nbsp;<img src='../images/plus.gif' alt='' name='plus' width='5' height='5' border='0'  /> Entertainment Based VAS";
Arr[2]="&nbsp;<img src='../images/plus.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel 3.5G";


Arr1[0]="&nbsp;<img src='../images/minus.gif' alt='' name='plus' width='5' height='5' border='0'  /> <font style='text-color:red'>General VAS</font>";
Arr1[1]="&nbsp;<img src='../images/minus.gif' alt='' name='minus22' width='5' height='5' border='0'  /> <font style='text-color:red'>Entertainment Based VAS</font>";
Arr1[2]="&nbsp;<img src='../images/minus.gif' alt='' name='plus' width='5' height='5' border='0'  /> <font style='text-color:red'>Airtel 3.5G</font>";


ArrLink[0]="../vasworld/sms.html";
ArrLink[1]="../vasworld/airtel_welcome_tunes.html";
ArrLink[2]="../vasworld/airtel3g.html";


ArrSub[0]=new Array();
ArrSub[0][0]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> SMS";
ArrSub[0][1]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Call Management Services";


ArrSubLink[0]=new Array();
ArrSubLink[0][0]="sms.html";
ArrSubLink[0][1]="../vasworld/call_management_services.html";


ArrSub[1]=new Array();
ArrSub[1][0]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Welcome Tunes ";
ArrSub[1][1]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Music on Demand ";
ArrSub[1][2]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Live-Voice Portal ";
ArrSub[1][3]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Subscription Portal";
ArrSub[1][4]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Voice SMS ";
ArrSub[1][5]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Voice Mail ";
//ArrSub[1][6]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Dating Portal ";
ArrSub[1][6]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Intelligent Call Management  ";
//ArrSub[1][8]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Fun Games & Competitions ";



ArrSubLink[1]=new Array();
ArrSubLink[1][0]="../vasworld/airtel_welcome_tunes.html";
ArrSubLink[1][1]="../vasworld/music_on_demand.html";
ArrSubLink[1][2]="../vasworld/airtel_live_voice_portal.html";
ArrSubLink[1][3]="../vasworld/sms_ussd_subscriptions.html";
ArrSubLink[1][4]="../vasworld/vsms.html";
ArrSubLink[1][5]="../vasworld/smart_voice_mail.html";
//ArrSubLink[1][6]="../vasworld/dating_portal.html";
ArrSubLink[1][6]="../vasworld/in_call_management.html";
//ArrSubLink[1][8]="../vasworld/fungames_comp.html";


ArrSub[2]=new Array();
//ArrSub[2][0]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Tele-voting Service ";
ArrSub[2][0]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Live Video Portal ";
ArrSub[2][1]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3.5G Broadband ";
ArrSub[2][2]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3G ";
ArrSub[2][3]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3G Data Devices ";
ArrSub[2][4]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Live  W@P Portal  ";
ArrSub[2][5]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Instant Messenger ";
ArrSub[2][6]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Blackberry with Airtel 3G ";
ArrSub[2][7]="&nbsp;<img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Phone Back up Service ";




ArrSubLink[2]=new Array();
//ArrSubLink[2][0]="../vasworld/tele_voting_service.html";
ArrSubLink[2][0]="../vasworld/video_media_portal.html";
ArrSubLink[2][1]="../vasworld/3g_broadband.html";
ArrSubLink[2][2]="../vasworld/3g.html";
ArrSubLink[2][3]="../vasworld/3g_data_devices.html";
ArrSubLink[2][4]="../vasworld/3g_wp_portal.html";
ArrSubLink[2][5]="../vasworld/sim_services.html";
ArrSubLink[2][6]="../vasworld/blackberry_airtel3g.html";
ArrSubLink[2][7]="../vasworld/phonebackupservices.html";








/*var strTemp;
Arr[0]=" <img src='../images/plus.gif' alt='' name='plus' width='5' height='5' border='0'  /> General VAS";
Arr[1]=" <img src='../images/plus.gif' alt='' name='plus' width='5' height='5' border='0'  /> Entertainment Based VAS";
Arr[2]=" <img src='../images/plus.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel 3G";


Arr1[0]=" <img src='../images/minus.gif' alt='' name='plus' width='5' height='5' border='0'  /> <font style='text-color:red'>General VAS</font>";
Arr1[1]=" <img src='../images/minus.gif' alt='' name='minus22' width='5' height='5' border='0'  /> <font style='text-color:red'>Entertainment Based VAS</font>";
Arr1[2]=" <img src='../images/minus.gif' alt='' name='plus' width='5' height='5' border='0'  /> <font style='text-color:red'>Airtel 3G</font>";


ArrLink[0]="../vasworld/SMS.html";
ArrLink[1]="../vasworld/entertainment.html";
ArrLink[2]="../vasworld/airtel3g.html";


ArrSub[0]=new Array();
ArrSub[0][0]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> SMS";
ArrSub[0][1]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Call Management Services";


ArrSubLink[0]=new Array();
ArrSubLink[0][0]="../vasworld/SMS.html";
ArrSubLink[0][1]="../vasworld/call_management_services.html";


ArrSub[1]=new Array();
ArrSub[1][0]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Welcome Tunes ";
ArrSub[1][1]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Music on Demand ";
ArrSub[1][2]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Airtel Live-Voice Portal ";
ArrSub[1][3]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> SMS & USSD Subscription ";
ArrSub[1][4]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> VSMS ";
ArrSub[1][5]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Smart Voice Mail ";
ArrSub[1][6]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Dating Portal ";
ArrSub[1][7]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Incall Management ";



ArrSubLink[1]=new Array();
ArrSubLink[1][0]="../vasworld/entertainment.html";
ArrSubLink[1][1]="../vasworld/music_on_demand.html";
ArrSubLink[1][2]="../vasworld/airtel_live_Voice_portal.html";
ArrSubLink[1][3]="../vasworld/sms_ussd_Subscriptions.html";
ArrSubLink[1][4]="../vasworld/VSMS.html";
ArrSubLink[1][5]="../vasworld/smart_voice_mail.html";
ArrSubLink[1][6]="../vasworld/dating_portal.html";
ArrSubLink[1][7]="../vasworld/in_call_management.html";


ArrSub[2]=new Array();
ArrSub[2][0]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Tele-voting Service ";
ArrSub[2][1]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Video Media Portal ";
ArrSub[2][2]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3G Broadband ";
ArrSub[2][3]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3G ";
ArrSub[2][4]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3G Data Devices ";
ArrSub[2][5]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> 3G/W@P Portal ";
ArrSub[2][6]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Smart Instant Messenger ";
ArrSub[2][7]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Blackberry with Airtel 3G ";
ArrSub[2][8]=" <img src='../images/rd_arw.gif' alt='' name='plus' width='5' height='5' border='0'  /> Phone Back up Service ";




ArrSubLink[2]=new Array();
ArrSubLink[2][0]="../vasworld/tele_voting_service.html";
ArrSubLink[2][1]="../vasworld/video_media_portal.html";
ArrSubLink[2][2]="../vasworld/3g_broadband.html";
ArrSubLink[2][3]="../vasworld/3g.html";
ArrSubLink[2][4]="../vasworld/3g_data_devices.html";
ArrSubLink[2][5]="../vasworld/3g_wp_portal.html";
ArrSubLink[2][6]="../vasworld/smart_instant_messenger_services.html";
ArrSubLink[2][7]="../vasworld/blackberry_services_with_airtel3g.html";
ArrSubLink[2][8]="../vasworld/phonebackupservices.html";





*/







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";
//add this code
	if(ArrSub[mainIndex].length){
	document.getElementById("divSubMenu"+mainIndex).style.display="block";
	}
	
	//new code ends here

	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:1px;' 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];
	
	
}