
// JavaScript Document

function findObj(theObj, theDoc)
{
var p, i, foundObj;

if(!theDoc) theDoc = document;
if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
{
theDoc = parent.frames[theObj.substring(p+1)].document;
theObj = theObj.substring(0,p);
}
if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
for (i=0; !foundObj && i < theDoc.forms.length; i++)
foundObj = theDoc.forms[i][theObj];
for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
foundObj = findObj(theObj,theDoc.layers[i].document);
if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

return foundObj;
}
function textRotator() {
var textRotation = new Array(6); //5 is the number of elements in the array

        // QUOTATIONS
	textRotation[0] = 'Evergreen Refrigeration is a design-build contractor. We have an amazing staff of experienced engineers who are ready to design your project according to your needs. Contact your sales associate to learn more.';
	textRotation[1] = 'Evergreen has full in-house Revit 3D design capabilities. Building modeling helps us catch potential errors early on in your project and prevents a majority of coordination issues between trades';
	textRotation[2] = 'Evergreen installs residential and commercial HVAC systems in many different types of facilities such as schools, churches, medical facilities, retail stores, mixed use buildings, government buildings, and much more!';
	textRotation[3] = 'Evergreen Refrigeration can service your older equipment. Contact our service department for contract details.';
	textRotation[4] = 'Evergreen Refrigeration defines Building Information Modeling (BIM) as the move from analog to digital design and construction. A model-based technology linked with a database of project information, BIM potentially will change the way projects are built and stakeholders communicate with each other. Now proprietary paper building designs and models will be virtual, which will open up the flow of information industry-wide and encourage idea-sharing.';
	textRotation[5] = 'Need Residential work done? Evergreen now has a residential division! Visit <a href="http://www.evergreenhomeheatingandenergy.com" target="_blank">our residential site (click here)</a> to request service or a home energy inspection today!';

var counter = textRotation.length;
counter--;
var randomNumber = Math.round(Math.random()*counter);
var randomBanner = "<p>" + textRotation[randomNumber] + "</p>";
var el = findObj("textbanner");
el.innerHTML = randomBanner;
setTimeout('textRotator();',15000);
}
