

// Dinamic Layout
function getBrowserWidth()
{
	if (window.innerWidth)
	{
		return window.innerWidth;
	}	
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		return document.body.clientWidth;
	}		
		return 0;
}

function getBrowserHeight()
{
	if (window.innerHeight)
	{
		return window.innerHeight;
	}	
	else if (document.documentElement && document.documentElement.clientHeight != 0)
	{
		return document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		return document.body.clientHeight;
	}		
		return 0;
}

function getBrowserVersion()
{
	//sniffing browser
	nome_completo_browser = navigator.userAgent; //restituisce il nome completo del browser es:Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
	nome_codificato_browser = navigator.appCodeName; //restituisce il nome codificato del browser
	versione_browser = navigator.appVersion; //restituisce la versione del browser
	nome_browser = navigator.appName; //restituisce il nome completo del browser
	SO = navigator.platform; //restituisce la piattaforma su cui è istallato il browser
	
	// cattura se visualizzato con iPhone o iPad
	if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i)))
	{
		location.replace("iPhone/index.html");
	}
	if(navigator.userAgent.match(/iPad/i))
	{
		location.replace("iPad/index.html");
	}
}
	
