/**
*	Screen Sizes - V 1.0 - customized for anattitude
*
*   Javascript that measures the available space for align operations
**/

/**
* Returns the available height. 
* Measures the total available vertical space for content IN the browser window.
**/
function getDisplayHeight()
{
	var y = 600;		// fallbacksize
	if (self.innerHeight) // all except Explorer
	{
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		y = document.body.clientHeight;
	}
	return y;
}

/**
* Returns the available width.
*  Measures the total available horizontal space for content IN the browser window.
**/
function getDisplayWidth()
{
	var x = 800;		// fallbacksize
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
	}
	return x;
}

/**
* Calculates the Y position of the left upper corner of centered element with
* the specified heigth.  
**/
function getHalfVerticalSpace( blockHeight )
{
		space=getDisplayHeight() - blockHeight;
		return Math.round( space / 2 );
}

/**
* Calculates the X position of the left upper corner of centered element with
* the specified width.  
**/
function getHalfHorizontalSpace( blockWidth )
{
		space=getDisplayWidth() - blockWidth;
		return Math.round( space / 2 );
}

function conditionalFooter(){
	if( getDisplayHeight() > 595){
		document.getElementById('footer').style['display'] = 'block';
	}
}