// JavaScript Document

	function getInnerBrowserHeight(){
		if (window.innerHeight)
			return window.innerHeight;
		else if(document.documentElement)
			return document.documentElement.clientHeight;
		else if(document.body)
			return document.body.clientHeight;
		
	}
	/*function iPadDetection(){
    	return navigator.platform == "iPad";
	}*/
	function iPadDetection(){
    	if (navigator.platform == "iPad")
			return "iPad";
		else 
			return 0;
	}
	function adattaLayout(){
		if(iPadDetection()){
			location.replace('nuovosito/S/Home.html');
			return;
		}
		var browserHeight = window.screen.height;
		var browserInner = getInnerBrowserHeight();
		
		if(browserHeight >= 1024)
			location.replace('nuovosito/L/Home.html');
		if((browserHeight >= 900)&&(browserHeight < 1024))
			if (document.all)
			{
				if (browserInner >= 701 )
					location.replace('nuovosito/M/Home.html');
				else location.replace('nuovosito/S/Home.html');
			}
			else {
				if (browserInner >= 701 )
					location.replace('nuovosito/M/Home.html');
				else location.replace('nuovosito/S/Home.html');
			}
		if(browserHeight < 900)
			location.replace('nuovosito/S/Home.html');	
	}
