﻿function callTeaserPopup(id,wdth)
	{
		var pos;
		if (window.innerHeight)
		{
			pos = window.pageYOffset
		}
		else if (document.documentElement && document.documentElement.scrollTop)
		{
			pos = document.documentElement.scrollTop
		}
		else if (document.body)
		{
			pos = document.body.scrollTop
		}
		el = document.getElementById(id);
		el.style.width = wdth + "px";
		el.style.display = 'block';
		el.style.top = (((f_clientHeight() - el.offsetHeight) / 2)+pos) + 'px';
		el.style.left = (f_clientWidth() - el.offsetWidth) / 2 + 'px';
		el.style.zIndex = "1001";
		if(document.frames){
			document.getElementById("fr").style.top = el.style.top;
			document.getElementById("fr").style.left = el.style.left;
			document.getElementById("fr").style.width = el.style.width;
			document.getElementById("fr").style.height = "250";
			document.getElementById("fr").style.zIndex = "1000";
			document.getElementById("fr").style.display = "block";	document.getElementById("fr").style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
		}
	}
	function closeTeaserPopup(id)
	{
		document.getElementById(id).style.display = 'none';
		if(document.frames){
			document.getElementById("fr").style.display = "none";
		}
	}
	function f_clientWidth()
	{
		return f_filterResults
		(
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
		);
	}
	function f_clientHeight()
	{
		return f_filterResults
		(
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
		);
	}
	function f_filterResults(n_win, n_docel, n_body)
	{
		var n_result = n_win ? n_win : 0;
		if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
		return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
	}

