
//*** POP UP VIDEO ***//

    function finestra(nomefile,nomefinestra,larghezza,altezza) {
      if (document.all) {
        var x = window.screenLeft;
        var y = window.screenTop;
        var w = window.document.body.offsetWidth;
        var h = window.document.body.offsetHeight;
      }
      else {
        var x = window.screenX;
        var y = window.screenY;
        var w = window.outerWidth;
        var h = window.outerHeight;
      }
      var cntx = x + Math.round((w - larghezza) / 2);
      var cnty = y + Math.round((h - altezza) / 2);


      window_handle =   window.open (nomefile,nomefinestra, 'left=' +cntx+ ',top=' +cnty+ ',width=' +larghezza+ ',height='+altezza+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no');
      window_handle.focus();
    }
    function finestra2(nomefile,nomefinestra,larghezza,altezza) {
      if (document.all) {
        var x = window.screenLeft;
        var y = window.screenTop;
        var w = window.document.body.offsetWidth;
        var h = window.document.body.offsetHeight;
      }
      else {
        var x = window.screenX;
        var y = window.screenY;
        var w = window.outerWidth;
        var h = window.outerHeight;
      }
      var cntx = x + Math.round((w - larghezza) / 2);
      var cnty = y + Math.round((h - altezza) / 2);


      window_handle =   window.open (nomefile,nomefinestra, 'left=' +cntx+ ',top=' +cnty+ ',width=' +larghezza+ ',height='+altezza+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes');
      window_handle.focus();
    }

//*** FINE POP UP VIDEO **//



//*** CARICAMENTO SWF SENZA CONTORNO ***//

function populateSWF(NomeContenitore, NomeSwf, PathSwf, Larghezza, Altezza){
	var shtml = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"";
	shtml += " codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0\"";
	shtml += "  width=\"" + Larghezza + "\" height=\"" + Altezza + "\" id=\"" + NomeSwf + "\" align=\"\">";
	shtml += " <param name=allowScriptAccess value=sameDomain />";
	shtml += " <param name=scale value=noscale />";
	shtml += " <param name=movie value=\"" + PathSwf + "\">";
	shtml += " <param name=quality value=high>";
	shtml += " <param name=bgcolor value=#021931>";
	shtml += " <embed src=\"" + PathSwf + "\" quality=high bgcolor=#021931  width=\"" + Larghezza + "\" height=\"" + Altezza + "\" name=\"" + NomeSwf + "\" align=\"\"";
	shtml += "  type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
	shtml += "     </object>"

	var d = document.getElementById(NomeContenitore);
	d.innerHTML = shtml;
}

//*** FINE CARICAMENTO SWF SENZA CONTORNO ***//

// *** MENU A TENDINA ***//

layerz=new Array("layCaminella","layVini","layIdee","layCuriosita","layDove")
var got=0
document.density = 0;
document.layfade = 0;
function Clear(){
	for(i=0;i<layerz.length;i++){
		document.getElementById(layerz[i]).style.display='none';
		if (document.all){
			document.getElementById(layerz[i]).filters.alpha.opacity=0;
			document.density=0;
			clearInterval(document.theTimer);
		}
	}
}
function Lay(who){
	if ((! document.hideMenu)){
		Clear();
		got=1
		document.getElementById(who).style.display='block';
		document.layfade = who;
		if (document.all){
			document.theTimer = setInterval( "fadein(" +  document.layfade + ")" ,8);
		}

	}
}
function Out(){
	function checkOver(){
		if(got==0) Clear();
	}
	setTimeout(checkOver,1200)
}

function fadein(who){
		if ( document.density < 100 ){
			document.density += 10;
			who.filters.alpha.opacity = document.density;
		}
}

function testing(who){
}




// *** FINE MENU A TENDINA ***//
