
function os_inline_popup(width,height,url,fadepage,closediff,nosizetest){
	ifwidth=width;
	ifheight=height;
	//width=width+20;
	//height=height+30;
	mz = document.getElementById;
	ie = (document.styleSheets&&document.all) ? true:false
	var doinline=0;

	if(navigator.userAgent.indexOf("Firefox")!=-1){
		var versionindex=navigator.userAgent.indexOf("Firefox")+8;
		if (parseInt(navigator.userAgent.charAt(versionindex))>=1) doinline=1;
	}
	if (navigator.appVersion.indexOf("MSIE")!=-1){
		var version=0;
		var temp=navigator.appVersion.split("MSIE");
		version=parseFloat(temp[1]);
		if (version>=5.5) doinline=1;
	}
	if (navigator.appName=="Netscape"&&parseFloat(navigator.appVersion)>=4.7){
		var ua = navigator.userAgent.toLowerCase();
		var versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
		if (versionMinor > 7.0) doinline=1;
	}
	if(navigator.userAgent.indexOf("Opera")!=-1){
		var versionindex=navigator.userAgent.indexOf("Opera")+6
		if (parseInt(navigator.userAgent.charAt(versionindex))>=9)
		doinline=1;
	}
	
	if (nosizetest != 1)
	{
		if (window.innerHeight) 
		{
			if ((window.innerHeight-30) < height) doinline=0;
		} 
		else 
		{
			if (document.body && document.body.offsetHeight) 
			{
				if ((document.body.offsetHeight-30) < height) doinline=0;
			}
			if (document.body && document.body.clientHeight) 
			{
				if ((document.body.clientHeight-30) < height) doinline=0;
			}
		}
	}
	
	if (doinline == 1)
	{
		document.getElementById("os_inline_popup").style.visibility = "visible";
		document.getElementById("os_inline_popup").style.width = width;
		document.getElementById("os_inline_popup").style.height = height;
		document.getElementById("os_inline_popup").style.background = "transparent";
		document.getElementById("os_inline_popup").style.display = "block";
		if (ie)
		{
			document.all.os_inline_popup.style.top=document.body.scrollTop+20;
		}
		else
		{
			document.getElementById("os_inline_popup").style.top=pageYOffset+20;
		}
		if ((document.body.offsetWidth - width) > 0)
		{
			wl=(document.body.offsetWidth - width)/2;
			document.getElementById("os_inline_popup").style.left=wl;
		}
		if (closediff > 0)
		{
			var ihtml="<div class='osinlineclosediff'"+closediff+" onclick='os_inline_popup_close()' title='Fenster schliessen' style='width:60px;height:15px;position:relative;top:0px;float:right;padding-top:1px;color:#000;background-color:transparent;cursor:pointer;'>Schlie&szlig;en</div>";
		}
		else
		{
			var ihtml="";
		}
		ihtml=ihtml+"<center><iframe src='"+url+"' scrolling=auto frameborder=0 width="+ifwidth+" height="+ifheight+" allowtransparency=true></iframe></center>";
		document.getElementById("os_inline_popup").innerHTML=ihtml;
		if (fadepage == 1)
		{
			document.getElementById("os_side_fader").style.visibility = "visible";
			document.getElementById("os_side_fader").style.display = "block";
			document.getElementById("os_side_fader").style.width = "100%";
			document.getElementById("os_side_fader").style.height = document.body.offsetHeight+100;
			if (document.body.scrollHeight > document.body.offsetHeight)
			{
				document.getElementById("os_side_fader").style.height = document.body.scrollHeight+100;
			}
		}
		return(1);
	}
	else
	{
		return(window.open(url,'os_inline_popup_window',"resizable=yes,toolbar=0,location=0,directory=0,status=1,menubar=0,scrollbars=0,copyhistory=0,width="+ifwidth+",height="+ifheight));
	}
	return(0);
}
function os_inline_popup_close(){
	document.getElementById("os_inline_popup").innerHTML=" ";
	document.getElementById("os_inline_popup").style.visibility = "hidden";
	document.getElementById("os_side_fader").style.visibility = "hidden";
	document.getElementById("os_side_fader").style.width = 100;
	document.getElementById("os_side_fader").style.height = 100;
}