 function checkDate_depart(sender,args)
{
 if (sender._selectedDate < new Date())
            {
          
              
                sender._selectedDate = new Date(); 
                // set the date back to the current date
            sender._textbox.set_Value(sender._selectedDate.format(sender._format))

            var retDate = sender._selectedDate;
            retDate.setDate(retDate.getDate() + 1);    
          


document.getElementById('ctl00_ContentPlaceHolder1_txt_return').value=retDate.format(sender._format);
            }
            
            
            
          else if (sender._selectedDate >= new Date())
            {
          
            var retDate = sender._selectedDate;
            retDate.setDate(retDate.getDate() + 1);    
          


document.getElementById('ctl00_ContentPlaceHolder1_txt_return').value=retDate.format(sender._format);

            }
            
}


function checkDate_return(sender,args)
{
 if (sender._selectedDate < new Date())
            {
          
             
                sender._selectedDate = new Date(); 
                // set the date back to the current date
sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
            
               
      
            
                      
            
}



 function checkDate_DOB(sender,args)
{
 if (sender._selectedDate > new Date())
            {
          
              
                sender._selectedDate = new Date(); 
                // set the date back to the current date
            sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            
            }
            
            
 }