/*
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="the_queen2.html"><img src="images/the_queen_sml.jpg" border=0 alt="The Queen lookalike"></a>'
leftrightslide[1]='<a href="queen_mum2.html"><img src="images/queen_mum_sml.jpg" border=0 alt="Queen Mother lookalike"></a>'
leftrightslide[2]='<a href="princess_margaret2.html"><img src="images/princess_margaret_sml.jpg" border=0 alt="Princess Margaret lookalike"></a>'
leftrightslide[3]='<a href="prince_philip2.html"><img src="images/prince_philip_sml.jpg" border=0 alt="Prince Phillip lookalike"></a>'
leftrightslide[4]='<a href="prince_charles2.html"><img src="images/prince_charles_sml.jpg" border=0 alt="Prince Charles lookalike"></a>'
leftrightslide[5]='<a href="prince_william2.html"><img src="images/prince_william_sml.jpg" border=0 alt="Prince William lookalike"></a>'
leftrightslide[6]='<a href="camilla2.html"><img src="images/camilla_sml.jpg" border=0 alt="Camilla Parker-Bowles lookalike"></a>'
leftrightslide[7]='<a href="fergie2.html"><img src="images/fergie_sml.jpg" border=0 alt="Fergie lookalike"></a>'
leftrightslide[8]='<a href="sophie2.html"><img src="images/sophie_sml.jpg" border=0 alt="Sophie Rhys-Jones 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()
}
}
