//Updated 032405 12:18AM CST - MIKEG
//var strBaseUrl = "http://www.sterlingcommerce.com";
//var strAppsUrl = "http://www.sterlingcommerce.com";

///////////////////////////////////////
//THIS IS THE BEGINNING OF THE NAVIGATION CODE.
///////////////////////////////////////
//
//Declare Array Variables
//Primary - Main nav channel - Display only Secondary Menu, No highlight
//Secondary - Display Secondary Menu & Tertiary Menu, Highlight Secondary Menu Item
//Tertiary - Display Secondary Menu & Tertiary Menu, Highlight Tertiary menu item
//Syntax: Array name = ( ID, Menu Title, URL, Menu Level)
//
 
//Begin Sub Areas for Industries 
var Industries						= new Array('Industries', 'Industries', strBaseUrl + '/Industries/', '1');
	var Financial_Services			= new Array('Banking', 'Banking', strBaseUrl + '/Industries/Banking/', '2');
	var Government					= new Array('Government','Government', strBaseUrl + '/Industries/Government/','2');
	var Industrial_Manufacturing	= new Array('Manufacturing','Manufacturing', strBaseUrl + '/Industries/Manufacturing/','2');
	var Logistics					= new Array('Logistics','Logistics', strBaseUrl + '/Industries/Logistics/','2');
	var Retail						= new Array('Retail','Retail', strBaseUrl + '/Industries/Retail/','2');
	var Telecommunications			= new Array('Telecommunications','Telecommunications', strBaseUrl + '/Industries/Telecommunications/','2');


var subIndustries = new Array(
	Industries,
	Government,	
	Industrial_Manufacturing,
	Logistics,
	Retail,
	Telecommunications
	);

//Begin Sub Areas for Solutions
var Solutions						= new Array('Solutions', 'Solutions', strBaseUrl + '/Solutions/index.htm', '1');
	var Business_Applications		= new Array('Business_Applications','Business Applications', strBaseUrl + '/Solutions/BusinessApplications/','2');
	var Business_Integration		= new Array('Business_Integration','Business Integration', strBaseUrl + '/Solutions/BusinessIntegration/','2');
	var Business_Intelligence		= new Array('Business_Intelligence','Business Intelligence', strBaseUrl + '/Solutions/BusinessIntelligence/','2');
	var Business_ProcessManagement	= new Array('Business_ProcessManagement','Business Process Management', strBaseUrl + '/Solutions/BusinessProcessManagement/','2');
	var Solution_Delivery			= new Array('Solution_Delivery','Solution Delivery', strBaseUrl + '/Solutions/SolutionDelivery/','2');
	var Supply_ChainManagement		= new Array('Supply_ChainManagement','Supply_ChainManagement', strBaseUrl + '/Solutions/SupplyChain/','2');
	
var subSolutions = new Array(
	Solutions,
	Business_Applications,
	Business_Integration,
	Business_Intelligence,
	Business_ProcessManagement,
	Solution_Delivery,
	Supply_ChainManagement
	);

//Begin Sub Areas for Products
var Products					= new Array('Products', 'Products', strBaseUrl + '/Products/', '1');
var All_Products			= new Array('All_Products','All Products',strBaseUrl + '/Products/AllProducts/','2');
	var EAI   					= new Array('EAI','Application Integration (EAI)', strBaseUrl + '/Products/EAI/','2');
	var B2BCommunications   	= new Array('B2BCommunications','B2B Communications', strBaseUrl + '/Products/B2BCommunications/','2');
	var EDI						= new Array('EDI', 'Electronic Data Interchange (EDI)', strBaseUrl + '/Products/EDI/', '2');
	var GlobalDataSynch			= new Array('GlobalDataSynchronization','Global Data Synchronization', strBaseUrl + '/Solutions/SupplyChain/dssolutions.htm','2');
	var ManagedFileTransfer			= new Array('ManagedFileTransfer','Managed File Transfer', strBaseUrl + '/Procucts/Managed+File+Transfer/','2');
	var StandardsCertification		= new Array('StandardsCertification', 'Standards and Certification', strBaseUrl + '/Products/Standards+and+Certifications/', '2');
	var SupplyChainManagement		= new Array('SupplyChainManagement', 'Supply Chain Management', strBaseUrl + '/Solutions/SupplyChain/', '2');
	var Systems_Monitoring		= new Array('Systems_Monitoring','Systems Monitoring',strBaseUrl + '/Products/SystemsMonitoring/','2');
	


var subProducts	= new Array(
	Products,
	All_Products,
	EAI,
	B2BCommunications,
	EDI,
	GlobalDataSynch,
	ManagedFileTransfer,
	StandardsCertification,
	SupplyChainManagement,
	Systems_Monitoring
	);

//Begin Sub Areas for Services
var Services						= new Array('Services', 'Services', strBaseUrl + '/Services/index.htm', '1');
	var Customer_Support			= new Array('Customer_Support','Customer Support', strBaseUrl + '/Services/Customer-Support/','2');
	var Custom_Services				= new Array('Custom_Services','Custom Services', strBaseUrl + '/Services/CustomServices/','2');
	var Education					= new Array('Education','Education', strBaseUrl + '/Services/Education/','2');
	var Hosted_Network				= new Array('Hosted_Network','Hosted Network Solutions', strBaseUrl + '/Services/HostedNetworkSolutions/','2');
	var Implementation				= new Array('Implementation','Implementation Services', strBaseUrl + '/Services/ImplementationServices/','2');
	var Managed_Services			= new Array('Managed_Services','Managed Services', strBaseUrl + '/Services/Managed+Services/','2');
	var Post_Implementation			= new Array('Post_Implementation','Post-Implementation Services', strBaseUrl + '/Services/PostImplementationServices/','2');
	var Strategic_Consulting		= new Array('Strategic_Consulting','Strategic Consulting', strBaseUrl + '/Services/StrategicConsulting/','2');
	
var subServices = new Array(
	Services,
	Custom_Services,
	Customer_Support,
	Education,
	Hosted_Network,
	Implementation,
	Managed_Services,
	Post_Implementation,
	Strategic_Consulting
	);

//Begin Sub Areas for About Us 	
var About						= new Array('About', 'About', strBaseUrl + '/About/','1');
var Careers						= new Array('Careers','Careers', strBaseUrl + '/About/Careers/','2');
		var College_Connection		= new Array('College_Connection','College Connection', strBaseUrl + '/About/Careers/collegeconnection.html','3');
		var Job_Center				= new Array('Job_Center','Job Center', 'http://jobs-stercomm.icims.com/stercomm_jobs/jobs/candidate/intro.jsp','3');
	var Company_Info				= new Array('Company_Info','Company Info',strBaseUrl + '/About/CompanyInfo/','2');
		var Exe_Profiles			= new Array('Exe_Profiles','Executive Profiles', strBaseUrl + '/About/CompanyInfo/executiveprofiles/','3');	
		var Global_Sites			= new Array('Global_Sites','Global Sites', strBaseUrl + '/About/CompanyInfo/globalsites/','3');	
		var Office_Locations		= new Array('Office_Locations','Office Locations', strBaseUrl + '/About/CompanyInfo/officelocations/','3');	
	var Download_Center				= new Array('Download_Center','Download Center', strBaseUrl + '/About/DownloadCenter/','2');
	var Events						= new Array('Events','Events', strBaseUrl + '/About/Events/','2');
	var News						= new Array('News','News',strBaseUrl + '/About/News/','2');
		var Analyst_Views			= new Array('Analyst_Views','Analyst Views', strBaseUrl + '/About/News/AnalystViews/','3');
		var Awards_Recognition			= new Array('Awards_Recognition','Awards and Recognition', strBaseUrl + '/About/News/AwardsRecognition/','3');
		var Media_Coverage			= new Array('Media_Coverage','Media Coverage', strBaseUrl + '/About/News/MediaCoverage/','3');
		var Media_Kit			= new Array('Media_Kit','Media Kit', strBaseUrl + '/About/News/MediaKit/','3');
		var Press_Releases			= new Array('Press_Releases','Press Releases', strBaseUrl + '/About/News/PressReleases/','3');
	var Partners			= new Array('Partners','Partners', strBaseUrl + '/About/Partners/','2');


var subAbout = new Array(
	About,
	Careers,
	College_Connection,
	Job_Center,
	Company_Info,
	Exe_Profiles,
	Global_Sites,
	Office_Locations,
	Download_Center,
	Events,
	News,
	Analyst_Views,
	Awards_Recognition,
	Media_Coverage,
	Media_Kit,
	Press_Releases,
	Partners	
	);

//Begin Assembly of Main Section
var mainMenu = new Array(
	subIndustries,
	subSolutions,
	subProducts,
	subServices,
	subAbout	
		);

////////////////////////////////////////////////////////////////////////////////////////////////////////////
//																										  //
//																										  //
//                                 DON'T TOUCH CODE BELOW HERE!!!										  //
//																										  //
//																										  //
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Build only active Teritary Menu Items
function buildLeftNav(primary, secondary, tertiary)
	{
	var strCode = "";
	var menuLength = 0;
	var teritaryFlag = 0;
	strCode += "<div id=\"leftNav\"><ul>";
// Build Left Nav
// Syntax: <li><a href="#"> Our Vision</a></li>
	for (var i = 0; i < mainMenu.length; i++){
		menuLength = eval(mainMenu[i].length)
		if (mainMenu[i][0][0] == primary){
			for (var j = 0; j < menuLength; j++){
				k=j-1;
				if (mainMenu[i][j][3] == '3'){
					if (teritaryFlag == 1){
						if(mainMenu[i][k][3] == '2'){
							strCode +="<div id=\"leftNav2\"><ul>\n";
						}
						if (mainMenu[i][j][0] == tertiary){
							strCode += "<li id=\"leftNav2S\"><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
							//this is the selected third level line
							}else{
							strCode += "<li><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
							//this is the non selected third level line
						}
					}
				}else if (teritaryFlag == 1 && mainMenu[i][k][3] == '3'){
					strCode +="</ul></div>\n";
					teritaryFlag = 0;				
				}
				if (mainMenu[i][j][3] == '2'){
					if (mainMenu[i][j][0] == secondary){
						// this is the selected second level line
							strCode += " <li id=\"leftNavS\"><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
							teritaryFlag = 1;
						}else{
							strCode += "<li><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
							teritaryFlag = 0;		
						//this is the non selected second level line
						}
					}
				}
			}
			menuLength = 0;
		}
	strCode += "</ul></div>";
	document.write (strCode);
//alert(strCode)
	}
/*
// Build all Teritary Menu Items
function buildLeftNav(primary, secondary, tertiary)
	{
	var strCode = "";
	var menuLength = 0;
	strCode += "<ul>";
// Build Left Nav
// Syntax: <li><a href="#"> Our Vision</a></li>
	for (var i = 0; i < mainMenu.length; i++){
		menuLength = eval(mainMenu[i].length)
		if (mainMenu[i][0][0] == primary){
			for (var j = 0; j < menuLength; j++){
				k=j-1;
				if (mainMenu[i][j][3] == '2'){
					if(mainMenu[i][k][3] == '3'){
						strCode +="</ul></div>\n";
						}
					if (mainMenu[i][j][0] == secondary){
						// this is the selected second level line
							strCode += " <li id=\"leftNavS\"><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
						}else{
							strCode += "<li><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
						//this is the non selected second level line
						}
					}
				
				if (mainMenu[i][j][3] == '3'){
					if(mainMenu[i][k][3] == '2'){
						strCode +="<div id=\"leftNav2\"><ul>\n";
						}
					if (mainMenu[i][j][0] == tertiary){
						strCode += "<li id=\"leftNav2S\"><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
						//strCode += "<li id=\"subnavon\"><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>";
						//this is the selected third level line
						}else{
						strCode += "<li><a href=\"" + mainMenu[i][j][2] + "\">" + mainMenu[i][j][1] + "</a></li>\n";
						//this is the non selected third level line
						}					
					}			
				
				}
			}
			menuLength = 0;
		}
	strCode += "</ul>";
	document.write (strCode);
//alert(strCode)
	}*/
