


function checkBrowser() {
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.ie4mac=this.ie4 && navigator.userAgent.indexOf("Mac")>-1
	this.ns4mac=this.ns4 && navigator.appVersion.indexOf("Mac")>-1
	this.ie5mac=this.ie5 && navigator.userAgent.indexOf("Mac")>-1
	this.ie55=(this.ver.indexOf("MSIE 5.5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.mac = ( this.ie4mac || this.ns4mac || this.ie5mac ) 
	this.ns = ( this.ns4 || this.ns5 );
	this.ie = ( this.ie6 || this.ie5 || this.ie4 );
	this.ie5 = (this.ie6 || this.ie5 );  // Hinweis: Workaround, weil wir an vielen Stellen explizit auf ie4 || ie5 abtesten
	this.bw=( this.dom ||  this.ie6 || this.ie5 || this.ie4 || this.ns4 ||    this.ns5 || this.ie5mac)
	return this;
}
	
bw = new checkBrowser();



function setContentHeight(abstand) {
//	var abstand = 504; // Abstand von oben

	if (bw && bw.ie) {
	   	var height = document.body.offsetHeight-abstand;
	   	document.write ('<img src="sys/images/1pixt.gif" height="'+ height +'" width="1" border="0">');
	} else 
	if (bw && bw.ns) {
					var height = window.innerHeight-abstand;
	   	document.write ('<img src="sys/images/1pixt.gif" width="1" height="'+ height +'" alt="" border="0">');
	} else {
		//document.write ('<img src="sys/images/1pixt.gif" height="400" width="1" border="0">');
	}
}

function hald_openwin(myfile,width,height){
			if( !width ) width = 400;
			if( !height ) height = 400;
			var now=new Date()
			winname="a" + now.getTime()
			params = "width="+width+",height="+height+",resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=1 ";
			newwin = window.open( myfile, winname , params)
			if( window.focus ) newwin.focus();
		}
