/******** mouseOvers for primary nav ********/

if(document.images) {
  img1on = new Image(); img1on.src="/images/template/company_on.gif";
  img1off = new Image(); img1off.src="/images/template/company_off.gif";
  img2on = new Image(); img2on.src="/images/template/government_on.gif";
  img2off = new Image(); img2off.src="/images/template/government_off.gif";
  img3on = new Image(); img3on.src="/images/template/commercial_on.gif";
  img3off = new Image(); img3off.src="/images/template/commercial_off.gif";
  img4on = new Image(); img4on.src="/images/template/news_on.gif";
  img4off = new Image(); img4off.src="/images/template/news_off.gif";
  img5on = new Image(); img5on.src="/images/template/support_on.gif";
  img5off = new Image(); img5off.src="/images/template/support_off.gif";
}

/************* MENUS ************/
// Company
var menu1=new Array();
  menu1[0]='<a href="/management.html">Management</a>';
  menu1[1]='<a href="/board_of_directors.html">Board of Directors</a>';
  menu1[2]='<a href="/board_of_advisors.html">Board of Advisors</a>';
  menu1[3]='<a href="/investors.html">Investors</a>';
  menu1[4]='<a href="/careers.html">Careers</a>';
  menu1[5]='<a href="/contact.html">Contact</a>';
  
// Government
var menu2=new Array();
  menu2[0]='<a href="/starfighter.html">StarFighter<sup style="font-size:9px;">&reg;</sup></a>'
  menu2[1]='<a href="/military.html">Military</a>';
  menu2[2]='<a href="/emergency_response.html">Emergency Response</a>';
  menu2[3]='<a href="/border_control.html">Border Control</a>';
  menu2[4]='<a href="/forestry.html">Forestry</a>';
  menu2[5]='<a href="/emergency_services.html">Public Safety &amp; Emergency Services</a>';
  
// Commercial
var menu3=new Array();
  menu3[0]='<a href="/skysite.html">SkySite<sup style="font-size:9px;">&reg;</sup></a>'; 
  menu3[1]='<a href="/oil_gas.html">Oil &amp; Gas</a>';
  menu3[2]='<a href="/transportation.html">Transportation</a>';
  menu3[3]='<a href="/utilities.html">Utilities</a>';
  menu3[4]='<a href="/field_communications.html">Field Communications</a>';
  menu3[5]='<a href="/location_services.html">Location Services</a>';
  menu3[6]='<a href="/iden.html">iDEN Campus Solution</a>';
  menu3[7]='<a href="/commercial_coverage.html">Coverage</a>';
  
// News
var menu4=new Array();
  menu4[0]='<a href="/press_releases.html">Press Releases</a>';
  menu4[1]='<a href="/in_the_news.html">In the News</a>';
  menu4[2]='<a href="/events.html">Events</a>';
  menu4[3]='<a href="/contact_public_releations.html">Contact Public Relations</a>';
  
// Support
var menu5=new Array();
  menu5[0]='<a href="/faqs.html">FAQs</a>';
  menu5[1]='<a href="/partners.html">Partners</a>';
  menu5[2]='<a href="/how_to_purchase.html">How to Purchase</a>';


/************* FUNCTIONS ***********************/

function flash_write(file, width, height, version) {
  if(!version) version = "6,0,0,0";
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+'" width="'+width+'" height="'+height+'" id="movie" ><param name="movie" value="'+file+'" /><param name="wrmode" value="transparent" /><param name="menu" value="false" /><!--[if !IE]> <--> <object type="application/x-shockwave-flash" data="'+file+'" width="'+width+'" height="'+height+'"></object><!--> <![endif]--></object>');
}

function imgOn(imgName) {
	if (document.images) document[imgName].src = eval(imgName + "on.src");
}

function imgOff(imgName) {
	if (document.images) document[imgName].src = eval(imgName + "off.src");
}

/***********************************************
* 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
***********************************************/

// Some config options
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;" 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;
}
if(ie4) totaloffset=totaloffset+0 // adjust offset in IE6, if needed, here
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-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

