var dimensioneSchermoW = 0;
var dimensioneSchermoH = 0;
var posX = 0;
var posY = 0;

var scostamento = 0;
var posIntroX = 0;
var posIntroY = 0;
var dimensioneIntroW = 0;
var dimensioneIntroH = 0;

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()
{
	if (isNaN(window.scrollY))
	{
		dimensioneSchermoW = document.body.clientWidth;
		dimensioneSchermoH = document.body.clientHeight;
	}
	else
	{
		dimensioneSchermoW = window.innerWidth;
		dimensioneSchermoH = window.innerHeight;
	}
	
	//immagine intro
	var divIntro = document.getElementById("divIntro");
	
	//alert(dimensioneSchermoW + " - " + dimensioneSchermoH);
	
	var imgIndex = document.getElementById("imgIndex");
	imgIndex.style.width = dimensioneSchermoW;

	
	var imgIndexW = 0;
	var imgIndexH = 0;
	
	imgIndexW = imgIndex.clientWidth;
	imgIndexH = imgIndex.clientHeight;
	//alert(imgIndexW + " - " + imgIndexH);
	
	imgIndex.style.top = ((dimensioneSchermoH - imgIndexH) / 2);
	
	/*
	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/home2012AI.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");
}

function on_MouseMove(e) 
{
	
	if (!e) var e = window.event;

	alert(e.clientX);
	return false;
	
}

function LiveStreaming()
{
	window.open("http://www.tele1.it/streaming_live.htm", "GermanoZama_LiveStreaming");
	//window.open("http://www.tele1.it/germanozama/flash_winter.htm", "GermanoZama_FlashWinter");
}
