// JavaScript Document


/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for home
var menu1=new Array()

//Contents for About Us
var menu2=new Array()

//Contents for Facilities
var menu3=new Array()
menu3[0]='<a href="../facilities/bukitmerah.htm"><div style="margin-left: 6px; margin-right: 6px;">Technopreneur Centre @ Bukit Merah</div></a>'
menu3[1]='<a href="../facilities/scipark.htm"><div style="margin-left: 6px; margin-right: 6px;">iAxil@Singapore Science Park</div></a>'
menu3[2]='<a href="../facilities/ihub.htm"><div style="margin-left: 6px; margin-right: 6px;">iHUB</div></a>'
menu3[3]='<a href="http://www.nus.edu.sg/enterprise/nec/" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Nanyang Technological University</div></a>'
menu3[4]='<a href="../facilities/nus.htm"><div style="margin-left: 6px; margin-right: 6px;">National University of Singapore</div></a>'
menu3[5]='<a href="../facilities/sunteccity.htm"><div style="margin-left: 6px; margin-right: 6px;">Suntec City</div></a>'
menu3[6]='<a href="../facilities/chaichee.htm"><div style="margin-left: 6px; margin-right: 6px;">Technopark @ Chai Chee</div></a>'
menu3[7]='<a href="../facilities/ayerrajah.htm"><div style="margin-left: 6px; margin-right: 6px;">Technopreneur Centre @ Ayer Rajah</div></a>'
menu3[8]='<a href="../facilities/connection.htm"><div style="margin-left: 6px; margin-right: 6px;">The Connection</div></a>'
menu3[9 ]='<a href="../facilities/smu.htm"><div style="margin-left: 6px; margin-right: 6px;">Singapore Management University</div></a>'

//Contents for HotEvents
var menu4=new Array()
menu4[0]='<a href="../hotevents/funding.htm"><div style="margin-left: 6px; margin-right: 6px;">Access to Funding</div></a>'
menu4[1]='<a href="../hotevents/partners.htm"><div style="margin-left: 6px; margin-right: 6px;">Access to Markets and Partners</div></a>'
menu4[2]='<a href="../hotevents/technologies.htm"><div style="margin-left: 6px; margin-right: 6px;">Access to Technology</div></a>'
menu4[3]='<a href="../hotevents/talent.htm"><div style="margin-left: 6px; margin-right: 6px;">Access to Talent</div></a>'
menu4[4]='<a href="../hotevents/ideas.htm"><div style="margin-left: 6px; margin-right: 6px;">Access to Ideas</div></a>'

//Contents for Assistence
var menu5=new Array()
menu5[1]='<a href="../assistance/eii.htm"><div style="margin-left: 6px; margin-right: 6px;">Enterprise Investment Incentive (Technopreneur) Scheme</div></a>'
menu5[2]='<a href="http://www.spring.gov.sg/Content/WebPage.aspx?id=ed914074-3e47-4113-9b9a-e61093e99a30"><div style="margin-left: 6px; margin-right: 6px;">Startup EnterprisE Development Scheme (SEEDS)</div></a>'
menu5[3]='<a href="http://www.spring.gov.sg/Content/WebPage.aspx?id=e467dd22-abdd-42e1-9a5e-163eb43bf525"  target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Growth Financing Programme</div></a>'
menu5[4]='<a href="http://www.edb.gov.sg/edb/sg/en_uk/index/our_services/for_individuals/patent_application.html"  target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Patent Application Fund</div></a>'
menu5[5]='<a href="http://www.spring.gov.sg/Content/WebPage.aspx?id=807a2e1c-963f-4ac6-8b87-31106fe0dd36"  target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Entrepass</div></a>'
menu5[6]='<a href="../assistance/svp.htm"><div style="margin-left: 6px; margin-right: 6px;">Social Visit Pass for Entrepreneurs </div></a>'
menu5[7]='<a href="../assistance/mjv.htm"><div style="margin-left: 6px; margin-right: 6px;">Multiple Journey Visa  </div></a>'



//Contents for Links
var menu6=new Array()
menu6[0]='<a href="http://www.business.gov.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Doing Business in Singapore</div></a>'
menu6[1]='<a href="http://www.spring.gov.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Spring Singapore</div></a>'
menu6[2]='<a href="http://www.svca.org.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Singapore Venture Capital Association</div></a>'
menu6[3]='<a href="http://www.bansea.org" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Business Angel Network South East Asia</div></a>'
menu6[4]='<a href="http://www.idea.org.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Innovators and Entrepreneurs Association</div></a>'
menu6[5]='<a href="http://www.yeo.org.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Young Entrepreneurs’ Organisation</div></a>'
menu6[6]='<a href="http://www.ace.org.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Action Community for Entrepreneurship</div></a>'
menu6[7]='<a href="http://www.sbf.org.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Singapore Business Federation</div></a>'
menu6[8]='<a href="http://www.phoenixaward.com" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Phoenix Award</div></a>'
menu6[9]='<a href="http://www.tec.gov.sg" target="_blank""><div style="margin-left: 6px; margin-right: 6px;">The Enterprise Challenge</div></a>'
menu6[10]='<a href="http://www.globalentrepolis.com" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Global Entrepolis @ Singapore</div></a>'
menu6[11]='<a href="http://www.iesingapore.com" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">International Enterprise Singapore</div></a>'
menu6[12]='<a href="http://www.asme.org.sg/subpage.aspx?pageName=REC" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Regional Enterprise Centre @ ASME</div></a>'
menu6[13]='<a href="http://www.ipos.gov.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Intellectual Property Office of Singapore</div></a>'
menu6[14]='<a href="http://www.edb.gov.sg" target="_blank"><div style="margin-left: 6px; margin-right: 6px;">Economic Development Board (EDB)</div></a>'


//Contents for Contact Us
var menu7=new Array()

//Contents for Photo Gallery
var menu8=new Array()

// News Room
var menu9=new Array()
menu9[1]='<a href="../newsroom/pressreleases.htm"><div style="margin-left: 6px; margin-right: 6px;">Press Releases	</div></a>'
menu9[2]='<a href="../photogallery/index.aspx"><div style="margin-left: 6px; margin-right: 6px;">Past Events</div></a>'


var menuwidth='250px' //default menu width
var menubgcolor='#F8FAFF'  //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=-500
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
}
}
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")-2+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+3+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