// This Script Free To Use Providing This Notice Remains == //                                 
// This Script Has Been In The http://www.DesignerWiz.com Javascript Public Archive Library == // 
// NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == //
// Hide from old browsers
var i = 1;
banner1= new Image();
banner1.src = "images/banner_a_lens_for_all.jpg";
banner2 = new Image();
banner2.src = "images/banner_a_lens_for_all.jpg";
links = new Array
links[1] = "http://www.eyecarefoundation.nl/en_a_lens_for_all.shtml?tm=6"
links[2] = "http://www.eyecarefoundation.nl/en_a_lens_for_all.shtml?tm=6" //be sure to ad numbers consecutively
description = new Array
description[1] = "A lens for all. Hulp us!"
description[2] = "A lens for all. Hulp us!" //be sure to ad message numbers consecutively 
function startTime(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=8;	// How many seconds until the next banner rotation
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
if (i < 2){	// The number 2 is the amount of banners that you have above - adjust accordingly
i++;
document.banner.src = eval("banner" + i + ".src");
}
else{
i = 1;
document.banner.src = eval("banner" + i + ".src");
}
startTime();
}
else{
window.setTimeout("Timer()",1000)}
}
function clickLink(){
top.location = links[i]
}
function descript(){
window.status = description[i]
}
if (window.addEventListener) {
	window.addEventListener("load", startTime, false);
}
else if (window.attachEvent) {
	window.attachEvent("onload", startTime);
}
