<!--
	


var Slider = function(fP) {
		
		// Elements function
		
		this.e = function(fObj) { return( typeof(fObj) == "object" ? fObj : document.getElementById(fObj) ); }
		
		// Variables
		
		this.n         = fP["name"]      ? fP["name"]              : ""   ;
		this.container = fP["container"] ? this.e(fP["container"]) : null ;
		this.width     = fP["width"]     ? fP["width"]             : 0    ;
		this.height    = fP["height"]    ? fP["height"]            : 0    ;
		
		this.pictures = new Array();
		this.c = Math.round( Math.random() * 1000000000 );
		this.isPlaying = true;
		this.currPicture = -1;
		this.playTimer = null;
		this.zindex = 0;
		
		// Add picture to the slider
		
		this.add = function(fP) {
			
			var iFilename = fP["filename"] ? fP["filename"] : ""       ;
			var iLink     = fP["link"]     ? fP["link"]     : ""       ;
			var iTarget   = fP["target"]   ? fP["target"]   : "_blank" ;
			var iTitle    = fP["title"]    ? fP["title"]    : ""       ;
			
			if (iFilename != "") {
				
				this.pictures.push({
					"filename":iFilename,
					"link":iLink,
					"target":iTarget,
					"title":iTitle
				});
				
			}
			
		};
		
		// Rendering
		
		this.render = function() {
			
			var out = "";
			
			out += "<div style=\"padding-right:0px;overflow:hidden;position:relative; width:" + this.width + "%; height:" + this.height + "px;\">";
			for ( var i = 0 ; i < this.pictures.length ; i++ ) {
				out += "<div id=\"rocheposayslideshow_pic_" + this.c + "_" + i + "\" title=\"" + this.pictures[i]["title"] + "\" style=\"overflow:hidden;position:absolute; left:0px; top:0px; width:" + this.width + "%; height:" + this.height + "px;"+/* background-image:url('" + this.pictures[i]["filename"] + "'); background-repeat:no-repeat; background-position:center;*/" background-color:#FFFFFF; opacity:0; -moz-opacity:0; filter:alpha(opacity=0);\">";
				out += "<img src=\"" + this.pictures[i]["filename"] + "\" alt=\"\" style=\"display:block; position:relative;\" />";
				if (this.pictures[i]["link"] != "") out += "<a href=\"" + this.pictures[i]["link"] + "\" target=\"" + this.pictures[i]["target"] + "\" style=\"position:absolute; left:0px; top:0px; width:100%; height:100%;\"></a>";
				out += "</div>";
			}
			out += "</div>";
			
			this.container.innerHTML = out;
			
			this.container.style.overflow = "hidden";
			if (this.width > 0) this.container.style.width = this.width + "%";
			if (this.height > 0) this.container.style.height = this.height + "px";
			
			this.next();
			
		};
		
		// Playing function
		
		this.next = function() {
			
			if (this.isPlaying) {
				
				this.zindex++;
				
				var lastPic = this.currPicture;
				
				if (this.currPicture < this.pictures.length - 1) {
					this.currPicture++;
				} else {
					this.currPicture = 0;
				}
				
				for ( var i = 0 ; i < this.pictures.length ; i++ ) {
					this.e("rocheposayslideshow_pic_" + this.c + "_" + i).style.zIndex = 0;
				}
				
				this.e("rocheposayslideshow_pic_" + this.c + "_" + this.currPicture).style.zIndex = 1;
				
				$(this.e("rocheposayslideshow_pic_" + this.c + "_" + lastPic)).animate({
					opacity:0
				}, 1500 );
				
				$(this.e("rocheposayslideshow_pic_" + this.c + "_" + this.currPicture)).animate({
					opacity:1
				}, 1500 , function(fC,fLast) {
					return(function() {
						if (fLast != -1) {
							$(fC.e("rocheposayslideshow_pic_" + fC.c + "_" + fLast)).animate({
								opacity:0
							}, 10 );
						}
					});
				}(this,lastPic) );
				
				setTimeout(this.n + ".next()",9000);
				
			}
			
		}
		
	};
	
-->