function loadCSSScript(){
	var browserType = navigator.userAgent.toLowerCase();
	var instanceName = window.location.href.split('/');
	if(browserType.indexOf('firefox') != -1 && browserType.indexOf('macintosh') != -1){		//If Macintosh Firefox
		document.write('<link href="/europe/_resources/css/browsers/ffm/Browserstyle2.0.css" type="text/css" rel="stylesheet">');
	} else if(browserType.indexOf('firefox') != -1 && browserType.indexOf('windows') != -1){			//If Windows Firefox
		document.write('<link href="/europe/_resources/css/browsers/ffw/Browserstyle2.0.css" type="text/css" rel="stylesheet">');
	} else if(browserType.indexOf('msie 6.0') != -1 ){									//If Windows Internet Explorer 6.0
		document.write('<link href="/europe/_resources/css/browsers/ie6/Browserstyle2.0.css" type="text/css" rel="stylesheet">');
	} else if(browserType.indexOf('msie 7.0') != -1 ){									//If Windows Internet Explorer 7.0
		document.write('<link href="/europe/_resources/css/browsers/ie7/Browserstyle2.0.css" type="text/css" rel="stylesheet">');
	} else if(browserType.indexOf('safari') != -1 ){									//If Macintosh Safari
		document.write('<link href="/europe/_resources/css/browsers/saf/Browserstyle2.0.css" type="text/css" rel="stylesheet">');
	}
}

//onload events
loadCSSScript();

/*** Custom Functions ***/
var currentPage = window.location.href;
var navDivs = new Array('nav','leftNav');
var listOfLinks = new Array();
var listCounter = 0;

function activateNavigationLinks(){
	//Get list of all nav links
	for(i=0;i<navDivs.length;i++){
		if(document.getElementById(navDivs[i])){
			var allNavAnchors = document.getElementById(navDivs[i]).getElementsByTagName('a');
			for(n=0;n<allNavAnchors.length;n++){
				if(allNavAnchors[n].parentNode.parentNode.id == navDivs[i]){
					listOfLinks[listCounter] = allNavAnchors[n];
					listCounter++;
				}
			}
		}
	}

	//Change any links for this page to active
	var isFound = false;
	for(i=0;i<listOfLinks.length;i++){
		if(currentPage.indexOf(listOfLinks[i]) != -1){
			listOfLinks[i].className += 'active';
			isFound = true;
		}
	}
	
	//If nothing matches, turn on the default page
	if(isFound == false){
		listOfLinks[0].className += 'active';
	}
}





/*** Deprecated Code ***/
//This function lists all the sub pages and their navigation context
/*function locatePage(searchString){
	var pageArray = new Array('solutions','services','products','about','contactus.');

	for(i=0;i<pageArray.length;i++){
		if(searchString.toLowerCase().indexOf(pageArray[i]) != -1){
			return pageArray[i];
		}
	}
        return 'none';
}*/

//this function highlights the top nav and can also build page specific CSS without a rewrite
/*function pageSpecificCSS(){
	var pagename = locatePage(window.location.href);
	var classname = 'button1';
	var style = document.createElement('style');
	var allAnchors = document.getElementsByTagName('a');
	


	switch(pagename){
		case ('solutions'):
			classname='button2';
			break;
		case ('services'):
			classname='button3';
			break;
		case ('products'):
			classname='button4';
			break;
		case ('about'):
			classname='button5';
			break;
		case ('contactus.'):
			classname='button6';
			break;
	}

	for(i=0;i<allAnchors.length;i++){
		if(allAnchors[i].className == classname){
			allAnchors[i].className = classname + 'active';
		}
	}
}*/


