
function pcl(){
	document.getElementById("wrapper").innerHTML = '';
}

function gotoSite(sUrl)
{
	if(self.location.href.indexOf(sUrl) !== 0){
		top.location.href = sUrl;
	}
}

function getScale(){
	return scale_x;
}

function Fensterweite (){
	try{
		iWindowWidth = window.innerWidth;
	}
	catch(e){
		iWindowWidth = 0;
	}
	if(!iWindowWidth)
	{
		document.getElementById('windowhelper').style.display = 'block';
		iWindowWidth = document.getElementById('windowhelper').offsetLeft;
		if(iWindowWidth){
			iWindowWidth = iWindowWidth + 10;
		}
	}
	document.getElementById('windowhelper').style.display = 'none';
}

function Fensterhoehe ()
{
	try{
		iWindowHeight = window.innerHeight;
	}
	catch(e){
		iWindowHeight = 0;
	}
	if(!iWindowHeight)
	{
		document.getElementById('windowhelper').style.display = 'block';
		iWindowHeight = document.getElementById('windowhelper').offsetTop;
		if(iWindowHeight){
			iWindowHeight = iWindowHeight + 10;
		}
	}
	document.getElementById('windowhelper').style.display = 'none';
}

function ScaleFlash()
{

	var iFlashAspectRatio = def_scale_y/def_scale_x;

	if(iMinWidth > iWindowWidth)
	{
		scale_x = iMinWidth;
		scale_y = iFlashAspectRatio * iMinWidth;
	}
	else
	{
		scale_x =  iWindowWidth;
		scale_y = iFlashAspectRatio * iWindowWidth;
	}

	if(iMinWidth <= iWindowWidth && iMinHeight <= iWindowHeight){
		document.body.scroll = "no";
	}
	else{
		document.body.scroll = "yes";
	}


	document.getElementById('wrapper').style.width = document.getElementById('wrapper').firstChild.style.width = scale_x;
	document.getElementById('wrapper').style.height = document.getElementById('wrapper').firstChild.style.height = scale_y;
}

function neuAufbau()
{
	document.body.scroll = "no";
	Fensterweite();
	Fensterhoehe();
	ScaleFlash();
}
