function ScreenSizeChecker() 
{
	this.divs = [ "waytoosmall", "prettymuchtoosmall", "noflash" ];
	this.urlSuffix = "";
}

var o = ScreenSizeChecker.prototype;

o.init = function()
{
	document.getElementById( 'container' ).style.display = 'block';
	
	if ( series.length > 0 && img.length > 0 ) 
	{
		so.addVariable( "series", series );
		so.addVariable( "img", img );
		this.urlSuffix = "?series=" + series + "&img=" + img;
	}
	
	var fpIsCool = 	so.installedVer.versionIsValid( so.getAttribute("version") );
	
	if ( !fpIsCool )
	{
		this.noFlash();
		return;
	}
	
	if ( screen.height < 800 )
		this.isWayTooSmall();
	else if ( screen.height < 900 )
		this.isPrettyMuchTooSmall();
	else
		this.isJustRight();
}

o.noFlash = function()
{
	document.getElementById( 'noflash' ).style.display = "block";
}

o.isWayTooSmall = function()
{
	document.getElementById( 'waytoosmall' ).style.display = "block";
}

o.isPrettyMuchTooSmall = function()
{
	document.getElementById( 'prettymuchtoosmall' ).style.display = "block";
}

o.isJustRight = function()
{
	so.write( "container" );
}

o.hideEverything = function()
{
	var i = this.divs.length;
	while ( i-- )
		document.getElementById( this.divs[ i ] ).style.display = "none";
}

o.sayGoodbye = function()
{
	this.urlSuffix = "";
	this.hideEverything();
	document.getElementById( 'byebye' ).style.display = "block";
}

o.openPopUp = function()
{
	var host = window.location.host.indexOf( 'www' ) == -1 ? 'milchkleid.de' : 'www.milchkleid.de';	
	var win = window.open( "http://" + host + "/home/popup.php" + this.urlSuffix, 'milchpopup','toolbar=no,location=no,scrollbars=no,resizable=yes,width='+screen.width+',height='+screen.height+',left=0,top=0');	
}