function checkInput(){

      var msg = document.FormName.msg.value;
      var recipientList = document.FormName.recipientList.options;
      
      if( recipientList.length <= 0 ){
      alert("Recipient list cannot be empty.");
      return false;
      }

      if(msg == ""){
      alert("Message can not be empty");
      return false;
      }

      selectAllOptions(document.FormName.recipientList);
      return true;
      
 }

function checkSchedulerInput(){

 if(document.FormName.smsScheduler.checked){

        var day = document.FormName.dateS.value;
        var month = document.FormName.monthS.value;
        var year = document.FormName.yearS.value;

       }
}


function checkReminderInput(){
      
      var callerId = document.FormName.callerId.value;
       
      var msg = document.FormName.msg.value;
      var recipientList = document.FormName.recipientList.options;
      
      var month1 = document.FormName.monthS.value;
      var day1  = document.FormName.dateS.value;
      var year1 = document.FormName.yearS.value;
      
      var frequency = document.FormName.frequency.value;
      
      var month2 = document.FormName.monthE.value;
      var day2  = document.FormName.dateE.value;
      var year2 = document.FormName.yearE.value;
      
      var now = new Date();
      
      if(callerId == ""){
      alert("Caller Id can not be empty");
      return false;
      }
     
      if(document.FormName.recipientType[1].checked){ 
      if( recipientList.length <= 0 ){
      alert("Recipient list cannot be empty.");
      return false;
      }
      }
    
      if(msg == ""){
      alert("Message can not be empty");
      return false;
      }
      
      if(document.FormName.repeating[0].checked && document.FormName.endDate[1].checked){
      alert("You cann't choose to set endDate because you chose not repeat the reminder");
      return false;
      }
      
      if(document.FormName.repeating[1].checked) {
      if(frequency == ""){
      alert("Please specify your frequency");
      return false;
      }
      if(!allDigits(frequency) || frequency < 1){
      alert("Please specify a positive integer for frequency");
      return false;
      }
      }
      
      if(document.FormName.recurrenceType.options[3].selected){
      var checkedBoxLength = 0;
      for(i = 0; i < document.FormName.dayWeekly.length; i++){
      if(document.FormName.dayWeekly[i].checked){
      checkedBoxLength++;
      }
      }
      if(checkedBoxLength <= 0){
      alert("Specify the day you preferred in one week");
      return false;
      }
      }
      
      if(document.FormName.endDate[1].checked){
      
      }
      
      selectAllOptions(document.FormName.recipientList);
      return true;
      
}    
