// FIX FOR FUCKIN' SMALL RESOLUTION SCREENS, blabla, who use them today, eh?

if (isSmallScreen)
{

	if ($('body'))
	{
		if ($('areaHeader'))
			$('areaHeader').setStyle('height', 498);
		if ($('htmlEdit'))
			$('htmlEdit').setStyle('height', ($('areaHeader').getStyle('height').toInt() - $('htmlEdit').getStyle('padding-top').toInt() - $('htmlEdit').getStyle('padding-bottom').toInt()));
		if ($('search'))
			$('search').setStyle('height', ($('areaHeader').getStyle('height').toInt() - $('search').getStyle('padding-top').toInt() - $('search').getStyle('padding-bottom').toInt()));
		if ($('forms'))
			$('forms').setStyle('height', ($('areaHeader').getStyle('height').toInt() - $('forms').getStyle('padding-top').toInt() - $('forms').getStyle('padding-bottom').toInt() - 20));
	}
	
	$$('#bigMenu div').each(function(item, index) {
		item.setStyles({
			'padding-top': 7,
			'height': 32});
		item.addEvent('mouseover', function()
			{
				this.setStyle('background-image', 'url("' + rootApplicationPath + 'images/bg-big-menu-sm.png")');
			});
		item.addEvent('mouseout', function()
			{
				this.setStyle('background-image', 'none');
			});
	});
		
	$$('.redSubMenuItem > ul > li').each(function(item, index) {
		item.setStyle('background', 'transparent url("' + rootApplicationPath + 'images/red-sub-menu-first-level-darker.png") no-repeat top left');
	});
	
	$$('.redSubMenuItem > ul > li > ul > li').each(function(item, index) {
		item.setStyle('background', 'transparent url("' + rootApplicationPath + 'images/red-sub-menu-second-level-darker.png") no-repeat top left');
	});
	
	$('redSubMenu').setStyle('margin-top', -41);
	
	if (!Browser.Engine.trident || (Browser.Engine.trident && document.querySelectorAll))
	{
		$$('#areaRedMenu').each(function(item, index) {
			item.setStyle('margin', '45px auto 0px auto');
		});
	}
	
	if ($('bigSubMenu'))
		$('bigSubMenu').setStyle('height', 498);

	if ($('googlemaps'))
		$('googlemaps').setStyle('height', 210);
		
	if ($$('#newsletter .htmlEditContent').length > 0)
	    $$('#newsletter .htmlEditContent')[0].setStyle('height', 100);		
	if ($('newsletterList'))
	    $('newsletterList').setStyle('height', 160);
	if ($('newsletter'))
	    $('newsletter').setStyle('height', 458);
		
	if ($$('#di .htmlEditContent').length > 0)
	    $$('#di .htmlEditContent')[0].setStyle('height', 100);		
	if ($('diList'))
	    $('diList').setStyle('height', 240);
	if ($('di'))
	    $('di').setStyle('height', 458);
	    
	if ($('download'))
	    $('download').setStyle('height', 458);
	if ($('downloadList'))
	    $('downloadList').setStyle('height', 350);
	    
	if ($('products'))
	    $('products').setStyle('height', 458);
	    
	if ($('news'))
	{
	    $('news').setStyle('height', 478);
	    $('newsContainer').setStyle('height', 470);
	}
	    
	if ($('register'))
	{
	    $('register').setStyle('height', 458);
	    $('registerContainer').setStyle('height', 470);
	}
	
	if ($('productsList'))
	{
	    $$('#productsList img').each(function(item)
	    {
	        item.setStyle('width', item.getStyle('width').toInt() * 0.5);
	        item.setStyle('height', item.getStyle('height').toInt() * 0.5);
	    });
	    $$('#productsList > div').each(function(item)
	    {
	        item.setStyle('height', item.getStyle('height').toInt() - 62);
	    });
	    $('productsList').setStyle('height', 360);
	}
}
	
	if ($$('.bgAreaHeaderAzienda').length > 0)
		$$('.bgAreaHeaderAzienda')[0].setStyle('background', 'transparent url("' + rootApplicationPath + 'images/bg-l-azienda-small.jpg") no-repeat center center');
	if ($$('.bgAreaHeaderNostroMondo').length > 0)
		$$('.bgAreaHeaderNostroMondo')[0].setStyle('background', 'transparent url("' + rootApplicationPath + 'images/bg-nostro-mondo-small.jpg") no-repeat center center');
	if ($$('.bgAreaHeader7Plus').length > 0)
		$$('.bgAreaHeader7Plus')[0].setStyle('background', 'transparent url("' + rootApplicationPath + 'images/bg-7-plus-small.jpg") no-repeat center center');
	if ($$('.bgAreaHeaderProdotti').length > 0)
		$$('.bgAreaHeaderProdotti')[0].setStyle('background', 'transparent url("' + rootApplicationPath + 'images/bg-prodotti-small.jpg") no-repeat center center');
	if ($$('.bgOther').length > 0)
		$$('.bgOther')[0].setStyle('background', 'transparent url("' + bgSmallImage + '") no-repeat center center');