/*
Fading Scroller- By DynamicDrive.com
For full source code, 100's more DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/

var delay=7500 //set delay between message change (in miliseconds)
var fcontent=new Array()
begintag='<font face="verdana" size=2>' //set opening tag, such as font declarations
fcontent[0]="<a href=\"http://www.askthebuilder.com/EB001_Crown_Molding_EBook.shtml\">Crown Molding</a><br /><br /><img src=\"http://www.askthebuilder.com/images/ebooks/EB001.jpg\" width=\"79\" height=\"79\" alt=\"Crown Molding Ebook\" border=\"0\"><br /><br />Learn how to cut crown like a master finish carpenter in just 30 minutes."
fcontent[1]="<a href=\"http://www.askthebuilder.com/EB002_Painting_Cabinets_EBook.shtml\">Painting Cabinetry</a><br /><br /><img src=\"http://www.askthebuilder.com/images/ebooks/EB002.jpg\" width=\"79\" height=\"79\" alt=\"Painting Cabinetry Ebook\" border=\"0\"><br /><br />Save thousands and thousands of dollars by painting your cabinets."
fcontent[2]="<a href=\"http://www.askthebuilder.com/EB003_CPE_Shower_Pan_Liner.shtml\">Shower Pan Liner</a><br /><br /><img src=\"http://www.askthebuilder.com/images/ebooks/EB003.jpg\" width=\"79\" height=\"79\" alt=\"Shower Pan Liner Ebook\" border=\"0\"><br /><br />Leak-proof showers are easy so long as you install the right shower liner the right way!"
fcontent[3]="<a href=\"http://www.askthebuilder.com/EB004_Shower_Pan_Cement_Mud_Floor_EBook.shtml\">Cement Mud Floors</a><br /><br /><img src=\"http://www.askthebuilder.com/images/ebooks/EB004.jpg\" width=\"79\" height=\"79\" alt=\"Shower Pan Liner Ebook\" border=\"0\"><br /><br />Uncover the secrets of cement mud floors under ceramic tile with this EBook."
fcontent[4]="<a href=\"http://www.askthebuilder.com/EB005_Brick_Sealing_EBook.shtml\">Brick Sealant that Stops Leaks</a><br /><br /><img src=\"http://www.askthebuilder.com/images/ebooks/EB005.jpg\" width=\"79\" height=\"79\" alt=\"Shower Pan Liner Ebook\" border=\"0\"><br /><br />Stop water from entering your brick and masonry walls. Prevent mold growth!"
fcontent[5]="<a href=\"http://www.askthebuilder.com/EB006_Building_Simple_Stairs_EBook.shtml\">Stairs - Building a Simple Set</a><br /><br /><img src=\"http://www.askthebuilder.com/images/ebooks/EB006.jpg\" width=\"79\" height=\"79\" alt=\"Shower Pan Liner Ebook\" border=\"0\"><br /><br />Build perfect simple stairs and save hundreds of dollars."
closetag='</font>'

var fwidth=150 //set scroller width
var fheight=150 //set scroller height

///No need to edit below this line/////////////////

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0

if (DOM2)
faderdelay=2000

//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color="rgb(255,255,255)"
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
colorfade()
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag
else if (ns4){
document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)
document.fscrollerns.document.fscrollerns_sub.document.close()
}

index++
setTimeout("changecontent()",delay+faderdelay)
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

frame=20;
hex=255  // Initial color value.

function colorfade() {	         	
// 20 frames fading process
if(frame>0) {	
hex-=12; // increase color value
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
frame--;
setTimeout("colorfade()",20);	
}
else{
document.getElementById("fscroller").style.color="rgb(0,0,0)";
frame=20;
hex=255
}   
}

if (ie4||DOM2)
document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')

// added by ben to resolve conflicting multiple window.onload requests
if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", changecontent, false );
else if ( typeof window.attachEvent != "undefined" ) {
    window.attachEvent( "onload", changecontent );
}
else {
    if ( window.onload != null ) {
        var oldOnload = window.onload;
        window.onload = function ( e ) {
            oldOnload( e );
            changecontent();
        };
    }
    else
        window.onload = changecontent;
}

// window.onload=changecontent