<!--
fadeFace="tahoma";
fadeSize="2";
fadeWidth="100%";
fadeHeight=[1, "lines"] // You can make the second string "lines" or "px".
fadeSpeed=25; // Lower the number the faster, in milliseconds.
fadePause=0; // The length of the pause when switching messages, in milliseconds.

// both colors must be the same length to work correctly
colors=["#FFFFFF", "#cfcfcf", "#b0b0b0", "#989898", "#797979", "#606060", "#454545", "#2b2b2b", "#000000"]
linkcolors=["#FFFFFF", "#cfcfcf", "#b0b0b0", "#989898", "#797979", "#606060", "#454545", "#2b2b2b", "#000000"]

///////////// NO MORE CONFIGURING BELOW THIS LINE /////////////

IE=document.all;NS=document.layers;NS6=document.getElementById&&!document.all;BRs='';thehex=-1;theStr="";
if (fadeHeight[1]=="lines") for (i=0;i<fadeHeight[0];i++) {BRs+="<BR>"}
if (NS) {document.write('<ILAYER id=fadeLayer><FONT SIZE="'+fadeSize+'" FACE="'+fadeFace+'">'+((!NS)?BRs:'')+'<LAYER id=fadeLayer width='+fadeWidth+((fadeHeight[1]=="px")?" height="+fadeHeight+"":"")+' TOP=0 LEFT=0></LAYER></ILAYER>')}
else {document.write('<DIV id=baseFadeLayer style="position:relative;width:'+fadeWidth+((fadeHeight[1]=="px")?";height:"+fadeHeight+"":"")+'"><FONT SIZE="'+fadeSize+'" FACE="'+fadeFace+'">'+BRs+'<DIV id=fadeLayer STYLE="position:absolute;top:0;left:0;z-index:2;width:100%" ALIGN=CENTER></DIV></DIV>')}

function fadeText(type, which) {
if(window.fadetimeout){clearTimeout(fadetimeout);fadetimeout=''}
textStr=""
if (thehex<colors.length-1&&type=="in"||thehex>-1&&type=="out") {
if(type=="in"){thehex++;theStr=which}
else{thehex--;}
textStr="<FONT FACE=verdana SIZE=2 COLOR='"+colors[thehex]+"'>";
textStrs=theStr.split('>')

// If links in the string, adds colors to them
if (textStrs.length>1) {
for (i=0;i<textStrs.length;i++) {
textStr+=textStrs[i]+((i<textStrs.length-1)?">":"")
if (textStrs[i].charAt(textStrs[i].length-1).toLowerCase()=="a")textStr+="</FONT><FONT COLOR="+colors[thehex]+""+((NS6)?" SIZE="+fadeSize+" FACE="+fadeFace:"")+">"
if (textStrs[i].charAt(textStrs[i].indexOf('<')+1).toLowerCase()=="a")textStr+="<FONT COLOR="+linkcolors[thehex]+">"}}

// If no links in the string, just outputs original string
else {textStr+=theStr}

if(thehex==-1){textStr=""}

// Writes the string
// NS6 writes to 2 layers making the fade smoother
if (NS6)document.getElementById('fadeLayer').innerHTML=textStr;
if (IE)fadeLayer.innerHTML=textStr;
if (NS){document.layers["fadeLayer"].document.layers["fadeLayer"].document.write("<DIV ALIGN='CENTER'>"+textStr+"</DIV>")
document.layers["fadeLayer"].document.layers["fadeLayer"].document.close()}

fadetimeout=setTimeout('fadeText("'+type+'", "'+which+'")', fadeSpeed);}}

function FadeIn(message) {
if(window.tryingfade){clearTimeout(tryingfade);tryingfade="";}
if(thehex==-1){tryingfade=setTimeout('fadeText("in", "'+message+'")',fadeSpeed*2);}
else if (thehex<colors.length-1&&message==theStr||message!=theStr&&thehex>-1||thehex&&thehex<colors.length-1){
tryingfade=setTimeout('FadeIn("'+message+'")',fadeSpeed)
if(thehex==colors.length-1){fadeText('out')}}}

function FadeOut() {
if(window.tryingfade){clearTimeout(tryingfade);tryingfade="";}
fadeText('out');}

//-->

