

function checkValue(action,frmObj,objTxt,txt) {
             
 var testo;
 var curr_testo;
 var curr1_testo;
 var strFrase = false;
  
  testo = objTxt.value;
		   
 if(testo.substring(0,1) == '"')
 {
  if(testo.substring(testo.length-1,testo.length) == '"')
  {
   strFrase = true;
   curr1_testo = testo;
   frmObj.submit();
  }
 } 
 
 if(strFrase == false)
 {
  if(action == 'basic')
  {
  	   curr2_testo = "";
           curr_testo = testo.replace(/ e non /gi," - ");
	   curr1_testo = curr_testo.replace(/ e /gi," +");
	   if(curr1_testo.length > 0) curr2_testo = "+"+curr1_testo;
	   objTxt.value = curr2_testo;
	   frmObj.submit();	
  }
  
  if(action == 'submit')
  { 
  	   curr2_testo = "";
	   curr_testo = testo.replace(/ e non /gi," - ");
	   curr1_testo = curr_testo.replace(/ e /gi," +");
	   if(curr1_testo.length > 0)  curr2_testo = "+"+curr1_testo;
	   objTxt.value = curr2_testo;	
	   frmObj.submit();
  }
  
  if(action == 'refresh')
  { 
	   objTxt.value = "";	
	   frmObj.submit();
  }
  
  if(action == 'reload')
  {
   testo = txt;
   if(testo.substring(0,1) == "+") 
    testo = testo.substring(1,testo.length);
   curr_testo = testo.replace(/ - /gi," e non ");
   curr1_testo = curr_testo.replace(/ \+/gi," e ");
   objTxt.value = curr1_testo;
  }
  
 }	
 
 
}

                         

