/**
 * Resize layout flash callback
 */
var App = {
				
	resizeLayout: function( nSize ) {
		var ps = App.getPageSize().height;
		if ( nSize < ps ) {
			nSize = ps;
		}
		setTimeout( "App.resizeAsync('" + nSize + "'" + ")", 1 );
	},
	
	resizeAsync: function( nSize ) {
		var sSize = nSize + 'px';
		//alert( document.getElementById( 'cinquecento_by_diesel' ) );
		document.getElementById( 'cinquecento_by_diesel' ).style.height = sSize;
	},
	
	getPageSize: function() {
		
		var w = 0;
		var h = 0;

		//IE
		if( !window.innerWidth )
		{
			//strict mode
			if( !( document.documentElement.clientWidth == 0 ) )
			{
				w = document.documentElement.clientWidth;
				h = document.documentElement.clientHeight;
			}
			//quirks mode
			else
			{
				w = document.body.clientWidth;
				h = document.body.clientHeight;
			}
		}
		//w3c
		else
		{
			w = window.innerWidth;
			h = window.innerHeight;
		}
		return { width : w, height : h };
	}
}
