function xwriteit(opt1,opt2)
{
pwriteit(opt1);
var name_img=[
["1","2","3","4","5"],
["5.gif","gvirtual.gif","41.jpg","vlan.gif","vlan.gif"],
["5.jpg","1.jpg","12.jpg","11.jpg","2.jpg"],
["1","2","3","4","5"],
["1","2","3","4","5"],
["1","2","3","4","5"],
["1","2","3","4","5"],
["1","2","3","4","5"],
["1","2","3","4","5"]
];
document.write("<br><img src=\"images/"+name_img[opt1][opt2]+"\" align=\"right\">");
}
function pwriteit(opt1) 
	{
		if (opt1 >= 0)
{
var plinks=[
[HM_Array1, 36,0,4],		//Natural Gas
[HM_Array1_2 , 40,1,6],		//Transmission
[HM_Array1_3 , 46,2,2],		//Marketing
[HM_Array1_2_1, 48,3,3],	//HVJ
[HM_Array2, 51,4,5],		//Petrochemicals
[HM_Array2_3, 56,5,2],		//Marketing Network
[HM_Array3, 99,6,5],		//Freed
[HM_Array3_1, 63,7,4],		//LPG
[HM_Array3_2, 67,8,4],		//Propane
[HM_Array3_3, 71,9,4],		//Pentane
[HM_Array3_4, 75,10,4],		//sbps
[HM_Array3_5, 79,11,3],		//LPG Pipeline
[HM_Array3_5_2, 82,12,3],	//Freed
[HM_Array4 , 99,13,3],		//Freed
[HM_Array4_1 , 99,14,4],	//Telecom : Products & Prices
[HM_Array4_2 , 85,15,3],	//Telecom : Network
[HM_Array4_3 , 85,16,5],	//Telecom : GAILTEL Advantage
[HM_Array4_2_2 , 85,17,9],	//Telecom : Network :POP Address
[HM_Array5 , 92,18,5],		//Retail Gas
[HM_Array6 , 99,19,3],		//e&p
[HM_Array15 , 61,20,7],		//Customer Zone
[HM_Array16 , 99,21,5],		//Investor Zone
[HM_Array17 , 99,22,6],		//Energy Zone
[HM_Array18 , 99,23,4],		//Environment Zone
[HM_Array15_2 , 99,30,3],	//Customer Zone : Fertilizer
[HM_Array15_3 , 99,31,4],	//Customer Zone : Plastic Processors
[HM_Array15_4 , 99,32,4],	//Customer Zone : Automobile
[HM_Array15_5 , 99,33,5],	//Customer Zone : Telecom
[HM_Array25 , 99,34,7],	//About GAIL
[HM_Array30 , 99,35,6],	//Archives
[HM_Array30_8,99,36,5],	//Archives : Video Clipping
[HM_Array32 , 99,38,4],	//GAIL's Corporate Ads
[HM_Array33 , 99,39,6],	//GAIL's Product Ads
[HM_Array19 , 20,40,3],	//e-GAIL
[HM_Array34 , 99,41,6],	//GAIL's Product Ads
['The Menu Array','submenu startpoint','pwrite input','no.of submenu']
];

///************************************************COmmon Code********************************///
var htmltext2 = "";
htmltext2 += "<table width=\"100%\" border=\"0\" align=\"center\">";
for (j=0;j<=plinks.length-2 ;j++ )
{
if (parseInt(opt1) == parseInt(plinks[j][2])){opt=j;break;}
else {opt=j+1;}
}

for (i=0;i<=plinks[opt][0].length-2 ;i++ )
	{

	menu_num=plinks[opt][1]+i;
var mouse_effects_text=" onmouseout=\"HM_f_PopDown('elMenu"+menu_num+"')\" onmouseover=\"HM_f_PopUp('elMenu"+menu_num+"',event)\" ";
var mouse_effects;
	if (plinks[opt][0][i+1][1]=="#")	{mouse_effects=mouse_effects_text;}
	else	{mouse_effects=mouse_effects_text;}

var style_head;
var link_style;
switch(screen.width)
{
case 1024:
	link_style="font-family:Arial;font-size:13px;font-weight:normal;color:#000000;";
	break;
case 800:
	link_style="font-family:Arial;font-size:11px;font-weight:normal;color:#000000;";
	break;
}

htmltext2 += "<tr><td>&nbsp;<a  style=\""+link_style+"\" href=\""+plinks[opt][0][i+1][1]+"\""+mouse_effects+" >"+plinks[opt][0][i+1][0]+"</a></td></tr>";
	}

htmltext2 += "</table>"
document.write(htmltext2);
		}
}