    function HasQuotes(item, desc) {
        var msg = "";
        if (NoQuotes(item.value)){
           msg = "* " + desc + " - No quotes, apostrophe, plus signs or \& allowed\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    }

    function HasQuotesNotNull(item, desc) {
        var msg = "";
        if (NoQuotes(item.value) || item.value == ""){
           msg = "* " + desc + " - No quotes, apostrophe, plus signs or \& allowed or empty\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    }

    function HasQuotesA(item, desc) {
        var msg = "";
        if (NoQuotesA(item.value)){
           msg = "* " + desc + " - No quotes or apostrophe allowed\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    }

    function IsGreaterThanZero(item, desc) {
        var msg = "";
        if ((item.value <= 0) || (isNaN(item.value)) || (item.value =="")){
            msg += "* " + desc + " is empty or less than 0" + "\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    }

    function IsGreaterThanOrEqualToZero(item, desc) {
        var msg = "";
        if ((item.value < 0) || (isNaN(item.value)) || (item.value =="")){
            msg += "* " + desc + " is empty or less than 0"  + "\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    }

    function IsNotANumber(item, desc) {
        var msg = "";
        if (isNaN(item.value)){
            msg += "* " + desc + "\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    }

    function IsNotNull(item, desc) {
		
    	var msg = "";
        if (item.value == ""){
            msg += "* " + desc + "\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    }

    function NoQuotes(aText) {
        textValid=/[\"\'\&\+]/;
        return(textValid.exec(aText));
    }

    function NoQuotesA(aText) {
        textValid=/[\"\']/;
        return(textValid.exec(aText));
    }

    function validDate(aDate){
        dateValid=eval(/^(\d{1,2})[-\/](\d{1,2})[-\/]((\d{2}){1,2})$/);
        if (!dateValid.exec(aDate)){
            return(false);
        }
        else {
            var NumberOfDays;
            theMonth = parseInt(RegExp.$1, 10);
            theDay = RegExp.$2;
            theYear = RegExp.$3;
            theTwoDigitYear = RegExp.$4;
            if (theMonth < 1 || theMonth > 12) return(false);
            if (theDay < 1) return(false);
            if (theMonth == 4 || theMonth == 6 || theMonth == 9 || theMonth  == 11 ) {
                NumberOfDays = 30;
            }
            else if (theMonth == 2) {
                NumberOfDays = 28;
            }
            else {
                NumberOfDays = 31;
            }
            if (theDay > NumberOfDays) return(false);
            if (theYear > 2020) return(false);
            if (theYear > 20 && theYear < 90) return(false);
            if (theYear > 100 && theYear < 1990) return(false);
            if (theYear < 0) return(false);
            return(true);
        }
    }
    
    function IsADate(item, desc) {
    	var msg = "";
        if (!validDate(item.value)){
           msg = "* " + desc + " - Not a valid date\n";
            item.style.color = "#FF0000";
        }
        else{
            item.style.color = "#000000";
        }
        return(msg);
    
    }
