function setQuote(aFont) {
	var increment;
	var qH;
	var sH;
	qH = parseInt(document.getElementById("quoteBox").offsetHeight);
	sH = parseInt(document.getElementById("sayerBox").offsetHeight);
	if (aFont) {
		//alert(qH+", "+sH);
		qInc = 14;
		sInc = 23;
		if (qH < 55) {
			document.getElementById("quoteBox").style.top = qInc;  
			document.getElementById("sayerBox").style.top = sInc;
		} else if (qH > 55 && sH < 20) {
			document.getElementById("quoteBox").style.top = qInc;  
			document.getElementById("sayerBox").style.top = sInc;
		} else if (qH > 63 && sH < 35) {
			document.getElementById("quoteBox").style.top = qInc-4;
			document.getElementById("sayerBox").style.top = sInc-7;  
		} else if (qH > 55 && sH < 35) {
			document.getElementById("quoteBox").style.top = qInc; 
		} else if (qH > 60 && sH > 35) {
			document.getElementById("quoteBox").style.top = 2;
			document.getElementById("sayerBox").style.top = 5; 
		}
	} else {
		//alert("qh is " + qH + " & sH is " + sH);
		qInc = 14;
		sInc = 24;
		if (qH < 55) {
			document.getElementById("quoteBox").style.top = qInc;  
			document.getElementById("sayerBox").style.top = sInc;
		} else if (qH > 55 && sH < 20) {
			document.getElementById("quoteBox").style.top = qInc;  
			document.getElementById("sayerBox").style.top = sInc+2;
		} else if (qH > 63 && sH < 20) {
			document.getElementById("quoteBox").style.top = qInc-4;
			document.getElementById("sayerBox").style.top = sInc-12;
		} else if (qH > 63 && sH < 35) {
			document.getElementById("quoteBox").style.top = qInc-4;
			document.getElementById("sayerBox").style.top = sInc-12;  
		} else if (qH > 55 && sH < 35) {
			document.getElementById("quoteBox").style.top = qInc+1;
			document.getElementById("sayerBox").style.top = sInc-3;
		} else if (qH > 60 && sH > 35) {
			document.getElementById("quoteBox").style.top = 2;
			document.getElementById("sayerBox").style.top = 5; 
		}
	}
}

function playFlash() {
// This script will test up to the following version.
flash_versions = 7;

// Initialize variables and arrays
var flash = new Object();
flash.installed=false;
flash.version='0.0';

// Dig through Netscape-compatible plug-ins first.
if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash.installed = true;
			break;
		}
	}
}

// Then, dig through ActiveX-style plug-ins afterwords
else if (window.ActiveXObject) {
	for (x = 2; x <= flash_versions; x++) {
		try {
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if(oFlash) {
				flash.installed = true;
				flash.version = x + '.0';
			}
		}
		catch(e) {}
	}
}

// Create sniffing variables in the following style: flash.ver[x]
// Modified by mjac
flash.ver = Array();
for(i = 4; i <= flash_versions; i++) {
	eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");
}
	if ( flash.ver[6] ) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
		document.write(' WIDTH="760" HEIGHT="141" id="homemov" ALIGN="">');
		document.write(' <PARAM NAME=movie VALUE="html/homemov.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> '); 
		document.write('<EMBED src="html/homemov.swf" quality=high bgcolor=#000000 ');
		document.write('WIDTH="760" HEIGHT="141" NAME="homemov" ALIGN=""');
		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
		document.write(' </OBJECT>');
	} else {
			document.write('<div class="imagesIndiv" style="left: 1px; width: 105px;"><img src="html/images/homepage/home1.jpg"></div>');
			document.write('<div class="imagesIndiv" style="left: 107px; width: 219px;"><img src="html/images/homepage/home2.jpg"></div>');
			document.write('<div class="imagesIndiv" style="left: 327px; width: 105px;"><img src="html/images/homepage/home3.jpg"></div>');
			document.write('<div class="imagesIndiv" style="left: 433px; width: 219px;"><img src="html/images/homepage/home4.jpg"></div>');
			document.write('<div class="imagesIndiv" style="left: 654px; width: 105px;"><img src="html/images/homepage/home5.jpg">');
	}
}

function helloFont() {
	width0 = document.getElementById("fntLyr0").offsetWidth;
	width1 = document.getElementById("fntLyr1").offsetWidth;
    result = (width0 != width1);
	//alert(width0 + " ? " + width1 + " = " + result);
	return result;
  }


function setBaseDivs() {
	if ( (screen.width < 850) && (screen.height < 650) )  {
		document.writeln('<STYLE TYPE="text/css">');
		document.writeln('<\!--');
		document.writeln('#centerDiv {position:absolute; left:0px; top:5px; width:760px; height: 472px; z-index:-50');
		//height:472;  took this out of centerdiv def
		document.writeln('-->');
		document.writeln('</STYLE>');
	} else {
		var ie = (document.all) ? 1:0;
		if (ie) {
			windowWidth = document.body.offsetWidth-20;
			windowHeight = document.body.offsetHeight;
		} else {
			windowWidth = window.innerWidth-16;
			windowHeight = window.innerHeight;
		}
		document.writeln('<STYLE TYPE="text/css">');
		document.writeln('<\!--');
		
		document.writeln('@media screen {');
		document.writeln('#centerDiv { position:absolute; left: '+(windowWidth/2-706/2)+'px; top: '+(windowHeight/2-530/2)+'px; width: 760px; height: 472px; } ');
//		document.writeln('#centerDiv { position:absolute; left: 100px; top: 100px; width: 760px; height: 472px; } ');
		document.writeln('}');
		
		document.writeln('@media print {');
		//document.writeln('@media screen {');
		document.writeln('#centerDiv { position:absolute; left: 0px; top: 0px; } ');
		document.writeln('}');
	
// backup	document.writeln('#centerDiv { position:absolute; left: '+(windowWidth/2-706/2)+'px; top: '+(windowHeight/2-530/2)+'px; width: 760px; height: 472px; z-index: -50; } ');
		//document.writeln('#centerDiv {position:absolute; left:'+(windowWidth/2-706/2)+'; top:'+(windowHeight/2-530/2)+'; width:760; height:472; z-index:-50');
		document.writeln('-->');
		document.writeln('</STYLE>');
	}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		topmenu_05_over = newImage("images/topmenu_05-over.jpg");
		topmenu_06_topmenu_05_over = newImage("images/topmenu_06-topmenu_05_over.jpg");
		topmenu_07_topmenu_05_over = newImage("images/topmenu_07-topmenu_05_over.jpg");
		topmenu_08_topmenu_05_over = newImage("images/topmenu_08-topmenu_05_over.jpg");
		topmenu_09_topmenu_05_over = newImage("images/topmenu_09-topmenu_05_over.jpg");
		topmenu_10_topmenu_05_over = newImage("images/topmenu_10-topmenu_05_over.jpg");
		bottommenu_15_over = newImage("images/bottommenu_15-over.jpg");
		bottommenu_16_bottommenu_15_over = newImage("images/bottommenu_16-bottommenu_15.jpg");
		bottommenu_17_bottommenu_15_over = newImage("images/bottommenu_17-bottommenu_15.jpg");
		bottommenu_19_bottommenu_15_over = newImage("images/bottommenu_19-bottommenu_15.jpg");
		bottommenu_21_over = newImage("images/bottommenu_21-over.jpg");
		level1menu_07_over = newImage("images/level1menu_07-over.jpg");
		level1menu_08_level1menu_07_over = newImage("images/level1menu_08-level1menu_07.jpg");
		level1menu_09_level1menu_07_over = newImage("images/level1menu_09-level1menu_07.jpg");
		level1menu_10_level1menu_07_over = newImage("images/level1menu_10-level1menu_07.jpg");
		level1menu_11_level1menu_07_over = newImage("images/level1menu_11-level1menu_07.jpg");
		level1menu_12_level1menu_07_over = newImage("images/level1menu_12-level1menu_07.jpg");
		green_building_01_over = newImage("images/green_building_01-over.jpg");
		LEED_scorecard_01_over = newImage("images/LEED_scorecard_01-over.jpg");
		peopleServices_01_over = newImage("images/peopleServices_01-over.jpg");
		peopleServices_02_over = newImage("images/peopleServices_02-over.jpg");
		peopleServices_03_over = newImage("images/peopleServices_03-over.jpg");
		clienLIST_01_over = newImage("images/clienLIST_01-over.jpg");
		buttonGreenBlsg_01_over = newImage("images/buttonGreenBlsg_01-over.jpg");
		greenBldg_projects_01_over = newImage("images/greenBldg_projects_01-over.jpg");
		greenBldg_projects_02_over = newImage("images/greenBldg_projects_02-over.jpg");
		buttonConservationCalc_01_over = newImage("images/buttonConservationCalc_01-o.jpg");
		construction_wasteBUTTON_01_over = newImage("images/construction_wasteBUTTON-02.jpg");
		preloadFlag = true;
	}
}

function showNews() {
	document.getElementById("newsDiv").style.visibility = "visible";
}
function hideNews() {
	document.getElementById("newsDiv").style.visibility = "hidden";
}

var to;
function toBottom(){
	var div = document.getElementById('scroller');
	if (div.scrollTop != (div.offsetHeight+125)){
		div.scrollTop = div.scrollTop+2; //scroll 1 pixel up
		to = setTimeout('toBottom()', 10);
	} 
	else clearTimeout(to);
}
function toTop(){
	var div = document.getElementById('scroller');
	if (div.scrollTop > 0){
		div.scrollTop = div.scrollTop-2; //scroll 1 pixel up
		to = setTimeout('toTop()', 10);
	} 
	else clearTimeout(to);
}
function toBottomTest(elid){

	var ie = (document.all) ? 1:0;
	var div = document.getElementById(elid);
	var aThumb = document.getElementById("thumb");
	var sccontent = document.getElementById("scrollContent");
	if (ie) {
		if (div.scrollTop != (div.offsetHeight+75)){
			div.scrollTop = div.scrollTop+2; //scroll 1 pixel up
			if (parseInt(aThumb.style.top) < 254) { // where to stop scrolling, this works for IE
				aThumb.style.top  = parseInt(aThumb.style.top)+1;
			}
			to = setTimeout('toBottomTest("'+elid+'")', 10);
		} else {
			clearTimeout(to);
		}
	} else {
	//div.scrollTop != (div.offsetHeight) || 
		if (parseInt(sccontent.style.top) > -1*(sccontent.offsetHeight-div.offsetHeight) ){
			//alert(parseInt(sccontent.style.top));
			sccontent.style.top = parseInt(sccontent.style.top) - 2;
			//div.scrollTop = div.scrollTop+2; //scroll 1 pixel up
			if (parseInt(aThumb.style.top) < 236) { // where to stop scrolling, this works for IE
				aThumb.style.top  = parseInt(aThumb.style.top)+1;
			}		
			to = setTimeout('toBottomTest("'+elid+'")', 10);
		} else {
			clearTimeout(to);
		}
	}
}
function toTopTest(elid){
	var ie = (document.all) ? 1:0;
	var div = document.getElementById(elid);
	var sccontent = document.getElementById("scrollContent");
	var aThumb = document.getElementById("thumb");
	if (div.scrollTop > 0){
		div.scrollTop = div.scrollTop-2; //scroll 1 pixel up
		if (parseInt(aThumb.style.top) > 2) {
			aThumb.style.top  = parseInt(aThumb.style.top)-1;
		}// else {
		//	theScroll.scrollTo(parseInt(aThumb.style.top), 48);
		//}
	} else if (parseInt(sccontent.style.top) < 0) {
		sccontent.style.top = parseInt(sccontent.style.top) + 2;
		if (parseInt(aThumb.style.top) > 2) {
			aThumb.style.top  = parseInt(aThumb.style.top)-1;
		}
	} else {
		div.scrollTop = 0;
		sccontent.style.top = "0px"
		//aThumb.scrollTop = 0;
		aThumb.style.top = theThumb.minY; //45;
	}
//	}
	to = setTimeout('toTopTest("'+elid+'")', 10);
}
function mouseOut() {
	clearTimeout(to);
}

var b1 = "info";
var b2 = "graphicaps";

function es()
{
   document.write("<input type='hidden' name='sendto' value='");
   document.write(b1 + "@");
   document.write(b2 + ".com");
   document.write("'>");
}

function el()
{
   document.write("<a href='mailto:");
   document.write(b1 + "@");
   document.write(b2 + ".com");
   document.write("' style='font-size: 11px;'>");
   document.write(b1 + "@");
   document.write(b2 + ".com");
   document.write("</a>");
}