var delay = 15000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
var startcolor= new Array(255,255,255); // start color (red, green, blue)
var endcolor=new Array(102,102,102); // end color (red, green, blue)
var fcontent=new Array();
begintag='<div id="research">'; //set opening tag, such as font declarations
fcontent[0]="<div id='research-title'>Heat Island Group (Oct 2009)</div><div>Dark colored roofs and roads absorb more heat from the sun and transfer heat to the buildings below and around them. This forces the occupants of the buildings to use additional air conditioning. The exhaust from the air conditioning heats the outside air.  Measured from a single air conditioner, the temperature increase is not noticeable. Measured collectively in an urban environment, the temperature of a city can increase by 6-8 degrees. This is called the heat island effect. Heat Island research is conducted to locate, understand, and implement solutions to the summer warming trends occurring in urban areas. The Heat Island Group focuses on the study and development of reflective surfaces for buildings and roadways. The Heat island Group demonstrates potential energy savings through the use of cool roofs.</div><div style='padding-top:10px;'><a onclick=\"link();\">READ MORE</a></div>";
fcontent[1]="<div id='research-title'>Cool Roof Council (2009)</div><div>The Cool Roof Rating Council is a non-profit organization that develops methods to evaluate thermally insulating products. The Council measures the amount of solar reflectance of different cool roof coatings. They also measure the amount of heat that a cool roofing product releases once exposed to sunlight. The CRRC then assigns a value which can be used by contractors, archeitects and engineers to decide the best products to use. It is this product rating program that makes the CRRC the central resource for cool coatings. As the CRRC is a primary resource throughout the cool roofing industry, this site will be used as an overall foundation for research.</div><div style='padding-top:10px;'><a onclick=\"link();\">READ MORE</a></div>";
fcontent[2]="<div id='research-title'>What’s so cool about cool roofs? - Green Source (Mar 2009)</div><div>This article specifically explains what makes a cool roof an enery saving device. It explains solar reflectance and solar emmittance and gives details of how the ratings scale works. The article gives details about how a cool roof works and how to calculate the value of a cool roof. There are details that show how cool roofs reduce energy costs both for building owners and society as a whole. The  potential for global benefit is also explored. The article goes on to specify cost benefits that would arise with a mass use of cool roofing technologies.  There is a list of common roofing product types and there many references to other sources.</div><div style='padding-top:10px;'><a onclick=\"link();\">READ MORE</a></div>";
fcontent[3]="<div id='research-title'>American National Standards Institute –Cool Roof Rating Council-1 (2008)</div><div>ANSI is the accepted standardization body for all construction products and the cool roof rating council, in defining their standards went to ANSI for test data. The ANSI-CRRC-1 manual provides the definitions for all tests used to determine the properties of all products that can be defined as “cool”, which include the effects of time and exposure to thermally insulating products. The manual references the American Society for Testing and Materials (ASTM) which creates the testing conditions that set the standards for all cool roofing materials and the accelerated wear testing that will be used. The ASTM standards will be used to compare the various cool products against each other for effectiveness.</div><div style='padding-top:10px;'><a onclick=\"link();\">READ MORE</a></div>";
fcontent[4]="<div id='research-title'>Lawrence Berkeley National Laboratory (2009)</div><div>The Lawrence Berkeley National Laboratory performs energy efficient research for Advanced Energy Technologies, Atmospheric Sciences, Buildings Energy Efficiency, Energy analysis and Indoor and Outdoor Environmental Quality. This is lab used by the Federal Government for all aspects of energy efficiency. The Lawrence Berkeley National Laboratory studies the effects of various “cool” technologies including cool roofing and cool paving, noting the overall global effect of the technologies if used wide spread in terms energy reduction and environmental impact.</div><div style='padding-top:10px;'><a onclick=\"link();\">READ MORE</a></div>";
fcontent[5]="<div id='research-title'>Cool Colors Project Sponsored by the California Energy Commission (2009)</div><div> The California Energy Commission put together a collection of articles and publications describing the use and effects of cool roofs especially in California. It is a clearing house for information regarding cool roofing products, analysis of cool roofing and examples of use in the United States.  California Energy Commission has an extensive Q&A report drafted by Ronnen Levinson of the Lawrence Berkeley National Laboratory which provides a concise, yet comprehensive understanding of cool roofing.</div><div style='padding-top:10px;'><a onclick=\"link();\">READ MORE</a></div>";
closetag='</div>';
var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.
var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;
function changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  index++
}
function linkcolorchange(step){
  var obj=document.getElementById("fscroller").getElementsByTagName("A");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}
var fadecounter;
function colorfade(step) {
  if(step<=maxsteps) {
    document.getElementById("fscroller").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter=setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent()", delay);

  }
}
function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}
if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent



