
function detectVersion()
{
	version = parseInt(navigator.appVersion);
	return version;
}

function detectOS()
{
	if(navigator.userAgent.indexOf('Win') == -1) 
	{
		OS = 'Macintosh';
	}
	else
	{
		OS = 'Windows';
	}
	return OS;
}

function detectBrowser()
{
	if(navigator.appName.indexOf('Netscape') == -1) 
	{
		browser = 'IE';
	}
	else
	{
		browser = 'Netscape';
	}
	return browser;
}

function FullScreen(categoria,prodotto,lang)
{
	//alert(categoria+" "+prodotto+" "+lang);
	var adjWidth = 10;
	var adjHeight = 30;
	if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) 
	{
		adjWidth = 0;
		adjHeight = 35;
	}
	if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) 
	{
		adjWidth = 10;
		adjHeight = 35;
	}
	if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) 
	{
		adjWidth = 7;
		adjHeight = 30;
	}
	
	if (categoria != undefined || prodotto != undefined)
	{
		var linkTo = "http://www.turnlights.com/flash/prodotti.php?"+(categoria!=undefined ? "cat="+categoria : "")+(prodotto!=undefined ? "&prod="+prodotto : "")+(lang!=undefined ? "&lang="+lang : "");
	}
	else
	{
		var linkTo = "http://www.turnlights.com/flash/prodotti.php";
	}
	//self.location.href = linkTo;/*
	if(detectVersion() < 4) 
	{
		self.location.href = linkTo;
	}
	else
	{
		var winWidth = window.screen.availWidth - adjWidth;
		var winHeight = window.screen.availHeight - adjHeight;
		var winSize = 'width=' + winWidth + ',height=' + winHeight;
		var thewindow = window.open(linkTo, '', winSize);
		thewindow.moveTo(0,0);
	}
}

//window.onload = document.getElementById('categorie_bg').style.position = "absolute";