// Title: Winston COllege
// Author: Parwinder Sadana
// Dated: 28-02-2003
// This script is for fading the images on the splash page. Please call this page in the index.html file
// Make sure that in Index.html file Onload function is mentioned in the body tag.


// images foleder must be in the root otherwise it will not work and copy winston_images.js file in each 
// specifiec folder when it is needed.

sandra0 = new Image();
sandra0.src = "../../images/girl_smiling.jpg";

sandra1 = new Image();
sandra1.src = "../../images/classroom.jpg";

sandra2 = new Image();
sandra2.src = "../../images/graduates.jpg";

sandra2 = new Image();
sandra2.src = "../../images/graduates.jpg";

sandra3 = new Image();
sandra3.src = "../../images/girl_calling.jpg";

sandra4 = new Image();
sandra4.src = "../../images/students.jpg";

sandra5 = new Image();
sandra5.src = "../../images/girls_laptop.jpg";

sandra6 = new Image();
sandra6.src = "../../images/class_session.jpg";

var i_strngth=1
var i_image=0

var imageurl = new Array()
imageurl[0] ="../../images/girl_smiling.jpg"
imageurl[1] ="../../images/classroom.jpg"
imageurl[2] ="../../images/graduates.jpg"
imageurl[3] ="../../images/girl_calling.jpg"
imageurl[4] ="../../images/students.jpg"
imageurl[5] ="../../images/girls_laptop.jpg"
imageurl[6] ="../../images/class_session.jpg"


function showimage() {		
	if(document.all) {
		if (i_strngth <=110) {
			imagefader.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
			i_strngth=i_strngth+10
			var timer=setTimeout("showimage()",150)
		}	
		else {
			clearTimeout(timer)
			var timer=setTimeout("hideimage()",1000)
		}
	}	
	
	if(document.layers) {
			clearTimeout(timer)
			document.imagefader.document.write("<img src="+imageurl[i_image]+" border=0>")
			document.close()
			i_image++
			if (i_image >= imageurl.length) {i_image=0}	
			var timer=setTimeout("showimage()",1000)
				
	}	
}


function hideimage() {		
	if (i_strngth >=-10) {
		imagefader.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
		i_strngth=i_strngth-10
		var timer=setTimeout("hideimage()",150)
	}	
	else {
		clearTimeout(timer)
		i_image++
		if (i_image >= imageurl.length) {i_image=0}
		i_strngth=1
		var timer=setTimeout("showimage()",10)	
	}
}

