
//http://www.dynamicdrive.com/dynamicindex2/fadescroll.htm
begintag='<font face="Arial, Helvetica, sans-serif" font size="+1">' //set opening tag, such as font declarations
closetag='</font>'
var delay=3000;
var fwidth=320,fheight=20,index=0,faderdelay=10
var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
if (DOM2)faderdelay=3000

function changecontent(){
runSlideShow();
	if (index>=data.length) index=0
		if (DOM2){
		document.getElementById("fscroller").style.color="rgb(255,255,153)"
		document.getElementById("fscroller").innerHTML=begintag+data[index]+closetag
		colorfade()
		}
	else if (ie4)
		document.all.fscroller.innerHTML=begintag+data[index]+closetag
		else if (ns4){
			document.sc.document.sc_sub.document.write(begintag+data[index]+closetag)
			document.sc.document.sc_sub.document.close()
	}
index++

setTimeout("changecontent()",delay+faderdelay)
}
frame=20,hex=255  // Initial color value.
yellow=159;

function colorfade() {
if (!data[0])   {return;}
if (!data[1])   {frame=0;}
     	
// 20 frames fading process
if(frame>0) {	
hex-=12; 
yellow-=6;  // increase color value
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+yellow+")"; // 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>')
window.onload=changecontent


// slide show code

var slideShowSpeed = 5000;
var crossFadeDuration = 3;
var Pic = new Array();
Pic[0] = 'photos/1.jpg';
Pic[1] = 'photos/2.jpg';
Pic[2] = 'photos/3.jpg';
Pic[3] = 'photos/4.jpg';
Pic[4] = 'photos/5.jpg';
Pic[5] = 'photos/6.jpg';


var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;

}
