function isNull(value) {
    
  if (value == null || value.length == 0)
    return true;
  for (var count = 0; count < value.length; count++) {
    if (value.charAt(count) != " ") return false;
  }
  return true;

}

function isValidDate(day, month, year) {

  if ((parseFloat(month)==4 || parseFloat(month)==6 || parseFloat(month)==9 || parseFloat(month)==11) && parseFloat(day)==31) {
    return false;
  }
  if (parseFloat(month) == 2) {
    var bisestile = (parseFloat(year) % 4 == 0 && (parseFloat(year) % 100 != 0 || parseFloat(year) % 400 == 0));
    if (parseFloat(day)>29 || (parseFloat(day)==29 && !bisestile)) return false;
  }
  return true;

}

function isValidEmail(s) {

  if (s.indexOf("@") > 0 && (s.indexOf("@") < (s.length - 1) ) ) return true;
  return false;

}

function isValidItalianCAP(value) {
  
  if (isNaN(value) || value.length != 5) return false;
  return true;

}



function isValidNumber(number) {
	var numberPat = /^(\d+)(\.{0,1})(\d*)$/

        if(number.length==0) return false;
	if (!number.match(numberPat)) return false;
        return true;
}

function isInteger(number) {

  if (number!=Math.round(number)) return false;
  else return true;

}

function fixedRound(number,decimal) {

  factor=Math.pow(10,decimal);
  return (Math.round(number*factor)/factor);

}

 
function isStreet(street) {

    ok = false;
    for (i=0; i<street.length; i++) if (!isNaN(street.charAt(i))) ok = true;
    return ok;

  }


