

/***********************************************
* 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="190px"  // "300px"
//Specify the slider's height
var sliderheight="250px" // "150px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=1
//configure background color:
slidebgcolor="#EAEAEA"

//Specify the slider's images

var finalslide=''


//Specify gap between each image (use HTML):
var imagegap=" "

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=0


////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=slidespeed
// leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
	document.write('<span id="temp" style="visibility:hidden;position:absolute;top:0px;left:0px">'+leftrightslide+'</span>')
var actualwidth=''
var actualheight=''
var cross_slide, ns_slide

function fillup(){
	if (iedom){
		cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
		cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
		cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
		actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
		actualheight=document.all? cross_slide.offsetHeight : document.getElementById("temp").offsetHeight
		
		cross_slide2.style.top=actualheight+slideshowgap+"px"
		cross_slide2.style.left=0
		cross_slide.style.left=0
	}
	lefttime=setInterval("slidetop()",40)
}
window.onload=fillup


function slidetop(){
	if (iedom){
	
		
		for (ctr=0;ctr<90000;ctr++) ;
		if (parseInt(cross_slide.style.top)>(actualheight*(-1)+8)){
			cross_slide.style.top=parseInt(cross_slide.style.top)-copyspeed+"px"
			}
		else
			cross_slide.style.top=parseInt(cross_slide2.style.top)+actualheight+slideshowgap+"px"

		if (parseInt(cross_slide2.style.top)>(actualheight*(-1)+8)) {
			cross_slide2.style.top=parseInt(cross_slide2.style.top)-copyspeed+"px"
			cross_slide2.style.left=0
//			alert("CAlled");
		}	
		else
			cross_slide2.style.top=parseInt(cross_slide.style.top)+actualheight+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 style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
			write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
			write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
			write('</div></div>')
		}
		
		document.write('</td></table>')
	}
}
