﻿/***********************************************
* Conveyor belt slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Specify the slider's width (in pixels)
var sliderwidth="880px"
//Specify the slider's height
var sliderheight="101px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=1
//configure background color:
slidebgcolor="#FFFFFF"

//Specify gap between each image (use HTML):
var imagegap=""

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=-1


////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=slidespeed
leftrightslide = leftrightslide.join(imagegap);
var iedom=document.all||document.getElementById
//if (iedom)
//document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide

function fillup()
{
	cross_slide = document.getElementById("block1");
	cross_slide2= document.getElementById("block2");
	cross_slide.innerHTML = cross_slide2.innerHTML = leftrightslide;

// actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth

	actualwidth = cross_slide.offsetWidth;
	actualwidth = 1760;

	cross_slide2.style.left = actualwidth + slideshowgap + "px";
	
	cross_slide.style.width = actualwidth + 'px';
	cross_slide2.style.width = actualwidth + 'px';
	
	lefttime = setInterval("slideleft()",30);
}

window.onload = fillup;

function slideleft()
{
	if (parseInt(cross_slide.style.left) > (actualwidth*(-1)))
		cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
	else cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"
	
	if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)))
	cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
	else cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"
}

if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onmouseover="copyspeed=0" onmouseout="copyspeed=slidespeed">')
write('<div id="block1" style="position:absolute;left:0px;top:0px;height:'+sliderheight+'"></div>')
write('<div id="block2" style="position:absolute;left:-1000px;top:0px;height:'+sliderheight+'"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}