var wWidth;var wHeight;function resize(){	wWidth = document.documentElement.clientWidth ? document.documentElement.clientWidth : window.innerWidth;	wHeight = document.documentElement.clientHeight ? document.documentElement.clientHeight : window.innerHeight;}window.onresize=resize;resize();openslideshow=function(arr, arrText, dir, num){	var thisobjc = this;	this._arr = arr;	this._dir = dir || '';	this._arrtxt = arrText || [];	this.counter=num;	this.lightbox = document.getElementById("lightbox");	$(this.lightbox).setStyle("display", "block");	$(this.lightbox).addEvent("click", function(e){thisobjc.delLB(e)});		thisobjc.delLB=function(e){		var target = PTDoom.getTarget(e);		if(target.className=="ssImage"||target.className=="comment"){			return false;		}		$(this.lightbox).empty();		$(this.lightbox).setStyle("display", "none");	}	this.refr = function (){		var t = new Image;		t.onload=function(){						if (typeof thisobjc.para != 'undefined') {				$(thisobjc.para).empty();				if (typeof thisobjc._arrtxt[thisobjc.counter] != 'undefined') {					thisobjc.para.innerHTML = thisobjc._arrtxt[thisobjc.counter];				}			}						var pcw= Math.min(this.width, wWidth-20)*100/this.width;			var pch= this.height*100/this.height;						thisobjc.img.style.width=(Math.min(this.width, wWidth-20)*pch/100)+'px';			thisobjc.img.style.height=(this.height*pcw/100)+'px';						thisobjc.img.parentNode.style.width=(Math.min(this.width, wWidth-20)*pch/100)+'px';												thisobjc.img.src = t.src;						thisobjc.img.parentNode.parentNode.style.height=(Math.max(document.getElementById('seite').offsetHeight, document.getElementById('bildHandler').offsetHeight+70))+'px';			thisobjc.img.parentNode.parentNode.style.width=(Math.max(document.getElementById('seite').offsetWidth, wWidth))+'px';					}		t.src = GLOBAL.PATH+thisobjc._dir+"/"+thisobjc._arr[thisobjc.counter];	}	this.content=function(){		var div =$("div").get();		div.id = "bildHandler";				thisobjc.img =$("img").get();		thisobjc.img.className='ssImage';		if(thisobjc._arr.length>1){			/*var a = $("a").get();			a.href="#";			var bleft = $("div").get();			bleft.className = "bLeft";			$(bleft).addEvent("click", thisobjc.prevPic);			$(a).append(bleft);			$(div).append(a);*/						var a2 = $("a").get();			a2.className='comment';			//a2.href="#";			//var bright = $("div").get();			//bright.className = "bRight";			$(a2).addEvent("click", thisobjc.nextPic);			//$(a2).append(bright);			$(div).append(a2);			$(a2).append(thisobjc.img);		}else{			$(div).append(thisobjc.img);		}						if (thisobjc._arrtxt.length!=0) {			thisobjc.para = $("p").get();			thisobjc.para.className = "fotoUB";			$(div).append(thisobjc.para);		}		thisobjc.refr();				$(thisobjc.lightbox).append(div);					}	this.prevPic = function(){		if(thisobjc.counter>0){		   thisobjc.counter=thisobjc.counter-1;		 }else{			 thisobjc.counter=thisobjc._arr.length-1;		}		thisobjc.refr();		return false;	}		this.nextPic = function (){		if(thisobjc.counter<thisobjc._arr.length-1){			thisobjc.counter=thisobjc.counter+1;		 }else{			thisobjc.counter=0;		}		thisobjc.refr();		return false;	}	this.content();	return{			}}