// JavaScript Document

//-----------------------------------------------------------------------------
	var DomainnName = "www.geodecisions.com"
	
	var MyRecurrenceLeft = 0
	var MyRecurrenceTop = 0
	var MyLeftOffset = 0
	var MyMenuWidth = 0
	
	var MyLinkOffset = 21
	
	if (navigator.appName == "Netscape"){
		MyLinkOffset = 22
	}
	
	var CurrentMenu
	var CurrentSubMenu
	var CurrentSubSubMenu
	
	var IsRowHighlighted = 0
	var MyTimerID = 0
	
	var GetIndustriesMenu
	var GetServicesMenu
	var GetSolutionsMenu
	var GetCareersMenu
	var GetNewsroomMenu
	var GetAboutusMenu
	var GetContactusMenu
	
	var MenuID
	var CurrentContainer
	var CurrentSubContainer
	
	function GetMenuElement(theMenuRequest){
		var MenuRequest = String(theMenuRequest)
	
		var PrimaryMenu = new Array()
		var SubMenu0 = new Array()
		var SubMenu1 = new Array()
		var SubMenu2 = new Array()
		var SubMenu3 = new Array()
		var SubMenu4 = new Array()
		var SubMenu5 = new Array()
		var SubMenu6 = new Array()
		var SubMenu7 = new Array()
		var SubMenu8 = new Array()
		var SubMenu9 = new Array()
		var SubMenu10 = new Array()
		var SubMenu11 = new Array()
		var SubMenu12 = new Array()
		var SubMenu13 = new Array()
		var SubMenu14 = new Array()
		var SubMenu15 = new Array()
			
		if (MenuRequest == "GetIndustriesMenu"){
			MenuID = "1"
			PrimaryMenu[0] = "Commercial--/commercial.aspx"
				
			PrimaryMenu[1] = "Environmental--/environmental.aspx"
				
			PrimaryMenu[2] = "Government--/government.aspx"
				
			PrimaryMenu[3] = "Homeland Security--/homeland.aspx"
				
			PrimaryMenu[4] = "Law Enforcement--/law.aspx"
				
			PrimaryMenu[5] = "Military--/military.aspx"
			
			PrimaryMenu[6] = "Transportation--/transportation.aspx"
	
			PrimaryMenu[7] = "Utilities--/utility.aspx"
		}
		
		if (MenuRequest == "GetServicesMenu"){
			MenuID = "2"
			PrimaryMenu[0] = "Strategic Planning--/strategicplanning.aspx"
			
			PrimaryMenu[1] = "Needs Analysis and Requirements--/needsanalysis.aspx"
				
			PrimaryMenu[2] = "Database Design and Development--/databasedesign.aspx"
			    
			PrimaryMenu[3] = "Systems Design and Integration--/systemsdesign.aspx"

			PrimaryMenu[4] = "Application Design and Developement--/appdesign.aspx"
	
			PrimaryMenu[5] = "Wireless Technology Integration--/wireless.aspx"
			
			PrimaryMenu[6] = "Transportation Logistics--/translogistics.aspx"
			
			PrimaryMenu[7] = "Intelligent Transportation Systems--/its.aspx"
			
			PrimaryMenu[8] = "Linear Referencing System (LRS) Design and Implementation--/lrs-design.aspx"
			
			PrimaryMenu[9] = "Image Processing/Remote Sensing--/imageprocessing.aspx"
			
			PrimaryMenu[10] = "Web Design and Hosting--/webdesign.aspx"
			
			PrimaryMenu[11] = "Certified Training--/training.aspx"
		}
		
		if (MenuRequest == "GetSolutionsMenu"){
			MenuID = "3"
			
			PrimaryMenu[0] = "Software--/software.htm"
			
			PrimaryMenu[1] = "Applications--/applications.htm"
		}
		
		if (MenuRequest == "GetCareersMenu"){
		    MenuID = "4"
		    
			PrimaryMenu[0] = "View All Available Positions--/careers-joblist.aspx"
			
			PrimaryMenu[1] = "Work Environment--/careers-workenv.aspx"
		    
		    PrimaryMenu[2] = "Locations--/careers-locations.aspx"
		    
		    PrimaryMenu[3] = "Benefits--/careers-benefits.aspx"
		    
		    PrimaryMenu[4] = "Growth Structure--/careers-growth.aspx"
		}
		
		if (MenuRequest == "GetNewsroomMenu"){
			MenuID = "5"
			PrimaryMenu[0] = "Press Releases--/newsroom/newsroom.htm"
				
			PrimaryMenu[1] = "Articles--/newsroom/mediacoverage.htm"
	
			PrimaryMenu[2] = "Newsletter--/newsroom/newsletters.htm"
			
			PrimaryMenu[3] = "Awards--/newsroom/awards.htm"
		}
		
		if (MenuRequest == "GetAboutusMenu"){
			MenuID = "6"
			PrimaryMenu[0] = "History--/history.htm"
			
			PrimaryMenu[1] = "Sustainability--/sustainability.htm"
				
			PrimaryMenu[2] = "GSA Contract Holder--/GSA/gsaschedule.htm"
			
			PrimaryMenu[3] = "Texas DIR Contract--/TX-DIR/txdir.htm"
			
			PrimaryMenu[4] = "Business Partners--/partners.htm"
		}
		
		if (MenuRequest == "GetContactusMenu"){
			MenuID = "7"
						
			PrimaryMenu[0] = "Home--/index.aspx"
		}

		
		var MyOutput = ""
		var MySubOutput = ""
			
		var i = 0
		var x = 0
		var y = 0
	
		var eDIV = document.createElement("div")
		eDIV.setAttribute("id","MenuContainer" + MenuID)
		
		var MyDIV
		var MyTABLE
		var MyTBODY
		var MyTR
		var MyTD
		var MyFONT
		
		var MySubDIV
		var MySubTABLE
		
		var MyAnchor = document.createElement("a")
		MyAnchor.setAttribute("id","mytest" + MenuID + "")
	
		MyDIV = document.createElement("div")
		MyDIV.setAttribute("id","PrimaryMenu" + MenuID + "")
		
		MyTABLE = document.createElement("table")
		MyTABLE.setAttribute("id","PrimaryTable" + MenuID + "")
		MyTABLE.setAttribute("class","ddmMainMenu")
		MyTABLE.setAttribute("className","ddmMainMenu")
		
/*		MyTABLE.setAttribute("border","0") //Linda changed this border from 1 to 0
		MyTABLE.setAttribute("cellSpacing","0px")//Linda changed cellSpacing from 0 to 1 - cellSpacing must be 0, set it to the same color as background
		MyTABLE.setAttribute("cellPadding","3px")//Linda changed cellPadding from 1 to 2
		MyTABLE.setAttribute("borderColor","#FFFFFF")
		MyTABLE.setAttribute("bgColor","#396E99")//Linda changed the color from #00447C
		MyTABLE.setAttribute("width","100%")
*/		
		MyTBODY = document.createElement("tbody")
	
		for (i=0; i < PrimaryMenu.length; i++){
			MyTR = document.createElement("tr")
			
			MyTD = document.createElement("td")
			MyTD.setAttribute("id","PrimaryRow" + MenuID + "" + i + "")
			
			if (PrimaryMenu[i].split('--')[1] == "Header"){
				MyTD.setAttribute("class","ddmHeaderCell")
				MyTD.setAttribute("className","ddmHeaderCell")
			}else{
				MyTD.setAttribute("class","ddmLinkCell")
				MyTD.setAttribute("className","ddmLinkCell")
			}
			
			MyTD.setAttribute("onMouseOver","HighlightRow(document.getElementById('PrimaryRow" + MenuID + "" + i + "'), true)")
			MyTD.onmouseover = Function("HighlightRow(document.getElementById('PrimaryRow" + MenuID + "" + i + "'), true);");
			
			MyTD.setAttribute("onMouseOut","HighlightRow(document.getElementById('PrimaryRow" + MenuID + "" + i + "'), false)")
			MyTD.onmouseout = Function("HighlightRow(document.getElementById('PrimaryRow" + MenuID + "" + i + "'), false);");
			
			if (PrimaryMenu[i].split('--')[1] != "#"){
				if (PrimaryMenu[i].split('--')[1] != "Header"){
					if (parseInt(PrimaryMenu[i].split('--')[1].toLowerCase().indexOf("http://")) == 0){
						MyTD.setAttribute("onClick","FrameIt('" + PrimaryMenu[i].split('--')[1] + "')")
						MyTD.onclick = Function("FrameIt('" + PrimaryMenu[i].split('--')[1] + "');");
					}else{
						MyTD.setAttribute("onClick","FrameIt('" + "http://" + DomainnName + PrimaryMenu[i].split('--')[1] + "')")
						MyTD.onclick = Function("FrameIt('" + "http://" + DomainnName + PrimaryMenu[i].split('--')[1] + "');");
					}
				}
			}else{
				MyTD.setAttribute("onClick","window.location='#'")
				MyTD.onclick = Function("window.location='#';");
			}
			
			MyFONT = document.createElement("font")
			MyFONT.appendChild(document.createTextNode(PrimaryMenu[i].split('--')[0]))
			
			MyTD.appendChild(MyFONT)
			
			MyTR.appendChild(MyTD)
			MyTBODY.appendChild(MyTR)
		}
		
		MyTABLE.appendChild(MyTBODY)
		MyDIV.appendChild(MyTABLE)
		eDIV.appendChild(MyDIV)
			
		for (x=0; x < 100; x++){
			try{
				MySubDIV = document.createElement("div")
				MySubDIV.setAttribute("id","SubMenu" + MenuID + "" + x + "")
				MySubDIV.setAttribute("style","z-index:99; visibility:hidden; position:absolute;")
	
				MySubTABLE = document.createElement("table")
				MySubTABLE.setAttribute("id","SubTable" + MenuID + "")
				MySubTABLE.setAttribute("class","ddmSubMenu")
				MySubTABLE.setAttribute("className","ddmSubMenu")

				MyTBODY = document.createElement("tbody")
			
				for(i=0; i < eval('SubMenu' + x).length; i++){
					MyTR = document.createElement("tr")
					
					MyTD = document.createElement("td")
					MyTD.setAttribute("id","SubRow" + MenuID + "" + x + "" + i + "")
					
					if (eval('SubMenu' + x)[i].split('--')[1] == "Header"){
						MyTD.setAttribute("class","ddmHeaderCell")
						MyTD.setAttribute("className","ddmHeaderCell")
					}else{
						if (eval('SubMenu' + x)[i].split('--')[0] == "All Representative Projects"){
							MyTD.setAttribute("class","ddmRepProjects")
							MyTD.setAttribute("className","ddmRepProjects")
						}else{
							MyTD.setAttribute("class","ddmLinkCell")
							MyTD.setAttribute("className","ddmLinkCell")
						}
					}

					MyTD.setAttribute("onMouseOver","HighlightSubRow(document.getElementById('SubRow" + MenuID + "" + x + "" + i + "'), true);")
					MyTD.onmouseover = Function("HighlightSubRow(document.getElementById('SubRow" + MenuID + "" + x + "" + i + "'), true);");
					
					MyTD.setAttribute("onMouseOut","HighlightSubRow(document.getElementById('SubRow" + MenuID + "" + x + "" + i + "'), false);")
					MyTD.onmouseout = Function("HighlightSubRow(document.getElementById('SubRow" + MenuID + "" + x + "" + i + "'), false);");
	
					if (eval('SubMenu' + x)[i].split('--')[1] != "#"){
						if (eval('SubMenu' + x)[i].split('--')[1] != "Header"){
							if (parseInt(eval('SubMenu' + x)[i].split('--')[1].toLowerCase().indexOf("http://")) == 0){
								MyTD.setAttribute("onClick","FrameIt('" + eval('SubMenu' + x)[i].split('--')[1] + "')")
								MyTD.onclick = Function("FrameIt('" + eval('SubMenu' + x)[i].split('--')[1] + "');");
							}else{
								MyTD.setAttribute("onClick","FrameIt('" + "http://" + DomainnName + eval('SubMenu' + x)[i].split('--')[1] + "')")
								MyTD.onclick = Function("FrameIt('" + "http://" + DomainnName + eval('SubMenu' + x)[i].split('--')[1] + "');");
							}
						}
					}else{
						MyTD.setAttribute("onClick","window.location='#'")
						MyTD.onclick = Function("window.location='#';");
					}
					
					MyFONT = document.createElement("font")
					//MyFONT.setAttribute("face","Trebuchet MS")
					//MyFONT.setAttribute("color","#FFFFFF")
					MyFONT.appendChild(document.createTextNode(eval('SubMenu' + x)[i].split('--')[0]))
					
					MyTD.appendChild(MyFONT)
					//MyTD.appendChild(document.createTextNode(PrimaryMenu[i].split('--')[0]))
					
					//MyTD.appendChild(document.createTextNode(eval('SubMenu' + x)[i].split('--')[0]))
					
					MyTR.appendChild(MyTD)
					MyTBODY.appendChild(MyTR)
	
				}
	
				MySubTABLE.appendChild(MyTBODY)
				MySubDIV.appendChild(MySubTABLE)
				
				MySubDIV.style.zIndex = "99"
				MySubDIV.style.visibility = "hidden"
				MySubDIV.style.position = "absolute"
				
				eDIV.appendChild(MySubDIV)
				
			}
			catch(err){
				//x = 100
			}
		}
			
		eDIV.appendChild(MyAnchor)
		eDIV.style.zIndex = "99"
		eDIV.style.visibility = "hidden"
		eDIV.style.position = "absolute"
		eDIV.style.left = 0 + "px"
		eDIV.style.top = 0 + "px"
		
		document.body.appendChild(eDIV)
	}
	
	function MenuInitialize(){
		
		var CreateMenuBackground = document.createElement("div")
		CreateMenuBackground.setAttribute("id","MenuBackground")
		CreateMenuBackground.style.zIndex = "98"
		CreateMenuBackground.style.visibility = "hidden"
		CreateMenuBackground.style.position = "absolute"
		
		var CreateMenuFrame = document.createElement("iframe")
		CreateMenuFrame.setAttribute("id","MenuFrame")
		CreateMenuFrame.setAttribute("height","0px")
		CreateMenuFrame.setAttribute("width","0px")
		
		CreateMenuBackground.appendChild(CreateMenuFrame)
		
		document.body.appendChild(CreateMenuBackground)
		
		GetIndustriesMenu = GetMenuElement("GetIndustriesMenu")
		
		GetServicesMenu = GetMenuElement("GetServicesMenu")
		
		GetSolutionsMenu = GetMenuElement("GetSolutionsMenu")
	
		GetCareersMenu = GetMenuElement("GetCareersMenu")
	
		GetNewsroomMenu = GetMenuElement("GetNewsroomMenu")
	
		GetAboutusMenu = GetMenuElement("GetAboutusMenu")
		
		GetContactusMenu = GetMenuElement("GetContactusMenu")
		
	}
		
	function PosMenu(MyObject, MyContainer, MyLeftOffset, MyTopOffset){
		var MyRecurrenceParent //Parent Object

		MyRecurrenceLeft = MyObject.offsetLeft
		MyRecurrenceTop = MyObject.offsetTop
		
		MyRecurrenceParent = MyObject.offsetParent
		while (MyRecurrenceParent != null){
			MyRecurrenceLeft = MyRecurrenceLeft + MyRecurrenceParent.offsetLeft
			MyRecurrenceTop = MyRecurrenceTop + MyRecurrenceParent.offsetTop
			MyRecurrenceParent = MyRecurrenceParent.offsetParent
		}

		MyContainer.style.left = MyRecurrenceLeft + MyLeftOffset + "px"
		MyContainer.style.top = MyRecurrenceTop + MyTopOffset + "px"
		
		return MyContainer
	}
	
	function GetSubMenu(theObjectID){
		var TheObjectStr = String(theObjectID)
		var MyMenuID
		var MyMultiplier
		
		for (var i=TheObjectStr.length; i > 0; i--){
			if(String(parseInt(TheObjectStr.substring(i - 1, TheObjectStr.length))) != "NaN"){
				MyMenuID = String(TheObjectStr.substring(i - 1, TheObjectStr.length))
			}else{
				i = 0
			}
		}
		
		MyMultiplier = parseInt(MyMenuID.substring(0,1)) - 1
	
		try{
			var MyObject = PosMenu(document.getElementById(theObjectID), document.getElementById("SubMenu" +  MyMenuID),150 - (100 * MyMultiplier) + ((19 - MyMultiplier) * MyMultiplier),-100)
	
			MyObject.style.width = MyMenuWidth
			MyObject.style.visibility = "visible"
	
			CurrentSubContainer = MyObject
		}
		catch(err){
		
		}
		return MyObject
	}
	
	function HighlightSubRow(theObject, TrueOrFalse){
		if (TrueOrFalse == true){
			if (theObject.className == "ddmRepProjects"){
				theObject.className = "ddmRepProjectsOver"
			}else{
				if (theObject.className != "ddmHeaderCell"){
					theObject.className = "ddmLinkCellOver"
				}
			}
			
			IsRowHighlighted = 1
		}else{
			if (theObject.className == "ddmRepProjectsOver"){
				theObject.className = "ddmRepProjects"
			}else{
				if (theObject.className != "ddmHeaderCell"){
					theObject.className = "ddmLinkCell"
				}
			}

			if(String(CurrentSubMenu) == "[object]"){
				//CurrentSubSubMenu.style.visibility = "hidden"
			}
			
			IsRowHighlighted = 2
		}
	
	}
	
	function HighlightRow(theObject, TrueOrFalse){
		var TempSubMenu
	
		if (TrueOrFalse == true){
			if (theObject.className == "ddmWebSiteExtension"){
				theObject.className = "ddmWebSiteExtensionOver"
			}else{
				if (theObject.className != "ddmHeaderCell"){
					theObject.className = "ddmLinkCellOver"
				}
			}
			
			TempSubMenu = GetSubMenu(theObject.id)
	
			if(String(TempSubMenu).indexOf("object") > -1){
				if(String(CurrentSubMenu).indexOf("object") > -1){
					if(String(CurrentSubMenu.id) != String(TempSubMenu.id)){
						CurrentSubMenu.style.visibility = "hidden"
					}
				}
			}else{
				if(String(CurrentSubMenu).indexOf("object") > -1){
					CurrentSubMenu.style.visibility = "hidden"
				}
			}
			CurrentSubMenu = TempSubMenu
			IsRowHighlighted = 1
		}else{
			if (theObject.className == "ddmWebSiteExtensionOver"){
				theObject.className = "ddmWebSiteExtension"
			}else{
				if (theObject.className != "ddmHeaderCell"){
					theObject.className = "ddmLinkCell"
				}
			}
			
			IsRowHighlighted = 2
		}
	
	}
	
	function ShowMenu(TheObject, TheMenu, TheMenuWidth, TheMenuContainer){	
		IsRowHighlighted = 0
		MenuID = String(TheMenuContainer).substring(13)
		var FireFoxHack = 0

		if (TheMenu == "GetGFWebSitesMenu"){
			if (navigator.appName == "Netscape"){
				FireFoxHack = 8
			}else{
				FireFoxHack = -2
			}
		}
		
		if (MenuID == 1){MyLeftOffset = -19}
		if (MenuID == 2){MyLeftOffset = -23}
		if (MenuID == 3){MyLeftOffset = -20}
		if (MenuID == 4){MyLeftOffset = -25}
		if (MenuID == 5){MyLeftOffset = -17}
		if (MenuID == 6){MyLeftOffset = -21}

		var MyObject = document.getElementById(TheObject)
		var MyContainer = document.getElementById(TheMenuContainer)
			
		CurrentContainer = MyContainer
	
		var i = 0
		
		MyTimerID = window.setInterval("CheckRowState()", 1000)
			
		var MyContainerWidth = TheMenuWidth
		
		var MyContainerBackground = document.getElementById("MenuBackground")
		var MyContainerFrame = document.getElementById("MenuFrame")

		
		MyMenuWidth = TheMenuWidth
			
		MyContainer = PosMenu(MyObject, MyContainer, 0, MyLinkOffset)
		MyContainer.style.left = MyRecurrenceLeft + MyLeftOffset + "px"
		MyContainer.style.top = MyRecurrenceTop + MyLinkOffset + FireFoxHack + "px"
		MyContainer.style.width = TheMenuWidth
        
		HideAllMenus()
	
		if (document.all) {//IE Hack
			MyContainerBackground.style.left = MyRecurrenceLeft + MyLeftOffset + "px"
			MyContainerBackground.style.top = MyRecurrenceTop + MyLinkOffset + "px"
			MyContainerFrame.style.width = TheMenuWidth
			MyContainerFrame.style.height = document.getElementById("mytest" + MenuID).offsetTop + 1 + "px"
			MyContainerBackground.style.visibility = "visible"
		}
		MyContainer.style.visibility = "visible"
	}
	
	function HideAllMenus(){
		for (var i=1; i<7; i++){
			HideMe(document.getElementById("MenuContainer" + i), CurrentSubContainer)
		}
		return
	}
	
	function HideMe(TheContainer, TheSubContainer){
		var MyContainer = TheContainer
		var MySubContainer = TheSubContainer
		var MyContainerBackground = document.getElementById("MenuBackground")
	
		if (String(MyContainer).indexOf("object") > -1){
			MyContainer.style.visibility = "hidden"
		}
		if (String(MySubContainer).indexOf("object") > -1){
			MySubContainer.style.visibility = "hidden"
		}
		MyContainerBackground.style.visibility = "hidden"
	
		return
	}
	
	function CheckRowState(){
		//alert(IsRowHighlighted)
		if (IsRowHighlighted == 0 || IsRowHighlighted == 1){
			return false
		}
		
		if (IsRowHighlighted == 2){
			HideMe(CurrentContainer, CurrentSubContainer)
			window.clearInterval(MyTimerID)
			return true
		}
		
	}
	
	function CloseOut(){
		IsRowHighlighted = 2	
	}
	
//-----------------------------------------------------------


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
	

	<!--Function that puts links in frame. -->
	function loadPage(theURL) {
	 var thePage = theURL
	 //alert(theURL);
	 var win = window.self;
	 win.location = "/defaultsearch.asp?pContent=" + theURL;
	}

	//This code is owned and copyrighted by Gannett Fleming Inc. You CANNOT use this code without the express permission of Gannett Fleming.
	function Decrypt(theText) {
	var output = new String;
	var Temp = new Array();
	var TextSize = theText.length;
	for (i = 0; i < TextSize; i++) {
	Temp[i] = theText.charCodeAt(i);
	}
	for (i = 0; i < TextSize; i++) {
	output += String.fromCharCode(Temp[i] - 4);
	}
	output = "mailto:" + output
	window.location = output
	}