var closingSign="x";var loadingSign="L.O.A.D.I.N.G";var beforeSign="&lt;";var nextSign="&gt;";var borderDV=2;var paddingClosingSign=4;var spaceDV=20;var borderColorDV="#FF0000";var bgColorDV="#FFFFFF";var bgOpacity=40;var baseZIndex=1000;var dv=new DVObject();function initDV(){dv.writeHtmlCode();DHTML_init();dv.setAttributes();RegisterKeyEvents()}function DVObject(){this.htmlCode;this.parentDV;this.childDVCont;this.childDVClose;this.childDVLoad;this.childDVBefore;this.childDVNext;this.errorMessage;this.img=new DVImg();this.swapImg;this.allImages;this.currentDisplayedImage}function DVImg(){this.src;this.width;this.height;this.border;this.alt}DVObject.prototype.writeHtmlCode=function(){dv.htmlCode='<div id="parentDV">\n<div id="childDVCont"><img src="" width="10" height="10" border="0" alt="" title="" name="picDV"></div>\n<div id="childDVLoad">'+loadingSign+'</div><div id="childDVClose" onClick="dv.hideDV();" title="Schliessen!">'+closingSign+'</div><div id="childDVBefore" onClick="dv.showLastImage();" title="Vorheriges Bild"><b>'+beforeSign+'</b></div><div id="childDVNext" onClick="dv.showNextImage();" title="Nächstes Bild"><b>'+nextSign+"</b></div></div></div>";window.document.writeln(dv.htmlCode)};DVObject.prototype.setAttributes=function(){dv.parentDV=getElem("id","parentDV",null);dv.childDVCont=getElem("id","childDVCont",null);dv.childDVClose=getElem("id","childDVClose",null);dv.childDVLoad=getElem("id","childDVLoad",null);dv.childDVBefore=getElem("id","childDVBefore",null);dv.childDVNext=getElem("id","childDVNext",null);with(dv.parentDV.style){position="absolute";zIndex=baseZIndex+100;border=borderDV+"px solid "+borderColorDV;visibility="hidden"}with(dv.childDVCont.style){position="relative";zIndex=baseZIndex+1;visibility="hidden"}with(dv.childDVClose.style){position="absolute";zIndex=baseZIndex+2;cursor="pointer";right=paddingClosingSign+"px";top=paddingClosingSign+"px";width=25+"px";height=20+"px";textAlign="center";verticalAlign="middle";border=borderDV+"px solid "+borderColorDV;padding=2+"px";color=borderColorDV;backgroundColor=bgColorDV;visibility="hidden"}dv.setOpacityStyle(dv.childDVClose.style);with(dv.childDVLoad.style){position="absolute";zIndex=baseZIndex+2;left=borderDV+"px";bottom=borderDV+"px";height=20+"px";textAlign="center";verticalAlign="middle";border=borderDV+"px solid "+borderColorDV;padding=2+"px";color=borderColorDV;backgroundColor=bgColorDV;visibility="hidden"}dv.setOpacityStyle(dv.childDVLoad.style);with(dv.childDVBefore.style){position="absolute";zIndex=baseZIndex+1;top=paddingClosingSign+"px";left=paddingClosingSign+"px";cursor="pointer";textAlign="center";verticalAlign="middle";height=20+"px";padding=2+"px";border=borderDV+"px solid "+borderColorDV;color=borderColorDV;backgroundColor=bgColorDV;visibility="hidden"}dv.setOpacityStyle(dv.childDVBefore.style);var wNext=2*paddingClosingSign+parseInt(dv.childDVClose.style.width);if(!document.all){wNext=wNext+4*borderDV}with(dv.childDVNext.style){position="absolute";zIndex=baseZIndex+1;top=paddingClosingSign+"px";right=wNext+"px";cursor="pointer";textAlign="center";verticalAlign="middle";height=20+"px";padding=2+"px";border=borderDV+"px solid "+borderColorDV;color=borderColorDV;backgroundColor=bgColorDV;visibility="hidden"}dv.setOpacityStyle(dv.childDVNext.style);this.swapImg=document.images.picDV;dv.errorMessage=""};DVObject.prototype.showDV=function(imgString){dv.errorMessage="";dv.hideDV();dv.checkImgParameter(imgString);if(dv.errorMessage==""){var width=dv.img.width+2*borderDV+2*spaceDV;var height=dv.img.height+2*borderDV+2*spaceDV;var mid=dv.getMiddlePosition(width,height);with(dv.swapImg){src=dv.img.src;title=dv.img.alt;alt=dv.img.title;width=mid.width-(2*borderDV+2*spaceDV);height=mid.height-(2*borderDV+2*spaceDV)}with(dv.parentDV.style){width=(mid.width-(2*borderDV+2*spaceDV))+"px";height=(mid.height-(2*borderDV+2*spaceDV))+"px";top=(mid.top+borderDV+spaceDV)+"px";left=(mid.left+borderDV+spaceDV)+"px";visibility="visible"}with(dv.childDVCont.style){visibility="visible"}with(dv.childDVClose.style){visibility="visible"}with(dv.childDVBefore.style){visibility="visible"}with(dv.childDVNext.style){visibility="visible"}dv.showLoadDV();dv.checkBeforeAndNextImages(imgString)}else{alert(dv.errorMessage)}};DVObject.prototype.hideDV=function(){with(dv.parentDV.style){visibility="hidden"}with(dv.childDVCont.style){visibility="hidden"}with(dv.childDVClose.style){visibility="hidden"}with(dv.childDVLoad.style){visibility="hidden"}with(dv.childDVBefore.style){visibility="hidden"}with(dv.childDVNext.style){visibility="hidden"}with(dv.swapImg){src="";width=10;height=10}};DVObject.prototype.showLoadDV=function(){with(dv.childDVLoad.style){visibility="visible"}dv.checkLoad()};DVObject.prototype.checkLoad=function(){if(document.images.picDV.complete==false||dv.img.src==""){window.setTimeout("dv.checkLoad()",200)}else{with(dv.childDVLoad.style){visibility="hidden"}}};DVObject.prototype.checkImgParameter=function(c){if(c){var b=/src=["]?[a-zA-Z0-9.:_\-\/]+["]?/;var e=/width=["]?\d+["]?/;var d=/height=["]?\d+["]?/;var a=/alt=["]?[a-zA-Z0-9._\/&; ]*["]?/;var g=/title=["]?[a-zA-Z0-9._\-\/&; ]*["]?/;var f=/[a-zA-Z0-9._\/]+/;if(dv.regSearch(c,b,"test")){dv.img.src=dv.regSearch(c,b,"exec")+"";dv.img.src=dv.img.src.substring(5,dv.img.src.length-1)}else{dv.errorMessage+="# The given Parameter within the dv.showDV-call does not consist of an src='...'!\n"}if(dv.regSearch(c,e,"test")){dv.img.width=parseInt(dv.regSearchNumber(dv.regSearch(c,e,"exec")))}else{dv.errorMessage+="# The given Parameter within the dv.showDV-call does not consist of an width='...'!\n"}if(dv.regSearch(c,d,"test")){dv.img.height=parseInt(dv.regSearchNumber(dv.regSearch(c,d,"exec")))}else{dv.errorMessage+="# The given Parameter within the dv.showDV-call does not consist of an hidth='...'!\n"}if(dv.regSearch(c,a,"test")){dv.img.alt=dv.regSearch(c,a,"exec")+"";dv.img.alt=dv.img.alt.substring(5,dv.img.alt.length-1);dv.img.alt=dv.decodeHtml(dv.img.alt)}if(dv.regSearch(c,g,"test")){dv.img.title=dv.regSearch(c,g,"exec")+"";dv.img.title=dv.img.title.substring(7,dv.img.title.length-1);dv.img.title=dv.decodeHtml(dv.img.title)}}else{dv.errorMessage+="# The Parameter within the dv.showDV-call is null!\n"}};DVObject.prototype.decodeHtml=function(a){a=a.replace(/&auml;/,"ä");a=a.replace(/&Auml;/,"Ä");a=a.replace(/&uuml;/,"ü");a=a.replace(/&Uuml;/,"Ü");a=a.replace(/&ouml;/,"ö");a=a.replace(/&Ouml;/,"Ö");a=a.replace(/&szlig;/,"ß");return a};DVObject.prototype.regSearch=function(a,b,c){if(c=="exec"){return b.exec(a)}else{if(c=="test"){return b.test(a)}else{dv.errorMessage+="There is no fct-parameter given in the regSearch-call!"}}};DVObject.prototype.regSearchNumber=function(a){if(!isFinite(a)){return dv.regSearch(a,/[-]?\d+([,.]\d+)?/,"exec")}else{dv.errorMessage+="The given string ("+a+") does not consist of a number!\n"}};DVObject.prototype.getMiddlePosition=function(c,f){var a=dv.getScreenSize("width","inner");var e=dv.getScreenSize("height","inner");var b=new Array(4);if(a<c||e<f){if(a/c>e/f){var d=f;f=e;c=f*c/d}else{var d=c;c=a;f=c*f/d}}b.width=Math.round(c);b.height=Math.round(f);if(a/c<e/f){b.top=Math.round((e-f)/2)}else{b.top=Math.round((e-f)/2)}if(a/c>e/f){b.left=Math.round((a-c)/2)}else{b.left=Math.round((a-c)/2)}if(MS){if(document.documentElement.scrollTop){b.top+=document.documentElement.scrollTop}else{b.top+=document.body.scrollTop}if(document.documentElement.scrollLeft){b.left+=document.documentElement.scrollLeft}else{b.left+=document.body.scrollLeft}}else{b.top+=window.pageYOffset;b.left+=window.pageXOffset}return b};DVObject.prototype.getScreenSize=function(b,a){var f=navigator.userAgent.toLowerCase();var e=((f.indexOf("msie")!=-1)&&(f.indexOf("opera")==-1));var d=(window.document.getElementById)?true:false;var c;if(a=="inner"){if(e){if(b=="width"){c=document.documentElement.offsetWidth?document.documentElement.offsetWidth:document.body.offsetWidth}else{c=document.documentElement.offsetHeight?document.documentElement.offsetHeight:document.body.offsetHeight}}else{if(d){if(b=="width"){c=window.innerWidth}else{c=window.innerHeight}}else{BrowserFailure()}}}else{if(a=="outer"){if(b=="width"){c=screen.availWidth}if(b=="height"){c=screen.availHeight}}else{if(a=="max"){if(b=="width"){c=screen.width}if(b=="height"){c=screen.height}}else{ParameterFailure()}}}return c};DVObject.prototype.setAllImagesArray=function(a){dv.allImages=a};DVObject.prototype.checkBeforeAndNextImages=function(imgString){if(!dv.allImages||!dv.allImages.length||dv.allImages.length<2){with(dv.childDVBefore.style){visibility="hidden"}with(dv.childDVNext.style){visibility="hidden"}return}dv.currentDisplayedImage=dv.getPositionOfImage(imgString);if(parseInt(dv.currentDisplayedImage)==0){dv.childDVBefore.style.visibility="hidden"}else{dv.childDVBefore.style.visibility="visible"}if(parseInt(dv.currentDisplayedImage)==parseInt(dv.allImages.length)-1){dv.childDVNext.style.visibility="hidden"}else{dv.childDVNext.style.visibility="visible"}};DVObject.prototype.showLastImage=function(){var a=dv.allImages[parseInt(dv.currentDisplayedImage)-1];dv.showDV(a)};DVObject.prototype.showNextImage=function(){var a=dv.allImages[parseInt(dv.currentDisplayedImage)+1];dv.showDV(a)};DVObject.prototype.setOpacityStyle=function(styleObject){with(styleObject){opacity=dv.getOpacityValue("opacity");filter=dv.getOpacityValue("filter");mozOpacity=dv.getOpacityValue("mozOpacity")}};DVObject.prototype.getOpacityValue=function(b){if(b=="opacity"){return"."+bgOpacity}else{if(b=="filter"){return"alpha(opacity="+bgOpacity+")"}else{if(b=="mozOpacity"){var a=bgOpacity/100;return""+a}else{alert("Unknown kind of opacityStyle! Could not set opacity.");return bgOpacity}}}};DVObject.prototype.getPositionOfImage=function(b){for(var a in dv.allImages){if(dv.allImages[a]==b){return a}}};function RegisterKeyEvents(){var a=document.getElementsByTagName("body")[0];if(a.onkeydown==null){a.onkeydown=OKD}}function OKD(b){if(dv.parentDV.style.visibility=="hidden"){return}var c=(dv.allImages&&dv.allImages.length&&dv.allImages.length>1);var a=null;if(!b){b=window.event}if(b.which){a=b.which}else{if(b.keyCode){a=b.keyCode}}if(a!=null){if(c){if(a==37&&dv.childDVBefore.style.visibility=="visible"){dv.showLastImage()}else{if(a==39&&dv.childDVNext.style.visibility=="visible"){dv.showNextImage()}}}if(a==27||a==46){dv.hideDV()}}}var DHTML=0,DOM=0,MS=0,NS=0,OP=0;function DHTML_init(){if(window.opera){OP=1}if(document.getElementById){DHTML=1;DOM=1}if(document.all&&!OP){DHTML=1;MS=1}if(document.layers&&!OP){DHTML=1;NS=1}}function getElem(d,c,b){var a;if(DOM){if(d.toLowerCase()=="id"){if(typeof document.getElementById(c)=="object"){a=document.getElementById(c)}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="name"){if(typeof document.getElementsByName(c)=="object"){a=document.getElementsByName(c)[b]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="tagname"){if(typeof document.getElementsByTagName(c)=="object"||(OP&&typeof document.getElementsByTagName(c)=="function")){a=document.getElementsByTagName(c)[b]}else{a=void (0)}return(a)}else{return void (0)}}}}else{if(MS){if(d.toLowerCase()=="id"){if(typeof document.all[c]=="object"){a=document.all[c]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="tagname"){if(typeof document.all.tags(c)=="object"){a=document.all.tags(c)[b]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="name"){if(typeof document[c]=="object"){a=document[c]}else{a=void (0)}return(a)}else{return void (0)}}}}else{if(NS){if(d.toLowerCase()=="id"||d.toLowerCase()=="name"){if(typeof document[c]=="object"){a=document[c]}else{a=void (0)}return(a)}else{if(d.toLowerCase()=="index"){if(typeof document.layers[c]=="object"){a=document.layers[c]}else{a=void (0)}return(a)}else{return void (0)}}}}}}initDV();function checkLoad(){};