
// JavaScript Document
function Form_Validator(theForm)
{

  if (theForm.QTabArticoli.value == "")
  {
    alert("Inserire almeno un valore per il campo Ricerca" );
    theForm.QTabArticoli.focus();
    return (false);
  }

  if (theForm.QTabArticoli.value.length < 1)
  {
    alert("Inserire almeno 1 carattere nel campo Ricerca") 
	  theForm.QTabArticoli.focus();
    return (false);
  }

  var checkOK = "0123456789ABCDEFGHJKILMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.";
  var checkStr = theForm.QTabArticoli.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch != ".")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Sono stati inseriti caratteri non validi   " )
    theForm.QTabArticoli.focus();
    return (false);
  }

    return (true);
}
function makebg(el) {
	with (el.style) {
		background = "#0033cc";
	}
}
function nobg(el) {
	with (el.style) {
		background = "#000033";
	}
}