var _lvFw=null;
function _LvWinFocus(w) { if (w && w.focus) { _lvFw=w; setTimeout("_LvWinFocusT()",100); } }
function _LvWinFocusT() { if (_lvFw!=null) { _lvFw.focus();_lvFw=null;} }

function OpenWin(url,name,attr)
{
 var fw;
 if (attr) fw=window.open(url,name,attr);
 else if (name) fw=window.open(url,name);
 else if (url) fw=window.open(url);
 _LvWinFocus(fw);
}



function messaggio(msg)
{
     switch (msg)
	  {
	         case "blocked":
			       { 
			         msg = "Questa funzione è attiva soltanto per gli utenti registrati! La registrazione è gratuita!";
			         break; 
				   }
	  }	  
	  
	  alert(msg);
}

function playaudiofile(sorgente)
{

 comando="<embed src=" + '"'+sorgente +'"'+ "  VOLUME=" +'"'+200 +'" ' + "autostart=true controller=false WIDTH=0 HEIGHT=0>"

 if (document.layers)
 {
   document.layers.juke.document.write(comando);
   document.layers.juke.document.close();
 }
  else if (document.all) {
	juke.innerHTML=comando;
 }	
}


function stopaudiofile(sorgente)
{

 comando="<embed src=" + '"'+sorgente +'"'+ "  VOLUME=" +'"'+200 +'" ' + "autostart=false controller=false WIDTH=0 HEIGHT=0>"

 if (document.layers)
 {
   document.layers.juke.document.write(comando);
   document.layers.juke.document.close();
 }
  else if (document.all) {
	juke.innerHTML=comando;
 }	
}


function registrati()
{
 document.formAccesso.action = "registrazione_gratuita.asp";
 document.formAccesso.submit();
}

function invio_keyAccesso() {
       if (event.keyCode == 13) {
          //document.formAccesso.action = "controlloLogin.asp";
          //document.formAccesso.submit();
		  controllaLogin();
          event.returnValue = false;
       }
    }

function controllaLogin()
{
 document.formAccesso.action = "controlloLogin.asp";
 document.formAccesso.submit();
}


function invio_keyRegistrazione() {
       if (event.keyCode == 13) {
          //document.formAccesso.action = "controlloLogin.asp";
          //document.formAccesso.submit();
		  controlloDatiRegistrazione();
          event.returnValue = false;
       }
    }

function controlloRichiestaPassword() 
{
  var email = document.formRichiestaPassword.email.value;
  
  if (email == "")
   {
    alert("Per effettuare la richiesta è necessario compilare il campo Email");
    return false;
  } else {
   document.formRichiestaPassword.submit();
   return true;
  }
}


function controlloDatiRegistrazione() 
{
  var nomeReg = document.formReg.nomeReg.value;
  var loginReg = document.formReg.loginReg.value;
  var emailReg = document.formReg.emailReg.value;
  
  if (emailReg == "" || nomeReg == "" || loginReg == "" )
   {
    alert("Compilare tutti i campi");
    return false;
  } else {
   document.formReg.submit();
   return true;
  }
}

function invio_keyDizionario() {
       if (event.keyCode == 13) {
          //document.formAccesso.action = "controlloLogin.asp";
          //document.formAccesso.submit();
		  submit();
          event.returnValue = false;
       }
    }


function invio_keyCambiaPassword() {
       if (event.keyCode == 13) {
          //document.formAccesso.action = "controlloLogin.asp";
          //document.formAccesso.submit();
		  cambiaPassword();
          event.returnValue = false;
       }
    }

function cambiaPassword() 
{
  var nuovaPassword = document.formCambiaPassword.nuovaPassword.value;
  var confermaPassword = document.formCambiaPassword.confermaPassword.value;
  
  if (nuovaPassword == confermaPassword) 
  {
   document.formCambiaPassword.submit();
   return true;
  } else {
    alert("Le due password non sono identiche!");
    return false;
  }
}




function controlloQuesiti() {

  var oggetto = document.form_quesiti.oggetto.value;
  var messaggio = document.form_quesiti.messaggio.value;
  var email = document.form_quesiti.email.value;
    if (oggetto == "" || messaggio == "" || email == "" ) {
    alert ("Compilare tutti i campi obbligatori");
    return false;
  } else {
   document.form_quesiti.submit();
   return true;
  }
}

function controlloDatiRegistrazione() 
{
  var nomeReg = document.formReg.nomeReg.value;
  var loginReg = document.formReg.loginReg.value;
  var emailReg = document.formReg.emailReg.value;
  
  if (emailReg == "" || nomeReg == "" || loginReg == "" )
   {
    alert("Compilare tutti i campi");
    return false;
  } else {
   document.formReg.submit();
   return true;
  }
}

function controlloAcquistoAdvanced() 
{
      var counter=0;	  
      if (document.formAcquistoOfferta.Modulo1.checked) counter++;
      if (document.formAcquistoOfferta.Modulo2.checked) counter++;
      if (document.formAcquistoOfferta.Modulo3.checked) counter++;	  
      if (document.formAcquistoOfferta.Modulo4.checked) counter++;	  
      if (document.formAcquistoOfferta.Modulo5.checked) counter++;
      if (document.formAcquistoOfferta.Modulo6.checked) counter++;	  
	  
	  if (counter > 5){
	     alert('Questa offerta prevede la selezione di 5 articoli.');
		 return false;
	  }	 
	  else if (counter < 5){
	     alert('Questa offerta prevede la selezione di 5 articoli.');
		 return false;
	  }	 

	  else {
	      if (document.formAcquistoOfferta.Modulo1.checked && document.formAcquistoOfferta.Modulo2.checked && document.formAcquistoOfferta.Modulo3.checked && document.formAcquistoOfferta.Modulo4.checked && document.formAcquistoOfferta.Modulo5.checked) {
		     //alert('option 12345');
			 id=20;
		  }
		  if (document.formAcquistoOfferta.Modulo1.checked && document.formAcquistoOfferta.Modulo2.checked && document.formAcquistoOfferta.Modulo3.checked && document.formAcquistoOfferta.Modulo4.checked && document.formAcquistoOfferta.Modulo6.checked) {
		     //alert('option 12346');
			 id=21;
		  }
		  if (document.formAcquistoOfferta.Modulo1.checked && document.formAcquistoOfferta.Modulo2.checked && document.formAcquistoOfferta.Modulo3.checked && document.formAcquistoOfferta.Modulo5.checked && document.formAcquistoOfferta.Modulo6.checked) {
		     //alert('option 12356');
 			 id=22;
		  }
		  if (document.formAcquistoOfferta.Modulo1.checked && document.formAcquistoOfferta.Modulo2.checked && document.formAcquistoOfferta.Modulo4.checked && document.formAcquistoOfferta.Modulo5.checked && document.formAcquistoOfferta.Modulo6.checked) {
		     //alert('option 12456');
			 id=23;			 
		  }
		  if (document.formAcquistoOfferta.Modulo1.checked && document.formAcquistoOfferta.Modulo3.checked && document.formAcquistoOfferta.Modulo4.checked && document.formAcquistoOfferta.Modulo5.checked && document.formAcquistoOfferta.Modulo6.checked) {
		     //alert('option 13456');
			 id=24;			 
		  }
		  if (document.formAcquistoOfferta.Modulo2.checked && document.formAcquistoOfferta.Modulo3.checked && document.formAcquistoOfferta.Modulo4.checked && document.formAcquistoOfferta.Modulo5.checked && document.formAcquistoOfferta.Modulo6.checked) {
		     //alert('option 23456');
			 id=25;			 
		  }
 	       
 	 document.formAcquistoOfferta.action = 'http://www.eudida.it/eshop/acquisto.asp?idprodotto='+id+'&indirizzo=www.englishtool.com';
     document.formAcquistoOfferta.submit();
      }
	     
}


 <!--
    function Invio_2() {
      if (event.keyCode == 13) {
          document.form1.submit();
          return true;
          event.returnValue = false;
       }
     }
	 
	function Invio() {
      if (event.keyCode == 13) {
		  controllo_2();
          event.returnValue = false;
       }
    }
	 
    function clic() {
	 var email = document.form1.email.value;
//     var password = document.form1.password.value;
//     if (email == "" || password == "") {
     if (email == "") {
      alert ("Per iscriversi occorre inserire indirizzo e-mail e password");
      return false;
	  }
	 else {
      document.form1.submit();
      return true;
	  }
    }
   //-->
  
  function controllo() {
  var file1 = document.form2.file1.value;
  var titolo = document.form2.titolo.value;
  var testo = document.form2.testo.value;
  if (file1 == "" || titolo == "" || testo == "") {
    alert ("Tutti i campi sono obbligatori");
    return false;
  } else {
    document.form2.submit();
    return true;
  }
}

// Disabilità il stato destro sulle immagini
if (window.Event)
  document.captureEvents(Event.MOUSEUP);
function nocontextmenu() {
  event.cancelBubble = true, event.returnValue = false;
  return false;
} 

function norightclick(e) {
  if (window.Event) {
    if (e.which == 2 || e.which == 3) return false;
  }
  else if (event.button == 2 || event.button == 3) {
    event.cancelBubble = true, event.returnValue = false;
    return false;
  }
}

if (document.layers)
  document.captureEvents(Event.MOUSEDOWN);
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
document.onmouseup = norightclick;
/////////////////////////////////////////////////////////////


<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*

    function Invio_2() {
      if (event.keyCode == 13) {
          document.form1.submit();
          return true;
          event.returnValue = false;
       }
     }
 
	function Invio() {
      if (event.keyCode == 13) {
		  controllo_2();
          event.returnValue = false;
       }
    }
	 
    function clic() {
	 var email = document.form1.email.value;
//     var password = document.form1.password.value;
//     if (email == "" || password == "") {
     if (email == "") {
      alert ("Per iscriversi occorre inserire indirizzo e-mail e password");
      return false;
	  }
	 else {
      document.form1.submit();
      return true;
	  }
    }
   //-->
 
  function controllo() {
  var file1 = document.form2.file1.value;
  var titolo = document.form2.titolo.value;
  var testo = document.form2.testo.value;
  if (file1 == "" || titolo == "" || testo == "") {
    alert ("Tutti i campi sono obbligatori");
    return false;
  } else {
    document.form2.submit();
    return true;
  }
}
	

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

*/