 function SlideShow(slideList, altList, linkList, image, speed, name)
{
	this.slideList = slideList;
	this.altList = altList;
	this.linkList = linkList;
	this.image = image;
	this.speed = speed;
	this.name = name;
	this.current = -1;
	this.timer = 0;
	this.flag = true;
	this.imgwidth = 520;
	this.imgheight =240;
	this.ShowPageType=0;
	this.ShowPageWidth=800;
	this.ShowPageHeight=600;
}
 function SlideShowSize(slideList, altList, linkList, image, speed, name,imgWidth,imgHeight,showPageType,showPageWidth,showPageHeight)
{
	this.slideList = slideList;
	this.altList = altList;
	this.linkList = linkList;
	this.image = image;
	this.speed = speed;
	this.name = name;
	this.current = -1;
	this.timer = 0;
	this.flag = true;
	this.imgwidth=imgWidth;
	this.imgheight=imgHeight;	
	this.ShowPageType=showPageType;	
	this.ShowPageWidth=showPageWidth;
	this.ShowPageHeight=showPageHeight;
}
SlideShow.prototype.over = SlideShow_over;
SlideShow.prototype.out = SlideShow_out;
SlideShow.prototype.play = SlideShow_play;
SlideShow.prototype.next = SlideShow_next; 
SlideShow.prototype.go = SlideShow_go;
SlideShow.prototype.init = SlideShow_init;
SlideShowSize.prototype.over = SlideShow_over;
SlideShowSize.prototype.out = SlideShow_out;
SlideShowSize.prototype.play = SlideShow_play;
SlideShowSize.prototype.next = SlideShow_next; 
SlideShowSize.prototype.go = SlideShow_go;
SlideShowSize.prototype.init = SlideShow_init;
function SlideShow_go()
{
   if(this.ShowPageType==0)
	  window.open(this.linkList[this.current],'newwindow');
   else
	  window.open(this.linkList[this.current],'','width='+this.ShowPageWidth+',height='+this.ShowPageHeight);
}
function SlideShow_init()
{
	var s= this.name + ".go()";
	document.write('<a href="javascript:' + s +'"> <img style="FILTER: BlendTrans(duration=1);" scr="' + this.slideList[this.current] +'"name="'+this.image+'"></a>');
	document.write('<div style="FILTER: ALPHA(opacity=90);position:relative;left:-5px;text-align:left;overflow: hidden;top:-23px;height:20px;">');
	document.write('<div style="left:0px;text-align: right; width:inherit;">');
	for(var i=0;i<this.slideList.length;i++){
		s= this.name + ".next('" + i + "')";
		var sover = this.name + ".over('" + i + "')";
		var sout = this.name + ".out('" + i + "')";
		document.write('<a style=\"padding:0px 5px;border:solid 1px #eee;\" id="link'+i+'" href="javascript:' + s + '" class="button" style="cursor:hand;" onmouseover="'+ sover+ '" onmouseout="'+ sout+ '" title="'+this.altList[i]+'">'+ (i+1) +'</a>');
	}
	document.write('</div>');
	document.write('</div>');
}
function SlideShow_over(id)
{
	document.getElementById('link'+id).style.color="#fff";
	document.getElementById('link'+id).style.background="#f90";
}
function SlideShow_out(id)
{
	if (this.current == id){
		document.getElementById('link'+id).style.color="#fff";
		document.getElementById('link'+id).style.background="#f60";
	}
	else
	{
		document.getElementById('link'+id).style.color="#fff";
		document.getElementById('link'+id).style.background="#aaa";
	}
}
function SlideShow_next(id) 
{
	if (document.images)
	{
		if (this.slideList[id] != "none")
		{
			this.current = id;
			if (navigator.appName != "Netscape")
			{
				if (this.flag == false)
				{
					document.images[this.image].filters.BlendTrans.apply();
				}
			}
			document.images[this.image].src = this.slideList[id];
			document.images[this.image].alt = this.altList[id];
			document.images[this.image].width  = this.imgwidth;
			document.images[this.image].height = this.imgheight;
			document.getElementById('link'+id).style.color="#FFFFFF";
			document.getElementById('link'+id).style.background="#f60";
			for (var i=0;i<this.slideList.length;i++)
			{
			   if (i != id){
				   document.getElementById('link'+i).style.color="#fff";
				   document.getElementById('link'+i).style.background="#aaa";
				}
			}
			if (navigator.appName != "Netscape")
			{
				if (this.flag)
				{
					this.flag = false;
				}
				else if (document.all)
				{
					document.images[this.image].filters.BlendTrans.play();
				}
			}
			clearTimeout(this.timer);
			this.timer = setTimeout(this.name+'.play()', this.speed);
		}
	}
}
function SlideShow_play()
{
	with(this)
	{
		current++;
		current = current % slideList.length;
		next(current);
	}
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

