function scriviswf (background,nomeflash,dimx,dimy,nome,nomexml,nomeP){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ dimx +'" height="'+ dimy +'" id="'+nome+'" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="'+ nomeflash +'?fxml=' +  nomexml + '&nomeP=' +  nomeP + '" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="bgcolor" value="' + background + '" />\n');
	document.write('<embed src="'+ nomeflash + '" quality="high" wmode="transparent" bgcolor="' + background + '" width="'+ dimx +'" height="'+ dimy +'" name="'+nome+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
	//document.write(nomexml + '.xml');
}
function TestEncoding(inputString)
{
  var encodedInputString=escape(inputString);
  encodedInputString=encodedInputString.replace("+", "%2B");
  encodedInputString=encodedInputString.replace("/", "%2F"); 
  return encodedInputString;
}
function apriChiudiThumb(nomeDiv, ix){
        if (window.document.getElementById(nomeDiv).style.display == "none") {
            window.document.getElementById(nomeDiv).style.display = "block";
            new Fx.Style('gallerynum' + ix, 'width', {duration:500}).set(110);
            new Fx.Style('gallerynum' + ix, 'height', {duration:500}).set(124);
            
            new Fx.Style(nomeDiv, 'opacity').set(0);
            new Fx.Style(nomeDiv, 'opacity', {duration:1000}).start(0,1);
            
        }else{
            new Fx.Style('gallerynum' + ix, 'width', {duration:500}).set(18);
            new Fx.Style('gallerynum' + ix, 'height', {duration:500}).set(39);
            new Fx.Style(nomeDiv, 'opacity').set(0);
            window.document.getElementById(nomeDiv).style.display = "none";
            
        }
      }
function apriChiudiDiv(nomeDiv){
        if (window.document.getElementById(nomeDiv).style.display == "none") {
            window.document.getElementById(nomeDiv).style.display = "block";
            new Fx.Style(nomeDiv, 'opacity').set(0);
            new Fx.Style(nomeDiv, 'opacity', {duration:1000}).start(0,1);
        }else{
            new Fx.Style(nomeDiv, 'opacity').set(0);
            window.document.getElementById(nomeDiv).style.display = "none";
          
        }
      }
function apriChiudiDiv50(nomeDiv){
        if (window.document.getElementById(nomeDiv).style.display == "none") {
            window.document.getElementById(nomeDiv).style.display = "block";
            new Fx.Style(nomeDiv, 'opacity').set(0);
            new Fx.Style(nomeDiv, 'opacity', {duration:1000}).start(0,0.5);
            
        }else{
            new Fx.Style(nomeDiv, 'opacity').set(0);
            window.document.getElementById(nomeDiv).style.display = "none";
        }
      }
function mostraNascondiDiv(nomeDiv){
        if (window.document.getElementById(nomeDiv).style.display == "none") {
            window.document.getElementById(nomeDiv).style.display = "block";
        }else{
            window.document.getElementById(nomeDiv).style.display = "none";
        }
      }
function gotoUrl(page) {
    window.location=page;
}