window.onload = function()
{
	PosizionaElementi();
	window.status = "Germano Zama - bsdsoftware.it";
	
	VerificaVersioneFlash();
}

window.onresize = function()
{
	PosizionaElementi();
}

function VerificaVersioneFlash()
{
	if (! DetectFlashVer(10, 0, 0))
	{
		if (confirm("Attenzione: per un corretto funzionamento del sito e' necessaria l'installazione di Adobe Flash Player 10.\nSi desidera visitare la pagina di Adobe per il download del software?"))
		{
			window.open("http://get.adobe.com/it/flashplayer/", "AdobeFlashPlayer");
			return;
		}
	}
}

//ridimensiona e riposiziona gli elementi
function PosizionaElementi()
{
	//immagine intro
	var divIntro = document.getElementById("divIntro");
	var dimensioneSchermoW = 0;
	var dimensioneSchermoH = 0;
	var dimensioneInternoW = 970;
	var dimensioneInternoH = 666;
	
	if (isNaN(window.scrollY))
	{
		dimensioneSchermoW = document.body.clientWidth;
		dimensioneSchermoH = document.body.clientHeight;
	}
	else
	{
		dimensioneSchermoW = window.innerWidth;
		dimensioneSchermoH = window.innerHeight;
	}
	
	//alert(dimensioneInternoH + " - " + dimensioneSchermoH);
	
	divIntro.style.left = ((dimensioneSchermoW - dimensioneInternoW) / 2) + "px";
	if (dimensioneInternoH > dimensioneSchermoH)
		divIntro.style.top = "0px";
	else
		divIntro.style.top = ((dimensioneSchermoH - dimensioneInternoH) / 2) + "px";
}

//link sito bsd
function LinkBSD()
{
	window.open("http://www.bsdsoftware.it", "BSDSoftware");	
}

//ingresso al sito
function Entra(sito)
{
	if (sito)
		window.location.href = "./menu/home.html";
	else
		window.open("http://www.germanozamashop.com", "GermanoZamaShop");	
}

//fan gz
function FanGZFB()
{
	window.open("http://www.facebook.com/pages/GERMANO-ZAMA/180429297233?ref=search&sid=1098437407.30861849..1", "FanGZFB");
}