// CEA.com.au 'Acadia' / 2008 - All Rights Reserved - CEA Technologies Pty Limited
// Website Developed By Creeight (services@creeight.com.au)

// Script: http://www.creeight.com.au/
// Command Line: '<a href="#" onclick="NavigationMenuInactive()" onmouseover="NavigationMenuActive(this,event,Link,'100px')">Link</a>'

// Modified by RussB

var ProductsServices=new Array()

ProductsServices[0]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=ProductsServices:PhasedArrayTechnologies" style="width:220px;">Phased Array Technologies</a></div>'

ProductsServices[1]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=ProductsServices:ContinuousWaveIlluminators" style="width:220px;">Continuous Wave Illuminators</a></div>'

ProductsServices[2]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=ProductsServices:Communications" style="width:220px;">Communications</a></div>'

ProductsServices[3]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=ProductsServices:Surveillance" style="width:220px;">Surveillance</a></div>'

ProductsServices[4]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=ProductsServices:Antennas" style="width:220px;">Antennas</a></div>'

ProductsServices[5]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=ProductsServices:Software" style="width:220px;">Software</a></div>'

ProductsServices[6]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=ProductsServices:Support" style="width:220px;">Support</a></div>'

var NewsMedia=new Array()

NewsMedia[0]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=NewsMedia:LatestNews" style="width:120px;">Latest News</a></div>'

NewsMedia[1]='<div><a class="NavigationMenu" href="../!Global/Directory.php?Location=NewsMedia:NewsArchive" style="width:120px;">News Archive</a></div>'

var menuwidth='120px'

var menubgcolor='00254a'

var disappeardelay=0

var hidemenu_onclick="yes"

var ie4=document.all

var ns6=document.getElementById&&!document.all

if (ie4||ns6)

document.write('<!--[if IE]>')

document.write('<style type="text/css">')

document.write('#NavigationMenu {margin-left:1px;margin-top:0px;}')

document.write('</style>')

document.write('<![EndIf]-->')

document.write('<div id="NavigationMenu" style="filter:alpha(opacity=90);opacity:.9;position:absolute;text-align:left;visibility:hidden;width:120px;z-index:5;" 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 windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18

dropmenuobj.contentmeasure=dropmenuobj.offsetHeight

if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)

edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight

}

return edgeoffset

}

function populatemenu(what)

{

if (ie4||ns6)

dropmenuobj.innerHTML=what.join("")

}

function NavigationMenuActive(obj, e, menucontents, menuwidth)

{

if (window.event) event.cancelBubble=true

else if (e.stopPropagation) e.stopPropagation()

clearhidemenu()

dropmenuobj=document.getElementById? document.getElementById("NavigationMenu") : NavigationMenu

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 NavigationSystem()

}

function NavigationSystem()

{

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))

NavigationMenuInactive()

else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))

NavigationMenuInactive()

}

function hidemenu(e)

{

if (typeof dropmenuobj!="undefined")

{

if (ie4||ns6)

dropmenuobj.style.visibility="hidden"

}

}

function NavigationMenuInactive()

{

if (ie4||ns6)

delayhide=setTimeout("hidemenu()",disappeardelay)

}

function clearhidemenu()

{

if (typeof delayhide!="undefined")

clearTimeout(delayhide)

}

if (hidemenu_onclick=="yes")

document.onclick=hidemenu
