	  <% Server.Execute("meta/track.asp") %>
          <!--#include file="Include/visit-inc.asp"-->
	  <!--#include file="include/setup.inc" -->
 	  <!--#include file="include/db.inc" -->		
	  <!--#include file="js/Utility.js" -->
	  
 	  <!--#include file="include/header.inc" -->	
 	  <!--#include file="include/menu.inc" -->
	  <!--#include file="include/mailer.inc" -->
	  <!--#include file="include/private.inc" -->
      
	  <SCRIPT><!--
				function Controlli(){	
					var flagSubmit = 0
					for(i=0;i<document.nameform.elements.length;i++){
						
						if (document.nameform.elements(i).type == "text" || document.nameform.elements(i).type == "textarea" || document.nameform.elements(i).type == "radio") {
							document.nameform.elements(i).style.backgroundColor = "white";							
							if (document.nameform.elements(i).value == ""){
								if (document.nameform.elements(i).name == "X_CodiceISTAT")	{
									if (document.nameform.X_DisponibilitaLocale[0].checked == true){
										document.nameform.elements(i).style.backgroundColor = "red";
										flagSubmit = 1;	
									}
								}else{				
									document.nameform.elements(i).style.backgroundColor = "red";
									flagSubmit = 1;
								}
								
							}
						}						
					}
					
					if (flagSubmit==0){
						// Controlla password						
						if (document.nameform.X_Password.value == document.nameform.X_ConfPassword.value){
							if ((document.nameform.X_radiobutton1[0].checked == true) && (document.nameform.X_radiobutton2[0].checked == true)){
								document.nameform.submit()																
							}else{
								alert("Attenzione!!. Confermare il trattamento dei dati personali.")
							}
						}else{
							document.nameform.X_Password.style.backgroundColor = "red";
							document.nameform.X_ConfPassword.style.backgroundColor = "red";
							alert("Attenzione!!. La password digitata non è corretta.");
						}
					}					
				}			
	  --></SCRIPT>
	  
	  <%	   
	  If CBool(Request.QueryString("Add")) = True Then
	  		
			X_Nome = Request.Form("X_Nome")
			X_Cognome = Request.Form("X_Cognome")
			X_Citta = Request.Form("X_Citta")
			X_Provincia = Request.Form("X_Provincia")
			X_Telefono = Request.Form("X_Telefono")
			X_Fax = Request.Form("X_Fax")
			X_Email = Request.Form("X_Email")
			X_Professione = Request.Form("X_Professione")
			X_AreeInteresse = Request.Form("X_AreeInteresse")			
			X_Login = Request.Form("X_Login")			
			X_Password = Request.Form("X_Password")
						
								
			' Setto la connessione	  		
			Set Connessione = DBConnexion()
				
			Set RsUser = Server.CreateObject("ADODB.Recordset")
			RsUser.CursorType = adOpenKeyset
			RsUser.LockType = 2
			RsUser.Open "User", Connessione, , , adCmdTable

			RsUser.AddNew
			RsUser("Nome") = X_Nome
			RsUser("Cognome") = X_Cognome
			RsUser("Citta") = X_Citta
			RsUser("Telefono") = X_Telefono
			RsUser("Fax") = X_Fax
			RsUser("EMail") = X_Email
			RsUser("Professione") = X_Professione
			RsUser("AreeInteresse") = X_AreeInteresse
			RsUser("Login") = X_Login
			RsUser("Password") = X_Password
			RsUser.Update
			
			RsUser.Close
			Set RsUser = Nothing
			
			Set RsEmailList = Server.CreateObject("ADODB.Recordset")
			RsEmailList.CursorType = adOpenKeyset
			RsEmailList.LockType = 2
			RsEmailList.Open "Email_Members", Connessione, , , adCmdTable
			
			RsEmailList.AddNew
			RsEmailList("Member_Name") = X_Nome & " " & X_Cognome
			RsEmailList("Member_Email") = X_Email
			RsEmailList.Update
			
			RsEmailList.Close
			Set RsEmailList = Nothing
			
			Set Connessione = Nothing
			
			Response.Write("Registrazione effettuata!!")
			Response.Write("<BR><A HREF=""index.asp"">Torna alla Home</A>")
			Response.End
		End If
		Titolo = "Richiesta informazioni"
	  %>
	    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="750" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="750" valign="top"><table width="700" height="750" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="492" valign="top">
												<table width="100%" height="750" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="750" valign="top">
															<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr> 
                                  <td><table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
                                      <tr> 
                                        <td colspan="2" valign="top"> 
                                     			<form name="nameform" method="post" action="registrazione.asp?Add=True">                                              
                                            <table width="100%" border="0" cellpadding="3" cellspacing="1" background="images/spazio.gif">
                                              <tr> 
                                                <td colspan="2" class="xbig">Anagrafica</td>
                                              </tr>
                                              <tr> 
                                                <td width="42%" class="bodystyleblack">Nome:</td>
                                                <td width="58%"><input name="X_Nome" type="text" class="campo" maxlength="50"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Cognome:</td>
                                                <td><input name="X_Cognome" type="text" class="campo" maxlength="50"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Citt&agrave;:</td>
                                                <td><input name="X_Citta" type="text" class="campo" maxlength="50"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Provincia:</td>
                                                <td><input name="X_Provincia" type="text" class="campo" maxlength="2"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Tel: 
                                                </td>
                                                <td class="bodystyleblack"><input name="X_Telefono" type="text" class="campo" maxlength="50"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Fax:</td>
                                                <td class="bodystyleblack"><input name="X_Fax" type="text" class="campo" maxlength="50"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Email:</td>
                                                <td class="bodystyleblack"><input name="X_Email" type="text" class="campo" maxlength="50" onBlur="ControllaMail(this)"></td>
                                              </tr>
                                              <tr>
                                                <td class="bodystyleblack">Professione:</td>
                                                <td class="bodystyleblack"><SELECT name="X_Professione" class="campo" >
                                                    <option selected >Seleziona</option>
                                                    <option>Studente</option>
                                                    <option>Impiegato</option>
                                                    <option>Quadro</option>
                                                    <option>Commerciante</option>
                                                    <option>Insegnante</option>
                                                    <option>Operaio qualificato</option>
                                                    <option>Libero Professionista</option>
                                                    <option>Militare</option>
                                                    <option>Dirigente d'azienda</option>
                                                    <option>Operaio</option>
                                                    <option>Coltivatore diretto</option>
                                                    <option>Disoccupato</option>
                                                    <option>Casalinga/o</option>
                                                    <option>Pensionato</option>
                                                  </SELECT></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Aree 
                                                  di interesse:</td>
                                                <td class="bodystyleblack"><select name="X_AreeInteresse" class="campo" >
                                                	<option selected >Seleziona</option>
                                                    <option>Ambiente</option>
                                                    <option>Edilizia</option>
                                                    <option>Beni culturali</option>
                                                    <option>Turismo</option>
                                                    <option>Informatica</option>
                                                    <option>Servizi sociali</option>
                                                    <option>Altro</option>
                                                  </select></td>
                                              </tr>
                                              <tr> 
                                                <td class="xbig">Login &amp; Password:</td>
                                                <td class="bodystyleblack"><strong>Massimo 
                                                  8 caratteri</strong></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Login:</td>
                                                <td class="bodystyleblack"><input name="X_Login" type="text" class="campo" maxlength="8"> 
                                                </td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Password:</td>
                                                <td class="bodystyleblack"><input name="X_Password" type="PASSWORD" class="campo" maxlength="8"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack">Conferma Password:</td>
                                                <td class="bodystyleblack"><input name="X_ConfPassword" type="PASSWORD" class="campo" maxlength="8"></td>
                                              </tr>
                                              <tr> 
                                                <td colspan="2" class="bodystyleblack">&nbsp;</td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack"><strong><font color="#000000">Legge675/96</font></strong></td>
                                                <td>&nbsp;</td>
                                              </tr>
                                              <tr> 
                                                <td colspan="2" class="bodystyleblack"> 
                                                  <textarea name="textarea8" cols="50" rows="3">
                                                  				Garanzia di riservatezza (informativa ex articolo 10 legge 675/96): i suoi dati verranno trattati in forma automatizzata 
                                                  				al solo fine di prestare il servizio richiesto, che comprende a Sua discrezione, l’invio di materiale informativo e/o commerciale 
                                                  				da parte di AGEST s.r.l. e/o di società ad essa collegate, con modalità strettamente necessarie a tale scopo. Il conferimento 
                                                  				dei dati e’ facoltativo; in mancanza, tuttavia, non potremo dar corso al servizio richiesto. I dati non saranno divulgati a terzi 
                                                  				se non nei limiti indicati.

																													Ai sensi della Legge 675/96 dichiaro di aver preso visione dell’informativa ex art. 10. Manifesto di seguito il consenso al trattamento 
																													dei miei dati personali finalizzato alla risposta alla presente richiesta di informazioni e alle seguenti che dovessero seguire.
																									</textarea> 
                                                </td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack"><div align="right"><strong><font color="#FF0000">Acconsento</font>:</strong></div></td>
                                                <td class="bodystyleblack">Si 
                                                  <input type="radio" name="X_radiobutton1" value="No">
                                                  No 
                                                  <input type="radio" name="X_radiobutton1" value="Si"></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack"><strong><font color="#000000">Trattamento 
                                                  dati personali</font></strong></td>
                                                <td>&nbsp;</td>
                                              </tr>
                                              <tr> 
                                                <td colspan="2" class="bodystyleblack"><p> 
                                                    <textarea name="textarea9" cols="50" rows="3">Manifesto di seguito il consenso al trattamento dei miei dati personali finalizzato a ricevere materiale informativo e/o commerciale da parte della Vs. società e/o di società a Voi collegate.</textarea>
                                                    <br>
                                                  </p></td>
                                              </tr>
                                              <tr> 
                                                <td class="bodystyleblack"><div align="right"><strong><font color="#FF0000">Acconsento</font>:</strong></div></td>
                                                <td class="bodystyleblack">Si 
                                                  <input type="radio" name="X_radiobutton2" value="Si">
                                                  No 
                                                  <input type="radio" name="X_radiobutton2" value="No"></td>
                                              </tr>
                                              <tr> 
                                                <td height="50" class="bodystyleblack"><div align="center"> 
                                                    <input name="Submit3" type="reset" class="campopiccolo" value="Reset">
                                                  </div></td>
                                                <td height="50" class="bodystyleblack"><div align="center"> 
                                                    <input name="Submit2" type="button" class="campopiccolo" value="Invia" OnClick="Controlli()">
                                                  </div></td>
                                              </tr>
                                            </table>
                                          </form>
                                        </td>
                                      </tr>
                                      <tr> 
                                        <td width="20%" valign="top"><div align="right"></div></td>
                                        <td width="80%" height="20"><div align="right"></div></td>
                                      </tr>
                                    </table></td>
                                </tr>
                              </table>
                              <p class="bodystyleblack"><br>
                              </p></td>
                          </tr>
                        </table></td>
                      <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="1" bgcolor="E9E8F3"><img src="images/spazio.gif" width="1" height="1"></td>
                            <td height="750" valign="top"><br> <br> <br> <table width="217" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr> 
                                  <td><img src="images/bianco.gif" width="217" height="15"></td>
                                </tr>
                                <tr> 
                                  <td bgcolor="#FFFFFF" class="bodystyleblack"><table width="100%" border="0" cellspacing="5" cellpadding="5">
                                      <tr> 
                                        <td class="bodystyleblack"><p><font color="#000000"><strong>N.B<br>
                                            <br>
                                            Attenzione!! per una completa navigazione 
                                            all'interno del sito www.agestsrl.it 
                                            devi essere registrato.<br>
                                            <br>
                                            Compaila tutti i campi presenti nel 
                                            modulo form che trovi alla tua sinistra.<br>
                                            </strong></font><strong><font color="#000000"><br>
                                            Accedi alle area private grazie all'inserimento 
                                            della tua LOGIN &amp; PASSWORD.</font></strong><font color="#000000"><br>
                                            <br>
                                            </font></p>
                                          </td>
                                      </tr>
                                      <tr> 
                                        <td height="202" valign="top" class="bodystyleblack">&nbsp;</td>
                                      </tr>
                                    </table></td>
                                </tr>
                                <tr> 
                                  <td><img src="images/biancodown.gif" width="217" height="15"></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table>
                        <p>&nbsp;</p>
                        <p>&nbsp;</p></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            
          </td>
        </tr>
      </table>    
    <!--#include file="include/footer.inc" -->
