// JavaScript Document
isoHoehe = document.documentElement.clientHeight;
isoBreite = document.documentElement.clientWidth;
isoVerhaeltnis = isoBreite/isoHoehe ;
if(isoVerhaeltnis<=1.3){	  	 
	breite=Math.round(isoHoehe*1.33333333)+"px";
	hoehe=isoHoehe+"px";
}else{
	breite=isoBreite+"px";
	hoehe=Math.round(isoBreite*0.75)+"px";
}
conheight = isoHoehe-100;
conwidth = isoBreite-100;	
if(conheight <= 530){conheight=530};
if(conwidth <= 690){conwidth=690};
document.write ("<style type='text/css'> #pic #photo { width:"+breite+"; height:"+hoehe+"; } #content { width:"+conwidth+"px; height:"+conheight+"px; }</style>");

function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}

function liquid() {	
	isoHoehe = document.documentElement.clientHeight;
	isoBreite = document.documentElement.clientWidth;
	isoVerhaeltnis = isoBreite/isoHoehe ;

	if(isoVerhaeltnis<=1.3){
		document.getElementById('photo').style.width='auto';
		document.getElementById('photo').style.height='100%';
	}else{
		document.getElementById('photo').style.width='100%';
		document.getElementById('photo').style.height='auto';
	}	
	if (!(document.getElementById('content'))) {return;}
	conheight = isoHoehe-100;
	conwidth = isoBreite-100;	
	if(conheight <= 530){conheight=530};
	if(conwidth <= 690){conwidth=690};
	document.getElementById('content').style.width=conwidth+"px";
	document.getElementById('content').style.height=conheight+"px";
}

function Fensterweite () {
  if (window.innerWidth) {
	return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
	return document.body.offsetWidth;
  } else {
	return 0;
  }
}

function Fensterhoehe () {
  if (window.innerHeight) {
	return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
	return document.body.offsetHeight;
  } else {
	return 0;
  }
}

function neuAufbau () {
  if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
	/*location.href = location.href;*/
	liquid();
}

/* Ãœberwachung von Netscape initialisieren */
if (!window.Weite && window.innerWidth) {
  window.onresize = neuAufbau;
  Weite = Fensterweite();
  Hoehe = Fensterhoehe();
}
	
function maybeDia (Ereignis) {
  if (!Ereignis)
    Ereignis = window.event;
  if (Ereignis.which) {
    Tastencode = Ereignis.which;
  } else if (Ereignis.keyCode) {
    Tastencode = Ereignis.keyCode;
  }
  if(Tastencode==68&&haltdia==1){
	  	  haltdia=0;
	  showdia();
	  }else{
		 haltdia=1;  
		  }
}

	var speed=4500;
	haltdia = 1;
	var position=0;
	function showdia () {
	 	if(haltdia == 0){
			if (!(document.images)) {;return;}
			if (!(document.photo)) {return;}
			
			document.photo.src=pictures[position++];
			if (position == pictures.length) { position = 0; }
			diatimer =  setTimeout("showdia();",speed);

		}else{
		  	clearTimeout(diatimer); 
		}
}

function BlurLinks(){

// Text- u. Grafik-Links
lnks=document.getElementsByTagName('a');
for(i=0;i<lnks.length;i++){
	lnks[i].onfocus=new Function("this.blur()");
}

}n

// onload=BlurLinks;

function ieOverDesc(){}
function ieOutDesc(){}

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}