if(window.addEventListener) {
window.addEventListener("load", loadEvents, true);
}
else if(window.attachEvent) {
window.attachEvent("onload", loadEvents);
}

function loadEvents() {	
var random = Math.floor(Math.random()*26);
var nimg = document.createElement('img');
nimg.id = 'slideimage';
nimg.alt = '';
nimg.height = '80';
nimg.width = '120';
nimg.onload = function() {document.getElementById('slides').appendChild(nimg);}
nimg.src = '/images/Slides/'+random+'.jpg';
var t = window.setTimeout('changeImage()',7000);
}

function changeImage() {
var random = Math.floor(Math.random()*26);	
var slideimg = document.getElementById('slideimage');
var nimg = document.createElement('img');
nimg.onload = function() {
	document.getElementById('slideimage').src = '/images/Slides/'+random+'.jpg';
	var t = window.setTimeout('changeImage()',7000);
}
nimg.src = '/images/Slides/'+random+'.jpg';
}