sub window_onload() get_pos 500,450 get_posTitle submenu.style.visibility = "hidden" document.all.myframe.src = "" document.all.myframe.style.height = 340 End sub sub window_onresize() dim imgsrc imgsrc = ucase(sbanner.src) if instr(imgsrc,ucase("Images/MinistryOfficeTitle.gif")) Then get_pos 500,450 Elseif instr(imgsrc,ucase("Images/SocialTitle.gif")) Then get_pos 400,450 Elseif instr(imgsrc,ucase("Images/FireServiceTitle.gif")) Then get_pos 400,430 Elseif instr(imgsrc,ucase("Images/ReliefTitle.gif")) Then get_pos 400,390 End if get_posTitle get_subMenuPos() End sub function get_pos(Fleft,Sleft) if document.body.clientwidth = 1004 then first.style.left = Fleft seco.style.left = Sleft home.style.left = 140 else first.style.left = Fleft - 100 seco.style.left = Sleft - 100 home.style.left = 40 end if End Function function get_posTitle() if document.body.clientwidth < Cint(Mid(banner.style.width,1,3)) Then bpleft = 10 pleft = Mid(banner.style.width,1,3) - 348 fleft = pleft + bpleft - 30 Min.style.left = fleft social.style.left = fleft fire.style.left = fleft relief.style.left = fleft Else bleft = document.body.clientwidth - Mid(banner.style.width,1,3) bpleft = bleft / 2 pleft = Mid(banner.style.width,1,3) - 348 fleft = pleft + bpleft - 30 Min.style.left = fleft social.style.left = fleft fire.style.left = fleft relief.style.left = fleft end if End Function Function get_subMenuPos() if document.body.clientwidth = 780 Then submenu.style.left = 468 submenu.style.top = 165 elseif document.body.clientwidth = 1004 Then submenu.style.left = 568 submenu.style.top = 165 else submenu.style.left = 470 submenu.style.top = 165 End if End Function sub document_Onclick() submenu.style.visibility = "hidden" End sub sub home_Onmouseover() home.style.cursor = "hand" End sub sub home_OnClick() document.location.href = "main.htm" End sub sub Min_Onmouseover() Min.style.cursor = "Hand" End sub sub Min_Onclick() get_pos 500,450 sbanner.src = "Images/MinistryOfficeTitle.gif" document.all.myframe.src="a1.htm" document.all.myframe.style.height = 550 td1.innerText = "" td2.innertext = "" td3.innerText = "History |" td4.innertext = "Organization Chat" td5.innerText = "" td6.innertext = "" td7.innerText = "" End sub sub social_Onmouseover() social.style.cursor = "Hand" End sub sub social_Onclick() get_pos 400,450 sbanner.src = "Images/SocialTitle.gif" document.all.myframe.src="b1.htm" document.all.myframe.style.height = 560 td1.innerText = "Introduction |" td2.innertext = "Legislative Aspect |" td3.innerText = "Social welfare services |" td4.innertext = "Government & NGOs |" td5.innerText = "National committee on women affairs |" td6.innertext = "Asean focal point" td7.innerText = "" End sub sub fire_onmouseover() fire.style.cursor = "Hand" End sub sub fire_Onclick() get_pos 400,430 document.all.myframe.src="d1.htm" document.all.myframe.style.height = 1025 sbanner.src = "Images/FireServiceTitle.gif" td1.innerText = "Introduction |" td2.innertext = "Duties & Function |" td3.innerText = "Fire stations |" td4.innertext = "Phone Numbers |" td5.innerText = "Central fire services training school |" td6.innertext = "Fire Extinguisher" td7.innerText = "" End sub sub relief_onmouseover() relief.style.cursor = "Hand" End sub sub relief_Onclick() get_pos 400,390 document.all.myframe.src="c1.htm" document.all.myframe.style.height = 630 sbanner.src = "Images/ReliefTitle.gif" td1.innerText = "Introduction |" td2.innertext = "Organization Set-up |" td3.innerText = "Delivering Relief |" td4.innertext = "Rehabilitation river or sea victims |" td5.innerText = "Providing cash assistance for returnees |" td6.innertext = "Prevention of natural disasters |" td7.innerText = "Central Committee" End sub Sub td1_onmouseover() td1.style.cursor = "Hand" td1.style.color = "Blue" End sub Sub td1_onmouseout() td1.style.color = "" End sub Sub td1_Onclick() dim imgsrc imgsrc = ucase(sbanner.src) if instr(imgsrc,"Images/SocialTtitle.gif") <> 0 Then document.all.myframe.src = "b1.htm" document.all.myframe.style.height = 560 elseif instr(imgsrc,ucase("Images/FireServiceTitle.gif")) <> 0 Then document.all.myframe.src = "d1.htm" document.all.myframe.style.height = 1025 elseif instr(imgsrc,ucase("Images/ReliefTitle.gif")) <> 0 Then document.all.myframe.src = "c1.htm" document.all.myframe.style.height = 630 End if End sub Sub td2_onmouseover() td2.style.cursor = "Hand" td2.style.color = "Blue" End sub Sub td2_onmouseout() td2.style.color = "" End sub Sub td2_Onclick() dim imgsrc imgsrc = ucase(sbanner.src) if instr(imgsrc,"Images/SocialTitle.gif") <> 0 Then document.all.myframe.src = "b2.htm" document.all.myframe.style.height = 750 elseif instr(imgsrc,ucase("Images/FireServiceTitle.gif")) <> 0 Then document.all.myframe.src = "d2.htm" document.all.myframe.style.height = 830 elseif instr(imgsrc,ucase("Images/ReliefTitle.gif")) <> 0 Then document.all.myframe.src = "c2.htm" document.all.myframe.style.height = 800 End if End sub Sub td3_onmouseover() td3.style.cursor = "Hand" td3.style.color = "Blue" if td3.innerText = "Social welfare services |" Then submenu.style.visibility = display submenu.style.zIndex = 44 get_subMenuPos() End if End sub Sub td3_onmouseout() td3.style.color = "" 'submenu.style.visibility = "hidden" End sub Sub td3_Onclick() dim imgsrc imgsrc = UCASE(sbanner.src) if instr(imgsrc,ucase("Images/MinistryOfficeTitle.gif")) <> 0 Then document.all.myframe.src = "a1.htm" document.all.myframe.style.height = 550 elseif instr(imgsrc,"Images/SocialTitle.gif") <> 0 Then document.all.myframe.src = "b3.htm" submenu.style.visibility = display document.all.myframe.style.height = 530 elseif instr(imgsrc,ucase("Images/FireServiceTitle.gif")) <> 0 Then document.all.myframe.src = "d3.htm" document.all.myframe.style.height = 2100 elseif instr(imgsrc,ucase("Images/ReliefTitle.gif")) <> 0 Then document.all.myframe.src = "c3.htm" document.all.myframe.style.height = 605 End if End sub Sub td4_onmouseover() td4.style.cursor = "Hand" td4.style.color = "Blue" End sub Sub td4_onmouseout() td4.style.color = "" End sub Sub td4_Onclick() dim imgsrc imgsrc = ucase(sbanner.src) if instr(imgsrc,ucase("Images/MinistryOfficeTitle.gif")) <> 0 Then document.all.myframe.src = "a2.htm" document.all.myframe.style.height = 800 elseif instr(imgsrc,"Images/SocialTitle.gif") <> 0 Then document.all.myframe.src = "b4.htm" document.all.myframe.style.height = 1370 elseif instr(imgsrc,ucase("Images/FireServiceTitle.gif")) <> 0 Then document.all.myframe.src = "d4.htm" document.all.myframe.style.height = 650 elseif instr(imgsrc,ucase("Images/ReliefTitle.gif")) <> 0 Then document.all.myframe.src = "c4.htm" document.all.myframe.style.height = 670 End if End sub Sub td5_onmouseover() td5.style.cursor = "Hand" td5.style.color = "Blue" End sub Sub td5_onmouseout() td5.style.color = "" End sub Sub td5_Onclick() dim imgsrc imgsrc = ucase(sbanner.src) if instr(imgsrc,"Images/SocialTitle.gif") <> 0 Then document.all.myframe.src = "b5.htm" document.all.myframe.style.height = 890 elseif instr(imgsrc,ucase("Images/FireServiceTitle.gif")) <> 0 Then document.all.myframe.src = "d5.htm" document.all.myframe.style.height = 680 elseif instr(imgsrc,ucase("Images/ReliefTitle.gif")) <> 0 Then document.all.myframe.src = "c5.htm" document.all.myframe.style.height = 800 End if End sub Sub td6_onmouseover() td6.style.cursor = "Hand" td6.style.color = "Blue" End sub Sub td6_onmouseout() td6.style.color = "" End sub Sub td6_Onclick() dim imgsrc imgsrc = ucase(sbanner.src) if instr(imgsrc,"Images/SocialTitle.gif") <> 0 Then document.all.myframe.src = "b6.htm" document.all.myframe.style.height = 600 elseif instr(imgsrc,ucase("Images/FireServiceTitle.GIF")) <> 0 Then document.all.myframe.src = "d6.htm" document.all.myframe.style.height = 1000 elseif instr(imgsrc,ucase("Images/ReliefTitle.gif")) <> 0 Then document.all.myframe.src = "c6.htm" document.all.myframe.style.height = 680 End if End sub Sub td7_onmouseover() td7.style.cursor = "Hand" td7.style.color = "Blue" End sub Sub td7_onmouseout() td7.style.color = "" End sub Sub td7_Onclick() dim imgsrc imgsrc = ucase(sbanner.src) if instr(imgsrc,ucase("Images/ReliefTitle.gif")) <> 0 Then document.all.myframe.src = "c7.htm" document.all.myframe.style.height = 1200 end if End sub