/*
Conveyor belt slideshow script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com
*/

//Specify the slider's width (in pixels)
var sliderwidth=350
//Specify the slider's height (in pixels, pertains only to NS)
var sliderheight=101
//Specify the slider's scroll speed (larger is faster)
var slidespeed=3

//Specify the slider's images
var finalslide=''
var leftrightslide=new Array()
leftrightslide[0]='<a href="tony_blair2.html"><img src="images/t_blair_sml.jpg" border=0 alt="Tony Blair lookalike"></a>'
leftrightslide[1]='<a href="cherie_blair2.html"><img src="images/c_blair_sml.jpg" border=0 alt="Cherie Blair lookalike"></a>'
leftrightslide[2]='<a href="john_major2.html"><img src="images/j_major_sml.jpg" border=0 alt="John Major lookalike"></a>'
leftrightslide[3]='<a href="margaret_thatcher2.html"><img src="images/m_thatcher_sml.jpg" border=0 alt="Margaret Thatcher lookalike"></a>'
leftrightslide[4]='<a href="bill_clinton2.html"><img src="images/b_clinton_sml.jpg" border=0 alt="Bill Clinton lookalike"></a>'
leftrightslide[5]='<a href="hilary_clinton2.html"><img src="images/h_clinton_sml.jpg" border=0 alt="Hilary Clinton lookalike"></a>'

///////do NOT edit pass this line////////////////////////////////////

var copyspeed=slidespeed
//copy contents of leftrightslide into one variable
for (y=0;y<=99;y++){
for (i=0;i<leftrightslide.length;i++)
finalslide=finalslide+leftrightslide[i]+"&nbsp;"
}

if (document.all){
//dynamically write out the marquee tag
document.write('<marquee id="ieslider" scrollAmount=0 style="width:'+sliderwidth+'">'+finalslide+'</marquee>')
//stop marquee when mouse is over it
ieslider.onmouseover=new Function("ieslider.scrollAmount=0")
//re-enable marquee when mouse is out
ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=slidespeed")
}

function regenerate(){
// window.location.reload()
window.location.replace(top.location);
}
function regenerate2(){
if (document.layers){
document.ns_slider01.visibility="show"
setTimeout("window.onresize=regenerate",450)
intializeleftrightslide()
}
if (document.all)
ieslider.scrollAmount=slidespeed
}

//NS specific function for initializing slider upon page load
function intializeleftrightslide(){
document.ns_slider01.document.ns_slider02.document.write('<nobr>'+finalslide+'</nobr>')
document. ns_slider01.document.ns_slider02.document.close()
thelength=document.ns_slider01.document.ns_slider02.document.width
scrollslide()
}

//NS specific function for sliding slideshow
function scrollslide(){
if (document.ns_slider01.document.ns_slider02.left>=thelength*(-1)){
document.ns_slider01.document.ns_slider02.left-=slidespeed
setTimeout("scrollslide()",100)
}
else{
document.ns_slider01.document.ns_slider02.left=sliderwidth
scrollslide()
}
}
window.onload=regenerate2
