<!--
function getFullYear(date) {
  var y = date.getYear();
  if(y<1000) y+=1900;
  return y;
}
 
var dateset = false;
 
function setDropoffDate() {
 
    //alert("Inside setDropoffDate function...");
    
    var selectedMonthYear = document.forms[0].pickupMonthSelection;
    var selectedDay = document.forms[0].pickupDaySelection;
    var setMonthYear = document.forms[0].dropoffMonthSelection;
    var setDay = document.forms[0].dropoffDaySelection;
    
    var puMonth = selectedMonthYear.options[selectedMonthYear.selectedIndex].value;
    var puYear;
    if(puMonth >= m_iCurrentMonth)
     puYear = m_iCurrentYear;
    else
     puYear = m_iCurrentYear + 1;
    
    var puDay = selectedDay.options[selectedDay.selectedIndex].value;
    
    var puDate = new Date(puYear,(parseInt(puMonth,10)), parseInt(puDay,10));
    var doDate = new Date(puYear,(parseInt(puMonth,10)), (parseInt(puDay,10) + 1));
    
    for(var i = 0; i < selectedMonthYear.options.length; i++) {
            var month = selectedMonthYear.options[i].value
            var year;
     if(month > m_iCurrentMonth)
  year = m_iCurrentYear;
     else
  year = m_iCurrentYear + 1;
            if((parseInt(month,10) == puDate.getMonth()) &&  (parseInt(year,10) == getFullYear(puDate))) {
                selectedMonthYear.options[i].selected = 1;
            }
    }   
 
    for(var i=0;i<selectedDay.options.length;i++) {
        var day = selectedDay.options[i].value;
        if(parseInt(day,10) == puDate.getDate()) {
            selectedDay.options[i].selected=1;
        }
    }   
 
    if(dateset==false) {
        for(i=0;i<setMonthYear.options.length;i++) {
            var month = setMonthYear.options[i].value;
            var year;
            if(month >= m_iCurrentMonth)
  year = m_iCurrentYear;
     else
  year = m_iCurrentYear + 1;
            if((parseInt(month,10) == doDate.getMonth())) {
                setMonthYear.options[i].selected=1;
            }
        }   
 
        for(i=0;i<setDay.options.length;i++) {
            var day = setDay.options[i].value;
            if(parseInt(day,10) == doDate.getDate()) {
                setDay.options[i].selected=1;
            }
        }
    }
}
 
// Stop hiding from old browsers -->
 
function setRapidDropoffDate() {
 
    //alert("Inside setRapidDropoffDate function...");
    
    var selectedMonthYear = document.forms['REQUEST_A_RATE'].PICKUP_MONTH;
    var selectedDay = document.forms['REQUEST_A_RATE'].PICKUP_DAY;
    var setMonthYear = document.forms['REQUEST_A_RATE'].RETURN_MONTH;
    var setDay = document.forms['REQUEST_A_RATE'].RETURN_DAY;
    
    var puMonth = selectedMonthYear.options[selectedMonthYear.selectedIndex].value;
    var puYear;
    if(puMonth >= m_iCurrentMonth)
     puYear = m_iCurrentYear;
    else
     puYear = m_iCurrentYear + 1;
    
    var puDay = selectedDay.options[selectedDay.selectedIndex].value;
    
    var puDate = new Date(puYear,(parseInt(puMonth,10)), parseInt(puDay,10));
    var doDate = new Date(puYear,(parseInt(puMonth,10)), (parseInt(puDay,10) + 1));
    
    for(var i = 0; i < selectedMonthYear.options.length; i++) {
            var month = selectedMonthYear.options[i].value
            var year;
     if(month > m_iCurrentMonth)
  year = m_iCurrentYear;
     else
  year = m_iCurrentYear + 1;
            if((parseInt(month,10) == puDate.getMonth()) &&  (parseInt(year,10) == getFullYear(puDate))) {
                selectedMonthYear.options[i].selected = 1;
            }
    }   
 
    for(var i=0;i<selectedDay.options.length;i++) {
        var day = selectedDay.options[i].value;
        if(parseInt(day,10) == puDate.getDate()) {
            selectedDay.options[i].selected=1;
        }
    }   
 
    if(dateset==false) {
        for(i=0;i<setMonthYear.options.length;i++) {
            var month = setMonthYear.options[i].value;
            var year;
            if(month >= m_iCurrentMonth)
  year = m_iCurrentYear;
     else
  year = m_iCurrentYear + 1;

            if((parseInt(month,10) == doDate.getMonth())) {
                setMonthYear.options[i].selected=1;
            }
        }   
 
        for(i=0;i<setDay.options.length;i++) {
            var day = setDay.options[i].value;
            if(parseInt(day,10) == doDate.getDate()) {
                setDay.options[i].selected=1;
            }
        }
    }
}
 

function setReturnDropoffDate() {
   
    //alert("Inside setReturnDropoffDate function...");
        
        var selectedMonthYear = document.forms[0].dropoffMonthSelection;
    var selectedDay = document.forms[0].dropoffDaySelection;
            
        var puMonth = selectedMonthYear.options[selectedMonthYear.selectedIndex].value;
        var puYear;
        if(puMonth >= m_iCurrentMonth)
         puYear = m_iCurrentYear;
        else
         puYear = m_iCurrentYear + 1;
        
        var puDay = selectedDay.options[selectedDay.selectedIndex].value;
        
        var puDate = new Date(puYear,(parseInt(puMonth,10)), parseInt(puDay,10));
        var doDate = new Date(puYear,(parseInt(puMonth,10)), (parseInt(puDay,10) + 1));
        
        for(var i = 0; i < selectedMonthYear.options.length; i++) {
                var month = selectedMonthYear.options[i].value
                var year;
         if(month > m_iCurrentMonth)
      year = m_iCurrentYear;
         else
      year = m_iCurrentYear + 1;
                if((parseInt(month,10) == puDate.getMonth()) &&  (parseInt(year,10) == getFullYear(puDate))) {
                    selectedMonthYear.options[i].selected = 1;
                }
        }   
     
        for(var i=0;i<selectedDay.options.length;i++) {
            var day = selectedDay.options[i].value;
            if(parseInt(day,10) == puDate.getDate()) {
                selectedDay.options[i].selected=1;
            }
        }   
    
}    
 

function setRapidReturnDropoffDate() {
 
    //alert("Inside setRapidReturnDropoffDate function...");
    
    var selectedMonthYear = document.forms['REQUEST_A_RATE'].RETURN_MONTH;
    var selectedDay = document.forms['REQUEST_A_RATE'].RETURN_DAY;
        
    var puMonth = selectedMonthYear.options[selectedMonthYear.selectedIndex].value;
    var puYear;
    if(puMonth >= m_iCurrentMonth)
     puYear = m_iCurrentYear;
    else
     puYear = m_iCurrentYear + 1;
    
    var puDay = selectedDay.options[selectedDay.selectedIndex].value;
    
    var puDate = new Date(puYear,(parseInt(puMonth,10)), parseInt(puDay,10));
    var doDate = new Date(puYear,(parseInt(puMonth,10)), (parseInt(puDay,10) + 1));
    
    for(var i = 0; i < selectedMonthYear.options.length; i++) {
            var month = selectedMonthYear.options[i].value
            var year;
     if(month > m_iCurrentMonth)
  year = m_iCurrentYear;
     else
  year = m_iCurrentYear + 1;
            if((parseInt(month,10) == puDate.getMonth()) &&  (parseInt(year,10) == getFullYear(puDate))) {
                selectedMonthYear.options[i].selected = 1;
            }
    }   
 
    for(var i=0;i<selectedDay.options.length;i++) {
        var day = selectedDay.options[i].value;
        if(parseInt(day,10) == puDate.getDate()) {
            selectedDay.options[i].selected=1;
        }
    }   
    
    
}
 
 
 
function setTempReturnDropoffDate() {
 
    //alert("Inside setDropoffDate function...");
    
    var selectedMonthYear = document.forms[0].dropoffMonthSelection;
    var selectedDay = document.forms[0].dropoffDaySelection;
   
    var setMonthYear = document.forms[0].pickupMonthSelection;
    var setDay = document.forms[0].pickupDaySelection;
        
    var puMonth = selectedMonthYear.options[selectedMonthYear.selectedIndex].value;
    var doMonth = setMonthYear.options[setMonthYear.selectedIndex].value;
    var puYear;
    
    if(puMonth >= m_iCurrentMonth)
     puYear = m_iCurrentYear;
    else
     puYear = m_iCurrentYear + 1;
    
    var puDay = selectedDay.options[selectedDay.selectedIndex].value;
    var doDay = setDay.options[setDay.selectedIndex].value;
    
    var puDate = new Date(puYear,(parseInt(puMonth,10)), parseInt(puDay,10));
    var doDate = new Date(puYear,(parseInt(doMonth,10)), (parseInt(doDay,10) + 1));
   
    for(var i = 0; i < selectedMonthYear.options.length; i++) 
    {
            var month = selectedMonthYear.options[i].value
            var year;
            if((parseInt(month,10)) == (doDate.getMonth())) {
               selectedMonthYear.options[i].selected=1;
            }
    }   
 
    for(var i=0;i<selectedDay.options.length;i++) {
        var day = selectedDay.options[i].value;
        if(parseInt(day,10) == doDate.getDate()) {
            selectedDay.options[i].selected=1;
        }
    }   
}    
 

function setTempRapidReturnDropoffDate() {
 
    //alert("Inside setTempRapidReturnDropoffDate function...");
    
    var selectedMonthYear = document.forms['REQUEST_A_RATE'].RETURN_MONTH;
    var selectedDay = document.forms['REQUEST_A_RATE'].RETURN_DAY;
   
    var setMonthYear = document.forms['REQUEST_A_RATE'].PICKUP_MONTH;
    var setDay = document.forms['REQUEST_A_RATE'].PICKUP_DAY;
        
    var puMonth = selectedMonthYear.options[selectedMonthYear.selectedIndex].value;
    var doMonth = setMonthYear.options[setMonthYear.selectedIndex].value;
    var puYear;
    
    if(puMonth >= m_iCurrentMonth)
     puYear = m_iCurrentYear;
    else
     puYear = m_iCurrentYear + 1;
    
    var puDay = selectedDay.options[selectedDay.selectedIndex].value;
    var doDay = setDay.options[setDay.selectedIndex].value;
    
    var puDate = new Date(puYear,(parseInt(puMonth,10)), parseInt(puDay,10));
    var doDate = new Date(puYear,(parseInt(doMonth,10)), (parseInt(doDay,10) + 1));
   
    for(var i = 0; i < selectedMonthYear.options.length; i++) 
    {
            var month = selectedMonthYear.options[i].value
            var year;
            if((parseInt(month,10)) == (doDate.getMonth())) {
               selectedMonthYear.options[i].selected=1;
            }
    }   
 
    for(var i=0;i<selectedDay.options.length;i++) {
        var day = selectedDay.options[i].value;
        if(parseInt(day,10) == doDate.getDate()) {
            selectedDay.options[i].selected=1;
        }
    }   
}  
//-->
