﻿//Content for "About GridAsia" menu
var menu1=new Array()
menu1[0]='<a href="about_history.php" title="History">History</a>'
//menu1[1]='<a href="about_steering.php" title="Steering Committee">Steering Committee</a>'
menu1[1]='<a href="about_organizing.php" title="Organizing Committee">Organizing Committee</a>'
//menu1[3]='<a href="about_research.php" title="Research Program Committee">Research Program Committee</a>'
menu1[2]='<a href="about_sponsors.php" title="Sponsoring Organizations">Sponsoring Organizations</a>'
menu1[3]='<a href="about_contact.php" title="Contact Information">Contact Information</a>'

//Content for "Conference" menu
var menu2=new Array()
//menu2[0]='<a href="conference_keynote.php" title="Keynote Speakers">Keynote Speakers</a>'
//menu2[1]='<a href="conference_pcgrid.php" title="PC-Grid Install Fest">PC-Grid Install Fest</a>'
menu2[2]='<a href="conference_schedule.php" title="Schedule">Schedule</a>'

//Content for "Programs" menu
var menu3=new Array()
//menu3[0]='<a href="programs_invited.php" title="Invited Speakers">Invited Speakers</a>'
menu3[0]='<a href="programs_keynote.php" title="Keynote Speakers">Keynote & Plenary Speakers</a>'
//menu3[1]='<a href="programs_tutorials.php" title="Tutorials">Tutorials</a>'
menu3[1]='<a href="programs_cloudsg.php" title="Cloud@SG Summit">Cloud@SG Summit</a>'
//menu3[3]='<a href="programs_researchtrack.php" title="Research Track">Research Track</a>'
menu3[2]='<a href="programs_cloudcamp.php" title="CloudCamp">CloudCamp</a>'
//menu3[3]='<a href="programs_tutorials_2008.php" title="Tutorials">Tutorials</a>'
//menu3[6]='<a href="programs_pcgrid.php" title="PC-Grid Install Fest">PC-Grid Install Fest</a>'
//menu3[4]='<a href="programs_social.php" title="Social Program">Social Program</a>'
menu3[3]='<a href="programs_apectel.php" title="APEC TEL 39">APECTEL 39 Grid Workshops</a>'
menu3[4]='<a href="programs_gaa.php" title="Grids Around Asia">Grids Around Asia</a>'
menu3[5]='<a href="programs_gsp.php" title="Commercial Grid Services">Commercial Grid Services</a>'
menu3[6]='<a href="programs_social.php" title="Social Program">Social Program</a>'

//Content for "Exhibits" menu
var menu4=new Array()
//menu4[0]='<a href="exhibits_signature.php" title="Signature Booths">Signature Booths</a>'
menu4[1]='<a href="exhibits.php" title="Grid Showcase at APECTEL 39">Grid Showcase at APECTEL 39</a>'
menu4[2]='<a href="exhibits_facilities.php" title="Facilities &amp; Floorplan">Facilities &amp; Floorplan</a>'
menu4[3]='<a href="exhibitors_info.php" title="Info for Exhibitors">Info for Exhibitors</a>'
menu4[4]='<a href="exhibits_info.php" title="Info on Exhibits">Info on Exhibits</a>'

//Content for "News & Press" menu
var menu5=new Array()
menu5[0]='<a href="news.php" title="Press Releases">Press Releases</a>'

//Content for "Accommodation & Travel" menu
var menu6=new Array()
menu6[0]='<a href="travel_hotels.php" title="Conference Hotels">Conference Hotels</a>'
menu6[1]='<a href="travel_venue.php" title="Conference Venue">Conference Venue</a>'
menu6[2]='<a href="travel_maps.php" title="Maps &amp; Directions">Maps &amp; Directions</a>'
menu6[3]='<a href="travel_about.php" title="About Singapore">About Singapore</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='#b3cde4'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu