/***********************************************
* 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
***********************************************/

// Note: this file is overwritten when the banners are added, deleted or updated
//       please make changes in the AdminOHCA project

var imagegap = " " //Specify gap between each image in a slideshow (use HTML)
var slideshowgap = 7 //Specify pixels gap between each slideshow group rotation (use integer)
var leftrightslide = ""
var wrappoint; 

var sliderwidth = "344px"
var sliderheight = "50px"
slidebgcolor = "#FFFFFF" //configure background color

///// RARELY WILL NEED TO EDIT BELOW THIS LINE /////
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide
var cross_slide2
var widthandgap 
cross_slide2 = document.getElementById("group2")
cross_slide2.style.display = "none"

function fillup(){
 cross_slide = document.getElementById("group1")
 actualwidth = 1521
 cross_slide2.style.display = "block"
 cross_slide2.style.left = (actualwidth + slideshowgap) + "px"
 
 widthandgap = actualwidth + slideshowgap
 wrappoint = -actualwidth + 8
 
 lefttime=setInterval("slideleft()",40)
}
window.onload=fillup

var sliding = true
var nosliding = false

function startslide( param ){
 if( param == "hover" && nosliding == true ) return;
 if( sliding == false ) lefttime = setInterval("slideleft()",40)
 sliding = true
 nosliding = false
}

function stopslide( param ){
 if( param == "click" ) nosliding = true;
 if( sliding == false ) return;
 clearInterval(lefttime)
 sliding = false
}

var slide1pos
var slide2pos

function slideleft(){
 slide1pos = parseInt(cross_slide.style.left)
 slide2pos = parseInt(cross_slide2.style.left)
 
 if( slide1pos > wrappoint ) cross_slide.style.left = --slide1pos + "px"
 else cross_slide.style.left = (slide2pos + widthandgap) + "px"

 if( slide2pos > wrappoint ) cross_slide2.style.left = --slide2pos + "px"
 else cross_slide2.style.left = (slide1pos + widthandgap) + "px"
}

