window.defaultStatus = "http://www.firmentraining-ulm.de";

function displaystatus(){ window.status='http://www.firmentraining-ulm.de';return true; }

function changeLinks(){
	var alinks = document.links
	for (var i=0; i<alinks.length; i++) {
		if (alinks[i].target != "_blank") {
				document.links[i].onmouseover = displaystatus;
			/* if (navigator.userAgent.indexOf("MSIE")) {//if(window.event){
				document.links[i].attachEvent('onmouseover',displaystatus)
			//otherwise
			}else{
				document.links[i].addeventListener('mouseover',displaystatus,false)
			} */
		}
	}
}

function winpopup(url,width,height,xPosProzent,yPosProzent,scrollbars,resizable) {
	if (window.newwin) {if (!window.newwin.closed) window.newwin.close()}
	
	if (width      ==null) width      = 500 // (default)
	if (height     ==null) height     = 400 // (default)
	if (xPosProzent==null) xPosProzent=  50 // (default)
	if (yPosProzent==null) yPosProzent=  50 // (default)
	if (scrollbars ==null) scrollbars =   0 // (default)
	if (resizable  ==null) resizable  =   0 // (default)

	if (width>screen.width) width=screen.width
	if (height>screen.height) height=screen.height

	var x=(screen.width -width )*xPosProzent/100
	var y=(screen.height-height)*yPosProzent/100
	var paras="resizable="+resizable+",scrollbars="+scrollbars+",toolbar=0,menubar=0,location=0,status=0,directories=0,width="+width+",height="+height
	if (document.layers) window.newwin=window.open(url,"AQUATEC",paras+",screenX="+x+",screenY="+y)
	else                 window.newwin=window.open(url,"AQUATEC",paras);window.newwin.moveTo(x,y)
}

function settHeight(elt){
	//IE6
	//alert(elt)
	if(elt==null) elt='textdiv';
	var headerH=144
	var footerH=1
	//if (navigator.userAgent.indexOf("Gecko")) footerH=8
	cH=Fensterhoehe()
	//if(document.layers)
	//alert(cH)
	//showObj(navigator)
	if (navigator.userAgent.indexOf("MSIE") ||
		navigator.userAgent.indexOf("Gecko")) {

		var obj=document.getElementById(elt)
		var maxH=cH-headerH-footerH
		//alert(cH+' '+maxH+' '+obj.height);showObj(obj)
		obj.style.height=maxH
	}
}
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.clientHeight) return document.body.clientHeight;
 else return 0;
}
function init(){
if(!window.Weite && document.body && document.body.offsetWidth){
   Weite = Fensterweite();
   Hoehe = Fensterhoehe();
   window.onresize = newHeight;
   window.onFocus = newHeight;

  }
if(!window.Weite && window.innerWidth){
   Weite = Fensterweite();
   Hoehe = Fensterhoehe();
   window.onresize = newHeight;
   window.onFocus = newHeight;
  }
}
function newHeight(){
 if (Weite != Fensterweite() || Hoehe != Fensterhoehe()) settHeight()
}

function showObj(o){
	if (o==null) alert("null")
	else if (!o) alert("undefined");
	else {var s="";for (var x in o) s+=x+" = "+o[x]+" #|# ";alert(s)}}

