

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.replace(/#/g,'');
		}
	}

function adaptrowheight(imagehoehe,versatz)
	{
	var abstandvonoben = document.getElementById("logotabelleoben");
	var steuerleiste = document.getElementById("steuerleisteh");
	
	if (imagehoehe > Hoehe)
		Hoehe = imagehoehe;
	else if (Hoehe <=300)
		Hoehe = 300;
		
	
		
 	abstandvonoben.style.height = Math.round(((Hoehe - imagehoehe) / 2) -  versatz)  + "px";
// 	alert(abstandvonoben.style.height);
// 	alert(Math.round(Weite/2-450) + " " + Math.round(Hoehe/2-300));
	if(steuerleiste)
		steuerleiste.style.width = Weite + "px";
//	steuerleiste.style.left = (Weite / 2) + "px";
	
	document.cookie = "archium_y="+Weite+";";	document.cookie = "archium_x="+Math.round(((Hoehe - imagehoehe) / 2) -  versatz)+";";
	}
		
//var tooltip_used = 0;
function swapimg(id,mausi,bild)
        {
	var tabu=window.document.getElementById(id);
	if(tabu)
		{
        	if (mausi)
            		tabu.src = bild;
		}
	}
var bildnummer = 0;
var immatsch = new Array();
function preload(bild)
	{
	immatsch[bildnummer] = new Image();
    	immatsch[bildnummer].src = bild;
    	//alert('Bild '+ bildnummer + ': ' + immatsch[bildnummer].src + ' geladen'); //Debug
	bildnummer++;
	}	
	
var nureinmal = 0;
function howto_leistungsspektrum(tooltiptext)
	{
	if(nureinmal == 0)
		{
		nureinmal = 1;
		Tip(tooltiptext,SHADOW,true,DELAY,0,FADEIN,800,FADEOUT,200,BORDERWIDTH,1,BORDERCOLOR,'black',BGCOLOR,'white',OPACITY,95,TITLEBGCOLOR,'#d5d5d5',TITLEFONTCOLOR,'black',CLICKCLOSE,true,CLOSEBTN,true,FOLLOWMOUSE,false,STICKY,true,TITLE,'Hinweis',CENTERWINDOW, true, CENTERALWAYS, true,WIDTH,450,FONTFACE,'verdana,arial,helvetica,geneva,sans-serif', FONTSIZE, '11pt',FONTCOLOR,'black');
		}
	}
	//FIX,[Math.round(Weite/2-(225-((200+15)/2))),Math.max(0,Math.round(Hoehe/2-(45)))],
var nullingerstatus = new Array();
function TextaufNullinger(eli)
	{
	if (nullingerstatus[eli] != "done")
		{
		//window.document.Anfrage.elements[eli].value='';
		var tabu=window.document.getElementsByName(eli);
		tabu[0].value="";
		nullingerstatus[eli] = "done"
		}
	}

function Hebehervor(eli)
	{
	var tabu=window.document.getElementsByName(eli);
	tabu[0].style.backgroundColor="#FFFFB6";
	}

function Hebezurueck(eli)
	{
	var tabu=window.document.getElementsByName(eli);
	tabu[0].style.backgroundColor="white";
	}

var tout; 

