var delay=6
//var ccon=new Array()
begintag='<center><font face="Arial" size=2>'
//ccon[0]="<img src='/images/building.jpg'>";
//ccon[1]="<img src='/images/home_1.jpg' align='left'> <font size=6 color=990000><b>Welcome!</b></font>";
//ccon[2]="<img src='/images/home_2.jpg' align='right'> Message 2"
//ccon[3]="<img src='/images/home_3.jpg' align='left'> Message 3"
closetag='</font></center>'
var cwidth='501px'
var cheight='185px'

// end edit
var crun=true
var crun2=true
var cdir=1
var fconL=ccon.length
var cfadet=0
var cfadex=1
var hex=(cfadet==0)? 255 : 0
var cscol=(cfadet==0)? "rgb(255,255,255)" : "rgb(0,0,0)"
var cecol=(cfadet==0)? "rgb(0,0,0)" : "rgb(255,255,255)"
var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var cfaded=0
var index=0
if (DOM2)
cfaded=2000
delay=delay*1000
function csst() {
if(crun) {
crun=false;
document.getElementById("btnss").value=' > '
if(!crun2) clearTimeout(ctimer2)
}
else {
crun=true;
document.getElementById("btnss").value=' | | '
if(crun2)cchange()
else cfb(cdir)
}
}
function cfb(inp){
cdir=inp
crun=true
document.getElementById("btnss").value=' | | '
if(!crun2) clearTimeout(ctimer2)
if(inp==1){
if(index>=fconL || (!crun2 && index==fconL-1))
index=0
else{
if(!crun2)index++
}
}
else{
if(index==0 || (crun2 && index==1))
index=fconL-1
else{
if(crun2) index=index-2
else index--
}
}
crun2=false
cchange3()
ctimer2 = setTimeout("cfb("+inp+")",delay+cfaded)
}
function cchange(){
if(crun2) cchange2()
//PageLoad()
}
function cchange3(){
cchange2()
}
function cchange2(){
if(crun){
if(index>=fconL && crun2)
index=0
if(DOM2){
ctmpobj=document.getElementById("cscroll")
ctmpobj.style.color=cscol
ctmpobj.innerHTML=begintag+ccon[index]+closetag
linksobj=ctmpobj.getElementsByTagName("A")
imgobj=ctmpobj.getElementsByTagName("IMG")
if(imgobj.length>0){
preloadedimages=new Array()
for (i=0;i<imgobj.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=imgobj[i].src;
imgobj[i].style.filter="alpha(opacity=0)"
imgobj[i].style.MozOpacity=0;
}
}
curpos=10
if(cfadex)
cchangex(linksobj,imgobj)
colorfade()
}
else if(ie4)
document.all.cscroll.innerHTML=begintag+ccon[index]+closetag
else if(ns4){
ctmpobj=document.charscroll.document.charscroll_sub.document
ctmpobj.write(begintag+ccon[index]+closetag)
ctmpobj.close()
}
if(crun2) index++
setTimeout("cchange()",delay+cfaded)
}
}
frame=20
function cchangex(obj,obj2){
if(obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color="rgb("+hex+","+hex+","+hex+")"
}
if(obj2.length>0){
for (i=0;i<obj2.length;i++){
curpos+=5;
if(obj2[i].filters){
obj2[i].filters.alpha.opacity=curpos
}
else if(obj2[i].style.MozOpacity)
obj2[i].style.MozOpacity=curpos/100
}
}
}
function colorfade() {
ctmpobj=document.getElementById("cscroll").style.color
if(frame>0) {
hex=(cfadet==0)? hex-12 : hex+12
document.getElementById("cscroll").style.color="rgb("+hex+","+hex+","+hex+")"
if(cfadex)
cchangex(linksobj,imgobj)
frame--
setTimeout("colorfade()",20)
}
else{
document.getElementById("cscroll").style.color=cecol
frame=20
hex=(cfadet==0)? 255 : 0
}
}
function cbtnd(id,val,clk){
str='<input type=button id=btn'+id+' value=" '+val+' " onclick="'+clk+'" style="font-size:8px;width:50">'
return str
}
if(ie4||DOM2){
document.write('<div id="cscroll" style="border:1px solid black;width:'+cwidth+';height:'+cheight+';padding:2px"></div>')
//document.write('<div style="width:'+cwidth+';text-align:right">'+cbtnd("F","<<","cfb(0)")+cbtnd("ss","| |","csst()")+cbtnd("B",">>","cfb(1)")+'</div>')
}
window.onload=cchange
