//Settings
var menuwidth='129px' //default menu width
var menubgcolor='#666666'  //menu bgcolor
var imageBase='../images/menu/index.html' // image base directory
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var selected = 'home';

//Contents for Company Menu
var menu1=new Array()
menu1[0]=menustring('Company/leadership.aspx', 'leadership_roll.html', 'leadership_over.html')
menu1[1]=menustring('Company/profile.aspx', 'companyProf_roll.html', 'companyProf_over.html')
menu1[2]=menustring('Company/quality.aspx', 'quality_roll.html', 'quality_over.html')
menu1[3]=menustring('Company/history.aspx', 'history_roll.html', 'history_over.html')
menu1[4]=menustring('Company/vision.aspx', 'vision_roll.html', 'vision_over.html')
menu1[5]=menustring('Company/companyawards.aspx', 'companyawards_roll.html', 'companyawards_over.html')
menu1[6]=menustring('Company/locations.aspx', 'locations_roll.html', 'locations_over.html')
menu1[7]=menustring('Company/contacts.aspx', 'contacts_roll.html', 'contacts_over.html')
menu1[8]=menustring('Company/feedback.aspx', 'feedback_roll.html', 'feedback_over.html')
menu1[9]=menustring('Company/media.aspx', 'mediaCenter_roll.html', 'mediaCenter_over.html')
menu1[10]=menustring('Company/press.aspx', 'pressRelease_roll.html', 'pressRelease_over.html')

//Contents for Operations Menu
var menu2=new Array()
menu2[0]=menustring('Operations/profservgroup.aspx', 'profServicesGroup_roll.html', 'profServicesGroup_over.html')
menu2[1]=menustring('Operations/C4ISRgroup.aspx', 'C4ISRGroup_roll.html', 'C4ISRGroup_over.html')
menu2[2]=menustring('Operations/modSustaingroup.aspx', 'modSustainGroup_roll.html', 'modSustainGroup_over.html')
menu2[3]=menustring('Operations/logisticsOpgroup.aspx', 'logisticsOpGroup_roll.html', 'logisticsOpGroup_over.html')
// menu2[0]=menustring('Operations/airgroup.aspx', 'airForceGroup_roll.gif', 'airForceGroup_over.gif')
// menu2[1]=menustring('Operations/landgroup.aspx', 'landForceGroup_roll.gif', 'landForceGroup_over.gif')
// menu2[2]=menustring('Operations/nsgroup.aspx', 'natSecurityGroup_roll.gif', 'natSecurityGroup_over.gif')
// menu2[3]=menustring('Operations/outgroup.aspx', 'outsourceGroup_roll.gif', 'outsourceGroup_over.gif')

//Contents for Customers Menu
var menu3=new Array()
menu3[0]=menustring('Customers/airforces.aspx', 'airForce_roll.html', 'airForce_over.html')
menu3[1]=menustring('Customers/landforces.aspx', 'landForce_roll.html', 'landForce_over.html')
menu3[2]=menustring('Customers/nationalsecurity.aspx', 'natSecurity_roll.html', 'natSecurity_over.html')
// menu3[3]=menustring('Customers/outsourcing.aspx', 'outsource_roll.gif', 'outsource_over.gif')

//Contents for Careers Menu
var menu4=new Array()
menu4[0]=menustring('Careers/awards.aspx', 'awards_roll.html', 'awards_over.html')
menu4[1]=menustring('Careers/benefits.aspx', 'benefits_roll.html', 'benefits_over.html')
menu4[2]=menustring('Careers/openings.aspx', 'opening_roll.html', 'opening_over.html')
menu4[3]=menustring('Careers/resume.aspx', 'resume_roll.html', 'resume_over.html')
menu4[4]=menustring('Careers/training.aspx', 'training_roll.html', 'training_over.html')

//Contents for Investor Relations Menu
var menu5=new Array()
menu5[0]=menustring('InvestorRelations/briefings.aspx', 'corpBrief_roll.html', 'corpBrief_over.html')
menu5[1]=menustring('Company/press.aspx', 'press_roll.html', 'press_over.html')
menu5[2]=menustring('InvestorRelations/annualreports.aspx', 'anReport_roll.html', 'anReport_over.html')
menu5[3]=menustring('InvestorRelations/analystcoverage.aspx', 'analystCov_roll.html', 'analystCov_over.html')
menu5[4]=menustring('InvestorRelations/calendar.aspx', 'IRCalendar_roll.html', 'IRCalendar_over.html')
menu5[5]=menustring('InvestorRelations/stockchart.aspx', 'stockChart_roll.html', 'stockChart_over.html')
menu5[6]=menustring('InvestorRelations/secfilings.aspx', 'secFile_roll.html', 'secFile_over.html')
menu5[7]=menustring('InvestorRelations/corpgov.aspx', 'corpGov_roll.html', 'corpGov_over.html')
menu5[8]=menustring('InvestorRelations/inforequest.aspx', 'reqInfo_roll.html', 'reqInfo_over.html')
menu5[9]=menustring('InvestorRelations/faq.aspx', 'faq_roll.html', 'faq_over.html')
menu5[10]=menustring('InvestorRelations/Safeharbor.aspx', 'webcast_roll.html', 'webcast_over.html')

//Contents for Investor Relations Menu
//var menu5=new Array()
//menu5[0]=menustring('InvestorRelations/analystcoverage.aspx', 'analystCov_roll.gif', 'analystCov_over.gif')
//menu5[1]=menustring('InvestorRelations/annualreports.aspx', 'anReport_roll.gif', 'anReport_over.gif')
//menu5[2]=menustring('InvestorRelations/briefings.aspx', 'corpBrief_roll.gif', 'corpBrief_over.gif')
//menu5[3]=menustring('InvestorRelations/calendar.aspx', 'IRCalendar_roll.gif', 'IRCalendar_over.gif')
//menu5[4]=menustring('InvestorRelations/corpgov.aspx', 'corpGov_roll.gif', 'corpGov_over.gif')
//menu5[5]=menustring('InvestorRelations/faq.aspx', 'faq_roll.gif', 'faq_over.gif')
//menu5[6]=menustring('InvestorRelations/inforequest.aspx', 'reqInfo_roll.gif', 'reqInfo_over.gif')
//menu5[7]=menustring('Company/press.aspx', 'press_roll.gif', 'press_over.gif')
//menu5[8]=menustring('InvestorRelations/secfilings.aspx', 'secFile_roll.gif', 'secFile_over.gif')
//menu5[9]=menustring('InvestorRelations/stockchart.aspx', 'stockChart_roll.gif', 'stockChart_over.gif')
//menu5[10]=menustring('InvestorRelations/webcast.aspx', 'webcast_roll.gif', 'webcast_over.gif')
//menu5[11]=menustring('Company/profile.aspx?source=corporate', 'compProf_roll.gif', 'compProf_over.gif')
//menu5[12]=menustring('InvestorRelations/corpleadership.aspx', 'corpLead_roll.gif', 'corpLead_over.gif')

//Contents for Contract Vehicles Menu
var menu6=new Array()
menu6[0]=menustring('ContractVehicles/bpa.aspx', 'bpaContracts_roll.html', 'bpaContracts_over.html')
menu6[1]=menustring('ContractVehicles/gsa.aspx', 'gsaSched_roll.html', 'gsaSched_over.html')
menu6[2]=menustring('ContractVehicles/primary.aspx', 'primContract_roll.html', 'primContract_over.html')
menu6[4]=menustring('ContractVehicles/commercialpricelist.aspx', 'commercialPL_roll.html', 'commercialPL_over.html')

/////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 menuSelect()
{
   if(selected != null)
   {
       //var obj = document.getElementById(selected);
       //var src = obj.src;
      // var splitsrc = src.split('.gif');
      // obj.src = splitsrc[0] + '_over.gif';
   }
}

function select(name)
{
    selected = name;
}

function swap(obj, newimage)
{
    obj.src = newimage;
}

function menustring(url, imageDrop, imageOver)
{
    img1 = new Image();
    img1.src = imageBase + imageDrop;
    img2 = new Image();
    img2.src = imageBase + imageOver;
    
    return '<a href="../' + url + '"><img src="' + imageBase + imageDrop + '" onmouseover="swap(this, \'' + imageBase + imageOver + '\')" onmouseout="swap(this, \'' + imageBase + imageDrop + '\')" /></a>'
}

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
