/**
 * This is written in js because i'd need more than a half css file only
 * with hacks in it, x-browser compatibility _not_ given...
 */


function setFooter() 
{
	/* 31 = height + padding + border */
	
	/**
	 *  YES I KNOW it's the same, either i'm drunk or 
	 *  this is really a bug. just writing
	 *  $('bottom').style.top = $('page').getHeight() + 'px';
	 *  won't work properly...
	 */
	
	if( $('page').getHeight() > document.viewport.getHeight() ) 
	{
		$('bottom').style.top = $('page').getHeight() + 'px';
		//alert('page is bigger than viewport');
	}
	
	if( $('page').getHeight() < document.viewport.getHeight() ) 
	{
		$('bottom').style.top = $('page').getHeight() + 'px';
		//alert('page is smaller than viewport');
	}
}

function setContentLeft()
{	
	if( $('header-image') == null )
	{
		/* 5 or 25 = padding of content-wrap */
		$('content-left').style.top = $('main-navigation').getHeight() - 5 + 'px';
		$('content-left').style.height = $('content-wrap').getHeight() - $('main-navigation').getHeight() - 25 + 'px';
	}
	
	else
	{
		$('content-left').style.height = $('content-wrap').getHeight() - 25 + 'px';
	}
	
	if( $('content-left').childElements().length != 0 ) $('content-left').style.backgroundColor = '#a88f88';
}

function emptyField(field)
{
	field.value = '';
}



window.onload = function() 
{
	setFooter();
	setContentLeft();
}

window.onresize = function() 
{
	setFooter();
}
