// JavaScript Document

/***********************************************
* Fading Ticker Tape Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//default speed is 4.5 seconds, Change that as desired
var speed=8500

var news=new Array()
news[0]="Copyright &copy; 2007 Continuous Spouting | <a href='http://www.thewebco.co.nz' target='_blank'>Designed by The Web Co</a>"
news[1]="<a href='feedback.php'>\"George, James & Tim speedy and efficient took pride in their work Kyle downpipes…fitted beautifully.  A very satisfactory experience\" - Paul Farmer</a>"
news[2]="<a href='feedback.php'>\"the contractors were prompt, efficient and professional.  Plus the cleanliness of the property when the job was completed was great!\"</a>"
news[3]="<a href='feedback.php'>\"my spouting is fantastic, and the guy who put it up was great, did a really professional job\" - Steve Wakeley</a>"
news[4]="<a href='feedback.php'>\"workmanship was excellent pleasure to deal with\" - Donald Douglas</a>"
news[5]="<a href='feedback.php'>\"our new spouting looks great and the job was well organised and executed.  Many thanks\" - Oliver Meech</a>"
news[6]="<a href='feedback.php'>\"fantastic experience… from Sales to installation to invoicing\" - Blair Knill</a>"
news[7]="<a href='feedback.php'>\"if every tradesman was as professional as yours, what a simple world we would live in.  a real pleasure to deal with, heartfelt thanks\" - Barney Farrell</a>"
news[8]="<a href='feedback.php'>\"It is not common to receive such professional, friendly, honest, polite and intelligent service.  His customer service was exceptional!\" - Kirsten Corson</a>"
news[9]="<a href='feedback.php'>\"positive and cheery attitude, professional in dealing with me, completed the job efficiently… left the site in good condition\" - Grant Cooper</a>"
news[10]="<a href='feedback.php'>\"very professional installation job was done\" - Mark Beston</a>"

//expand or shorten this list of messages as desired

var fadescheme=0 //set 0 to fade bgcolor from (white to black), 1 for (black to white)
var hex=(fadescheme==0)? 255 : 0
var startcolor=(fadescheme==0)? "rgb(2,81,148)" : "rgb(2,81,148)"
var endcolor=(fadescheme==0)? "rgb(2,81,148)" : "rgb(2,81,148)"
var frame=40;

var ie=document.all
var ns6=document.getElementById
var ns4=document.layers

i=0
tickerobject=ie? subtickertape: ns6? document.getElementById("subtickertape") : document.tickertape.document

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",650)
}

function bgcolorfade() {	         	
// 20 frames fading process
if(frame>0) {	
hex=(fadescheme==0)? hex-12 : hex+12 // increase or decrease color value depd on fadescheme
tickerobject.style.backgroundColor="rgb("+hex+","+hex+","+hex+")"; // Set color value.
frame--;
setTimeout("bgcolorfade()",100);	
}
else{
tickerobject.style.backgroundColor=endcolor;
frame=40;
hex=(fadescheme==0)? 255 : 0
}   
}

function updatecontent(){
if (ie||ns6)
bgcolorfade()
if (ns4){
tickerobject.subtickertape.document.write('<span class="subtickertapefont">'+news[i]+'</span>')
tickerobject.subtickertape.document.close()
}
else 
tickerobject.innerHTML=news[i]

if (i<news.length-1)
i++
else
i=0
setTimeout("updatecontent()",speed)
}

