var variableslide=new Array()

//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]


variableslide[0]=['spacer.gif','', 'Mike Reilly has carried out a great deal of work for us over the last few years. <p>We live in a large Victorian home and the work has included interior wallpapering and painting, bathroom tiling, exterior carpentry restoration and painting, chimney brick restoration, and complete roofing. <p>Dave and Judi W.<br>Cambridge']


variableslide[1]=['spacer.gif','', 'Now we know why the company is called Reilly\'s Reliable Restorations... because they are reliable and always finish the job as promised. <p>I would not hesitate to recommend Reilly\'s Reliable Restorations for any type of home renovation project. <p>Peter W.<br>Cambridge']

variableslide[2]=['spacer.gif','', 'The work quotations are detailed and accurate, the work quality is excellent, and the service is always courteous, friendly, and reliable as the company name implies. Mike and his workers are conscientious, responsive and always a pleasure to work with. We happily recommend this company to anyone.<p>Dave and Judi W.<br>Cambridge']


//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=10000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById
var ranNum= Math.floor(Math.random()*variableslide.length);

for (i=0;i<variableslide.length;i++){
	var cacheimage=new Image()
	cacheimage.src=variableslide[i][0]
}

var currentslide=ranNum

function returnDocument() {
var file_name = document.location.href;
var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
return file_name.substring(file_name.lastIndexOf("/")+1, end);
}

function rotateimages(){
contentcontainer=''

var file_name=returnDocument()
if (file_name=="chimneys.html"||file_name=="roofing.html"||file_name=="renovations.html"){
	var vert=1
}
else{vert=0}

if (variableslide[currentslide][1]!="")
contentcontainer+='<a target="_blank" href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img '
if (vert){
	contentcontainer+='align="left"'
}
contentcontainer+='src="'+variableslide[currentslide][0]+'" border="0" vspace="0" '
if (vert)
contentcontainer+='hspace="5"'
contentcontainer+='>'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
if (!vert)
contentcontainer+='</a><br>'
if (variableslide[currentslide][2]!="")
contentcontainer+=variableslide[currentslide][2]

if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}

if (ie||dom)
document.write('<div id="slidedom"></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}

if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider

document.write('<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgColor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth}; left=0 top=0></layer></ilayer>')
