// **********************************************************************
// DateValidation.js | Created On: 15th February 2008 | Sujay V Sarma
//  File contains a function to validate the selected Date.
// **********************************************************************
    // This function will validate that a Day/Month/Year combination is valid
    // day: selected day of the month
    // month: selected month of the year (full string: January, February, etc)
    // year: the year selected
    function CheckDate(day, month, year) {
        var realDays = 0;
        var isValid = false;        
      // alert(day + ' : ' + month + ' :: ' + year + ' ? ');
        switch (month)
        {
            case 'January':
            case 'March':
            case 'May':
            case 'July':
            case 'August':
            case 'October':
            case 'December':
                realDays = 31;
                break;
                
            case 'February':
                if ( ((year % 4) == 0) || ((year % 100) == 0) )
                {
                    realDays = 29;
                } else {
                    realDays = 28;
                }
                break;
                
            case 'April':
            case 'June':
            case 'September':
            case 'November':
                realDays = 30;
                break;
        }
        
        if (parseInt(day) <= realDays) {
            isValid = true;
        }
        
        if (!isValid) {
        }
        return isValid;
    }

