//ein paar variablen
var q = 0;
var nav_opacity = 0;
var prev_opacity = 0;
var prev_int_exists = false;
var ganz_unten = false;
var scrolled_by = 0;
var scrolled_by2 = 0;
var browser = navigator.appName;

function info () {
var BrowserName = navigator.appName;
var BrowserVersion = navigator.appVersion;
var name = BrowserName.toLowerCase();
if(name.indexOf('explorer')>0){ 
  var parts = BrowserVersion.split(";");
  var BrowserVersion = parts[0]+";"+parts[1]+")";
}
document.write("<span style=\"font-size:8pt; color:rgb(150,150,150);\">Info: Sie verwenden den Browser <b>"+BrowserName+"</b> in der Version<b>"+BrowserVersion+"</b>. JavaScript ist <b>aktiviert</b>.</span>");
}

Highlight0 = new Image();
Highlight0.src = "images/t_03_b.gif";
Highlight1 = new Image();
Highlight1.src = "images/t_06_b.gif";
Highlight2 = new Image();
Highlight2.src = "images/t_08_b.gif";
Highlight3 = new Image();
Highlight3.src = "images/t_10_b.gif";
Highlight4 = new Image();
Highlight4.src = "images/t_03_b.gif";


normal1 = new Image;
normal1.src = "images/re.gif";
normal2 = new Image;
normal2.src = "images/link.gif"
normal3 = new Image;
normal3.src = "images/bolt.gif"
normal4 = new Image;
normal4.src = "images/italic.gif"
normal5 = new Image;
normal5.src = "images/underlined.gif"


pushed1 = new Image;
pushed1.src = "images/repushed.gif";
pushed2 = new Image;
pushed2.src = "images/linkpushed.gif";
pushed3 = new Image;
pushed3.src = "images/boltpushed.gif";
pushed4 = new Image;
pushed4.src = "images/italicpushed.gif";
pushed5 = new Image;
pushed5.src = "images/underlinedpushed.gif";

function Bildwechsel (Bildnr, Bildobjekt) {
window.document.images[Bildnr].src = Bildobjekt.src;
}

function hide (id) {
if(prev_int_exists){
    clearInterval(int_preview);
}
prev_int_exists = false;
prev_opacity = 0;
document.getElementById(id).style.visibility="hidden";
}

function show (id) {
document.getElementById(id).style.visibility="visible";
}

function first(id){
if(q==1){
clearInterval(inb);
}
q = 0;
begin (id);
}

function begin (id){
if(q==0){
ina = setInterval(function(){fadein(id);},25);
}else{
if(q==1){
inb = setInterval(function(){fadeout(id);},25);
}
}
}

function fadein(id){
var x = document.getElementById(id).style;
x.visibility = "visible";

if(nav_opacity<0.85){
x.MozOpacity = nav_opacity + 0.1;
x.opacity = nav_opacity + 0.1;
x.KhtmlOpacity = nav_opacity + 0.1;
x.filter = 'alpha(opacity='+((nav_opacity*100)+10)+')';
nav_opacity += 0.1;
}else{
clearInterval(ina);
}
}


function begin_preview (id, evt){
    prev_int_exists = true;
	document.getElementById(id).style.top = evt.clientY-(document.getElementById(id).offsetHeight/2)+30+'px';
    int_preview = setInterval(function(){fadein_preview(id);},25);
}

function fadein_preview(id){
    var x = document.getElementById(id).style;
    x.visibility = "visible";

    if(prev_opacity<1){
    x.MozOpacity = prev_opacity + 0.1;
    x.opacity = prev_opacity + 0.1;
    x.KhtmlOpacity = prev_opacity + 0.1;
    x.filter = 'alpha(opacity='+((prev_opacity*100)+10)+')';
    prev_opacity += 0.1;
}else{
    clearInterval(int_preview);
    prev_int_exists = false;
}
}

function fadeout(id){
x = document.getElementById(id).style;

if(nav_opacity>0){
x.MozOpacity = nav_opacity - 0.1;
x.opacity = nav_opacity - 0.1;
x.KhtmlOpacity = nav_opacity - 0.1;
x.filter = 'alpha(opacity='+((nav_opacity*100)-10)+')';
nav_opacity -= 0.1;
}else{
clearInterval(inb);
x.visibility = "hidden";
}
}

function format(type){
	var area = document.forms.gbform.text;
	var text = area.value;
	var str1 = "["+type+"]";
	var str2 = "[/"+type+"]";
	area.focus();
	if(type != 'a'){
		if(typeof area.selectionStart != 'undefined'){
			var curserposition = area.selectionStart;
			var laenge = area.selectionEnd-area.selectionStart;
			var new_text = text.substr(0,area.selectionStart)+str1+text.substr(area.selectionStart,laenge)+str2+text.substr(area.selectionEnd,(text.length-area.selectionEnd));
			area.value = new_text;
			if(laenge == 0){
				area.selectionStart = area.selectionEnd = curserposition + str1.length + laenge;
			}else{
				area.selectionStart = area.selectionEnd = curserposition + str1.length + str2.length + laenge;
			}
		}else{
			if(typeof document.selection != 'undefined'){
				var range = document.selection.createRange();
				var inbetween = range.text;
				var laenge = inbetween.length;
				range.text = str1+inbetween+str2;
				if(laenge == 0){
					range.move("character",-str2.length);	
				}
			}else{
				area.value = area.value+str1+str2;	
			}
		}
	}else{
		if(typeof area.selectionStart != 'undefined'){
			var curserposition = area.selectionStart;
			var laenge = area.selectionEnd-area.selectionStart;
			var new_text;
			var http;
			if(laenge == 0){
				var link = prompt("Bitte die Addresse eingeben!","http://");
				if(link != null){
					new_text = text.substr(0,area.selectionStart)+str1+link+str2+text.substr(area.selectionEnd,(text.length-area.selectionEnd));
					area.value = new_text;
					area.selectionStart = area.selectionEnd = curserposition + str1.length + str2.length + link.length;
				}
			}else{
				if(text.substr(area.selectionStart,laenge).indexOf('http://')==-1){
					var link = prompt("Bitte die Addresse eingeben!","http://");
					if(link != null){
						new_text = text.substr(0,area.selectionStart)+"[a="+link+"]"+text.substr(area.selectionStart,laenge)+str2+text.substr(area.selectionEnd,(text.length-area.selectionEnd));
						area.value = new_text;
					}
					http = true;
				}else{
					new_text = text.substr(0,area.selectionStart)+str1+text.substr(area.selectionStart,laenge)+str2+text.substr(area.selectionEnd,(text.length-area.selectionEnd));
					area.value = new_text;
					http = false;
				}
								if(http){
					if(link != null){
						area.selectionStart = area.selectionEnd = curserposition + str1.length + str2.length + laenge + 1 + link.length;
					}
				}else{
					area.selectionStart = area.selectionEnd = curserposition + str1.length + str2.length + laenge;	
				}
			}
		}else{
			if(typeof document.selection != 'undefined'){
				var range = document.selection.createRange();
				var inbetween = range.text;				
				var laenge = inbetween.length;				
				if(laenge == 0){
					var link = prompt("Bitte die Addresse eingeben!","http://");
					if(link != null){
						range.text = str1+link+str2;
					}
				}else{
					if(range.text.indexOf('http://')==-1){
						var link = prompt("Bitte die Addresse eingeben!","http://");
						if(link != null){
							range.text = "[a="+link+"]"+inbetween+str2;
						}
					}else{
						range.text = str1+inbetween+str2;
					}
				}
			}else{
				area.value = area.value+str1+str2;	
			}
		}		
	}
}


function push (x, Objekt){
	document.getElementById(x).src = Objekt.src;
}

function reset(id){
document.getElementById(id).reset();
document.getElementById(id).name.value = "";
document.getElementById(id).mail.value = "";
document.getElementById(id).www.value = "";
document.getElementById(id).text.innerHTML = "";
}

function high(iid){
document.getElementById(iid).style.background = "rgb(255,255,255)";
}

function low(iid){
document.getElementById(iid).style.background = "rgb(80,80,80)";
}

function tausch(id){
  document.getElementById(id).style.backgroundImage = "url(images/back2.gif)";
}

function retausch(id){
  document.getElementById(id).style.backgroundImage = "url(images/back.gif)";
}

//FUNKTIONEN FÜR GALLERY
prefetch1 = new Image;
prefetch2 = new Image;
function next(){
  selected = selected+1;
  id = selected;
  if(akt == 'a'){
    handle = document.getElementById('b');
    //voraussetzungen    
    if(intup == true){
      clearInterval(interval);
      }
    handle.style.visibility = 'hidden';
    handle.style.MozOpacity = '0';    
    handle.style.opacity = '0';       
    handle.style.KhtmlOpacity = '0';  
    handle.style.filter = 'alpha(opacity=0)';                         //neu
    document.getElementById('a').style.visibility = 'visible';
    document.getElementById('a').style.MozOpacity = '1';    
    document.getElementById('a').style.opacity = '1';       
    document.getElementById('a').style.KhtmlOpacity = '1';  
    document.getElementById('a').style.filter = 'alpha(opacity=100)';   //neu
    opacity=0;                                                         //neu
    //ende
    document.getElementById('a').style.zIndex = '9';
    handle.style.zIndex = '10';   
    document.getElementById('bb').src = files[id-1];  
    fullsize_positioning('b');
    if(files[id-2]){
    prefetch1.src = files[id-2];
    }
    
    if(files[id]){
    prefetch2.src = files[id];
    }    
    
    manage_navigation(id);
     
    akt = 'b'
    interval = setInterval(function(){einblenden('b');},40);  
    intup = true;  
  }else{
    
    handle = document.getElementById('a');
    //voraussetzungen    
    if(intup == true){
      clearInterval(interval);  
    }
    handle.style.visibility = 'hidden';
    handle.style.MozOpacity = '0';    
    handle.style.opacity = '0';       
    handle.style.KhtmlOpacity = '0';
    handle.style.filter = 'alpha(opacity=0)';                       //neu
    document.getElementById('b').style.visibility = 'visible';
    document.getElementById('b').style.MozOpacity = '1';    
    document.getElementById('b').style.opacity = '1';       
    document.getElementById('b').style.KhtmlOpacity = '1'; 
    document.getElementById('b').style.filter = 'alpha(opacity=100)'; //neu
    opacity=0;                                                      //neu
    //ende      
    document.getElementById('b').style.zIndex = '9';
    handle.style.zIndex = '10';     
    document.getElementById('aa').src = files[id-1];   
    fullsize_positioning('a');  
    if(files[id-2]){
    prefetch1.src = files[id-2];
    }
    
    if(files[id]){
    prefetch2.src = files[id];
    }    
    
    manage_navigation(id);
      
    akt = 'a'
    interval = setInterval(function(){einblenden('a');},40);  
    intup = true;  
  }
    if(selected == files.length && slideshow_active){
        clearInterval(slideshow_int);
        slideshow_active = false;
        ganz_unten = false;
        document.getElementById("slideshow_start").style.visibility = "hidden";
        document.getElementById("slideshow_start").innerHTML = "<a href=\"javascript:start_slideshow()\">&gt;Slideshow starten</a>";
    }
}

function previous(){
    selected = selected-1;
    id = selected;
  if(akt == 'a'){
    handle = document.getElementById('b');
    //voraussetzungen    
    if(intup == true){
      clearInterval(interval);
      }
    handle.style.visibility = 'hidden';
    handle.style.MozOpacity = '0';    
    handle.style.opacity = '0';       
    handle.style.KhtmlOpacity = '0';  
    handle.style.filter = 'alpha(opacity=0)';                         //neu
    document.getElementById('a').style.visibility = 'visible';
    document.getElementById('a').style.MozOpacity = '1';    
    document.getElementById('a').style.opacity = '1';       
    document.getElementById('a').style.KhtmlOpacity = '1';    
    document.getElementById('a').style.filter = 'alpha(opacity=100)';   //neu
    opacity=0;                                                         //neu  
    //ende
    document.getElementById('a').style.zIndex = '9';
    handle.style.zIndex = '10';    
    document.getElementById('bb').src = files[id-1];  
    fullsize_positioning('b');   
    if(files[id-2]){
    prefetch1.src = files[id-2];
    }
    
    if(files[id]){
    prefetch2.src = files[id];
    }    
      
    manage_navigation(id);
      
    akt = 'b'
    interval = setInterval(function(){einblenden('b');},40);  
    intup = true;     
  }else{
    
    handle = document.getElementById('a');
    //voraussetzungen    
    if(intup == true){
      clearInterval(interval);  
    }
    handle.style.visibility = 'hidden';
    handle.style.MozOpacity = '0';    
    handle.style.opacity = '0';       
    handle.style.KhtmlOpacity = '0';
    handle.style.filter = 'alpha(opacity=0)';                       //neu
    document.getElementById('b').style.visibility = 'visible';
    document.getElementById('b').style.MozOpacity = '1';    
    document.getElementById('b').style.opacity = '1';       
    document.getElementById('b').style.KhtmlOpacity = '1';   
    document.getElementById('b').style.filter = 'alpha(opacity=100)'; //neu
    opacity=0;                                                      //neu   
    //ende    
    document.getElementById('b').style.zIndex = '9';
    handle.style.zIndex = '10';     
    document.getElementById('aa').src = files[id-1];   
    fullsize_positioning('a');
    if(files[id-2]){
    prefetch1.src = files[id-2];
    }
    
    if(files[id]){
    prefetch2.src = files[id];
    }    
    
    manage_navigation(id);
      
    akt = 'a'
    interval = setInterval(function(){einblenden('a');},40);  
    intup = true;  
  }

}

function einblenden(id){
	x = document.getElementById(id).style;
	x.visibility = "visible";
	if(opacity<100){
		opacity = opacity+20;
		x.MozOpacity = (opacity/100);
		x.opacity = (opacity/100);
		x.KhtmlOpacity = (opacity/100);
		x.filter = 'alpha(opacity='+(opacity)+')';
	}else{
		clearInterval(interval);
		intup = false;
		opacity = 0;
		if(akt == 'a'){
			document.getElementById('b').style.MozOpacity = '0';    
			document.getElementById('b').style.opacity = '0';       
			document.getElementById('b').style.KhtmlOpacity = '0';   
			document.getElementById('b').style.filter = "alpha(opacity='0')";
			document.getElementById('bb').src = files[selected];  
		}else{
			document.getElementById('a').style.MozOpacity = '0';    
			document.getElementById('a').style.opacity = '0'; 
			document.getElementById('a').style.KhtmlOpacity = '0';  
			document.getElementById('a').style.filter = "alpha(opacity='0')";
			document.getElementById('aa').src = files[selected];
		}
	}
}

function start_slideshow(){
    next();
    slideshow_int = setInterval("next()",3500);
    slideshow_active = true;
    document.getElementById("slideshow_start").innerHTML = "<a href=\"javascript:stop_slideshow()\">&gt;Slideshow beenden</a>";
    scroll_to_edge();
}

function stop_slideshow(){
    if(slideshow_active){
        clearInterval(slideshow_int);
        slideshow_active = false;
        ganz_unten = false;
        document.getElementById("slideshow_start").innerHTML = "<a href=\"javascript:start_slideshow()\">&gt;Slideshow starten</a>";
    }
}

function scroll_to_edge()
{
	scroll_int = setInterval("scrolling();",20);
}

function scrolling(){
	if(typeof window.pageYOffset != 'undefined'){
		scrolled_by = window.pageYOffset;
	}else{
		scrolled_by = document.documentElement.scrollTop;
	}
	if(scrolled_by < (parseInt(document.getElementById('bildContainer').style.top)-2) && ganz_unten == false){
		scrollBy(0,+20);
	if(typeof window.pageYOffset != 'undefined'){
			scrolled_by2 = window.pageYOffset;
		}else{
			scrolled_by2 = document.documentElement.scrollTop;
		}   
		if(scrolled_by2 <= scrolled_by){
			ganz_unten = true;	
		}
	}else{
		clearInterval(scroll_int);
		ganz_unten = false;
	}
}

function fullsize_positioning(){
	document.getElementById('ai').style.height = document.getElementById('aa').height+'px';
	document.getElementById('ai').style.top = ((800-document.getElementById('aa').height)/2)+'px';
	document.getElementById('bi').style.height = document.getElementById('bb').height+'px';
	document.getElementById('bi').style.top = ((800-document.getElementById('bb').height)/2)+'px';	
}
//ENDE FUNKTIONEN FÜR GALLERY

function mehr(id,hohe){
  document.getElementById('mehr').style.visibility = 'hidden';
  roll_interval = setInterval(function(){roll_in(id,hohe);},20);
}

var roll_interval;

function roll(id,hohe){
  document.getElementById("shower").style.display = "none";
  document.getElementById('entry_top').style.display = "block";
  document.getElementById('entry_bottom').style.display = "block";
    document.getElementById('gb').style.display = "block";
  roll_interval = setInterval(function(){roll_in(id,hohe);},20);
}

function roll_in(id, hohe){
  if(parseInt(document.getElementById(id).style.height)<hohe){
    document.getElementById(id).style.height = parseInt(document.getElementById(id).style.height)+25+"px";
  }else{
    clearInterval(roll_interval);
  }
}

function naviHover(obj){
	if(obj.src.indexOf('Hover') > -1){
		obj.src = obj.src.substr(0,(obj.src.length - 9))+'.png';	
	}else{
		obj.src = obj.src.substr(0,(obj.src.length - 4))+'Hover.png';			
	}
}

function getPosition (o){
	var r = { top:0, left:0 };
	if(!o) return r;
	else if(typeof o == 'string' ) o = document.getElementById(o);
	
	if( typeof o != 'object' ) return r;
	
	if(typeof o.offsetTop != 'undefined')    {
		 r.left = r.top = 0;
		 while (o && o.tagName != 'BODY')         {
			  r.top  += parseInt( o.offsetTop );
			  r.left += parseInt( o.offsetLeft );
			  o = o.offsetParent;
		 }
	}
	return r;
}

function showCopyright(xx){
  object = document.getElementById("copyrightNote");
  var bodyPosition = getPosition(document.getElementById('contents'));
  if(typeof window.innerWidth == 'undefined'){
	object.style.left = xx.clientX - bodyPosition.left + 'px';
	object.style.top = xx.clientY - bodyPosition.top + 20 + document.documentElement.scrollTop + 'px';
  }else{
	object.style.left = xx.clientX - bodyPosition.left + 'px';
	object.style.top = xx.clientY - bodyPosition.top + 20 + window.pageYOffset + 'px';
  }
  object.style.visibility = "visible";
}

function hideCopyright(){
	document.getElementById('copyrightNote').style.visibility = 'hidden';
}

//die Rechteck-vergrößerungs Funktionen von 2d.php
var rectangleWidthInt;
var rectangleHeightInt;
var startSpeed = 100;
var endSpeed = 20;
function getCurrentSpeed(sMax, sCurrent){
	var progress = sMax/sCurrent;
	var speed = startSpeed-((startSpeed-endSpeed)/progress);
	return speed;
}

function drawRectangle(x,y){
	rectangleWidthInt = setInterval(function(){increaseWidth(x,y);}, 30);	
}

function increaseWidth(x,y){
	var obj = document.getElementById('backgroundRectangle');
	var increaseStep = getCurrentSpeed(x, parseInt(obj.style.width));
	if(parseInt(obj.style.width) < x){
		if(parseInt(obj.style.width) + increaseStep <= x){
			obj.style.width = parseInt(obj.style.width) + increaseStep +'px';
		}else{
			obj.style.width = x+'px';
		}
	}else{
		clearInterval(rectangleWidthInt);
		obj.style.width = x+'px';
		rectangleHeightInt = setInterval(function(){increaseHeight(y);}, 30);	
	}
}

function increaseHeight(y){
	var obj = document.getElementById('backgroundRectangle');
	var increaseStep = getCurrentSpeed(y, parseInt(obj.style.height));
	if(parseInt(obj.style.height) < y){
		if(parseInt(obj.style.height) + increaseStep <= y){
			obj.style.height = parseInt(obj.style.height) + increaseStep +'px';
		}else{
			obj.style.height = y+'px';
		}
	}else{
		clearInterval(rectangleHeightInt);	
		obj.style.height = y+'px';
		begin1();
	}
}
//end
//die fade in funktionen für 2d.php
 var op = 0;
 var interval_web;
 var add = 0.1;
 function begin1 (){
    obj = 'bild';
    document.getElementById('bild').style.display = 'block';    
    interval_web = setInterval(function(){fadein1(obj);},50);
  }

function fadein1(obj){
  if(op < 1){
    document.getElementById(obj).style.MozOpacity = op + add;
    document.getElementById(obj).style.opacity = op + add;
    document.getElementById(obj).style.KhtmlOpacity = op + add;
    document.getElementById(obj).style.filter = 'alpha(opacity='+op*100+')';
    op = op+add;
  }else{
    clearInterval(interval_web);
  }
}
//ende

function downloadSelectAll(){
	var downloadForm = document.getElementById('downloadForm');
	for(var i = 0; i < downloadForm.elements.length; i++){
		if(downloadForm.elements[i].type == 'checkbox' && downloadForm.elements[i].name == 'bilder[]'){
			downloadForm.elements[i].checked = true;
			focusActiveImages(downloadForm.elements[i]);
		}
	}
}

function downloadSelectNothing(){
	var downloadForm = document.getElementById('downloadForm');
	for(var i = 0; i < downloadForm.elements.length; i++){
		if(downloadForm.elements[i].type == 'checkbox' && downloadForm.elements[i].name == 'bilder[]'){
			downloadForm.elements[i].checked = false;
			focusActiveImages(downloadForm.elements[i]);
		}
	}
}

function showDownloadPreview(object, evt){
	if(document.getElementById('showPreview').checked){
		var previewObject = document.getElementById('downloadPreview');
		previewObject.src = 'images/loading.gif';
		var source = object.src.split('/');
		var source = source[source.length-1];
		previewObject.src = 'img_'+eventName+'/'+source;
		if(typeof window.pageYOffset == 'undefined'){
			var scrolled = document.documentElement.scrollTop;
		}else{
			var scrolled = window.pageYOffset;
		}
		var bodyPosition = getPosition(document.getElementById('contents'));
		if(object.width > object.height){
			previewObject.style.left = (document.getElementById('contents').offsetWidth - 800)/2 + 'px';
		}else{
			previewObject.style.left = (document.getElementById('contents').offsetWidth - 534)/2 + 'px';		
		}
		previewObject.style.top = evt.clientY + scrolled + 20 + 'px';
		previewObject.style.display = 'inline';
	}
}

function hideDownloadPreview(){
	document.getElementById('downloadPreview').src = 'images/loading.gif';
	document.getElementById('downloadPreview').style.display = 'none';
}

function moveDownloadPreview(evt){
	var previewObject = document.getElementById('downloadPreview');
	if(typeof window.pageYOffset == 'undefined'){
		var scrolled = document.documentElement.scrollTop;
	}else{
		var scrolled = window.pageYOffset;
	}	
	previewObject.style.top = evt.clientY + scrolled + 20 + 'px';		
}

function focusActiveImages(obj){
	if(obj.checked){
		obj.offsetParent.style.backgroundImage = 'url(images/backActive.png)';
	}else{
		obj.offsetParent.style.backgroundImage = '';
	}
}

var fullscreenOpacity = 0;
var fullscreenIntAct = false;
var fullscreenInt;
function showFullscreen(){
	var obj = document.getElementById('vollbildAnsicht');
	obj.style.display = 'block';
	var pos = getPosition(document.getElementById('bild'));
	var pos2 = getPosition(document.getElementById('contents'));
	document.getElementById('vollbildImgDiv').style.left = pos.left - pos2.left+'px';
	document.getElementById('vollbildImgDiv').style.top = pos.top+'px';
	document.getElementById('vollbildImgDiv').style.display = 'block';
	if(fullscreenIntAct){
		clearInterval(fullscreenInt);
	}
	fullscreenIntAct = true;
	fullscreenInt = setInterval(function(){fadeInFullscreen();},20);
}

function fadeInFullscreen(){
	var obj = document.getElementById('vollbildAnsicht');	
	if(fullscreenOpacity < 100){
		fullscreenOpacity += 20;
		obj.style.MozOpacity = (fullscreenOpacity/100);
		obj.style.opacity = (fullscreenOpacity/100);
		obj.style.KhtmlOpacity = (fullscreenOpacity/100);
		obj.style.filter = 'alpha(opacity='+(fullscreenOpacity)+')';
	}else{
		clearInterval(fullscreenInt);
		fullscreenIntAct = false;		
		obj.style.MozOpacity = 1;
		obj.style.opacity = 1;
		obj.style.KhtmlOpacity = 1;
		obj.style.filter = 'alpha(opacity=100)';	
	}
}

function closeFullscreen(){
	if(fullscreenIntAct){
		clearInterval(fullscreenInt);
	}
	fullscreenIntAct = true;
	fullscreenInt = setInterval(function(){fadeOutFullscreen();},20);
}

function fadeOutFullscreen(){
	var obj = document.getElementById('vollbildAnsicht');	
	if(fullscreenOpacity > 0){
		fullscreenOpacity -= 20;
		obj.style.MozOpacity = (fullscreenOpacity/100);
		obj.style.opacity = (fullscreenOpacity/100);
		obj.style.KhtmlOpacity = (fullscreenOpacity/100);
		obj.style.filter = 'alpha(opacity='+(fullscreenOpacity)+')';
	}else{
		clearInterval(fullscreenInt);
		fullscreenIntAct = false;		
		obj.style.MozOpacity = 0;
		obj.style.opacity = 0;
		obj.style.KhtmlOpacity = 0;
		obj.style.filter = 'alpha(opacity=0)';	
		obj.style.display = 'none';
		document.getElementById('vollbildImgDiv').style.display = 'none';
	}	
}