
// JavaScript Document
var FadeInTimer;
var FadeOutTimer;
var intY;
var xPos, yPos;
var xhr = false;
var count =1 ;
var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};

BrowserDetect.init();
function alignVertical()
{
	if (document.getElementById) 
	{
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) 
		{
			var contentElement = document.getElementById('wrapper');
			var contentHeight = contentElement.offsetHeight;
			if (windowHeight - contentHeight > 10) 
			{
				contentElement.style.position = 'relative';
				contentElement.style.top = ((windowHeight / 2) - ((contentHeight / 2) + 10)) + 'px';
			}//end if
			else 
			{
				contentElement.style.position = 'static';
			}//end else
		}//end if
	}
}

function captionHide(captionID)
{
	if(!document.getElementById(captionID)) return;
	document.getElementById(captionID).style.zIndex = 0;
	document.getElementById(captionID).style.display = 'none';
}

function captionPop(captionID)
{
	if(!document.getElementById(captionID)) return;
	var object = document.getElementById(captionID).style;
	object.display = 'block';
	object.zIndex = 10;
}

function getScroll( itemID )
{
	if(!document.getElementById(itemID)) alert('no');
	var object = document.getElementById(itemID);
//	if(BrowserDetect.browser == "Opera") return 0;
	return object.scrollTop;
}

function getWindowHeight() 
{
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') 
	{
		windowHeight = window.innerHeight;
	}//end if
	else 
	{
		if (document.documentElement && document.documentElement.clientHeight) 
		{
			windowHeight = document.documentElement.clientHeight;
		}//end if
		else 
		{
			if (document.body && document.body.clientHeight) 
			{
				windowHeight = document.body.clientHeight;
			}//end if
		}//end else
	}//end else
	return windowHeight;
}

function imageFader(opacity, imageID) 
{
	if(!document.getElementById(imageID)) return;
    var object = document.getElementById(imageID);
	if(object)
	{
		object = object.style;
		object.filter = "Alpha(opacity=" + opacity + ")";
		object.opacity = (opacity/100);
		object.KhtmlOpacity = (opacity/100);
		if(opacity >= 100) { opacity = 99.99999; }
		object.MozOpacity = (opacity/100);
	}//end if
} 

function imageFade(start, end, imageID, width, millisec)
{
	clearTimeout(FadeInTimer);
	clearTimeout(FadeOutTimer);
	if(!document.getElementById(imageID)) return;
	var object = document.getElementById(imageID);
	if(object)
	{
		object = object.style;
		var speed = Math.round(millisec / 100);
    	var timer = 0;
		if(start > end) //fade out
		{
			for(i = start; i >= end; i--) 
			{
				FadeOutTimer = setTimeout("imageFader(" + i + ",'" + imageID + "')", (timer * speed));
				timer++;
			}//end for
			object.zIndex = 0;
		}//end if
		if(start < end) //fade in
		{
			object.width = width;
			object.zIndex = 5;
			for(i = start; i <= end; i++) 
			{
				FadeInTimer = setTimeout("imageFader(" + i + ",'" + imageID + "')", (timer * speed));
				timer++;
			}//end for
		}//end else
	}
}

function imageHide(imageID)
{
	if(!document.getElementById(imageID)) return;
	document.getElementById(imageID).style.zIndex = 0;
	document.getElementById(imageID).style.width = 0;
}

function imageShow(imageID, width)
{
	//if(!document.getElementById(imageID)) return;
	//if(BrowserDetect.OS == "Mac")
	//{
	//	imagePop(imageID, width);	
	//}//end if
//	else
	//{
		var object;
		object = document.getElementById(imageID).style;
		object.filter = "Alpha(opacity=0)";
		object.KhtmlOpacity = "0";
		object.MozOpacity = "0";
		object.opacity = "0";	
		object.width = width;
		if(navigator.appName == "Microsoft Internet Explorer")
		imageFade(0, 100, imageID, width, 100);	
		else imageFade(0, 100, imageID, width, 300);	
		
	//}//end else
}

function imagePop(imageID, width)
{
	if(!document.getElementById(imageID)) return;
	var object = document.getElementById(imageID).style;
	object.filter = "Alpha(opacity = 100)";
	object.KhtmlOpacity = "1";
	object.MozOpacity = "1";
	object.opacity = "1";		
	object.width = width;
	object.zIndex = 5;
}

var galleryImages;
var galleryIndex; 
var slideshowInterval;

function slideLoad(slide_total)
{			 
			slideshowInterval = setInterval("slideShow(" + slide_total + ")", 6000);
			
	 
}

function slideLoadCareers(slide_total)
{			 
			slideshowInterval = setInterval("slideShow(" + slide_total + ")", 4000);
			
	 
}
function BIMslideLoad(slide_total)
{
			BIMslideshowInterval = setInterval(BIMslideShow, 6000);

	 
}
var slideToggleBool=1;

function slideToggle(elemID) {
if (slideToggleBool==1){
slideToggleBool=0;
document.getElementById("toggleControl").src="resources/~images/playToggle.gif";
document.getElementById("toggleControlLink").title="Play slideshow:: ";

clearInterval(slideshowInterval);
}
else if (slideToggleBool==0)
{
document.getElementById("toggleControl").src="resources/~images/pauseToggle.gif";
document.getElementById("toggleControlLink").title="Pause slideshow:: ";

if (count==1)
	object=document.getElementById('slide1');
	else if (count==2)
	object=document.getElementById('slide2');
	else if (count==3)
	object=document.getElementById('slide3');
	else if (count==4)
	object=document.getElementById('slide4');
	else if (count==5)
	object=document.getElementById('slide5');
	else if (count==6)
	object=document.getElementById('slide6');
	object.style.visibility='hidden';
	object.style.opacity='0';
	object.style.filter='alpha(opacity=0)';
	count = count+1;
	if (count==7) count=1;
	if (count==1){
	document.getElementById('slide1').style.visibility='visible';
	imageFade(0, 100, 'slide1', 750, 1400)}
	else if (count==2){
	document.getElementById('slide2').style.visibility='visible';
	imageFade(0, 100, 'slide2', 750, 1400)
}	else if (count==3)
	{document.getElementById('slide3').style.visibility='visible';
	imageFade(0, 100, 'slide3', 750, 1400)
	}else if (count==4)
	{document.getElementById('slide4').style.visibility='visible';
	imageFade(0, 100, 'slide4', 750, 1400)
	}else if (count==5)
	{document.getElementById('slide5').style.visibility='visible';
	imageFade(0, 100, 'slide5', 750, 1400)
	}else if (count==6)
	{document.getElementById('slide6').style.visibility='visible';
	imageFade(0, 100, 'slide6', 750, 1400)
	}
slideLoad();

slideToggleBool=1;
}
}
function slideShow(slide_total)
{
	var object;
	 
 	if (count==1){
 	object=document.getElementById('slide1');}
	else if (count==2)
	object=document.getElementById('slide2');
	else if (count==3)
	object=document.getElementById('slide3');
	else if (count==4)
	object=document.getElementById('slide4');
	else if (count==5)
	object=document.getElementById('slide5');
	else if (count==6)
	object=document.getElementById('slide6');
	else if (count==7)
	object=document.getElementById('slide7');
	else if (count==8)
	object=document.getElementById('slide8');
	object.style.visibility='hidden';
	object.style.opacity='0';
	object.style.filter='alpha(opacity=0)';
	count = count+1;
	if (count==(slide_total + 1)) count=1;
	if (count==1){
	document.getElementById('slide1').style.visibility='visible';
	imageFade(0, 100, 'slide1', 469, 1400)}
	else if (count==2){
	document.getElementById('slide2').style.visibility='visible';
	imageFade(0, 100, 'slide2', 469, 1400)
}	else if (count==3)
	{document.getElementById('slide3').style.visibility='visible';
	imageFade(0, 100, 'slide3', 469, 1400)
	}else if (count==4)
	{document.getElementById('slide4').style.visibility='visible';
	imageFade(0, 100, 'slide4', 469, 1400)
	}else if (count==5)
	{document.getElementById('slide5').style.visibility='visible';
	imageFade(0, 100, 'slide5', 469, 1400)
	}else if (count==6)
	{document.getElementById('slide6').style.visibility='visible';
	imageFade(0, 100, 'slide6', 469, 1400)
	}else if (count==7)
	{document.getElementById('slide7').style.visibility='visible';
	imageFade(0, 100, 'slide7', 469, 1400)}
	else if (count==8)
	{document.getElementById('slide8').style.visibility='visible';
	imageFade(0, 100, 'slide8', 469, 1400)}
	 

}

function BIMslideShow()
{
	if (count==1){
 	object=document.getElementById('slide1');}
	else if (count==2)
	object=document.getElementById('slide2');
	else if (count==3)
	object=document.getElementById('slide3');
	else if (count==4)
	object=document.getElementById('slide4');

	 
	object.style.visibility='hidden';
	object.style.opacity='0';
	object.style.filter='alpha(opacity=0)';
	count = count+1;
	if (count==5) count=1;
	if (count==1){
	document.getElementById('slide1').style.visibility='visible';
	imageFade(0, 100, 'slide1', 469, 1400)}
	else if (count==2){
	document.getElementById('slide2').style.visibility='visible';
	imageFade(0, 100, 'slide2', 469, 1400)
}	else if (count==3)
	{document.getElementById('slide3').style.visibility='visible';
	imageFade(0, 100, 'slide3', 469, 1400)
	}else if (count==4)
	{document.getElementById('slide4').style.visibility='visible';
	imageFade(0, 100, 'slide4', 469, 1400)
	}
	}
	 



function taglinefade()
{
	imageFade(100, 0, 'tagline', 0, 1000);
}

function buildMenu( menu, menuType ) 
{
	if(!document.getElementById(menu)) return;
	var menu = document.getElementById(menu);
	var items = menu.getElementsByTagName("li");
	if(!items) return;
	var lineitem;
	var attrib;
	var id;
	for(var i = 0; i < items.length; i++)
	{
		lineitem = items[i];
		if( lineitem )
		{
			attrib = lineitem.attributes;
			id = attrib.getNamedItem("id").value;
			if(id.search(menuType) == -1)
			{
				lineitem.style.position = "absolute";
			}
			if(id.search("linkdead") != -1)
			{
				lineitem.style.color = "#777";
			}			
		}//end if
	}//end for
	menu.style.visibility = 'visible';
}//end function

function startMenu ( menuType ) 
{
	BrowserDetect.init();
	//menulist();
	slideLoad();
	setTimeout("taglinefade()", 3000);
	//buildMenu( "sidebarMenu", menuType );
	//buildMenu( "sidebarSubMenu", menuType );
}

function resizeNewsPreviews()
{
	var topHeight = document.getElementById("index-news-block-1").offsetHeight;
	document.getElementById("top-news-top-img").style.height = topHeight + "px";
	
	var midHeight = document.getElementById("index-news-block-2").offsetHeight;
	document.getElementById("top-news-middle-img").style.height = midHeight + "px";
	
	var bottomHeight = document.getElementById("index-news-block-3").offsetHeight;
	document.getElementById("top-news-bottom-img").style.height = bottomHeight + "px";
	
	
	document.getElementById("top-news-middle").style.top = topHeight + 25 + "px";

	document.getElementById("top-news-bottom").style.top = midHeight + topHeight + 50 + "px";

	}

function startHomePage() 
{	
	object=document.getElementById('slide1').style;
	object.opacity='1';
	object.filter='alpha(opacity=100)';
	slideBegin();
	resizeNewsPreviews();
}

function startHomePageFasterSlides()
{
	object=document.getElementById('slide1').style;
	object.opacity='1';
	object.filter='alpha(opacity=100)';
	slideBeginFasterSlides();
}

function slideBeginFasterSlides(){
object=document.getElementById('slide1').style;
	object.opacity='1';
	object.filter='alpha(opacity=100)';
slideLoadHomePageFasterSlides();
}

function slideLoadHomePageFasterSlides()
{
		
		slideshowInterval = setInterval(slideShowHomePage, 5000);
	
}
function slideShowHomePageFasterSlides()
{
	//Grab current slide using count
	var slideUp = 'slide' + count;
 	object=document.getElementById(slideUp);
	//Hide current slide
	object.style.visibility='hidden';
	object.style.opacity='0';
	object.style.filter='alpha(opacity=0)';

	//Grab next slide and make it current slide
	count = count+1;
	var slideUp = 'slide' + count;
	
	//Check to see if current slide exists; If current slide doesn't exist, make first slide current slide
	if(!document.getElementById(slideUp))
	{
	count = 1;
	var slideUp = 'slide' + count;
	}
	
	//Show current slide
	document.getElementById(slideUp).style.visibility='visible';
	imageFade(0, 100, slideUp, 750, 1000);	
}

function slideBegin(){
object=document.getElementById('slide1').style;
	object.opacity='1';
	object.filter='alpha(opacity=100)';
 setTimeout(slideShowHomePage,12000);
 setTimeout(slideLoadHomePage,12000);
}
function slideLoadHomePage()
{
		
		slideshowInterval = setInterval(slideShowHomePage, 12000);
	
}
function slideShowHomePage()
{
	//Grab current slide using count
	var slideUp = 'slide' + count;
 	object=document.getElementById(slideUp);
	//Hide current slide
	object.style.visibility='hidden';
	object.style.opacity='0';
	object.style.filter='alpha(opacity=0)';

	//Grab next slide and make it current slide
	count = count+1;
	var slideUp = 'slide' + count;
	
	//Check to see if current slide exists; If current slide doesn't exist, make first slide current slide
	if(!document.getElementById(slideUp))
	{
	count = 1;
	var slideUp = 'slide' + count;
	}
	
	//Show current slide
	document.getElementById(slideUp).style.visibility='visible';
	imageFade(0, 100, slideUp, 750, 1000);	
}

function start() 
{
//s	BrowserDetect.init();
	//menulist();
	  
//	setTimeout("taglinefade()", 3000);
	//setInterval("functionCheck()", 100);
//	showClientList();
}
function startWithCareerSlides(total)
{
slideLoadCareers(total)
}
 
function startWithSlides(total) 
{
//	BrowserDetect.init();
	//menulist();
	slideLoad(total);
//	setTimeout("taglinefade()", 3000);
//	setInterval("functionCheck()", 100);
//	showClientList();
}
function startWithSlidesCareers(total) 
{
//	BrowserDetect.init();
	//menulist();
	slideLoadCareers(total);
//	setTimeout("taglinefade()", 3000);
//	setInterval("functionCheck()", 100);
//	showClientList();
}

function startFirmProfile()
{
slideLoad(7);
}
function startCareers()
{
slideLoad(6);
}
function startWithBIMSlides() 
{
//	BrowserDetect.init();
	//menulist();
	BIMslideLoad();
//	setTimeout("taglinefade()", 3000);
//	setInterval("functionCheck()", 100);
//	showClientList();
}
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

//document.getElementById('resize').onmouseover = alert('helo');
//widthChange; 
//document.getElementById('resize').onmouseout = widthRestore; 

function widthChange(elemId) { 
	 
	clearTimeout(resizeBreadcrumb);
 	object = document.getElementById("resize");
	if (object.style.width == '500px') return;
    if (!object.currentWidth) object.currentWidth = 53; 
	//if no memory is set, set it first; 
    doWidthChangeMem(object,object.currentWidth,500,100,50,0.63); 
    } 
function widthRestore() { 

	object = document.getElementById('resize');
	
     if (!object.currentWidth) object.currentWidth = 500; 

   //resizeBreadcrumb = setTimeout("doWidthChangeMem(" + object + ", " + object.currentWidth + ", " + 53 + ", " + 50 + ", " + 100 + ", " + 0.2 + ")", 1500); 
	doWidthChangeMem(object, 500, 53, 10, 50, 0.5);
    }

function doWidthChangeMem(elem,startWidth,endWidth,steps,intervals,powr) { 
//Width changer with Memory by www.hesido.com
	//alert (elem + ", " + startWidth + ", " + endWidth + ", " + steps + ", " + intervals + ", " + powr);
	
    if (elem.widthChangeMemInt)
	window.clearInterval(elem.widthChangeMemInt);
    var actStep = 0;
    elem.widthChangeMemInt = window.setInterval(
	function() { 
	  elem.currentWidth = easeInOut(startWidth,endWidth,steps,actStep,powr);
	  document.getElementById('resize').style.width = elem.currentWidth + "px"; 
	  actStep++;
	  if (actStep > steps) window.clearInterval(elem.widthChangeMemInt);
	} 
	,intervals)
	
}

	function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) { 
//Generic Animation Step Value Generator By www.hesido.com 
    var delta = maxValue - minValue; 
    var stepp = minValue+(Math.pow(((1 / totalSteps) * actualStep), powr) * delta); 
    return Math.ceil(stepp) 
    } 
	
		function adjustNewsScroll(newsScroll)
		{
			var topPos = document.getElementById(newsScroll).offsetTop;
			document.getElementById('sidebar-text-news').scrollTop = topPos - 18;
		}
	
	
		function adjustNewsTitle()
	{
			object=document.getElementById('display-title-news');
 			if (object.innerHTML.length > 54)
			object.style.top='58px';
	}
	
	function functionCheck(){
		object = document.getElementById('resize');
		dotts = document.getElementById('dots');
		if(object.style.width=='57px')
		dotts.innerHTML=='...';
		}
		
	function getIndexSlides(){
	var slide1=Math.floor(Math.random()*7);
	var slide3=Math.floor(Math.random()*7);
	while (slide3==slide1){
	slide3=Math.floor(Math.random()*7);
	}
	var slide5=Math.floor(Math.random()*7);
	while ((slide5==slide1) || (slide5==slide3)){
	slide5==Math.floor(Math.random()*7);
	}
	
	var slide2=Math.floor(Math.random()*7);
	var slide4=Math.floor(Math.random()*7);
	while (slide4==slide2){
	slide4=Math.floor(Math.random()*7);
	}
	var slide6=Math.floor(Math.random()*7);
	while ((slide6==slide2) || (slide6==slide4)){
	slide6==Math.floor(Math.random()*7);
	} 
	document.write(slide1);
	document.write(slide2);
	document.write(slide3);
	document.write(slide4);
	document.write(slide5);
	document.write(slide6);
	}
	
	function adjustNewsSidebar(){
	document.getElementById('sidebar-text-project').style.height='223px';
	document.getElementById('sidebar-text-project-links').style.height='0px';
	//document.getElementById('sidebar-title-project-name').style.height='25px';
	document.getElementById('sidebar-divider-end').innerHTML=' ';
	
	}
	
 //OPACITY FUNCTIONS
 

//AJAX FUNCTIONS
var http = false;
var linkMark = 85;
var awardImageFadeTimer;
var fadeInNewsPage;
if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}

function newsBreadcrumb(date) {
	object=document.getElementById('breadcrumb-news-date');
	object.innerHTML=(date);
	
}

function awardsMakeGrey() {
var total = 98;
var count = 0;
for(count = 1; count<total; count++){

object = document.getElementById(count).style.color='#4B5763';
}
}
function awardsimageHide(elemId) {
	
}

function awards(topic, award_id) {
clearTimeout(FadeInAwardsImageTimer);
if (linkMark == award_id) return;
var total = 98;
var count = 0;
for(count = 1; count<=total; count++){
if (count != award_id)
object = document.getElementById(count).style.color='#4B5763';
document.getElementById(award_id).style.color='#f60';
}
if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}
  http.abort();
  url = "resources/~javascript/display-awards.php?award=" + topic;
   http.open("GET", url, true);
   http.onreadystatechange=function() {
    if(http.readyState == 4) {
	clearTimeout(FadeInAwardsImageTimer);
	document.getElementById('awardImage').style.filter='alpha(opacity=0)';
	  document.getElementById('awardImage').style.opacity='0';  
   document.getElementById('awardImage').innerHTML = http.responseText;
		 FadeInAwardsImage('awardImage', 0, 100, 500, 20); 

    }
  }
  http.send(null);
  linkMark = award_id;
}

//EMRAH THIS IS THE FUNCTION THAT IS USED
function newscall(topic, date, total) {
  document.getElementById('display-text-news').style.opacity='0';
  document.getElementById('display-text-news').style.filter='alpha(opacity=0)';
  document.getElementById('display-photo').innerHTML=' ';
  document.getElementById('display-photo').style.opacity='0';
  document.getElementById('display-photo').style.filter='alpha(opacity=0)';
  document.getElementById('display-title-news').style.opacity='0';
  document.getElementById('display-title-news').style.filter='alpha(opacity=0)';
  document.getElementById('ajax-loader').innerHTML='<img src="resources/~images/ajax-loader.gif">';
 
  http.abort();
  url = "resources/~javascript/display-newsold.php?story=" + topic;
  //turns all unselected stories grey, selected story orange
  var count=1;
  for(count=1;count<=total;count++){
  if (document.getElementById(count)){
	object = document.getElementById(count).style.color='#4B5763';
	object = document.getElementById(count).style.fontWeight='normal';
  }
 	object = document.getElementById(topic).style;
	object.color='#F60';
	object.fontWeight='bold';
  }
  //ajax call
  http.open("GET", url, true);
 
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
    
      document.getElementById('news-story').innerHTML = http.responseText;
	      document.getElementById('display-text-news').style.opacity='0';
  document.getElementById('display-text-news').style.filter='alpha(opacity=0)';
  document.getElementById('display-photo').style.opacity='0';
  document.getElementById('display-photo').style.filter='alpha(opacity=0)';
  document.getElementById('display-title-news').style.opacity='0';
  document.getElementById('display-title-news').style.filter='alpha(opacity=0)'
 
	  document.getElementById('ajax-loader').innerHTML=' ';

	fadeInNewsPage = setTimeout("FadeInNewsPage('display-photo'," +  0 + ',' + 100 + ', ' + 500 + ', ' + 20 + ')', 300); 
	adjustNewsTitle();
	FadeInNewsPage('display-title-news', 0, 100, 500, 20);
 	FadeInNewsPage('display-text-news', 0, 100, 500, 20);
    }
  }

  http.send(null);
   
 // setTimeout('newscall2(' + topic + ')', 1100);
}

function newscall2(topic) {
 
  
  http.abort();
  //fetches file which does proper database query
  url = "resources/~javascript/display-news-picture-title.php?story=" + topic;
  
  
  //ajax call
  http.open("GET", url, true);
 
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
	   
      document.getElementById('ajax2').innerHTML = http.responseText;
	
	//fade in new content
	  document.getElementById('ajax-loader').innerHTML=' ';
	  scrollDiv=document.getElementById('display-text-news');
  setTimeout('scrollDiv.scrollUpdate()', 100);
	fadeInNewsPage = setTimeout("FadeInNewsPage('display-photo'," +  0 + ',' + 100 + ', ' + 500 + ', ' + 20 + ')', 300); 
	adjustNewsTitle();
	FadeInNewsPage('display-title-news', 0, 100, 500, 20);
	//FadeInNewsPage('newsAjax', 0, 100, 500, 20);
	//FadeInNewsPage('display-text-news', 0, 100, 500, 20);
    }
	
  }
   
   
  http.send(null);
}
function career() {
		document.getElementById('display-text-benefits').style.left='-4444px';
	clearInterval(slideshowInterval);
var i=1;
for(i=1; i<7; i++){
v="slide" + i;
document.getElementById(v).style.visibility='hidden';
}
  http.abort();

  http.open("GET", "resources/~javascript/display-career.php", true);

  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('slide1').innerHTML = http.responseText;
	  FadeIn('slide1', 0, 100, 500, 20);
    }
  }
  http.send(null);
 }
 
 function careernew() {
  http.abort();

  http.open("GET", "resources/~javascript/display-career.php", true);

  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('slide1').innerHTML = http.responseText;
    }
  }
  http.send(null);
 }
 

function sitemapupdate() {



if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}
  http.abort();
  url = "resources/~javascript/display-sitemap.php";
   http.open("GET", url, true);
   http.onreadystatechange=function() {
    if(http.readyState == 4) {
	 
   document.getElementById('sitemap').innerHTML = http.responseText;
		  

    }
  }
  http.send(null);
  
}
function clearAllLists(){
document.getElementById('clientlistfieldALL').style.left='-1000px';
document.getElementById('clientlistfieldScienceTech').style.left='-1000px';
document.getElementById('clientlistfieldEducation').style.left='-1000px';
document.getElementById('clientlistfieldGovernment').style.left='-1000px';
document.getElementById('clientlistfieldEnergy').style.left='-1000px';
document.getElementById('listtitleALL').style.visibility='hidden';
document.getElementById('listtitleEducation').style.visibility='hidden';
document.getElementById('listtitleEnergy').style.visibility='hidden';
document.getElementById('listtitleGovernment').style.visibility='hidden';
document.getElementById('listtitleScienceTech').style.visibility='hidden';

document.getElementById('clientlistfieldALL').style.opacity='0';
document.getElementById('clientlistfieldScienceTech').style.opacity='0';
document.getElementById('clientlistfieldEducation').style.opacity='0';
document.getElementById('clientlistfieldGovernment').style.opacity='0';
document.getElementById('clientlistfieldEnergy').style.opacity='0';
document.getElementById('listtitleALL').style.opacity='0';
document.getElementById('listtitleEducation').style.opacity='0';
document.getElementById('listtitleEnergy').style.opacity='0';
document.getElementById('listtitleGovernment').style.opacity='0';
document.getElementById('listtitleScienceTech').style.opacity='0';

document.getElementById('clientlistfieldALL').style.filter='alpha(opacity=0)';
document.getElementById('clientlistfieldScienceTech').style.filter='alpha(opacity=0)';
document.getElementById('clientlistfieldEducation').style.filter='alpha(opacity=0)';
document.getElementById('clientlistfieldGovernment').style.filter='alpha(opacity=0)';
document.getElementById('clientlistfieldEnergy').style.filter='alpha(opacity=0)';
document.getElementById('listtitleALL').style.filter='alpha(opacity=0)';
document.getElementById('listtitleEducation').style.filter='alpha(opacity=0)';
document.getElementById('listtitleEnergy').style.filter='alpha(opacity=0)';
document.getElementById('listtitleGovernment').style.filter='alpha(opacity=0)';
document.getElementById('listtitleScienceTech').style.filter='alpha(opacity=0)';


}
function showEducation(){
clearAllLists();

document.getElementById('clientlistfieldEducation').style.left='179px';
document.getElementById('listtitleEducation').style.visibility='visible';
document.getElementById('listtitleEducation').style.left='179px';
FadeInPage('clientsEducation', 0, 100, 500, 20);
FadeInPage('listtitleEducation', 0, 100, 500, 20);
FadeInPage('clientlistfieldEducation', 0, 100, 500, 20);
sidebarClientsToggle('education');
//clientsAjax(2);
 }

function showGovernment(){
clearAllLists();

document.getElementById('clientlistfieldGovernment').style.left='179px';
document.getElementById('listtitleGovernment').style.left='179px';
document.getElementById('listtitleGovernment').style.visibility='visible';
FadeInPage('clientsGovernment', 0, 100, 500, 20);
FadeInPage('listtitleGovernment', 0, 100, 500, 20);
//FadeInPage('dividerGovernment', 0, 100, 500, 20);
FadeInPage('clientlistfieldGovernment', 0, 100, 500, 20);
//document.getElementById('listtitle').innerHTML='GOVERNMENT';
//document.getElementById('listtitle').style.color='#f60';
//document.getElementById('listtitle').style.fontWeight='bold';

sidebarClientsToggle('government');

//clientsAjax(4);
}

function showEnergy(){
clearAllLists();

document.getElementById('clientlistfieldEnergy').style.left='179px';
document.getElementById('listtitleEnergy').style.left='179px';
document.getElementById('listtitleEnergy').style.visibility='visible';
FadeInPage('clientsEnergy', 0, 100, 500, 20);
FadeInPage('listtitleEnergy', 0, 100, 500, 20);
//FadeInPage('dividerEnergy', 0, 100, 500, 20);
FadeInPage('clientlistfieldEnergy', 0, 100, 500, 20);
//document.getElementById('listtitle').innerHTML='ENERGY';
//document.getElementById('listtitle').style.color='#f60';
//document.getElementById('listtitle').style.fontWeight='bold';

sidebarClientsToggle('energy');

//clientsAjax(3);
}

function showScienceAndTechnology(){
clearAllLists();

document.getElementById('clientlistfieldScienceTech').style.left='179px';
document.getElementById('listtitleScienceTech').style.left='179px';
document.getElementById('listtitleScienceTech').style.visibility='visible';
FadeInPage('clientsScienceTech', 0, 100, 500, 20)
FadeInPage('listtitleScienceTech', 0, 100, 500, 20);
//FadeInPage('dividerScienceTech', 0, 100, 500, 20);
FadeInPage('clientlistfieldScienceTech', 0, 100, 500, 20);
//document.getElementById('listtitle').innerHTML='SCIENCE & TECHNOLOGY';
//document.getElementById('listtitle').style.color='#f60';
//document.getElementById('listtitle').style.fontWeight='bold';

sidebarClientsToggle('scienceandtechnology');

//clientsAjax('5');
}

function showAllSectors(){
clearAllLists();

document.getElementById('clientlistfieldALL').style.left='179px';
document.getElementById('listtitleALL').style.left='179px';
document.getElementById('listtitleALL').style.visibility='visible';
FadeInPage('clientsAllSectors', 0, 100, 500, 20);
FadeInPage('listtitleALL', 0, 100, 500, 20);
//FadeInPage('dividerALL', 0, 100, 500, 20);
FadeInPage('clientlistfieldALL', 0, 100, 500, 20);
//document.getElementById('listtitle').innerHTML='ALL SECTORS';
//document.getElementById('listtitle').style.color='#f60';
//document.getElementById('listtitle').style.fontWeight='bold';

sidebarClientsToggle('all');

//clientsAjax('1');
}



function clientsAjax(clientList){
http.abort();
  url = "resources/~javascript/display-clientlist.php?clients=" + clientList;
  clientsFade = document.getElementById('clients').style;
  clientlistfieldFade = document.getElementById('clientlistfield').style;
  listtitleFade = document.getElementById('listtitle').style;
  dividerFade = document.getElementById('divider').style;
  clientsFade.opacity='0';
  clientsFade.filter='alpha(opacity=0)';
  clientlistfieldFade.opacity='0';
  clientlistfieldFade.filter='alpha(opacity=0)';
  listtitleFade.opacity='0';
  listtitleFade.filter='alpha(opacity=0)';
  dividerFade.opacity='0';
  dividerFade.filter='alpha(opacity=0)';
  
   

  http.open("GET", url, true);
  
  http.onreadystatechange=function() {
 // if(http.readyState == 1) {
	//document.getElementById('ajax-call').innerHTML = '<img id=\"ajax-progress-news\" src=\"resources/~images/ajax-loader.gif\">';
 //	}
	//else if(http.readyState == 2) {
	//document.getElementById('ajax-call').innerHTML = '<img id=\"ajax-progress-news\" src=\"resources/~images/ajax-loader.gif\">';
	//}
	//else if(http.readyState == 3) {
	//document.getElementById('ajax-call').innerHTML = '<img id=\"ajax-progress-news\" src=\"resources/~images/ajax-loader.gif\">';
	//}
 if(http.readyState == 4) {
	//  clearTimeout(newsFade);
      document.getElementById('clientlistajax').innerHTML = http.responseText;
	 // if (topic != 130) 
  FadeInPage('clients', 0, 100, 500, 20);
FadeInPage('clientlistfield', 0, 100, 500, 20);
FadeInPage('listtitle', 0, 100, 500, 20);
FadeInPage('divider', 0, 100, 500, 20);

	 
    }
  } 
  scrollDiv=document.getElementById('clientlistfield');
  setTimeout('scrollDiv.scrollUpdate()', 800);
  http.send(null);
  
}

//TOOLTIPS
if (typeof document.attachEvent!='undefined') {
   window.attachEvent('onload',init);
   document.attachEvent('onmousemove',moveMouse);
   document.attachEvent('onclick',checkMove); }
else {
   window.addEventListener('load',init,false);
   document.addEventListener('mousemove',moveMouse,false);
   document.addEventListener('click',checkMove,false);
}

var oDv=document.createElement("div");
var dvHdr=document.createElement("div");
var dvBdy=document.createElement("div");
var windowlock,boxMove,fixposx,fixposy,lockX,lockY,fixx,fixy,ox,oy,boxLeft,boxRight,boxTop,boxBottom,evt,mouseX,mouseY,boxOpen,totalScrollTop,totalScrollLeft;
boxOpen=false;
ox=10;
oy=10;
lockX=0;
lockY=0;

function init() {
	oDv.appendChild(dvHdr);
	oDv.appendChild(dvBdy);
	oDv.style.position="absolute";
	oDv.style.visibility='hidden';
	document.body.appendChild(oDv);	
}

function defHdrStyle() {
	dvHdr.innerHTML='<img  style="vertical-align:middle"  src="info.gif">&nbsp;&nbsp;'+dvHdr.innerHTML;
	dvHdr.style.fontWeight='bold';
	dvHdr.style.width='230px';
	dvHdr.style.fontSize='10px';
	dvHdr.style.fontFamily='arial';
	dvHdr.style.border='1px solid #FF5F00';
	dvHdr.style.padding='3';
	dvHdr.style.fontSize='11';
	dvHdr.style.color='#4B5763';
	dvHdr.style.background='#CDC9C4';
	dvHdr.style.filter='alpha(opacity=85)'; // IE
	dvHdr.style.opacity='0.85'; // FF
	dvHdr.style.textAlign='left';
	//dvHdr.style.z-index='99';
}

function defBdyStyle() {
	dvBdy.style.borderBottom='1px solid #FF5F00';
	dvBdy.style.borderLeft='1px solid #FF5F00';
	dvBdy.style.borderRight='1px solid #FF5F00';
	dvBdy.style.width='230px';
	dvBdy.style.fontFamily='arial';
	dvBdy.style.fontSize='10px';
	dvBdy.style.padding='3';
	dvBdy.style.color='#4B5763';
	dvBdy.style.background='#FFFFFF';
	dvBdy.style.filter='alpha(opacity=85)'; // IE
	dvBdy.style.opacity='0.85'; // FF
	dvHdr.style.textAlign='left';

	//dvBdy.style.z-index='99';

}

function checkElemBO(txt) {
if (!txt || typeof(txt) != 'string') return false;
if ((txt.indexOf('header')>-1)&&(txt.indexOf('body')>-1)&&(txt.indexOf('[')>-1)&&(txt.indexOf('[')>-1)) 
   return true;
else
   return false;
}

function scanBO(curNode) {
	  if (checkElemBO(curNode.title)) {
         curNode.boHDR=getParam('header',curNode.title);
         curNode.boBDY=getParam('body',curNode.title);
			curNode.boCSSBDY=getParam('cssbody',curNode.title);			
			curNode.boCSSHDR=getParam('cssheader',curNode.title);
			curNode.IEbugfix=(getParam('hideselects',curNode.title)=='on')?true:false;
			curNode.fixX=parseInt(getParam('fixedrelx',curNode.title));
			curNode.fixY=parseInt(getParam('fixedrely',curNode.title));
			curNode.absX=parseInt(getParam('fixedabsx',curNode.title));
			curNode.absY=parseInt(getParam('fixedabsy',curNode.title));
			curNode.offY=(getParam('offsety',curNode.title)!='')?parseInt(getParam('offsety',curNode.title)):10;
			curNode.offX=(getParam('offsetx',curNode.title)!='')?parseInt(getParam('offsetx',curNode.title)):10;
			curNode.fade=(getParam('fade',curNode.title)=='on')?true:false;
			curNode.fadespeed=(getParam('fadespeed',curNode.title)!='')?getParam('fadespeed',curNode.title):0.04;
			curNode.delay=(getParam('delay',curNode.title)!='')?parseInt(getParam('delay',curNode.title)):0;
			if (getParam('requireclick',curNode.title)=='on') {
				curNode.requireclick=true;
				document.all?curNode.attachEvent('onclick',showHideBox):curNode.addEventListener('click',showHideBox,false);
				document.all?curNode.attachEvent('onmouseover',hideBox):curNode.addEventListener('mouseover',hideBox,false);
			}
			else {// Note : if requireclick is on the stop clicks are ignored   			
   			if (getParam('doubleclickstop',curNode.title)!='off') {
   				document.all?curNode.attachEvent('ondblclick',pauseBox):curNode.addEventListener('dblclick',pauseBox,false);
   			}	
   			if (getParam('singleclickstop',curNode.title)=='on') {
   				document.all?curNode.attachEvent('onclick',pauseBox):curNode.addEventListener('click',pauseBox,false);
   			}
   		}
			curNode.windowLock=getParam('windowlock',curNode.title).toLowerCase()=='off'?false:true;
			curNode.title='';
			curNode.hasbox=1;
	   }
	   else
	      curNode.hasbox=2;   
}


function getParam(param,list) {
	var reg = new RegExp('([^a-zA-Z]' + param + '|^' + param + ')\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]');
	var res = reg.exec(list);
	var returnvar;
	if(res)
		return res[2].replace('[[','[').replace(']]',']');
	else
		return '';
}

function Left(elem){	
	var x=0;
	if (elem.calcLeft)
		return elem.calcLeft;
	var oElem=elem;
	while(elem){
		 if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderLeftWidth)))&&(x!=0))
		 	x+=parseInt(elem.currentStyle.borderLeftWidth);
		 x+=elem.offsetLeft;
		 elem=elem.offsetParent;
	  } 
	oElem.calcLeft=x;
	return x;
	}

function Top(elem){
	 var x=0;
	 if (elem.calcTop)
	 	return elem.calcTop;
	 var oElem=elem;
	 while(elem){		
	 	 if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderTopWidth)))&&(x!=0))
		 	x+=parseInt(elem.currentStyle.borderTopWidth); 
		 x+=elem.offsetTop;
	         elem=elem.offsetParent;
 	 } 
 	 oElem.calcTop=x;
 	 return x;
 	 
}

var ah,ab;
function applyStyles() {
	if(ab)
		oDv.removeChild(dvBdy);
	if (ah)
		oDv.removeChild(dvHdr);
	dvHdr=document.createElement("div");
	dvBdy=document.createElement("div");
	CBE.boCSSBDY?dvBdy.className=CBE.boCSSBDY:defBdyStyle();
	CBE.boCSSHDR?dvHdr.className=CBE.boCSSHDR:defHdrStyle();
	dvHdr.innerHTML=CBE.boHDR;
	dvBdy.innerHTML=CBE.boBDY;
	ah=false;
	ab=false;
	if (CBE.boHDR!='') {		
		oDv.appendChild(dvHdr);
		ah=true;
	}	
	if (CBE.boBDY!=''){
		oDv.appendChild(dvBdy);
		ab=true;
	}	
}

var CSE,iterElem,LSE,CBE,LBE, totalScrollLeft, totalScrollTop, width, height ;
var ini=false;

// Customised function for inner window dimension
function SHW() {
   if (document.body && (document.body.clientWidth !=0)) {
      width=document.body.clientWidth;
      height=document.body.clientHeight;
   }
   if (document.documentElement && (document.documentElement.clientWidth!=0) && (document.body.clientWidth + 20 >= document.documentElement.clientWidth)) {
      width=document.documentElement.clientWidth;   
      height=document.documentElement.clientHeight;   
   }   
   return [width,height];
}


var ID=null;
function moveMouse(e) {
   //boxMove=true;
	e?evt=e:evt=event;
	
	CSE=evt.target?evt.target:evt.srcElement;
	
	if (!CSE.hasbox) {
	   // Note we need to scan up DOM here, some elements like TR don't get triggered as srcElement
	   iElem=CSE;
	   while ((iElem.parentNode) && (!iElem.hasbox)) {
	      scanBO(iElem);
	      iElem=iElem.parentNode;
	   }	   
	}
	
	if ((CSE!=LSE)&&(!isChild(CSE,dvHdr))&&(!isChild(CSE,dvBdy))){		
	   if (!CSE.boxItem) {
			iterElem=CSE;
			while ((iterElem.hasbox==2)&&(iterElem.parentNode))
					iterElem=iterElem.parentNode; 
			CSE.boxItem=iterElem;
			}
		iterElem=CSE.boxItem;
		if (CSE.boxItem&&(CSE.boxItem.hasbox==1))  {
			LBE=CBE;
			CBE=iterElem;
			if (CBE!=LBE) {
				applyStyles();
				if (!CBE.requireclick)
					if (CBE.fade) {
						if (ID!=null)
							clearTimeout(ID);
						ID=setTimeout("fadeIn("+CBE.fadespeed+")",CBE.delay);
					}
					else {
						if (ID!=null)
							clearTimeout(ID);
						COL=1;
						ID=setTimeout("oDv.style.visibility='visible';ID=null;",CBE.delay);						
					}
				if (CBE.IEbugfix) {hideSelects();} 
				fixposx=!isNaN(CBE.fixX)?Left(CBE)+CBE.fixX:CBE.absX;
				fixposy=!isNaN(CBE.fixY)?Top(CBE)+CBE.fixY:CBE.absY;			
				lockX=0;
				lockY=0;
				boxMove=true;
				ox=CBE.offX?CBE.offX:10;
				oy=CBE.offY?CBE.offY:10;
			}
		}
		else if (!isChild(CSE,dvHdr) && !isChild(CSE,dvBdy) && (boxMove))	{
			// The conditional here fixes flickering between tables cells.
			if ((!isChild(CBE,CSE)) || (CSE.tagName!='TABLE')) {   			
   			CBE=null;
   			if (ID!=null)
  					clearTimeout(ID);
   			fadeOut();
   			showSelects();
			}
		}
		LSE=CSE;
	}
	else if (((isChild(CSE,dvHdr) || isChild(CSE,dvBdy))&&(boxMove))) {
		totalScrollLeft=0;
		totalScrollTop=0;
		
		iterElem=CSE;
		while(iterElem) {
			if(!isNaN(parseInt(iterElem.scrollTop)))
				totalScrollTop+=parseInt(iterElem.scrollTop);
			if(!isNaN(parseInt(iterElem.scrollLeft)))
				totalScrollLeft+=parseInt(iterElem.scrollLeft);
			iterElem=iterElem.parentNode;			
		}
		if (CBE!=null) {
			boxLeft=Left(CBE)-totalScrollLeft;
			boxRight=parseInt(Left(CBE)+CBE.offsetWidth)-totalScrollLeft;
			boxTop=Top(CBE)-totalScrollTop;
			boxBottom=parseInt(Top(CBE)+CBE.offsetHeight)-totalScrollTop;
			doCheck();
		}
	}
	
	if (boxMove&&CBE) {
		// This added to alleviate bug in IE6 w.r.t DOCTYPE
		bodyScrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
		bodyScrollLet=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;
		mouseX=evt.pageX?evt.pageX-bodyScrollLet:evt.clientX-document.body.clientLeft;
		mouseY=evt.pageY?evt.pageY-bodyScrollTop:evt.clientY-document.body.clientTop;
		if ((CBE)&&(CBE.windowLock)) {
			mouseY < -oy?lockY=-mouseY-oy:lockY=0;
			mouseX < -ox?lockX=-mouseX-ox:lockX=0;
			mouseY > (SHW()[1]-oDv.offsetHeight-oy)?lockY=-mouseY+SHW()[1]-oDv.offsetHeight-oy:lockY=lockY;
			mouseX > (SHW()[0]-dvBdy.offsetWidth-ox)?lockX=-mouseX-ox+SHW()[0]-dvBdy.offsetWidth:lockX=lockX;			
		}
		oDv.style.left=((fixposx)||(fixposx==0))?fixposx:bodyScrollLet+mouseX+ox+lockX+"px";
		oDv.style.top=((fixposy)||(fixposy==0))?fixposy:bodyScrollTop+mouseY+oy+lockY+"px";		
		
	}
}

function doCheck() {	
	if (   (mouseX < boxLeft)    ||     (mouseX >boxRight)     || (mouseY < boxTop) || (mouseY > boxBottom)) {
		if (!CBE.requireclick)
			fadeOut();
		if (CBE.IEbugfix) {showSelects();}
		CBE=null;
	}
}

function pauseBox(e) {
   e?evt=e:evt=event;
	boxMove=false;
	evt.cancelBubble=true;
}

function showHideBox(e) {
	oDv.style.visibility=(oDv.style.visibility!='visible')?'visible':'hidden';
}

function hideBox(e) {
	oDv.style.visibility='hidden';
}

var COL=0;
var stopfade=false;
function fadeIn(fs) {
		ID=null;
		COL=0;
		oDv.style.visibility='visible';
		fadeIn2(fs);
}

function fadeIn2(fs) {
		COL=COL+fs;
		COL=(COL>1)?1:COL;
		oDv.style.filter='alpha(opacity='+parseInt(100*COL)+')';
		oDv.style.opacity=COL;
		if (COL<1)
		 setTimeout("fadeIn2("+fs+")",20);		
}


function fadeOut() {
	oDv.style.visibility='hidden';
	
}

function isChild(s,d) {
	while(s) {
		if (s==d) 
			return true;
		s=s.parentNode;
	}
	return false;
}

var cSrc;
function checkMove(e) {
	e?evt=e:evt=event;
	cSrc=evt.target?evt.target:evt.srcElement;
	if ((!boxMove)&&(!isChild(cSrc,oDv))) {
		fadeOut();
		if (CBE&&CBE.IEbugfix) {showSelects();}
		boxMove=true;
		CBE=null;
	}
}

function showSelects(){
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++){
      elements[i].style.visibility='visible';
   }
}

function hideSelects(){
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++){
   elements[i].style.visibility='hidden';
   }
}

//SITEMAP
function stoggleHighlight(elemId)
{
	object = document.getElementById(elemId);
	object.style.color='#f60';
	if (elemId == 'Smbtn1')
	{
	document.getElementById('Smbtn2').style.color='#4B5763';
 
	}
	else if (elemId == 'Smbtn2')
	{
	document.getElementById('Smbtn1').style.color='#4B5763';
 
	}
	else if (elemId == 'Smbtn3')
	{
	document.getElementById('Smbtn1').style.color='#4B5763';
	document.getElementById('Smbtn2').style.color='#4B5763';
	}
}


function showSiteMap(){
	document.getElementById('display-copyright').style.visibility='hidden';
	document.getElementById('sitemap').style.left='179px';
	var object = document.getElementById('sitemap').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.visibility = "visible";
	FadeIn('sitemap', 0, 100, 500, 20)
	var object2 = document.getElementById('display-copyright').style;
	object2.left = "-4444px";
}

function showCopyright(){
	document.getElementById('sitemap').style.visibility='hidden';
	document.getElementById('sitemap').style.left='-4444px';
	var object2 = document.getElementById('display-copyright').style;
	object2.filter = "alpha(opacity=0)";
	object2.opacity = "0";
	object2.left = "179px";
		FadeIn('display-copyright', 0, 100, 500, 20)
	var object3 = document.getElementById('sitemap').style;
	object3.left = "-4444px";
	
}

function showSiteInfo(){

	var object = document.getElementById('sitemap').style;
	object.visibility = "hidden";
	var object2 = document.getElementById('display-copyright').style;
	object2.left = "-4444px";
	var object3 = document.getElementById('site-info').style;
	object3.filter = "alpha(opacity=0)";
	object3.opacity = "0";
	object3.left="179px";
	FadeIn('site-info', 0, 100, 500, 20)

}
//FIRM PROFILE
function ftoggleHighlight(elemId)
{
	object = document.getElementById(elemId);
	object.style.color='#f60';
	if (elemId == 'fbtn1')
	{
	document.getElementById('fbtn2').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn2')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn3')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	document.getElementById('fbtn2').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn4')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	document.getElementById('fbtn2').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';

	}
}

function ftoggleHighlight1(elemId)
{
	object = document.getElementById(elemId);
	object.style.color='#f60';
	if (elemId == 'fbtn1')
	{
	document.getElementById('fbtn2').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn2')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn3')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	document.getElementById('fbtn2').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn4')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	document.getElementById('fbtn2').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';

	}

}


function environmentToggleHighlight(elemId)
{
	object = document.getElementById(elemId);
	object.style.color='#09630B';
	if (elemId == 'fbtn1')
	{
	document.getElementById('fbtn2').style.color='#4B5763';
	document.getElementById('fbtn3').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn2')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	document.getElementById('fbtn3').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn3')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	document.getElementById('fbtn2').style.color='#4B5763';
	document.getElementById('fbtn4').style.color='#4B5763';

	}
	else if (elemId == 'fbtn4')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
	document.getElementById('fbtn2').style.color='#4B5763';
	document.getElementById('fbtn3').style.color='#4B5763';

	}
}

function newenvironmentToggleHighlight(elemId)
{
	object = document.getElementById(elemId);
	object.style.color='#f60';
	if (elemId == 'fbtn1')
	{
	document.getElementById('fbtn2').style.color='#4B5763';
	}
	else if (elemId == 'fbtn2')
	{
	document.getElementById('fbtn1').style.color='#4B5763';
}
}

function showWhoWeAre(){
	document.getElementById('whatWeDo').style.left='-1111px';
	//document.getElementById('history').style.left='-1111px';
	document.getElementById('leadership').style.left='-1111px';
	clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('whoWeAre').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('whoWeAre', 0, 100, 500, 20)
	
}
function showWhatWeDo(){
	document.getElementById('whoWeAre').style.left='-1111px';
	//document.getElementById('history').style.left='-1111px';
	document.getElementById('leadership').style.left='-1111px';
clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('whatWeDo').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('whatWeDo', 0, 100, 500, 20)

}
function showHistory(){
	document.getElementById('whoWeAre').style.left='-1111px';
	document.getElementById('whatWeDo').style.left='-1111px';
	document.getElementById('leadership').style.left='-1111px';
clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('history').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('history', 0, 100, 500, 20)

}
function showLeadership(){
	document.getElementById('whoWeAre').style.left='-1111px';
	document.getElementById('whatWeDo').style.left='-1111px';
	//document.getElementById('history').style.left='-1111px';
clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('leadership').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('leadership', 0, 100, 500, 20)

}

function showWhoWeAre1(){
	document.getElementById('whatWeDo').style.left='-1111px';
	//document.getElementById('history').style.left='-1111px';
	document.getElementById('leadership').style.left='-1111px';
	document.getElementById('corevalues').style.left='-1111px';

	clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('whoWeAre').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('whoWeAre', 0, 100, 500, 20)
	
}
function showWhatWeDo1(){
	document.getElementById('whoWeAre').style.left='-1111px';
	//document.getElementById('history').style.left='-1111px';
	document.getElementById('leadership').style.left='-1111px';	document.getElementById('corevalues').style.left='-1111px';

clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('whatWeDo').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('whatWeDo', 0, 100, 500, 20)

}
function showHistory1(){
	document.getElementById('whoWeAre').style.left='-1111px';
	document.getElementById('whatWeDo').style.left='-1111px';
	document.getElementById('leadership').style.left='-1111px';	document.getElementById('corevalues').style.left='-1111px';

clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('history').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('history', 0, 100, 500, 20)

}
function showLeadership1(){
	document.getElementById('whoWeAre').style.left='-1111px';
	document.getElementById('whatWeDo').style.left='-1111px';	document.getElementById('corevalues').style.left='-1111px';

	//document.getElementById('history').style.left='-1111px';
clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('leadership').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('leadership', 0, 100, 500, 20)

}

function showCoreValues(){
	document.getElementById('whoWeAre').style.left='-1111px';
	document.getElementById('whatWeDo').style.left='-1111px';	document.getElementById('leadership').style.left='-1111px';

	//document.getElementById('history').style.left='-1111px';
clearInterval(slideshowInterval);
	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	var object = document.getElementById('corevalues').style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('corevalues', 0, 100, 500, 20)

}

function showPlanet()
{
 	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	
	document.getElementById('textEco').style.opacity='0';
	document.getElementById('textEco').style.filter='alpha(opacity=0)';
	document.getElementById('textLeedProjects').style.opacity='0';
	document.getElementById('textLeedProjects').style.filter='alpha(opacity=0)';
	document.getElementById('textLeedProjects').style.left='-888888px';
	document.getElementById('textEco').style.left='-888888px';
	document.getElementById('textPlanet').style.left='179px';

	var opacityValue = document.getElementById('textPlanet').style.opacity;
	if (opacityValue=='0')
	FadeIn('textPlanet', 0, 100, 500, 20);
}

function newshowPlanet()
{
 	var i=1;
	for(i=1; i<3; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	

	document.getElementById('textLeedProjects').style.opacity='0';
	document.getElementById('textLeedProjects').style.filter='alpha(opacity=0)';
	document.getElementById('textLeedProjects').style.left='-888888px';

	document.getElementById('textPlanet').style.left='179px';

	var opacityValue = document.getElementById('textPlanet').style.opacity;
	if (opacityValue=='0')
	FadeIn('textPlanet', 0, 100, 500, 20);
}

function showEco()
{
 	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	
	document.getElementById('textPlanet').style.opacity='0';
	document.getElementById('textPlanet').style.filter='alpha(opacity=0)';
	document.getElementById('textLeedProjects').style.opacity='0';
	document.getElementById('textLeedProjects').style.filter='alpha(opacity=0)';
	document.getElementById('textLeedProjects').style.left='-888888px';
	document.getElementById('textPlanet').style.left='-888888px';
	document.getElementById('textEco').style.left='179px';
	var opacityValue = document.getElementById('textEco').style.opacity;
	if (opacityValue=='0')
	FadeIn('textEco', 0, 100, 500, 20);
}

function showLeedProjects()
{
 	var i=1;
	for(i=1; i<6; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	
	document.getElementById('textPlanet').style.opacity='0';
	document.getElementById('textPlanet').style.filter='alpha(opacity=0)';
	document.getElementById('textPlanet').style.left='-888888px';
	document.getElementById('textEco').style.opacity='0';
	document.getElementById('textEco').style.filter='alpha(opacity=0)';
	document.getElementById('textEco').style.left='-888888px';
	document.getElementById('textLeedProjects').style.left='179px';
	var opacityValue = document.getElementById('textLeedProjects').style.opacity;
	if (opacityValue=='0')
	FadeIn('textLeedProjects', 0, 100, 500, 20);
}

function newshowLeedProjects()
{
 	var i=1;
	for(i=1; i<3; i++){
	v='slide' + i;
	document.getElementById(v).style.visibility='hidden';
	}
	
	document.getElementById('textPlanet').style.opacity='0';
	document.getElementById('textPlanet').style.filter='alpha(opacity=0)';
	document.getElementById('textPlanet').style.left='-888888px';
	document.getElementById('textLeedProjects').style.left='179px';
	var opacityValue = document.getElementById('textLeedProjects').style.opacity;
	if (opacityValue=='0')
	FadeIn('textLeedProjects', 0, 100, 500, 20);
}


//CAREERS
var toggle = 0;

function changeWorkingAtEYP() {
var employment = document.getElementById("slide1");
clearInterval(slideshowInterval);
var i=1;
for(i=1; i<7; i++){
v="slide" + i;
document.getElementById(v).style.visibility='hidden';
}

employment.style.visibility='hidden';
FadeIn('slide1', 0, 100, 500, 20);
employment.innerHTML = "<p class=\"no_margin\"><p>EYP is a design firm dedicated to creating better places to live, work, and learn. We work collaboratively in interdisciplinary teams of architects, planners and engineers to respond to design challenges with intellectual rigor, imagination and clear communications. We approach design as an intellectual exercise combining creativity, program-specific knowledge and technical expertise.</p>"
+ "<p>Design excellence, systems integration, client service, and sustainability are the cornerstones of our practice. We cultivate a spirit of innovation, collaboration, respect, and individual growth.</p>"
+ "<p>We design buildings for people: citizens, public servants, students, scholars. We work collaboratively with our clients and our colleagues to create places that welcome, inspire and challenge.</p>"
+ "<p>EYP offers a competitive salary plan designed to reward performance and comprehensive benefits packages. If you share in our commitment to designing better places to live, work & learn, please review our listing of open positions and submit your resume.</p>"
+ "<p>EYP is an Equal Opportunity Employer.</p>"
;
benefits = document.getElementById('display-text-benefits');
benefits.style.left = '-1001px'; 
benefits.style.opacity = '0';
benefits.style.filter = 'alpha(opacity=0)';

}

function changeBenefits() {
var employment = document.getElementById("slide1");
clearInterval(slideshowInterval);
var i=1;
for(i=1; i<7; i++){
v="slide" + i;
document.getElementById(v).style.visibility='hidden';
}
employment.style.visibility='hidden';
FadeIn('slide1', 0, 100, 500, 20);
employment.innerHTML = "<p class=\no_margin\"><p>EYP's benefit package is designed to best meet the needs of you and your family. We consider the EYP-employee" 
+ " relationship to be a true partnership. As such, EYP offers customized plans and programs that provide the highest measures of " 
+"personal security and well-being for our staff.</p></p>";
var object = document.getElementById('display-text-benefits');
object.style.left = "179px";

object.style.visibility = "hidden";
FadeIn('display-text-benefits', 0, 100, 500, 20);


}


function showJobSearch()
{
	imageFade(0, 100, 'job-search', 80, 100);
//	object = document.getElementById('job-search');
//	object.style.visibility = 'visible';
}


function hideJobSearch()
{
	object = document.getElementById('job-search').style;
	object.visibility = 'hidden';
}

function toggleHighlight(elemId)
{
	object = document.getElementById(elemId);
	object.style.color='#f60';
	if (elemId == 'cbutton1')
	{
	document.getElementById('cbutton2').style.color='#4B5763';
	document.getElementById('cbutton3').style.color='#4B5763';
	}
	else if (elemId == 'cbutton2')
	{
	document.getElementById('cbutton1').style.color='#4B5763';
 	document.getElementById('cbutton3').style.color='#4B5763';

	}
	else if (elemId == 'cbutton3')
	{
	document.getElementById('cbutton1').style.color='#4B5763';
	document.getElementById('cbutton2').style.color='#4B5763';	
	}
}

function toggleGrayCareerMenu(){
object1=document.getElementById('cbutton1');
object2=document.getElementById('cbutton2');
if (object1.style.color=='#f60')
object1.style.color='#4B5763';
if (object2.style.color=='#f60')
object2.style.color='#4B5763';
}
function ShowLocations() {
document.getElementById('menu-openings-disciplines').style.visibility='hidden';
document.getElementById('menu-openings-disciplines').style.opacity='0';
document.getElementById('menu-openings-disciplines').style.filter='alpha(opacity=0)';
document.getElementById('menu-openings-locations').style.visibility='visible';
FadeOpacityMenus('menu-openings-locations', 0, 100, 500, 20)
}

function ShowDisciplines() {
document.getElementById('menu-openings-locations').style.visibility='hidden';
document.getElementById('menu-openings-locations').style.opacity='0';
document.getElementById('menu-openings-locations').style.filter='alpha(opacity=0)';
document.getElementById('menu-openings-disciplines').style.visibility='visible';
FadeOpacityMenus('menu-openings-disciplines', 0, 100, 500, 20)
}
//ENERGYSERVICES
function showOverview()
{
document.getElementById('energyconservationplanning').style.left='-5000px';
document.getElementById('constructionandimplementation').style.left='-5000px';
document.getElementById('energyaudits').style.left='-5000px';
document.getElementById('openingText').style.left='179px';
}

function showEnergyAuditing()
{
document.getElementById('openingText').style.left='-5000px';
document.getElementById('energyconservationplanning').style.left='-5000px';
document.getElementById('constructionandimplementation').style.left='-5000px';
document.getElementById('energyaudits').style.left='179px';
}
 

function showEnergyDesign()
{
document.getElementById('openingText').style.left='-5000px';
document.getElementById('energyaudits').style.left='-5000px';
document.getElementById('constructionandimplementation').style.left='-5000px';
document.getElementById('energyconservationplanning').style.left='179px';
}
 

function showEnergyImplementation()
{
document.getElementById('openingText').style.left='-5000px';
document.getElementById('energyaudits').style.left='-5000px';
document.getElementById('energyconservationplanning').style.left='-5000px';
document.getElementById('constructionandimplementation').style.left='179px';
}

function toggleHighlightENERGYNEW(elemId)
{
 	object = document.getElementById(elemId);
	object.style.color='#f60';
	if (elemId == 'button1')
	{
	document.getElementById('button2').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button3').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button4').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';

	}
	else if (elemId == 'button2')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button3').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button4').style.color='#4B5763';
	}
	

		else if (elemId == 'button3')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button4').style.color='#4B5763';


	}

		else if (elemId == 'button4')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button3').style.color='#4B5763';


	}

}

function toggleHighlightENERGY(elemId)
{
 	object = document.getElementById(elemId);
	object.style.color='#2f8841';
	if (elemId == 'button1')
	{
	document.getElementById('button2').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';
	}
	else if (elemId == 'button2')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}
	

		else if (elemId == 'button5')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}

		else if (elemId == 'button7')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}

		else if (elemId == 'button9')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
//	document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}
		else if (elemId == 'button10')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}
		else if (elemId == 'button11')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}
		else if (elemId == 'button12')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}
		else if (elemId == 'button13')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}
		else if (elemId == 'button14')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';
	document.getElementById('button15').style.color='#4B5763';

	}
		else if (elemId == 'button15')
	{
		document.getElementById('button1').style.color='#4B5763';
	//document.getElementById('button3').style.color='#4B5763';
	document.getElementById('button2').style.color='#4B5763';
	document.getElementById('button5').style.color='#4B5763';
	//document.getElementById('button6').style.color='#4B5763';
	document.getElementById('button7').style.color='#4B5763';
	//document.getElementById('button8').style.color='#4B5763';
	document.getElementById('button9').style.color='#4B5763';
	document.getElementById('button10').style.color='#4B5763';
	document.getElementById('button11').style.color='#4B5763';
	document.getElementById('button12').style.color='#4B5763';
	document.getElementById('button13').style.color='#4B5763';
	document.getElementById('button14').style.color='#4B5763';
	//document.getElementById('button4').style.color='#4B5763';

	}
}


function showService(service){
	var i=1;
	for (i=1; i<16; i++){
	document.getElementById('service' + i).style.left='-1111px';
	}
	var object = document.getElementById(('service' + service)).style;
	object.filter = "alpha(opacity=0)";
	object.opacity = "0";
	object.left = "179px";
	FadeIn('service' + service, 0, 100, 500, 20)
	
}

//OPACITY FUNCTIONS
var FadeInTimer;
var FadeOutTimer;
var FadeInOpacityStepTimer;
var FadeOutOpacityStepTimer;
var menuNotify = 0;
var menuFade;
var menuInFade;
var menuFadeStep;
var newsFade;
var awardsFadeOut;
var FadeInPageTimer;
var awardsFadeOutTimer;
var FadeOutAwardOpacityStepTimer;
var awardsFade;
var FadeInMenuInTimeTimer;
var FadeMenuInTimer;
var FadeMenuOpacityStepTimer;
var FadeOutMainMenuTimer;
var FadeInAwardsImageTimer;
var count;
var FadeInProjectMenuTimer;
var FadeInExpertsTimer;
var FadeOutExpertsMenuBox;
var FadeInPresentationsTimer;
var FadeOutPresentationsMenuBox;
//ELEMENTAL FADE FUNCTIONS
function MakeHidden(elemId)
{
	object = document.getElementById(elemId);
	object.style.visibility='hidden';
}

function FadeInOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	object = document.getElementById(elemId);
	object.style.visibility='visible';
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
	
    if (stepNum < steps)
    FadeInOpacityStepTimer=setTimeout("FadeInOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", 500);
	

	}

function FadeIn(elemId, fromOpacity, toOpacity, time, fps)
{
	object = document.getElementById(elemId);
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	
	FadeInTimer = setTimeout("FadeOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

function FadeOut(elemId, fromOpacity, toOpacity, time, fps)
{
	object = document.getElementById(elemId);
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	
	FadeOutTimer = setTimeout("FadeOutOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

function FadeOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	object = document.getElementById(elemId);
	object.style.visibility='visible';
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));

    if (stepNum < steps)
       menuFadeStep=setTimeout("FadeOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	}
	

function FadeOutOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
    if (stepNum < steps)
    FadeOutOpacityStepTimer=setTimeout("FadeOutOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", 500);
	object = document.getElementById(elemId);

	}

function SetOpacity(elem, opacityAsInt)
{
	var opacityAsDecimal = opacityAsInt;
	
	if (opacityAsInt > 100)
		opacityAsInt = opacityAsDecimal = 100; 
	else if (opacityAsInt < 0)
		opacityAsInt = opacityAsDecimal = 0; 
	
	opacityAsDecimal /= 100;
	
	
	elem.style.opacity = opacityAsDecimal;
	elem.style.filter  = "alpha(opacity=" + opacityAsInt + ")";
}

function KeepIn(elemId, fromOpacity, toOpacity, time, fps)
{
	clearTimeout(FadeOutMainMenuTimer);
	object = document.getElementById(elemId);
	object.style.visibility = 'visible';
	object.style.opacity='1';
	object.style.filter= 'alpha(opacity=100)';
	
}


	//fades in a flexcroll element to sidebar(700px left)
function FadeInWithScrollbar(elemId, fromOpacity, toOpacity, time, fps, left)
{	
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	//FadeInWithScrollbarStep(elemId, 0, steps, fromOpacity, delta, (time/steps));
	setTimeout("FadeInWithScrollbarStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
	
	}
	
function FadeInWithScrollbarStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
	{
	object = document.getElementById(elemId);
	object.style.left='700px';
    
	SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
	
    if (stepNum < steps)
       menuFadeStep = setTimeout("FadeInWithScrollbarStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	
	
	}

//PAGE FADE-INS

function FadePageOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));

    if (stepNum < steps)
       menuFadeStep=setTimeout("FadePageOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	}
	
	
function FadeInPage(elemId, fromOpacity, toOpacity, time, fps)
{
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	FadeInPageTimer = setTimeout("FadePageOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

function FadeInPageWithScrollbar(elemId, fromOpacity, toOpacity, time, fps)
{	
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	//FadeInWithScrollbarStep(elemId, 0, steps, fromOpacity, delta, (time/steps));
	setTimeout("FadeInPageWithScrollbarStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
	
	}
	
function FadeInPageWithScrollbarStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
	{
	object = document.getElementById(elemId);
	object.style.left='700px';
    
	SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
	
    if (stepNum < steps)
       pagescrollFadeStep = setTimeout("FadeInPageWithScrollbarStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	
	
	}
	
	
//MAIN MENU FADE FUNCTIONS
function FadeOutMainMenu(elemId, fromOpacity, toOpacity, time, fps)
{	clearTimeout(FadeMenuOpacityStepTimer);
	//var FadeOutMainMenuClear = setTimeout("clearTimeout(" + FadeMenuOpacityStepTimer + ")", 200);
	clearTimeout(FadeMenuInTimer);
	clearTimeout(FadeInMenuInTimeTimer);
	
	FadeOutMainMenuTimer = setTimeout("MakeHidden('" + elemId + "')", 800);


	


	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	//FadeOutMainMenuTimer = set
}




function FadeMenuInTime(elemId, fromOpacity, toOpacity, time, fps)
{
	var portfolio = document.getElementById('submenu_portfolio');
	var expertise = document.getElementById('submenu_expertise');	
	var aboutus = document.getElementById('submenu_about');
	var sustainability = document.getElementById('submenu_sustainability');
	if (elemId == 'submenu_portfolio'){
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	sustainability.style.visibility = 'hidden';
	sustainability.style.opacity = '0';
	sustainability.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_expertise'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	sustainability.style.visibility = 'hidden';
	sustainability.style.opacity = '0';
	sustainability.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_sustainability'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_about'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	sustainability.style.visibility = 'hidden';
	sustainability.style.opacity = '0';
	sustainability.style.filter = 'alpha(opacity=0)';}
	
	FadeInMenuInTimeTimer = setTimeout("FadeMenuIn('" + elemId + "', " + fromOpacity + ", " + toOpacity + ", " + time + ", " + fps + ")", 200);
	
	}
function FadeOutMainMenuTime(elemId, fromOpacity, toOpacity, time, fps)
{
		FadeOutMainMenu(elemId, fromOpacity, toOpacity, time, fps);
	
	}	
	
	
function FadeMenuIn(elemId, fromOpacity, toOpacity, time, fps)
{


	
	
	object = document.getElementById(elemId);
	
		
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	
	FadeMenuInTimer = setTimeout("FadeMenuOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

function FadeMenuOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	object = document.getElementById(elemId);
	object.style.visibility='visible';
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));

    if (stepNum < steps)
      FadeMenuOpacityStepTimer = setTimeout("FadeMenuOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	}

//PROJECT MENU FADE FUNCTIONS

function ClearProjectTimeout () {
clearTimeout(FadeInProjectMenuTimer);
}


 function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

 var FadeOutProjectMenuBox;
 
function FadeInProjectMenu(popUp, linkArea)
	{
		if (FadeOutProjectMenuBox)
		clearTimeout(FadeOutProjectMenuBox);
 		var projects;
		var links = document.getElementById("projects_links");
		var list = links.getElementsByTagName("ul");
		for (var i = 0; i < list.length; i++) { 
		list[i].style.visibility="hidden";
		//projects = list[i].("status");
		}
 		popUpTop = document.getElementById(popUp).style;
		var pagePosition = getPosition( 'page' );
		var scrollPosition = getScroll( 'project_menu' );
		//(((pagePosition[1]) + scrollPosition )) + 'px';
		var pageToFind = document.getElementById('wrapper');
		var pageCoords = findPosY(pageToFind);
		var elemToFind = document.getElementById(linkArea);
		var elemCoords = findPosY(elemToFind);
 		var topValue = (elemCoords - pageCoords + 'px') ;
		c = topValue.toString();
		popUpTop.top = c;
		document.getElementById(popUp).style.visibility="visible";
		 
	}


function FadeOutProjectMenu(elemId)
	{
		FadeOutProjectMenuBox = setTimeout("MakeHidden('" + elemId + "')", 600);
	}	
	
	function getPosition( itemID ) 
{
	if(!document.getElementById(itemID)) return;
	var object = document.getElementById(itemID);
	var curleft = curtop = 0;
	if (object.offsetParent)
	{
		curleft = object.offsetLeft
		curtop = object.offsetTop
		while (object = object.offsetParent)
		{
			curleft += object.offsetLeft
			curtop += object.offsetTop
		}//end while
	}//end if
	return [curleft,curtop];
}

function KeepInProjectMenu(elemId, fromOpacity, toOpacity, time, fps)
{

	clearTimeout(FadeOutProjectMenuBox);
	object = document.getElementById(elemId);
	object.style.visibility='visible';
	object.style.opacity='1';
	object.style.filter= 'alpha(opacity=100)';
	
}




	function FadeOpacityMenus(elemId, fromOpacity, toOpacity, time, fps)
{	
	clearTimeout(t);
	if (elemId == 'menu-openings-disciplines')
		document.getElementById('menu-openings-locations').style.left ='-1111';
	else if (elemId == 'menu-openings-locations')
		document.getElementById('menu-openings-disciplines').style.left='-1111';
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	
	var t = setTimeout("FadeOpacityStepMenus('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
	
	}
	
	function FadeOpacityStepMenus(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
	{
	object = document.getElementById(elemId);
	object.style.left='698px';
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
	
    if (stepNum < steps)
        setTimeout("FadeOpacityStepMenus('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	
	
	}

//NEWS  SPECIFIC FADE FUNCTIONS
function FadeInNewsStory(elemId, fromOpacity, toOpacity, time, fps, left)
{	
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	//FadeInWithScrollbarStep(elemId, 0, steps, fromOpacity, delta, (time/steps));
	setTimeout("FadeInNewsStoryStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
	
	}
	
function FadeInNewsStoryStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
	{
	object = document.getElementById(elemId);
	object.style.left='194px';
    
	SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
	
    if (stepNum < steps)
       setTimeout("FadeInNewsStoryStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	
	
	}
function FadeInNewsPage(elemId, fromOpacity, toOpacity, time, fps)
{
	object = document.getElementById(elemId);
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	newsFade = setTimeout("FadePageOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

//EXPERTS SPECIFIC FADE FUNCTIONS
	
function FadeInExpertsMenu(originalId, elemId)
	{
		clearTimeout(FadeInExpertsTimer);
		clearTimeout(FadeOutExpertsMenuBox);
		originalobject = document.getElementById(originalId).style;
		object = document.getElementById(elemId).style;
		//object.opacity = '0';
		//object.filter = 'alpha(opacity=0)';
		FadeInExpertsTimer = setTimeout("ExpertsMenuIn('" + elemId + "')", 200);
		var count = elemId;
		}
		
function FadeInPresentationsMenu(originalId, elemId)
	{
		clearTimeout(FadeInPresentationsTimer);
		clearTimeout(FadeOutPresentationsMenuBox);
		originalobject = document.getElementById(originalId).style;
		object = document.getElementById(elemId).style;
		//object.opacity = '0';
		//object.filter = 'alpha(opacity=0)';
		FadeInPresentationsTimer = setTimeout("PresentationsMenuIn('" + elemId + "')", 200);
		var count = elemId;
		}

function ExpertsMenuIn(elemId)
{

document.getElementById(elemId).style.left='454px';
}

function PresentationsMenuIn(elemId)
{
document.getElementById(elemId).style.left='454px';
}

function FadeOutExpertsMenu(elemId)
	{
		
		FadeOutExpertsMenuBox = setTimeout("FadeOutExpertsMenuTime('" + elemId + "')", 300);
		
	}
	
function FadeOutPresentationsMenu(elemId)
	{
		FadeOutPresentationsMenuBox = setTimeout("FadeOutPresentationsMenuTime('" + elemId + "')", 300);
	}
	
function FadeOutExpertsMenuTime(elemId)
{
		object = document.getElementById(elemId).style;	
		object.left = '-5535px';
}

function FadeOutPresentationsMenuTime(elemId)
{
	object = document.getElementById(elemId).style;
	object.left = '-5555px';
}

function KeepInExperts(elemId, fromOpacity, toOpacity, time, fps)
{
	
	
	clearTimeout(FadeOutExpertsMenuBox);
	object = document.getElementById(elemId);
	object.style.visibility='visible';
	}

function KeepInPresentations(elemId, fromOpacity, toOpacity, time, fps)
{
	clearTimeout(FadeOutPresentationsMenuBox);
	object = document.getElementById(elemId);
	object.style.visibility='visible';
}
	
	//AWARDS SPECIFIC FADE FUNCTIONS
function FadeOutAwardOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
    if (stepNum < steps)
    FadeOutAwardOpacityStepTimer=setTimeout("FadeOutAwardOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", 500);

	}
	
function FadeOutAward(elemId, fromOpacity, toOpacity, time, fps)
{
	object = document.getElementById(elemId);
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	awardsFadeOutTimer = setTimeout("FadeOutAwardOpacityStep('" + elemId + "', " + 100 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}



function FadeInAwardsOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));
	
    if (stepNum < steps)
    FadeInOpacityStepTimer=setTimeout("FadeInAwardsOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", 500);
	

	}

function FadeInAwards(elemId, fromOpacity, toOpacity, time, fps)
{
	clearTimeout(awardsFade);
	object = document.getElementById(elemId);
	
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	awardsFade = setTimeout("FadePageOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

function FadeInAwardsImage(elemId, fromOpacity, toOpacity, time, fps)
{
	object = document.getElementById(elemId);
	document.getElementById('awardImage').style.filter='alpha(opacity=0)';
	  document.getElementById('awardImage').style.opacity='alpha(opacity=0)';  
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	setTimeout("FadeAwardsImageOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

function FadeAwardsImageOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));

    if (stepNum < steps)
       FadeInAwardsImageTimer=setTimeout("FadePageOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	}
	
//APPLICATION CENTER
function FadeOutMainMenu(elemId, fromOpacity, toOpacity, time, fps)
{	clearTimeout(FadeMenuOpacityStepTimer);
	//var FadeOutMainMenuClear = setTimeout("clearTimeout(" + FadeMenuOpacityStepTimer + ")", 200);
	clearTimeout(FadeMenuInTimer);
	clearTimeout(FadeInMenuInTimeTimer);
	
	FadeOutMainMenuTimer = setTimeout("MakeHidden('" + elemId + "')", 800);


	


	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	//FadeOutMainMenuTimer = set
}




function FadeApplicationMenuInTime(elemId, fromOpacity, toOpacity, time, fps)
{
	var portfolio = document.getElementById('submenu_portfolio');
	var expertise = document.getElementById('submenu_expertise');	
	var aboutus = document.getElementById('submenu_about');
	var sustainability = document.getElementById('submenu_sustainability');
	if (elemId == 'submenu_portfolio'){
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	sustainability.style.visibility = 'hidden';
	sustainability.style.opacity = '0';
	sustainability.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_expertise'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	sustainability.style.visibility = 'hidden';
	sustainability.style.opacity = '0';
	sustainability.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_sustainability'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_about'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	sustainability.style.visibility = 'hidden';
	sustainability.style.opacity = '0';
	sustainability.style.filter = 'alpha(opacity=0)';}
	
	FadeInMenuInTimeTimer = setTimeout("FadeMenuIn('" + elemId + "', " + fromOpacity + ", " + toOpacity + ", " + time + ", " + fps + ")", 200);
	
  }
	 
	
 
function FadeOutApplicationMenuTime(elemId, fromOpacity, toOpacity, time, fps)
{
		FadeOutMainMenu(elemId, fromOpacity, toOpacity, time, fps);
	
	}	
	
	
function FadeMenuIn(elemId, fromOpacity, toOpacity, time, fps)
{


	
	
	object = document.getElementById(elemId);
	
		
	var steps = Math.ceil(fps * (time / 1000));
	var delta = (toOpacity - fromOpacity) / steps;
	
	FadeMenuInTimer = setTimeout("FadeMenuOpacityStep('" + elemId + "', " + 0 + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + (time / steps) + ")", 200);
}

function FadeMenuOpacityStep(elemId, stepNum, steps, fromOpacity, delta, timePerStep)
{
	object = document.getElementById(elemId);
	object.style.visibility='visible';
	
    SetOpacity(document.getElementById(elemId), Math.round(parseInt(fromOpacity) + (delta * stepNum)));

    if (stepNum < steps)
      FadeMenuOpacityStepTimer = setTimeout("FadeMenuOpacityStep('" + elemId + "', " + (stepNum+1) + ", " + steps + ", " + fromOpacity + ", " + delta + ", " + timePerStep + ");", timePerStep);
	} 
	
//PAGE FADE-INS
function portfolio()
{


}
function portfolioenergy()
{


}
function expertise()
{


}
function expertiseenergy()
{


}

function energy()
{

}

function sustainabilityAttitude()
{
 


}

function leedprojects()
{ 


}

function awardsLd()
{
;
}


function energyservices()
{


}

function newenergyservices()
{

 
}

function integrated_project_delivery()
{


}

function MainMenuIn(elemId, fromOpacity, toOpacity, time, fps)
{
	clearTimeout(FadeOutMainMenuTimer);
	var portfolio = document.getElementById('submenu_portfolio');
	var expertise = document.getElementById('submenu_expertise');	
	var aboutus = document.getElementById('submenu_about');
	var people = document.getElementById('submenu_people');
	if (elemId == 'submenu_portfolio'){
	people.style.visibility = 'hidden';
	people.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_expertise'){
	people.style.visibility = 'hidden';
	people.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';}
	
	else if (elemId == 'submenu_about'){
	people.style.visibility = 'hidden';
	people.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	}
	else if (elemId == 'submenu_people'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';

	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	}
	
	document.getElementById(elemId).style.visibility='visible';
	document.getElementById(elemId).style.opacity='1';
	document.getElementById(elemId).style.filter='alpha(opacity=100)';
	//FadeInMenuInTimeTimer = setTimeout("FadeMenuIn('" + elemId + "', " + fromOpacity + ", " + toOpacity + ", " + time + ", " + fps + ")", 200);
	
	}
	
function MainMenuInEdited(elemId, fromOpacity, toOpacity, time, fps)
{
	clearTimeout(FadeOutMainMenuTimer);
	var portfolio = document.getElementById('submenu_portfolio');
	var expertise = document.getElementById('submenu_expertise');	
	var aboutus = document.getElementById('submenu_about');
	var people = document.getElementById('submenu_people');
	var ideas = document.getElementById('submenu_ideas');
	if (elemId == 'submenu_portfolio'){
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	ideas.style.visibility = 'hidden';
	ideas.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';
	people.style.visibility = 'hidden';
	people.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_expertise'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	ideas.style.visibility = 'hidden';
	ideas.style.opacity = '0';
	ideas.style.filter = 'alpha(opacity=0)';
		people.style.filter = 'alpha(opacity=0)';
	people.style.visibility = 'hidden';
	people.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_ideas'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
		people.style.filter = 'alpha(opacity=0)';
	people.style.visibility = 'hidden';
	people.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';}
	else if (elemId == 'submenu_about'){
	portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	ideas.style.visibility = 'hidden';
	ideas.style.opacity = '0';
	ideas.style.filter = 'alpha(opacity=0)';
		people.style.filter = 'alpha(opacity=0)';
	people.style.visibility = 'hidden';
	people.style.opacity = '0';
	people.style.filter = 'alpha(opacity=0)';}
	else if (elemId == "submenu_people"){
		portfolio.style.visibility = 'hidden';
	portfolio.style.opacity = '0';
	portfolio.style.filter = 'alpha(opacity=0)';
	expertise.style.visibility = 'hidden';
	expertise.style.opacity = '0';
	expertise.style.filter = 'alpha(opacity=0)';
	ideas.style.visibility = 'hidden';
	ideas.style.opacity = '0';
	ideas.style.filter = 'alpha(opacity=0)';
		people.style.filter = 'alpha(opacity=0)';
	aboutus.style.visibility = 'hidden';
	aboutus.style.opacity = '0';
	aboutus.style.filter = 'alpha(opacity=0)';
	
	}
	
	document.getElementById(elemId).style.visibility='visible';
	document.getElementById(elemId).style.opacity='1';
	document.getElementById(elemId).style.filter='alpha(opacity=100)';
	//FadeInMenuInTimeTimer = setTimeout("FadeMenuIn('" + elemId + "', " + fromOpacity + ", " + toOpacity + ", " + time + ", " + fps + ")", 200);
	
	}
	
function scrollNow()
{

//document.getElementById("content").scrollTop = strPos; //Enter your desired Position
document.getElementById("display-text-energyservice").scrollTop = 0; //It scrolls to top//document.getElementById("display-text-news").scrollTop = 0; //It scrolls to top

}

function IntroducingSwitch (expert)
{
if (expert=="William"){
document.getElementById('display-text-misc').innerHTML="<div style=\"height:20px;\"></div><a href=\"mailto:wvanhorn@eypae.com\" style=\"background: transparent url('http://www.eypaedesign.com/resources/~images/email.png') no-repeat scroll right center; padding-right:17px; color:#f60;\"><span class=\"text-orange\">William Van Horn</span><span class=\"text-orangenotbold\">, AIA, LEED AP</a><br/><span style=\"color:#f60;\">Senior Project Director</span>";
document.getElementById('introducingjava').innerHTML="William has more than 25 years of experience designing and managing technology-intensive, user-friendly college and university facilities and will play a crucial role in strengthening EYP’s award-winning Higher Education practice. William’s passion lies in managing large institutional projects with complex programmatic and technological needs; providing high-level, user-friendly design for a variety of technology-intensive building types; and crafting strategic design processes for projects involving multiple stakeholders. A member of the American Institute of Architects and registered architect in New York, William received a bachelor of architecture degree from Arizona State University. He is currently working on projects for several of EYP’s most prestigious Higher Education clients, including New York University and SUNY Maritime College.<br/><br/><br/><br/><br/><br/>";
document.getElementById('display-photo-people').innerHTML="<img src=\"http://www.eypaedesign.com/resources/misc/misc-3.jpg\">";
var myDiv=document.getElementById("display-text-bio");
document.getElementById("introducingjava").scrollTop = 0; //It scrolls to top//document.getElementById("display-text-news").scrollTop = 0; //It scrolls to top
if(myDiv!=null&&myDiv.scrollUpdate) myDiv.scrollUpdate(); document.getElementById("display-text-bio").scrollTop = 0; //It scrolls to top//document.getElementById("display-text-news").scrollTop = 0; //It scrolls to top
document.getElementById('william').style.color='#f60';
document.getElementById('leslie').style.color='#4b5763';
document.getElementById('robert').style.color='#4b5763';

 }
else if (expert=="Leslie"){
document.getElementById('display-text-misc').innerHTML="<div style=\"height:20px;\"></div><a href=\"mailto:lglynn@eypae.com\" style=\"background: transparent url('http://www.eypaedesign.com/resources/~images/email.png') no-repeat scroll right center; padding-right:17px; color:#f60;\"><span class=\"text-orange\">Leslie A. Glynn</span><span class=\"text-orangenotbold\">, AIA, LEED AP</a><br/><span style=\"color:#f60;\">Senior Laboratory Planner</span>";
document.getElementById('introducingjava').innerHTML="As a seasoned professional, Leslie’s extensive programming, planning, and designs for the sciences will strengthen and significantly expand EYP’s award-winning presence in Science and Technology and Higher Education.  Leslie’s passion lies with crafting physical spaces that effectively support and inspire the dynamic nature of science, as well as for science’s constant and rapid evolution beyond yesterday’s paradigms. She possesses a deep understanding of A/E integration, specifically the ways in which an experienced team brings to clients a great synergy that maximizes opportunities and optimizes values. Additionally, she has a thorough knowledge of the sciences, from both an academic and corporate perspective. A LEED AP Accredited Professional, an active member of the American Institute of Architects, and a published author, Leslie received a bachelor of architecture degree from Cornell University. She is currently working on a project for Trinity University, one of EYP’s most prominent Higher Education clients.<br/><br/>";
document.getElementById('display-photo-people').innerHTML="<img src=\"http://www.eypaedesign.com/resources/misc/misc-3a.jpg\">";
var myDiv=document.getElementById("display-text-bio");
document.getElementById("introducingjava").scrollTop = 0; //It scrolls to top//document.getElementById("display-text-news").scrollTop = 0; //It scrolls to top
if(myDiv!=null&&myDiv.scrollUpdate) myDiv.scrollUpdate(); document.getElementById("display-text-bio").scrollTop = 0; //It scrolls to top//document.getElementById("display-text-news").scrollTop = 0; //It scrolls to top
document.getElementById('leslie').style.color='#f60';
document.getElementById('william').style.color='#4b5763';
document.getElementById('robert').style.color='#4b5763';
}
else if (expert=="Bob"){
document.getElementById('display-text-misc').innerHTML="<div style=\"height:20px;\"></div><a href=\"mailto:rdegenova@eypae.com\" style=\"background: transparent url('http://www.eypaedesign.com/resources/~images/email.png') no-repeat scroll right center; padding-right:17px; color:#f60;\"><span class=\"text-orange\">Robert DeGenova</span><span class=\"text-orangenotbold\">, R.A.</a><br/><span style=\"color:#f60;\">Senior Laboratory Planner</span>";
document.getElementById('introducingjava').innerHTML="Robert has more than 25 years of programming, planning, and leadership expertise and will play an integral role in further strengthening the firm’s nationally recognized Science and Technology practice.  Robert’s passion lies in assisting the scientific community in their tireless efforts to solve contemporary and urgent problems. These include creating therapeutics and vaccines for infectious diseases, developing solutions for growing energy needs, devising new technologies and advances in medicine, and discovering new, cutting-edge methods of cancer research. He has personally witnessed the good that can come from designing specialized facilities—whether in a small building or on a grand, international scale—to support these types of scientific research.  An award-winning architect, frequent lecturer, and published author, Robert has planned and programmed more than two million square feet of Science and Technology space in North America, Europe, and Asia. His impressive project portfolio includes design for research and development, biomedical, translational, bio-containment, and pharmaceutical manufacturing laboratories, vivaria, and academic science facilities. Currently, he is working on several of EYP’s prominent projects for clients such as Virginia Polytechnic Institute, James Madison University, New York University, and Brookhaven National Laboratories.<br/><br/>";
document.getElementById('display-photo-people').innerHTML="<img src=\"http://www.eypaedesign.com/resources/misc/misc-3b.jpg\">";

document.getElementById("display-text-bio").scrollTop = 0; //It scrolls to top//document.getElementById("display-text-news").scrollTop = 0; //It scrolls to top
document.getElementById("introducingjava").scrollTop = 0; //It scrolls to top//document.getElementById("display-text-news").scrollTop = 0; //It scrolls to top
var myDiv=document.getElementById("display-text-bio");
if(myDiv!=null&&myDiv.scrollUpdate) myDiv.scrollUpdate(); document.getElementById('robert').style.color='#f60';
document.getElementById('leslie').style.color='#4b5763';
document.getElementById('william').style.color='#4b5763';
document.getElementById('robert').style.color='#f60';

}
}

function opacityAnotherOn (other)
{
document.getElementById('icon').style.filter='alpha(opacity=100)';
document.getElementById('icon').style.opacity='1';
document.getElementById('words').style.textDecoration='underline';

}

function opacityAnotherOff (other)
{
document.getElementById('icon').style.filter='alpha(opacity=75)';
document.getElementById('icon').style.opacity='.75';
document.getElementById('words').style.textDecoration='none';

}

function underlineAnotherOn (other)
{
document.getElementById('words').style.textDecoration='underline';
document.getElementById('icon').style.filter='alpha(opacity=100)';
document.getElementById('icon').style.opacity='1';
}

function underlineAnotherOff (other)
{
document.getElementById('words').style.textDecoration='none';
document.getElementById('icon').style.filter='alpha(opacity=75)';
document.getElementById('icon').style.opacity='.75';
}
  
