function startslideshow(slideshowname,slideshowcontent,trans_width,trans_height,pause,degree,divtoappend)
{
	this.bgcolor='white';
	this.name = slideshowname;
	this.divtoappend = divtoappend;
	this.trans_width = trans_width;
	this.trans_height = trans_height;
	this.pause = pause;
	this.degree = degree;

	this.imageholder=new Array();
	this.slideshowcontent = slideshowcontent;
	for (i=0;i<slideshowcontent.length;i++){
		this.imageholder[i]=new Image();
		this.imageholder[i].src=slideshowcontent[i][0];
	}

	this.ie4=document.all;
	this.dom=document.getElementById;

	if (this.ie4||this.dom)
	{
		//document.write('<div style="position:relative;width:'+this.trans_width+';height:'+this.trans_height+';overflow:hidden"><div id=this.divtoappend+"canvas0" style="position:absolute;background-color:'+this.bgcolor+';width:'+this.trans_width+';height:'+this.trans_height+';left:-'+this.trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id=+"canvas1" style="position:absolute;background-color:'+this.bgcolor+';width:'+this.trans_width+';height:'+this.trans_height+';left:-'+this.trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>');
		document.getElementById(this.divtoappend).innerHTML = '<div style="position:relative;width:'+this.trans_width+';height:'+this.trans_height+';overflow:hidden"><div id="'+this.divtoappend+'canvas0" style="position:absolute;background-color:'+this.bgcolor+';width:'+this.trans_width+';height:'+this.trans_height+';left:-'+this.trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="'+this.divtoappend+'canvas1" style="position:absolute;background-color:'+this.bgcolor+';width:'+this.trans_width+';height:'+this.trans_height+';left:-'+this.trans_width+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>';
		
	}
	else if (document.layers){
		document.write('<ilayer id=tickernsmain visibility=hide width='+this.trans_width+' height='+this.trans_height+' bgColor='+this.bgcolor+'><layer id=tickernssub width='+this.trans_width+' height='+this.trans_height+' left=0 top=0>'+'<img src="'+slideshowcontent[0][0]+'"></layer></ilayer>');
	}

	this.curpos=this.trans_width*(-1);
	this.curcanvas=this.divtoappend+"canvas0";
	this.curindex=0;
	this.nextindex=1;

	this.getslidehtml = function(theslide){
		var slidehtml="";
		if (theslide[1]!="")
			slidehtml='<a href="'+theslide[1]+'" target="'+theslide[2]+'">';
		slidehtml+='<img src="'+theslide[0]+'" border="0">';
		if (theslide[1]!="")
			slidehtml+='</a>';
		return slidehtml;
	}

	this.moveslide = function(){
		if (this.curpos<0){
			this.curpos=Math.min(this.curpos+this.degree,0);
			this.tempobj.style.left=this.curpos+"px";
		}
		else{
			clearInterval(this.dropslide);
			if (this.crossobj.filters)
				this.crossobj.filters.alpha.opacity=100;
			else if (this.crossobj.style.MozOpacity)
				this.crossobj.style.MozOpacity=1;
			this.nextcanvas=(this.curcanvas==this.divtoappend+"canvas0")? divtoappend+"canvas0" : divtoappend+"canvas1";
			this.tempobj=this.ie4? eval("document.all."+this.nextcanvas) : document.getElementById(this.nextcanvas);
			this.tempobj.innerHTML=this.getslidehtml(this.slideshowcontent[this.curindex]);
			this.nextindex=(this.nextindex<this.slideshowcontent.length-1)? this.nextindex+1 : 0;
			setTimeout(this.name+ ".rotateslide()",this.pause);
		}
	}
	this.rotateslide = function(){
		if (this.ie4||this.dom){
			this.resetit(this.curcanvas);
			this.crossobj=this.tempobj=this.ie4? eval("document.all."+this.curcanvas) : document.getElementById(this.curcanvas);
			this.crossobj.style.zIndex++;
			if (this.crossobj.filters)
			{
				var canvaszero = divtoappend+"canvas0";
				var canvasone = divtoappend+"canvas1";
				document.all.canvaszero.filters.alpha.opacity=document.all.canvasone.filters.alpha.opacity=20;
			}
			else if (this.crossobj.style.MozOpacity)
				document.getElementById(divtoappend+"canvas0").style.MozOpacity=document.getElementById(divtoappend+"canvas1").style.MozOpacity=0.2;
			this.dropslide=setInterval(this.name + ".moveslide();",50);
			this.curcanvas=(this.curcanvas==this.divtoappend+"canvas0")? this.divtoappend+"canvas1" : this.divtoappend+"canvas0";
		}
		else if (document.layers){
			this.crossobj.document.write(this.getslidehtml(this.slideshowcontent[curindex]));
			this.crossobj.document.close();
		}
		this.curindex=(this.curindex<this.slideshowcontent.length-1)? this.curindex+1 : 0;
	}

	this.jumptoslide = function(which){
		this.curindex=which;
		eval(this.name + ".rotateslide();");
	}

	this.resetit = function(what){
		this.curpos=parseInt(this.trans_width)*(-1)
		this.crossobj=this.ie4? eval("document.all."+what) : document.getElementById(what)
		this.crossobj.style.left=this.curpos+"px"
	}

	this.startit = function (){
		this.crossobj=this.ie4? eval("document.all."+this.curcanvas) : this.dom? document.getElementById(this.curcanvas) : document.tickernsmain.document.tickernssub;
		if (this.ie4||this.dom){
			this.crossobj.innerHTML=this.getslidehtml(this.slideshowcontent[this.curindex]);
			eval(this.name + ".rotateslide();");
		}
		else{
			document.tickernsmain.visibility='show';
			this.curindex++;
			setInterval(this.name + ".rotateslide();",this.pause);
		}
	}
}
