
function slide(name){
	this.name=name;
	this.div1='';
	this.div2='';

	this.timeout=5000;
	this.imgArray=new Array();
	this.doImgNr=1;
	this.start=start;
	this.doSlide=doSlide;
	this.doFading=doFading;

	this.transP=100;

	function start(tout){
		if(isNaN(tout)){tout=1;}
		if(this.imgArray.length>1){setTimeout(name+'.doSlide();',tout);}
	}

	function doSlide(){
		if(this.doImgNr>(this.imgArray.length-1)){this.doImgNr=0;}
		

		var d1=document.getElementById(this.div1);
		var d2=document.getElementById(this.div2);
		if(d1&&d2){
			d2.style.backgroundImage='url('+this.imgArray[this.doImgNr]+')';
			//d2.style.backgroundImage='none';
		}
		var h=this.div1;this.div1=this.div2;this.div2=h;

		this.transP=100;
		this.doFading();

		this.doImgNr++;
		setTimeout(name+'.doSlide()',this.timeout);
	}
	function doFading(){
		var d1=document.getElementById(this.div1);
		var d2=document.getElementById(this.div2);
		this.transP-=5;
		if(!(this.transP>0)){this.transP=0;}

		//filter:alpha(opacity=25);-moz-opacity:.25;opacity:.25
		d1.style.zIndex=1;
		d2.style.zIndex=2;

		d1.style.filter='alpha(opacity=100)';
		d2.style.filter='alpha(opacity='+(this.transP)+')';

		d1.style.opacity=1;
		d2.style.opacity=(this.transP)/100;

		if(this.transP>0){
			setTimeout(name+'.doFading();',50);
		}else{
			var ImgNr = this.doImgNr;
			if(ImgNr >(this.imgArray.length-1)){ImgNr =0;}
			d2.style.backgroundImage='url('+this.imgArray[ImgNr]+')';
		}
	}
}

function printPage(){
	var dl = new String(window.document.location.href);
	if(dl){
		var dlArr = dl.split('/');
		var ndl='';
		for(var i=0;i<dlArr.length-1;i++){
			ndl+=dlArr[i]
			ndl+='/';
		}
		ndl+='index_print.asp';
		if(dlArr[dlArr.length-1]!='/'){
			var gv = new String(dlArr[dlArr.length-1]);
			var gvArr = gv.split('?');ndl+='?'+gvArr[1];
		}
		var wo = window.open(ndl, 'smPrintPage', 'width=630, height=670, menubar=no, scrollbars=yes, resizable=yes, status=no, toolbar=no');
		if(wo){wo.focus(); wo.print();}
	}
}
