
 function popup(nome, cognome, eta, ruolo, descrizione, foto)
 {	 	 
 	
 	
   var stili = "top=100, left=100, width=550, height=750, status=no, menubar=no, toolbar=no scrollbar=no";
   var testo = window.open("", "", stili);
      testo.document.write("<html>\n");
      testo.document.write(" <head>\n");
      testo.document.write("  <title>Profilo collaboratore</title>\n");
      testo.document.write("  <basefont size=2 face=Tahoma>\n");
      testo.document.write(" </head>\n");
      testo.document.write("<body topmargin=20 leftmargin=90>\n");
      testo.document.write("<div align=left>NOME: &nbsp;<b> " + nome + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left>COGNOME: &nbsp;<b> " + cognome + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left>ETA': &nbsp;<b>" + eta + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left>RUOLO: &nbsp;<b>" + ruolo + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left><b><img src=" + foto + " width='500' height='100'></b></div>\n");
      testo.document.write("<br><br>");
      testo.document.write("<div align=left><b>" + descrizione + "</b></a></div>\n");
      testo.document.write("</body>\n");
      testo.document.write("</html>");

} 

 function popupLibreria(nome, indirizzo, telefono, sito, descrizione)
 {	 	 
 	
 	
   var stili = "top=100, left=100, width=550, height=750, status=no, menubar=no, toolbar=no scrollbar=no";
   var testo = window.open("", "", stili);
      testo.document.write("<html>\n");
      testo.document.write(" <head>\n");
      testo.document.write("  <title>Profilo collaboratore</title>\n");
      testo.document.write("  <basefont size=2 face=Tahoma>\n");
      testo.document.write(" </head>\n");
      testo.document.write("<body topmargin=20 leftmargin=90>\n");
      testo.document.write("<div align=left>LIBRERIA: &nbsp;<b> " + nome + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left>INDIRIZZO: &nbsp;<b> " + indirizzo + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left>TELEFONO : &nbsp;<b>" + telefono + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left>SITO : &nbsp;<b>" + sito + "</b></a></div>\n");
      testo.document.write("<br>");
      testo.document.write("<div align=left><b>" + descrizione + "</b></a></div>\n");
      testo.document.write("</body>\n");
      testo.document.write("</html>");

} 

function controllaCancellazioniChiSiamo(form, nome, cognome)
{
			var conferma = false;
			conferma = confirm("Attenzione!\n Vuoi davvero cancellare \n " + nome  + "  " + cognome  + " ?");     
			if (conferma == false)
      {
				return false;
			}
	
	
}
function controllaCancellazioniTrailer(form, trailer)
{
	
			var conferma = false;
			conferma = confirm("Attenzione!\n Vuoi davvero cancellare \n " + trailer  + " ?");     
			if (conferma == false)
      {
				return false;
			}
		
}

function controllaCancellazioniLibreria(form, libreria)
{
	
			var conferma = false;
			conferma = confirm("Attenzione!\n Vuoi davvero cancellare \n " + libreria  + " ?");     
			if (conferma == false)
      {
				return false;
			}

}





function controllaFoto(form)
{
	
	var file = trimmer(form.uploadfile.value); 
	
	if(file == null || file.length == 0)
	{
			var conferma = false;
			conferma = confirm("Attenzione!\n Non è stata inserita nessuan foto\nVuoi continuare?");     
			if (conferma == false)
      {
				return false;
			}
	
	}
}

function controllaFotoTrailer(form)
{
	
	var fileFoto = trimmer(form.uploadfileFoto.value); 
	var fileFilmati = trimmer(form.uploadfileFilmati.value);
	
	if(fileFoto == null || fileFoto.length == 0)
	{
			var conferma = false;
			conferma = confirm("Attenzione!\n Non è stata inserita nessuan foto\nVuoi continuare?");     
			if (conferma == false)
      {
				return false;
			}
	
	}
	if(fileFilmati == null || fileFilmati.length == 0)
	{
			var conferma = false;
			conferma = confirm("Attenzione!\n Non è stato caricato alcun filmato\nVuoi continuare?");     
			if (conferma == false)
      {
				return false;
			}
	
	}
	
}

function controllaInserimentoFotoTrailer(form, option)
{		
		 var valore = "";

  	 var i = option.selectedIndex;
  	 trailer = option.options[i].value;
  	 		  	
		 var file = form.uploadfile.value;	
		 var nome = form.desc_file.value;	
		 
		 if (trailer.length == 0 || trailer.length == 0)
     {
      		alert("AVVISO!\nNon hai specificato il trailer a cui associare le foto!");
      		form.trailer.focus();
      		return false;
     }
     if(file.length == 0 || file.length == 0)
     { 		
     		alert("AVVISO!\nNon hai caricato nessuna foto!");
        form.uploadfile.focus();
        return false;
     }
     if(nome.length == 0 || nome.length == 0)
     { 		
     		alert("AVVISO!\nNon hai scritto il nome della foto!");
        form.desc_file.focus();
        return false;
     } 	
     

}
	



function trimmer(stringa_in)
{
 var stringa_out = "";
 var stringa_blanck = " ";
 var stringa_tmp = "";

 if (stringa_in == null) return stringa_out;
 
 for (var i=0; i<stringa_in.length; i++)
 {
   stringa_tmp = stringa_in.substring(i, i+1);
   if (stringa_tmp != stringa_blanck) 
   {
     stringa_out += stringa_tmp;
   }
 }  
 return stringa_out;   
}


 function popup2(nome, cognome, eta, ruolo, descrizione, foto)
 {
		 var stili = "top=100, left=100, width=730, height=830, status=no, menubar=no, toolbar=no scrollbar=\"yes\", resizable=yes";
   	 var testo = window.open("", "", stili);
			
					//testo.document.write("<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">");
					testo.document.write("<html>");
					testo.document.write("<head>");
					testo.document.write("<title>TIL Foto gallery</title>");
					testo.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
					testo.document.write("<link href='teatro_libreria.css' rel='stylesheet' type='text/css'>");
					testo.document.write("</head>");
					testo.document.write("<body bgcolor='#000000'  scroll=\"yes\"leftmargin='00'topmargin='00' marginwidth='00' marginheight='00'>");
					testo.document.write("<table width='696' border='0' cellpadding='00' cellspacing='00' bgcolor='#CCCCCC'>");
					testo.document.write("<tr>"); 
					testo.document.write("    <td>&nbsp;</td>");
					testo.document.write("    <td colspan='4'>&nbsp;</td>");
					testo.document.write("    <td>&nbsp;</td>");
					testo.document.write("  </tr>");
					testo.document.write("  <tr>"); 
					testo.document.write("    <td width='15' height='35' bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("    <td height='35' colspan='4' bgcolor='#FFFFFF'><span class='titolirossoMB'>" + nome + "&nbsp;"); 
					testo.document.write("      " + cognome + "</span><span class='nerom'> (" + eta + ") - </span><span class='nero_MB'>" + ruolo + "&nbsp;"); 
					testo.document.write("      </span><span class='nerom'></span></td>");
					testo.document.write("    <td width='15' height='35'>&nbsp;</td>");
					testo.document.write("  </tr>");
					testo.document.write("  <tr>"); 
					testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
					testo.document.write("    <td width='170' align='center' valign='top'><img src=" + foto +  " width='170' height='580'></td>");
					testo.document.write("    <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
					testo.document.write("    <td width='446' bgcolor='#FFFFFF'><span class='nerom'>" + descrizione + "&nbsp;"); 
					testo.document.write("      </span></td>");
					testo.document.write("    <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
					testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
					testo.document.write("	  </tr>");
					testo.document.write("	  <tr>"); 
					testo.document.write("	    <td>&nbsp;</td>");
					testo.document.write("	    <td>&nbsp;</td>");
					testo.document.write("	    <td bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("	    <td bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("	    <td bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("	    <td>&nbsp;</td>");
					testo.document.write("	  </tr>");
					testo.document.write("	</table>");
					testo.document.write("	<br>");
					testo.document.write("	<script language='javascript'>");
					testo.document.write("	window.resizeTo(imgSrc.width + 90, imgSrc.height + 200);");
					testo.document.write("	</script>");
					testo.document.write("	</body>");
					testo.document.write("	</html>");

}

 function popupLibreria2(nome, indirizzo, telefono, sito, responsabile, foto, descrizione)
 {	
   var stili = "top=100, left=100, width=750, height=450, status=no, menubar=no, toolbar=no scrollbar=\"yes\" resizable=yes";
   var testo = window.open("", "", stili);
   
   if(indirizzo == null || indirizzo.length == 0)
   {
   				labelIndirizzo = "";
   }
   else
   {
  		 		labelIndirizzo = "Indirizzo";
   }
   
   if(telefono == null || telefono.length == 0)
   {
   				labelTelefono = "";
   }
   else
   {
  		 		labelTelefono = "Telefono";
   }
   
   if(sito == null || sito.length == 0)
   {
   				labelSito = "";
   }
   else
   {
  		 		labelSito = "Sito";
   }
   
   if(responsabile == null || responsabile.length == 0)
   {
   				labelResponsabile = "";
   }
   else
   {
  		 		labelResponsabile = "Responsabile eventi";
   } 
    
    	   
   testo.document.write("<html>");
	testo.document.write("<head>");
	testo.document.write("<title>TIL Foto gallery</title>");
	testo.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
	testo.document.write("<link href='teatro_libreria.css' rel='stylesheet' type='text/css'>");
	testo.document.write("<link href='teatro_libreria.css' rel='stylesheet' type='text/css'>");
	testo.document.write("</head>");
	testo.document.write("<body bgcolor='#000000' leftmargin='00' scroll\"yes\" topmargin='00' marginwidth='00' marginheight='00'>");
	testo.document.write("<table width='650' border='0' cellpadding='00' cellspacing='00' bgcolor='#CCCCCC'>");
	testo.document.write("  <tr>"); 
	 testo.document.write("   <td>&nbsp;</td>");
	 testo.document.write("   <td colspan='4'>&nbsp;</td>");
	  testo.document.write("  <td>&nbsp;</td>");
	 testo.document.write(" </tr>");
	testo.document.write("<tr>"); 
    testo.document.write("<td width='15' height='35' bgcolor='#FFFFFF'>&nbsp;</td>");
  testo.document.write("  <td height='35' colspan='4' bgcolor='#FFFFFF'><span class='titolirossoMB'>" + nome +  "&nbsp; "); 
  testo.document.write("    </span><span class='nerom'> &#8211; " +  labelTelefono + " &nbsp; "  + telefono + " <br>");
  testo.document.write("    </span><span class='nero_MB'>" + labelIndirizzo + "</span><span class='nerom'>"); 
  testo.document.write("    </span><span class='titolirossoMB'>" + indirizzo + "</span><br>");
  testo.document.write("    <span class='nero_MB'> "+ labelSito + " </span><span class='nerom'>"); 
  testo.document.write("    </span><span class='titolirossoMB'>" + sito + "</span><br>");
  testo.document.write("    <span class='nero_MB'> " + labelResponsabile + " </span><span class='nerom'>"); 
  testo.document.write("    </span><span class='titolirossoMB'>" + responsabile + "</span><br>");
  testo.document.write("    <br>");
  testo.document.write("    </td>");
  testo.document.write("  <td width='15' height='35'>&nbsp;</td>");
  testo.document.write(" </tr>");
	testo.document.write("  <tr>"); 
	testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
	testo.document.write("    <td width='80' align='center' valign='top'><img src=" + foto + " width='80' height='80'></td>");
	 testo.document.write("   <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
	testo.document.write("    <td width='446' bgcolor='#FFFFFF'><span class='nerom'>" + descrizione + " &nbsp; "); 
	testo.document.write("      </span></td>");																					
	testo.document.write("    <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
	testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
	testo.document.write("  </tr>");
	testo.document.write("  <tr>"); 
	testo.document.write("    <td>&nbsp;</td>");
	testo.document.write("    <td>&nbsp;</td>");
	 testo.document.write("   <td bgcolor='#FFFFFF'>&nbsp;</td>");
	 testo.document.write("   <td bgcolor='#FFFFFF'>&nbsp;</td>");
	 testo.document.write("   <td bgcolor='#FFFFFF'>&nbsp;</td>");
	 testo.document.write("   <td>&nbsp;</td>");
testo.document.write("	  </tr>");
testo.document.write("	</table>");
testo.document.write("	<br>");
testo.document.write("	<script language='javascript'>");
testo.document.write("	window.resizeTo(imgSrc.width + 90, imgSrc.height + 200);");
testo.document.write("	</script>");
testo.document.write("	</body>");
testo.document.write("</html>");

}


function popup2_inglese(nome, cognome, eta, ruolo, descrizione, foto)
 {
		 var stili = "top=100, left=100, width=730, height=830, status=no, menubar=no, toolbar=no scrollbar=\"yes\", resizable=yes";
   	 var testo = window.open("", "", stili);
			
					//testo.document.write("<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">");
					testo.document.write("<html>");
					testo.document.write("<head>");
					testo.document.write("<title>TIL Foto gallery</title>");
					testo.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
					testo.document.write("<link href='teatro_libreria.css' rel='stylesheet' type='text/css'>");
					testo.document.write("</head>");
					testo.document.write("<body bgcolor='#000000'  scroll=\"yes\"leftmargin='00'topmargin='00' marginwidth='00' marginheight='00'>");
					testo.document.write("<table width='696' border='0' cellpadding='00' cellspacing='00' bgcolor='#CCCCCC'>");
					testo.document.write("<tr>"); 
					testo.document.write("    <td>&nbsp;</td>");
					testo.document.write("    <td colspan='4'>&nbsp;</td>");
					testo.document.write("    <td>&nbsp;</td>");
					testo.document.write("  </tr>");
					testo.document.write("  <tr>"); 
					testo.document.write("    <td width='15' height='35' bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("    <td height='35' colspan='4' bgcolor='#FFFFFF'><span class='titolirossoMB'>" + nome + "&nbsp;"); 
					testo.document.write("      " + cognome + "</span><span class='nerom'> (" + eta + ") - </span><span class='nero_MB'>" + ruolo + "&nbsp;"); 
					testo.document.write("      </span><span class='nerom'></span></td>");
					testo.document.write("    <td width='15' height='35'>&nbsp;</td>");
					testo.document.write("  </tr>");
					testo.document.write("  <tr>"); 
					testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
					testo.document.write("    <td width='170' align='center' valign='top'><img src=" + foto +  " width='170' height='580'></td>");
					testo.document.write("    <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
					testo.document.write("    <td width='446' bgcolor='#FFFFFF'><span class='nerom'>" + descrizione + "&nbsp;"); 
					testo.document.write("      </span></td>");
					testo.document.write("    <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
					testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
					testo.document.write("	  </tr>");
					testo.document.write("	  <tr>"); 
					testo.document.write("	    <td>&nbsp;</td>");
					testo.document.write("	    <td>&nbsp;</td>");
					testo.document.write("	    <td bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("	    <td bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("	    <td bgcolor='#FFFFFF'>&nbsp;</td>");
					testo.document.write("	    <td>&nbsp;</td>");
					testo.document.write("	  </tr>");
					testo.document.write("	</table>");
					testo.document.write("	<br>");
					testo.document.write("	<script language='javascript'>");
					testo.document.write("	window.resizeTo(imgSrc.width + 90, imgSrc.height + 200);");
					testo.document.write("	</script>");
					testo.document.write("	</body>");
					testo.document.write("	</html>");

}

 




 function popupLibreria2_inglese(nome, indirizzo, telefono, sito, responsabile, foto, descrizione)
 {	
   var stili = "top=100, left=100, width=750, height=450, status=no, menubar=no, toolbar=no scrollbar=\"yes\" resizable=yes";
   var testo = window.open("", "", stili);
   
   if(indirizzo == null || indirizzo.length == 0)
   {
   				labelIndirizzo = "";
   }
   else
   {
  		 		labelIndirizzo = "Address";
   }
   
   if(telefono == null || telefono.length == 0)
   {
   				labelTelefono = "";
   }
   else
   {
  		 		labelTelefono = "Phone";
   }
   
   if(sito == null || sito.length == 0)
   {
   				labelSito = "";
   }
   else
   {
  		 		labelSito = "Website";
   }
   
   if(responsabile == null || responsabile.length == 0)
   {
   				labelResponsabile = "";
   }
   else
   {
  		 		labelResponsabile = "Responsible for events";
   } 
    
    	   
  testo.document.write("<html>");
	testo.document.write("<head>");
	testo.document.write("<title>TIL Foto gallery</title>");
	testo.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
	testo.document.write("<link href='teatro_libreria.css' rel='stylesheet' type='text/css'>");
	testo.document.write("<link href='teatro_libreria.css' rel='stylesheet' type='text/css'>");
	testo.document.write("</head>");
	testo.document.write("<body bgcolor='#000000' leftmargin='00' scroll\"yes\" topmargin='00' marginwidth='00' marginheight='00'>");
	testo.document.write("<table width='650' border='0' cellpadding='00' cellspacing='00' bgcolor='#CCCCCC'>");
	testo.document.write("  <tr>"); 
	testo.document.write("   <td>&nbsp;</td>");
	testo.document.write("   <td colspan='4'>&nbsp;</td>");
	testo.document.write("  <td>&nbsp;</td>");
	testo.document.write(" </tr>");
	testo.document.write("<tr>"); 
  testo.document.write("<td width='15' height='35' bgcolor='#FFFFFF'>&nbsp;</td>");
  testo.document.write("  <td height='35' colspan='4' bgcolor='#FFFFFF'><span class='titolirossoMB'>" + nome +  "&nbsp; "); 
  testo.document.write("    </span><span class='nerom'> &#8211; " +  labelTelefono + " &nbsp; "  + telefono + " <br>");
  testo.document.write("    </span><span class='nero_MB'>" + labelIndirizzo + "</span><span class='nerom'>"); 
  testo.document.write("    </span><span class='titolirossoMB'>" + indirizzo + "</span><br>");
  testo.document.write("    <span class='nero_MB'> "+ labelSito + " </span><span class='nerom'>"); 
  testo.document.write("    </span><span class='titolirossoMB'>" + sito + "</span><br>");
  testo.document.write("    <span class='nero_MB'> " + labelResponsabile + " </span><span class='nerom'>"); 
  testo.document.write("    </span><span class='titolirossoMB'>" + responsabile + "</span><br>");
  testo.document.write("    <br>");
  testo.document.write("    </td>");
  testo.document.write("  <td width='15' height='35'>&nbsp;</td>");
  testo.document.write(" </tr>");
	testo.document.write("  <tr>"); 
	testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
	testo.document.write("    <td width='80' align='center' valign='top'><img src=" + foto + " width='80' height='80'></td>");
	testo.document.write("   <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
	testo.document.write("    <td width='446' bgcolor='#FFFFFF'><span class='nerom'>" + descrizione + " &nbsp; "); 
	testo.document.write("      </span></td>");																					
	testo.document.write("    <td width='25' bgcolor='#FFFFFF'><img src='images/px_vuoto.gif' width='25' height='8'></td>");
	testo.document.write("    <td width='15' height='90'>&nbsp;</td>");
	testo.document.write("  </tr>");
	testo.document.write("  <tr>"); 
	testo.document.write("    <td>&nbsp;</td>");
	testo.document.write("    <td>&nbsp;</td>");
	testo.document.write("   <td bgcolor='#FFFFFF'>&nbsp;</td>");
	testo.document.write("   <td bgcolor='#FFFFFF'>&nbsp;</td>");
	testo.document.write("   <td bgcolor='#FFFFFF'>&nbsp;</td>");
	testo.document.write("   <td>&nbsp;</td>");
	testo.document.write("	  </tr>");
	testo.document.write("	</table>");
	testo.document.write("	<br>");
	testo.document.write("	<script language='javascript'>");
	testo.document.write("	window.resizeTo(imgSrc.width + 90, imgSrc.height + 200);");
	testo.document.write("	</script>");
	testo.document.write("	</body>");
	testo.document.write("</html>");

}
  