﻿var tickercontents = new Array()



tickercontents[0] = 'Chargers use energy even when the device they charge isn’t plugged in.  Unplug them from the wall when not being used.'



tickercontents[1] = 'If all the cars in the US had properly inflated tires, it would save close to 2 billion gallons of gasoline per year and improve your gas mileage 3 to 7%.'



tickercontents[2] = 'To maximize efficiency, wash only full loads of clothes when possible and always clean the dryer’s lint filter after every load.'



tickercontents[3] = 'Appliances like televisions, VCRs, stereo-equipment, clock radios and microwaves continue to use electricity even in standby mode. Turn them off before going away on holidays.'



tickercontents[4] = 'Just 10 seconds of idling your vehicle consumes more energy than is used to restart the vehicle.'



tickercontents[5] = 'For warming small amounts of food a microwave oven can save a third of the power of a conventional electric stove.'



tickercontents[6] = 'If every U.S. household replaced four incandescent bulbs with compact fluorescent bulbs, we’d save as much energy as removing seven million cars from the road. <a href="http://www.energystar.gov/index.cfm?c=cfls.pr_cfls">Learn More</a>'



tickercontents[7] ='If you live in the Sun Belt, look into low-e windows, which can cut the cooling load by 10% to 15%.'



tickercontents[8] = 'If just 25% of U.S. families used 10 fewer plastic bags a month, we would save over 2.5 BILLION bags a year.'



tickercontents[9] = 'Americans use 50 million tons of paper annually -- consuming more than 850 million trees.'



tickercontents[10] = 'The U.S. government’s Energy Star Website estimates that a handy homeowner can save up to 20% on heating and cooling costs (or reduce total annual energy bill 10%) by adding weather sealing and insulating in the home to prevent energy loss.'



tickercontents[11] = 'A typical US driver uses 1070 gallons of gasoline each year.'



tickercontents[12] = 'The average US family spends between 400 to 1000 a year to run its electric home appliances.'



tickercontents[13] = 'Switching to fluorescent lighting could collectively save Americans 750 million a year if we all switched to this more efficient form of lighting.'



tickercontents[14] = 'The energy bill for the average home in Austin, TX is $2018.<br /><br />The energy bill for an efficient home in Austin TX is $1086.'



tickercontents[15] = 'In 2005, the US consumed 21.8% of the energy consumed in the world that year.  In 2005 the US had 4.6% of the world’s population.'



tickercontents[16] = 'A programmable thermostat, available for free through Austin Energy’s Power Saver™ Program, can save more than $100 a year on home energy costs.'



tickercontents[17] = 'Heating and cooling account for between 50 to 70% of home energy use.'



tickercontents[18] = 'Recycling one aluminum can saves enough energy to operate a TV for three hours.'



tickercontents[19] = 'If we recycled all of the newspapers printed in the US on a typical Sunday, we would save 550,000 trees – or about 20 million trees a year.'



tickercontents[20] = 'A 150-watt computer uses 1,314 kWH per year if left on continuously.  To generate that much electricity, it takes the energy equivalent of more than 1,000 lbs. of coal or 100 gallons of oil.'



tickercontents[21] = 'Indoor lighting use is highest during the hours of 9am to 5pm, even though the light bulb was invented to help us see in the dark.'




var tickdelay = 8000 //delay btw messages



var highlightspeed = 10 //10 pixels at a time.







////Do not edit pass this line////////////////







var currentmessage = 0



var clipwidth = 0








function changetickercontent() {

		random_num = Math.ceil(Math.random()*21)

    crosstick.style.clip = "rect(0px 0px auto 0px)"



    crosstick.innerHTML = tickercontents[random_num]



    highlightmsg()



}







function highlightmsg() {



    var msgwidth = crosstick.offsetWidth



    if (clipwidth < msgwidth) {



        clipwidth += highlightspeed



        crosstick.style.clip = "rect(0px " + clipwidth + "px auto 0px)"



        beginclip = setTimeout("highlightmsg()", 20)



    }



    else {



        clipwidth = 0



        clearTimeout(beginclip)



        if (currentmessage == tickercontents.length - 1) currentmessage = 0



        else currentmessage++



        setTimeout("changetickercontent()", tickdelay)



    }



}







function start_ticking() {



    crosstick = document.getElementById ? document.getElementById("highlighter") : document.all.highlighter



    crosstickParent = crosstick.parentNode ? crosstick.parentNode : crosstick.parentElement



    if (parseInt(crosstick.offsetHeight) > 0)



        crosstickParent.style.height = crosstick.offsetHeight + 'px'



    else



        setTimeout("crosstickParent.style.height=crosstick.offsetHeight+'px'", 100) //delay for Mozilla's sake



    changetickercontent()



}







if (document.all || document.getElementById)



    window.onload = start_ticking