function over(a,submenu) {
 document.images[a].src="/templates/pruemtal/images/nav_de/"+a+"1.jpg";
 for (i=0; i<subs.length; i++) {
  if (document.getElementById("subm"+subs[i])) {
   document.getElementById("subm"+subs[i]).style.display="none";
  }
 }
 if (document.getElementById("subm"+submenu)) {
  document.getElementById("subm"+submenu).style.left=document.getElementById("mainm"+submenu).style.left.replace(/px/,"")*1-11+"px";
  document.getElementById("subm"+submenu).style.top=document.getElementById("mainm"+submenu).style.top.replace(/px/,"")*1+document.getElementById("mainm"+submenu).style.height.replace(/px/,"")*1-5+"px";
  document.getElementById("subm"+submenu).style.display="block";
 }
}
function out(a,submenu) {
 document.images[a].src="/templates/pruemtal/images/nav_de/"+a+".jpg";
}
function outall() {
 for (i=0; i<subs.length; i++) {
  if (document.getElementById("subm"+subs[i])) {
   document.getElementById("subm"+subs[i]).style.display="none";
  }
 } 
}
function anfahrt() {
 document.location="/index.php?option=com_content&view=article&id=53&Itemid=86&ort="+document.formanfahrt.ort.value+"&strasse="+document.formanfahrt.strasse.value;
}
function anfahrt2() {
 document.location="/index.php?option=com_content&view=article&id=53&Itemid=86&ort="+document.formanfahrt2.ort.value+"&strasse="+document.formanfahrt2.strasse.value;
}
function getPageSize(){

	var xScroll, yScroll;

	if (window.innerHeight && window.scrollMaxY) {
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}

	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}

	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else {
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
	return arrayPageSize;
}
var siteset=0;
function init() {
 setsize();
 setInterval("setsize()",1000);
 if (document.getElementById("printbutton")) {
  document.getElementById("printbutton").style.visibility="visible";
 }
}
function setsize() {
 sizes=getPageSize();
// alert(sizes[1]+"\n"+sizes[3]);
 if (sizes[1]<650) {
 sizes[1]=650;
//  document.getElementById("wischer").style.height=sizes[1]+62;
//  document.getElementById("footer").style.top=sizes[1];
 } else {
//  document.getElementById("wischer").style.height=sizes[1]+30;
//  document.getElementById("footer").style.top=sizes[1]-62+30;
 }
 if (sizes[1]-sizes[3]>10 && siteset<1) {sizes[1]=sizes[1]+70; siteset++;}
  document.getElementById("wischer").style.height=sizes[1];
  document.getElementById("footer").style.bottom=sizes[3]-sizes[1]+5
// }
 if (document.getElementById("footer").style.visibility=="hidden") {
  document.getElementById("footer").style.visibility="visible";
 }
}
window.addEvent('domready',function(){
				var obj = {
					wait: 5000, 
					effect: 'fade',
					duration: 1000, 
					loop: true, 
					thumbnails: false,
					backgroundSlider: false,
					onClick: function(i){alert(i)}
				}
				show = new SlideShow('slideshowContainer',logobilder,obj);
				show.play();
});

