function TagCloudSrc(tag_value, curr_lang){   location.href='search_result.php?full_text=' + tag_value + '&section=&lang=' + curr_lang;}function mailto(subject, body){   location.href='mailto:?subject='+subject + '&body=' + body; }var min=8;var max=18;function increaseFontSize() {   var p = document.getElementsByTagName('p');   for(i=0;i<p.length;i++) {      if(p[i].style.fontSize) {         var s = parseInt(p[i].style.fontSize.replace("px",""));      } else {         var s = 12;      }      if(s!=max) {         s += 1;      }      p[i].style.fontSize = s+"px"   }}function decreaseFontSize() {   var p = document.getElementsByTagName('p');   for(i=0;i<p.length;i++) {      if(p[i].style.fontSize) {         var s = parseInt(p[i].style.fontSize.replace("px",""));      } else {         var s = 12;      }      if(s!=min) {         s -= 1;      }      p[i].style.fontSize = s+"px"   }   }function showPic (whichpic) {    if (document.getElementById)    {       document.getElementById('placeholder').src = whichpic.href;       if (whichpic.title)       {         document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;       }       else       {         document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;       }       return false;    }    else    {       return true;    } }// -------------------------------------------------------// validazione modifica dati personali// -------------------------------------------------------function validateDatiPersonali(){	  var nome    = document.getElementById('datiPersonaliForm').dati_personali_nome.value;  var cogn    = document.getElementById('datiPersonaliForm').dati_personali_cognome.value;  var captcha = document.getElementById('datiPersonaliForm').dati_personali_captcha.value;  var email   = document.getElementById('datiPersonaliForm').dati_personali_email.value;  var login   = document.getElementById('datiPersonaliForm').dati_personali_login.value;       if (       email &&        login &&        nome &&        cogn &&        captcha               )  {      if (email.indexOf('@',0) != -1 && email.indexOf('.',0) != -1)         return true;      else      {        alert('inserire un indirizzo di mail corretto.');        return false;      }      }  else  {     alert('compilare tutti i campi obbligatori.');     return false;  }}// -------------------------------------------------------// validazione registrazione// -------------------------------------------------------function validateRegistrazione(){   var nome    = document.getElementById('newsletterForm').registrazione_nome.value;  var cogn    = document.getElementById('newsletterForm').registrazione_cognome.value;  var mail    = document.getElementById('newsletterForm').registrazione_mail.value;  var captcha = document.getElementById('newsletterForm').registrazione_captcha.value;       if (nome && mail && cogn && captcha )  {                  if (mail.indexOf('@',0) != -1 && mail.indexOf('.',0) != -1)         return true;      else      {        alert('inserire un indirizzo di mail corretto.');        return false;      }     }  else  {     alert('compilare tutti i campi obbligatori.');     return false;  }}// -------------------------------------------------------// ricerca libera// -------------------------------------------------------function ExecFreeSearch(){  var inputText = document.getElementById('full_text_field');  document.formFreeSearch.full_text.value = inputText.value;  document.formFreeSearch.submit();}// -------------------------------------------------------// validazione io sono, io cerco// -------------------------------------------------------function ExecIoSonoCerco(){  var sono  = document.form_sono_cerco.io_sono.value;  var cerco = document.form_sono_cerco.io_cerco.value;    if (         ( (sono == '') && (cerco == '') )        ||        ( (sono == 'ALL') && (cerco == 'ALL') )        ||        ( (sono == '') && (cerco == 'ALL') )        ||        ( (sono == 'ALL') && (cerco == '') )     )     {  	 alert('specificare un valore per "io sono" e "io cerco"');  	 return;  }  document.form_sono_cerco.submit()}// -------------------------------------------------------// validazione io cerco// -------------------------------------------------------function ExecIoCerco(cerco){  var theForm = document.getElementById("form_sono_cerco");  //theForm.io_cerco.value = cerco;    if (cerco == '')   {  	 alert('specificare il parametro di ricerca');  	 return;  }  theForm.submit();}function showPic (whichpic) {    if (document.getElementById)    {       document.getElementById('placeholder').src = whichpic.href;       if (whichpic.title)       {         document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;       }       else       {         document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;       }       return false;    }    else    {       return true;    } }// -------------------------------------------------------// validazione newsletter// -------------------------------------------------------function validateNewsletter(){  var nome = document.getElementById('newsletterForm').newsletter_nome.value;  var cogn = document.getElementById('newsletterForm').newsletter_cognome.value;  var mail = document.getElementById('newsletterForm').newsletter_mail.value;    if (nome && mail && cogn)  {    if (mail.indexOf('@',0) != -1 && mail.indexOf('.',0) != -1)       return true;    else    {       alert('inserire un indirizzo di mail corretto.');       return false;    }  }  else  {     alert('compilare tutti i campi obbligatori.');     return false;  }}// -------------------------------------------------------// validazione commenti// -------------------------------------------------------function validateCommento(){  var formName = document.getElementById('commentoForm');    var nome    = formName.nome.value;  var mail    = formName.email.value;  var commento   = formName.segnalazione.value;    if (nome && mail && commento)  {    if (mail.indexOf('@',0) != -1 && mail.indexOf('.',0) != -1)       return true;    else    {       alert('inserire un indirizzo di mail corretto.');       return false;    }  }  else  {     alert('compilare tutti i campi obbligatori.');     return false;  }}// -------------------------------------------------------// validazione richiesta info// -------------------------------------------------------function validateRichiesta(){  var formName = document.getElementById('richiestaForm');    var nome    = formName.nome.value;  var cellulare = formName.cellulare.value;  var mail    = formName.email.value;  var richiesta   = formName.segnalazione.value;    if (nome && cellulare && mail && richiesta)  {    if (mail.indexOf('@',0) != -1 && mail.indexOf('.',0) != -1)       return true;    else    {       alert('inserire un indirizzo di mail corretto.');       return false;    }  }  else  {     alert('compilare tutti i campi obbligatori.');     return false;  }}// -------------------------------------------------------// galleria generale: selezione di una categoria di immagini// -------------------------------------------------------function SelectCategory(){    if (document.getElementById('selectCategory').selected_step != null)    document.getElementById('selectCategory').selected_step.value = 0;    document.getElementById('selectCategory').submit();}// -------------------------------------------------------// galleria generale: selezione di una categoria di immagini// -------------------------------------------------------function SelectImageGroup(){  document.getElementById('selectCategory').submit();}// -------------------------------------------------------// apertura pagina di edit delle schede// -------------------------------------------------------function EditSk(page){  var wnd = window.opener;    if ( (wnd != null) && (!wnd.closed) )  {    wnd.focus();    wnd.location.href = page;  }    else    OpenWindow(page, 'EditSk', 700, 500);}// -------------------------------------------------------// messaggio di conferma// -------------------------------------------------------function ConfirmDelete(msg){  return confirm(msg);}// -------------------------------------------------------// permette di digitare solo numeri// -------------------------------------------------------function numbersonly(myfield, e, dec){  var key;  var keychar;    if (window.event)     key = window.event.keyCode;  else if (e)     key = e.which;  else     return true;  keychar = String.fromCharCode(key);    // control keys  if ((key==null) || (key==0) || (key==8) ||       (key==9) || (key==13) || (key==27) )     return true;    // numbers  else if ((("0123456789").indexOf(keychar) > -1))     return true;    // decimal point jump  else if (dec && (keychar == "."))     {     myfield.form.elements[dec].focus();     return false;     }  else     return false;}// -------------------------------------------------------// permette di digitare solo numeri e lettere// -------------------------------------------------------function letternumber(e){  var key;  var keychar;    if (window.event)     key = window.event.keyCode;  else if (e)     key = e.which;  else     return true;  keychar = String.fromCharCode(key);  keychar = keychar.toLowerCase();    // control keys  if ((key==null) || (key==0) || (key==8) ||       (key==9) || (key==13) || (key==27) )     return true;    // alphas and numbers  else if (((" '.-abcdefghijklmnopqrstuvwxyz0123456789àèìòù?_,éç&âäèêëöüçß&()@").indexOf(keychar) > -1))     return true;  else     return false;}// -------------------------------------------------------// classica openWindow// -------------------------------------------------------function OpenWindow(url, windowName, w, h){   var wf = "";   wf = wf + "width=" + w;   wf = wf + ",height=" + h;   wf = wf + ",resizable=yes";   wf = wf + ",scrollbars=yes";   wf = wf + ",menubar=no";   wf = wf + ",toolbar=no";   wf = wf + ",directories=no";   wf = wf + ",location=no";   wf = wf + ",status=yes";   var wnd = window.open(url,windowName,wf);   wnd.focus();}// -------------------------------------------------------// si muove tra le pagine del navigatore// -------------------------------------------------------function ChangeOffset(NewOffset) {  document.getElementById("mainForm").last_record.value = NewOffset;  document.getElementById("mainForm").submit();}