XSAg = window.navigator.userAgent; XSBVers = parseInt(XSAg.charAt(XSAg.indexOf("/")+1),10);XSAppName = window.navigator.appName;function XSIsIE() { return XSAg.indexOf("MSIE") > 0;}function XSIEStyl(s) { if (document.all.tags("div")[s] != null) return document.all.tags("div")[s].style; else return null;}function XSNSStyl(s) { return XSFindElement(s,0); }function XSFindElement(n,ly) { if (XSBVers < 4) return document[n];    var curDoc = ly ? ly.document : document; var elem = curDoc[n];    if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {        elem = XSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}    return elem;}XSIm = new Object();function XSClickReturn () {	var bAgent = window.navigator.userAgent; 	var bAppName = window.navigator.appName;	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))		return true; 	else return false; }function XSPreloadImage(name, index, url) {    if (document.images) {        if (XSIm[name] == null)            XSIm[name] = new Object();        XSIm[name][index] = new Image();         XSIm[name][index].src = url;     }}function XSSwitchButton(name, index, status) {    if (document.images) {        if (XSIm[name]) {            var img = (!XSIsIE()) ? XSFindElement(name,0) : document[name];            if (img && typeof(XSIm[name][index].src) != "undefined")  {                img.src = XSIm[name][index].src;            }            self.status = status;            return true;        }    }    return false;}function XSPopupURLGoto(popup) {
	location = popup.options[popup.selectedIndex].value;
}function XSGotoLink(frame, url) {    if (frame != "null") {        var hasFrame=false;		for(i=0;i<parent.frames.length;i++) {			if (parent.frames[i].name==frame) {     	  		hasFrame=true;      	  		break;        	}     	}     	if (hasFrame==true) {     		parent.frames[frame].location = url;     	}     	else {        	parent.location = url;		}    }    else     	location = url;}function XSOpenWindow(url, windowname, width, height, resizable, scrollbars, menubar, toolbar, directories, location, status) { 	var wf = "";		wf = wf + "width=" + width;	wf = wf + ",height=" + height;	wf = wf + ",resizable=" + (resizable ? "yes" : "no");	wf = wf + ",scrollbars=" + (scrollbars ? "yes" : "no");	wf = wf + ",menubar=" + (menubar ? "yes" : "no");	wf = wf + ",toolbar=" + (toolbar ? "yes" : "no");	wf = wf + ",directories=" + (directories ? "yes" : "no");	wf = wf + ",location=" + (location ? "yes" : "no");	wf = wf + ",status=" + (status ? "yes" : "no");			window.open(url,windowname,wf);}function XSCloseWindow() { if (self.parent.frames.length != 0) {	self.parent.close()		} else {	window.close()	}}function XSURLPopupLocationChange(popup, target) {	window.open(popup.options[popup.selectedIndex].value, target);}function XSStatelessImageSlideShowFadeInOut(slideShowName, timeStanding, timeFading) {	this._slideShowName = slideShowName;	this._ulThumbsElement = document.getElementById(this._slideShowName+"Thumbs");	this._imageDivElement = document.getElementById(this._slideShowName+"Image");	this._liElementArray = this._ulThumbsElement.getElementsByTagName('li');	this._timeoutStanding = timeStanding;	this._timeoutFading = timeFading;	this._imageIndex = 0;	this._imageCount = this._liElementArray.length;		this.init();	var thisObj = this;	this.interval = setInterval(function() { thisObj.run(); }, this._timeoutStanding);}XSStatelessImageSlideShowFadeInOut.prototype.init = function() {	x=0;		for (x=0;x<this._liElementArray.length;x++) {		var img = this.getImg(x);		if (x==0) {			img.style.visibility = "visible";			this.changeOpacity(100, img.id);		}		else {			this.changeOpacity(0, img.id);		}	}}XSStatelessImageSlideShowFadeInOut.prototype.run = function() {	var _nextIndex = (this._imageIndex+1) % this._imageCount;	var imgElement = this.getImg(_nextIndex); 	if (!imgElement.complete)		return;		var oldImgElement = this.getImg(this._imageIndex); 	oldImgElement.style.visibility = "visible";	imgElement.style.visibility = "visible";	this.fadeOut(oldImgElement);	this.fadeIn(imgElement);		this._imageIndex = _nextIndex;}XSStatelessImageSlideShowFadeInOut.prototype.fadeOut = function(img) {	this.fadeOpacity(img, 100, 0, this._timeoutFading);}XSStatelessImageSlideShowFadeInOut.prototype.fadeIn = function(img) {	this.fadeOpacity(img, 0, 100, this._timeoutFading);}XSStatelessImageSlideShowFadeInOut.prototype.getImg = function(index) {	var imgID = this._slideShowName+"Image"+index;	var imgElement = document.getElementById(imgID);	if (!imgElement) {		imgElement=document.createElement('img');		imgElement.id = imgID;		this._imageDivElement.appendChild(imgElement);		var liImg = this._liElementArray[index].childNodes[0];		imgElement.style.visibility = "hidden";		imgElement.src = liImg.src;			}	return imgElement;}	XSStatelessImageSlideShowFadeInOut.prototype.fadeOpacity = function(elem, opacStart, opacEnd, sec) {	var speed = Math.round(sec / 100); 	var timer = 0; 	if(opacStart > opacEnd) { 		var thisObj = this;		for(i = opacStart; i >= opacEnd; i--) { 			setTimeout(this._slideShowName+".changeOpacity("+i+", '"+elem.id+"')", (timer * speed));			timer++; 		} 	} 	else if(opacStart < opacEnd) { 		for(i = opacStart; i <= opacEnd; i++) { 			setTimeout(this._slideShowName+".changeOpacity("+i+", '"+elem.id+"')", (timer * speed));			timer++; 		 }	} } XSStatelessImageSlideShowFadeInOut.prototype.changeOpacity = function(opacity, id) { 	var object = document.getElementById(id).style; 	object.opacity = (opacity / 100); 	object.MozOpacity = (opacity / 100); 	object.KhtmlOpacity = (opacity / 100); 	object.filter = "alpha(opacity=" + opacity + ")";}
