window.onload = function()
{
	PosizionaElementi();	
}

window.onresize = function()
{
	PosizionaElementi();
}

//ridimensiona e riposiziona gli elementi
function PosizionaElementi()
{
	//footer
	var footer = document.getElementById("footer");
	footer.style.width = "100%";
	
	//immagine intro
	var immagineIntro = document.getElementById("immagineIntro");
	var dimensioneSchermoW = 0;
	var dimensioneSchermoH = 0;
	var dimensioneInternoW = 690;
	var dimensioneInternoH = 400;
	
	if (isNaN(window.scrollY))
	{
		dimensioneSchermoW = document.body.clientWidth;
		dimensioneSchermoH = document.body.clientHeight;
	}
	else
	{
		dimensioneSchermoW = window.innerWidth;
		dimensioneSchermoH = window.innerHeight;
	}
	
	//alert(dimensioneSchermoW + " - " + dimensioneSchermoH);
	
	immagineIntro.style.left = ((dimensioneSchermoW - dimensioneInternoW) / 2) + "px";
	immagineIntro.style.top = ((dimensioneSchermoH - dimensioneInternoH - 40) / 2) + "px";
}

//link sito bsd
function LinkBSD()
{
	window.open("http://www.bsdsoftware.it", "BSDSoftware");	
}

//ingresso al sito
function Entra(lingua)
{
  if (! DetectFlashVer(10, 0, 0))
  {
    switch (lingua)
    {
      case "it":
        if (confirm("Attenzione: per un corretto funzionamento del sito e' consigliata la presenza di Adobe Flash Player 10 installato.\nSi desidera visitare la pagina di Adobe per il download del software?"))
        {
          window.open("http://get.adobe.com/it/flashplayer/", "AdobeFlashPlayer");
          return;
        }
      break;
      case "en":
        if (confirm("Caution: for proper operation of the site is recommended the presence of the Adobe Flash Player 10 installed.\nDo you wish to visit Adobe site to download the software?"))
        {
          window.open("http://get.adobe.com/it/flashplayer/", "AdobeFlashPlayer");
          return;
        }
      break;
    }
    
  }
  
  
  
  
  window.location.href = "./menu/home2009AI.html?lang=" + lingua;
}