
var slideShowSpeed = 5000;
var crossFadeDuration = 10;
var browser = new BrowserCheck();
var t;
var j = 0;
var p = Pic_path.length;

var preLoad = new Array();
for (i = 0; i < p; i++) 
{
	preLoad[i] = new Image();
	preLoad[i].src = Pic_path[i].replace("\'","'");
}

window.onload = runSlideShow

function runSlideShow()
{
	if (document.all) 
	{
		document.images.SlideShow.style.filter="blendTrans(duration=2)";
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();
	}
	document.images.SlideShow.src = preLoad[j].src;
	document.images.SlideShow.alt = Pic_alt[j];
	if (document.all) 
	{
			document.images.SlideShow.filters.blendTrans.Play();
	}
	j = j + 1;
	if (j > (p - 1)) j = 0;
		t = setTimeout('runSlideShow()', slideShowSpeed);
}

function fadeOut(obj) 
{
    obj.style.filter="blendTrans(duration=2)";
	if ((obj.visibility != "hidden") && (obj.filters.blendTrans.status != 2)) 
		{
        obj.filters.blendTrans.Apply();
        obj.style.visibility="hidden";
	    obj.filters.blendTrans.Play();
		}
}
function fadeIn(obj) 
{
	obj.style.filter="blendTrans(duration=2)";
	if ((obj.visibility != "visible") && (obj.filters.blendTrans.status != 2)) 
	{
		obj.filters.blendTrans.Apply();
		obj.style.visibility="visible";
		obj.filters.blendTrans.Play();
	}
}

function BrowserCheck()
{
	var b = navigator.appName;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.version = navigator.appVersion
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0);
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0);
	if (this.ie5) this.v = 5;
	this.min = (this.ns||this.ie);
	this.win = (this.version.indexOf('Win')>0);
	this.mac = (this.version.indexOf('Mac')>0);
}
