function getBrowserType()
{
	if(document.ids)x='nc4';
	else if( document.all && !document.getElementById )x='ie4';
	else if( window.opera && !document.createElement )x='op5';
	else if( window.opera && window.getComputedStyle )  {
	          if(document.createRange)x='op8';
	            else if(window.navigate)x='op7.5';
	                             else x='op7.2';                   }
	else if( window.opera && document.compatMode )x='op7';
	else if( window.opera && document.releaseEvents )x='op6';
	else if( document.contains && !window.opera )x='kq3';
	else if(window.pkcs11&&window.XML)x='f15';
	else if( window.getSelection && window.atob )x='nn7';
	else if( window.getSelection && !document.compatMode )x='nn6';
	else if( window.clipboardData && document.compatMode )
	  x=window.XMLHttpRequest? 'IE7' : 'IE6';
	else if( window.clipboardData ){x='ie5';
	     if( !document.createDocumentFragment ) x+='.5';
	     if( document.doctype && !window.print ) x+='m';}
	else if( document.getElementById && !document.all ) x='op4';
	else if( document.images && !document.all ) x='nn3';
	else if(document.clientWidth&&!window.RegExp)x='kq2';
	else x='???';
	return x;
}

function getWinHeight()
{
	if(window.innerWidth)
	{ 
 		h = window.innerHeight;
	} // ns4
 	else if(document.body)
 	{
 	 	h = document.body.clientHeight;
  		if (document.body.offsetHeight == h && document.documentElement && document.documentElement.clientHeight)
  		{
   			h = document.documentElement.clientHeight;
  		}
 	}
 	return h;
}

function getWinWidth()
{
	if(window.innerWidth)
	{ 
 		w = window.innerWidth;
	} // ns4
 	else if(document.body)
 	{
 	 	w = document.body.clientWidth;
  		if (document.body.offsetWidth == w && document.documentElement && document.documentElement.clientWidth)
  		{
   			w = document.documentElement.clientWidth;
  		}
 	}
 	return w;
}

function popup(link, name, width, height, menubar, toolbar, scrollbars, status, resizable, location, hotkeys)
{
	name = "popup"+name;
	if(typeof popupwindow == "undefined")
	{
		popupwindow = new Object();
	}
	popupwindow[name] = window.open(link, name,"width="+width+",height="+height+",menubar="+menubar+",toolbar="+toolbar+",scrollbars="+scrollbars+",status="+status+",resizable="+resizable+",location="+location+",hotkeys="+hotkeys);
	popupwindow[name].focus();
}

var resizePageoffsetH;

function resizePage()
{
	var hoehederseite = document.getElementById("heightofpage");
	if(window.outerHeight)
	{
		dh = window.outerHeight - getWinHeight();
		dw = window.outerWidth - getWinWidth();
	}
	else
	{
		dh1 = getWinHeight();
		dw1 = getWinWidth();
		window.resizeTo(dw1, dh1);
		dh = dh1 - getWinHeight();
		dw = dw1 - getWinWidth();
	}
	neuehoehe = hoehederseite.offsetHeight+dh+resizePageoffsetH;
	neuebreite = hoehederseite.offsetWidth+dw;
 	window.resizeTo(neuebreite, neuehoehe);
	
 	
}

function resizeDiv(obj, targetobj, offsetH, offsetW)
{
	nh = obj.offsetHeight+offsetH;
	nw = obj.offsetWidth+offsetW;
	targetobj.style.height = nh+"px";
	targetobj.style.width = nw+"px";
	alert(obj.name);
}

function htmlspecialchars(str,typ) {
if(typeof str=="undefined") str="";
if(typeof typ!="number") typ=2;
typ=Math.max(0,Math.min(3,parseInt(typ)));
var html=new Array();
html[38]="&amp;"; html[60]="&lt;"; html[62]="&gt;";
if(typ==1 || typ==3) html[39]="&#039;";
if(typ==2 || typ==3) html[34]="&quot;";
for(var i in html) eval("str=str.replace(/"+String.fromCharCode(i)+"/g,\""+html[i]+"\");");
return str;
}