// Browser Detection 
function BrowserCheck() {
	var b = navigator.appName;	
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.version = navigator.appVersion;
	//if (this.version.indexOf('Win')>0) this.os = "PC";
	//else if (this.version.indexOf('Mac')>0) this.os = "Mac";	
	this.WinOs = (this.version.indexOf('Win')>0);
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v>=5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (this.version.indexOf('MSIE 4')>0);
	this.ie5 = (this.version.indexOf('MSIE 5')>0);
	this.ie6 = (this.version.indexOf('MSIE 6')>0);
	this.min = (this.ns||this.ie);
}
var browser = new BrowserCheck();

//if ((browser.WinOs) && (browser.ie)){
	//window.onresize = new Function("window.location.href=document.location");
	window.onresize = new Function("resizeFooter();");
//}


<!--
//IMAGE ROLLOVERS
function imgOn(imgName) { document[imgName].src = eval(imgName + "_on.src"); }
function imgOff(imgName) { document[imgName].src = eval(imgName + "_off.src"); }

//IMAGE CACHING
var oImgPath = new Object();
oImgPath.topnav = "/images/left_nav/";

function cacheImg(name,src,rollover,type){
	if (!type) var type = "gif";
	if (rollover==true){
		eval(name + "_off =  new Image");
		eval(name + "_off.src = \'" + src + name + "_off." + type + "\'");
		eval(name + "_on =  new Image");
		eval(name + "_on.src = \'" + src + name + "_on." + type + "\'");
	} else {
		eval(name + " = new Image");
		eval(name + ".src = \'"+src+name+"."+type+"\'");
	}
}



//-----Top Nav
cacheImg('alliances',oImgPath['topnav'],true);
cacheImg('awards',oImgPath['topnav'],true);
cacheImg('beliefs',oImgPath['topnav'],true);
cacheImg('careers',oImgPath['topnav'],true);
cacheImg('clients',oImgPath['topnav'],true);
cacheImg('contact',oImgPath['topnav'],true);
cacheImg('emerg_channels',oImgPath['topnav'],true);
cacheImg('facts',oImgPath['topnav'],true);
cacheImg('history',oImgPath['topnav'],true);
cacheImg('int_marketing',oImgPath['topnav'],true);
cacheImg('menu',oImgPath['topnav'],true);
cacheImg('news',oImgPath['topnav'],true);
cacheImg('offices',oImgPath['topnav'],true);
cacheImg('people',oImgPath['topnav'],true);
cacheImg('portfolio',oImgPath['topnav'],true);
cacheImg('services',oImgPath['topnav'],true);
cacheImg('top_careers',oImgPath['topnav'],true);
cacheImg('top_news',oImgPath['topnav'],true);
cacheImg('web_devel',oImgPath['topnav'],true);
cacheImg('home',oImgPath['topnav'],true);

// -->

bolAdjustSiteFooter = true;
pageLevel = ""

function centerHeight(ctl){
	var heightDifference = 0;
	if (ctl == "main"){
		heightDifference = 373;
	}else if (ctl == "third") {
		heightDifference = 74;
	}else if (ctl == "portfolio") {
		heightDifference = 373;
	}else if (ctl == "beliefs") {
		heightDifference = 373;
	}else if (ctl == "clients") {
		heightDifference = 373;
	}else if (ctl == "home") {
		heightDifference = 373
	}
	
	
	var center_row_height
	if (browser.ns){ 		
		center_row_height = self.innerHeight-heightDifference; 
	}else if (browser.ie6){
		center_row_height = parseInt(document.documentElement.clientHeight)-heightDifference;		
	}else{
		center_row_height = parseInt(document.body.clientHeight)-heightDifference;
	}
	//alert(center_row_height);
	return(center_row_height);
}

function resizeFooter(){	
	//alert(pageLevel);
	//document.leftsidebackground.height = centerHeight(pageLevel);	
	document.rightsidebackground.height = centerHeight(pageLevel);	
}

function adjustFooter(ctl,ctl2){	
	pageLevel = ctl2;
	var temp_center_row_height = centerHeight(ctl2);
	//alert(temp_center_row_height);
		
	if (ctl=="left"){
		//if ((browser.ns || browser.ie) && (typeof temp_center_row_height == "number") && (bolAdjustSiteFooter)){			
			//document.writeln('<td width="4" class="leftgutterline" valign="top"><img src="/images/shared/spacer.gif" width="4" height="'+ temp_center_row_height +'" border="0" name="leftsidebackground"></td>'); 
		//} else { 
			document.writeln('<td width="4" class="leftgutterline" valign="top"><img src="/images/shared/spacer.gif" width="4" height="1" border="0" name="leftsidebackground"></td>'); 
		//}
	}else if (ctl=="right"){		
		if ((browser.ns || browser.ie) && (typeof temp_center_row_height == "number") && (bolAdjustSiteFooter)){			
			document.writeln('<td width="1" class="rightgutterline" valign="top"><img src="/images/shared/spacer.gif" width="1" height="'+ temp_center_row_height +'" border="0" name="rightsidebackground"></td>'); 
		} else { 
			document.writeln('<td width="1" class="rightgutterline" valign="top"><img src="/images/shared/spacer.gif" width="1" height="1" border="0" name="rightsidebackground"></td>'); 
		}
	}
}



//Netscape 4.x Resize
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function showLayer(id){
	if (!browser.ns4){
		if (document.all) document.all[id].style.visibility='visible';	
		else if (browser.ns5) document.getElementById(id).style.visibility='visible';
	}
}

function hideLayer(id){
	if (!browser.ns4){
		if (document.all) document.all[id].style.visibility='hidden';	
		else if (browser.ns5) document.getElementById(id).style.visibility='hidden';
	}
}

var timerID;
var timeout = 500;

function timeup(ctl,ctl2,ctl3){
	imgOff(ctl3);
	showLayer(ctl2);
	hideLayer(ctl);
}

function onParent(ctl, ctl2, ctl3){
	imgOn(ctl3);
	clearTimeout(timerID);
	showLayer(ctl);
	hideLayer(ctl2);
}

function offParent(ctl, ctl2, ctl3){	
	timerID = setTimeout('timeup(\''+ctl+'\', \''+ctl2+'\', \''+ctl3+'\')',timeout);
}

function onChild(){ clearTimeout(timerID); }

function offChild(ctl, ctl2, ctl3){ timerID = setTimeout('timeup(\''+ctl+'\', \''+ctl2+'\', \''+ctl3+'\')',timeout); }

function popWindowArticles(url, pdf){
	var width;
	var height;
	var name;
	if (!pdf) pdf = false;
	if (pdf){
		width = 700;
		height = 500;
		name = "pdfPopWindow";
	}else{
		width = 700;
		height = 500;
		name = "OffSitePopWindow";
	}	
 	var realW = (width)/2;
	var realH = (height)/2;
 	if (document.all){		
        var xMax = screen.width, yMax = screen.height;
    }else if (document.layers){       
        var xMax = screen.width, yMax = screen.height;
    }else if (document.getElementById){
		var xMax = screen.width, yMax = screen.height;
	}else{
		var xMax = 800, yMax=600;
	}
	var xOffset = ((xMax)/2) - realW, yOffset = (((yMax)/2)) - realH; 
	if (yMax==600){
		yOffset = 0;
	}	
	
	if (pdf) {
		var options = "directories=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,resizable=yes" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}else{
		var options = "directories=yes,status=yes,location=yes,scrollbars=yes,menubar=yes,toolbar=yes,resizable=yes" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}
	
	popup = window.open(url,name,options);
	popup.focus();	
}

function popWindow(url, width, height, name, scrollbars){
	if (!scrollbars) scrollbars = false;
	if (!width) width = 500;
	if (!height) height = 500;
 	var realW = (width)/2;
	var realH = (height)/2;
 	if (document.all){		
        var xMax = screen.width, yMax = screen.height;
    }else if (document.layers){       
        var xMax = screen.width, yMax = screen.height;
    }else if (document.getElementById){
		var xMax = screen.width, yMax = screen.height;
	}else{
		var xMax = 800, yMax=600;
	}
	var xOffset = ((xMax)/2) - realW, yOffset = (((yMax)/2)) - realH; 
	if (yMax==600){
		yOffset = 0;
	}	
	
	if (scrollbars) {
		var options = "directories=no,status=no,location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}else{
		var options = "directories=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}
	
	if (!name) name = "default_window";
	
	popup = window.open(url,name,options);
	popup.focus();	
}

function getElmtRef(strElmtId) {
	if (!document.getElementById) {
		return document.all[strElmtId];
	} else {
		return document.getElementById(strElmtId);
	}
}

//------