// JavaScript Document

	function slider(uid,slamt,lrs,slidevar) {

		this.sliderwidth="385px";
		this.sliderheight="80px";
		this.slidespeed=slidevar;
		this.slidebgcolor="transparent";
		this.copyspeed=this.slidespeed;
		this.uniqueid=uid;
		this.slideshowgap=5;
		this.slide_amount=slamt;
		this.finalslide="";
		this.lefttime='';
		this.lrslide = lrs;
		this.actualwidth='';
		this.cross_slide;
		this.cross_slide2;
		//alert("this is sliderspeed "+this.slide_amount+", this is sliderheight "+this.actualwidth);
		
		var tdiv1 = "temp"+this.uniqueid;
		var tdiv2 = "2_"+this.uniqueid;
		var tdiv3 = "3_"+this.uniqueid;
		
		this.iedom=document.all||document.getElementById;
		
		this.fillup = function (){
			
			if (this.iedom){

				this.cross_slide=document.getElementById ? document.getElementById(tdiv2) : document.all.tdiv2;
				this.cross_slide2=document.getElementById ? document.getElementById(tdiv3) : document.all.tdiv3;
				this.cross_slide.innerHTML=this.cross_slide2.innerHTML=this.lrslide;
				this.actualwidth=document.all? this.cross_slide.offsetWidth : document.getElementById(tdiv1).offsetWidth;
				this.cross_slide2.style.left=this.actualwidth+this.slideshowgap+"px";
				//alert('here');
			}
			var self = this;
  		this.lefttime = setInterval( function () { self.slideleft(); }, 30 ) ;			
			//this.lefttime=setInterval(this.slideleft,30)
			//alert(this.lefttime);
		}	

		this.slideleft = function (){
			if (this.iedom){

				//alert('getting here?');
				if (parseInt(this.cross_slide.style.left)>(this.actualwidth*(-1)+8)) {
					this.cross_slide.style.left=parseInt(this.cross_slide.style.left)-this.copyspeed+"px"
				} else {
					this.cross_slide.style.left=parseInt(this.cross_slide2.style.left)+this.actualwidth+this.slideshowgap+"px"
				}
				
				if (parseInt(this.cross_slide2.style.left)>(this.actualwidth*(-1)+8)){
					this.cross_slide2.style.left=parseInt(this.cross_slide2.style.left)-this.copyspeed+"px"
				} else {
					this.cross_slide2.style.left=parseInt(this.cross_slide.style.left)+this.actualwidth+this.slideshowgap+"px"
				}
			}			
		}
		
		if (this.iedom) {

			document.write('<table border="0" cellspacing="0" cellpadding="0"><td valign="middle">');
			document.write('<div style="position:relative;width:'+this.sliderwidth+';height:'+this.sliderheight+';overflow:hidden">')
			document.write('<div style="position:absolute;width:'+this.sliderwidth+';height:'+this.sliderheight+';background-color:'+this.slidebgcolor+'" onMouseover="row'+this.uniqueid+'.copyspeed=0" onMouseout="row'+this.uniqueid+'.copyspeed='+this.slidespeed+'">')

			//section 1
			document.write('<div id="'+tdiv2+'" style="position:absolute;left:0px;top:0px"></div>')
			
			//section 2
			document.write('<div id="'+tdiv3+'" style="position:absolute;left:-1000px;top:0px"></div>')
			document.write('</div></div>')
			document.write('</td></table>')
		}

		/*
		this.goFaster = function () {
			if (copyspeed < 10) copyspeed++;
			//else alert("You are at the maximum speed");
		}

		this.goSlower = function () {
			if (copyspeed > 1) copyspeed--;
			//else alert("You are at the minimum speed");
		}
		*/		
		
	}
