function browserDetection(path)
{
  var ind=0; var versione1=-1;
  
  if((ind = navigator.appVersion.indexOf("MSIE")) > -1 && navigator.userAgent.indexOf("Opera") == -1) 
  {
    //IL BROWSER E' EXPLORER
    versione1 = parseInt(navigator.appVersion.substr(ind+5));
    versione2 = parseFloat(navigator.appVersion.substr(ind+5));
    if(versione1 <= 6)
    {
      var html = "<div id='brw'>"+
      "<a target='_blank' title='download gratuito internet explorer' href='http://www.microsoft.com/downloads/Browse.aspx?displaylang=it&categoryid=6'>"+
      "<img border='0' style='margin-right: 5px;' align='left' src='"+path+"interfaccia/ie.jpg' />"+
      "Scarica Internet Explorer 7 o superiore per visualizzare correttamente il sito</a>. "+
      "<span>Il download &egrave; gratuito!</span></div>";
      document.getElementById('browser').innerHTML = html;
    }
  }
  
	
	//div.appendChild(document.createTextNode(versione1));
}

/*Inserimento file flash*/
  function animazione_flash(nome,path,b,h,id,loop) {
  if(path == "/")
  {
    document.write("<object id='"+id+"' type='application/x-shockwave-flash' data='"+nome+".swf'width='"+b+"' height='"+h+"' id='filmato'>\n");
    document.write("<param name='movie' value='"+nome+".swf' />\n");
  }
  else{
    document.write("<object id='"+id+"' type='application/x-shockwave-flash' data='"+path+"/"+nome+".swf'width='"+b+"' height='"+h+"' id='filmato'>\n");
    document.write("<param name='movie' value='"+path+"/"+nome+".swf' />\n");
  }
  document.write("<param name='quality' value='high' /><param name='wmode' value='transparent' />\n");
  document.write("<param name='loop' value='"+loop+"' />\n");
  document.write("</object>\n");
}

function delGal(id)
{
  conferma = window.confirm("ELIMINARE DEFINITIVAMENTE LE FOTO N. "+id+"?");
  if(conferma==true)
    window.location = "../admin/?delGal="+id;
}
function delEve(id)
{
  conferma = window.confirm("ELIMINARE DEFINITIVAMENTE L'EVENTO N. "+id+"?");
  if(conferma==true)
    window.location = "../admin/?delEve="+id;
}

/* TRANSIZIONE EVENTI */

function scheduler(numEve)
{
  this.numEve = numEve;
  this.corrente = 0;
  this.old=0;
  
  this.play = play;
  this.show = show;
  this.getCorrente = getCorrente;
}

function play()
{
  this.old = this.corrente;
  this.corrente = this.corrente+1;
  
  if(this.corrente > (this.numEve-1))
    this.corrente=0;
  
  sh.show();
  
  setTimeout("sh.play()",7000);
}

function getCorrente(){return this.corrente;}

function show()
{
  document.getElementById("banner"+this.old).style.visibility="hidden";
  document.getElementById("banner"+this.corrente).style.visibility="visible";
}

/* FINE TRANS. EVENTI */













