//////////
//
// This script file contains all eCoupon-specific JavaScript
//
/////////

function getECouponCodeFromForm(tbForm, tbBox) {
        return eval("document." + tbForm + "." + tbBox + ".value");
}

// Logic for hiding/showing the Return Date/Time on the eCoupon RTR

function hideMe(field) {

  if (document.getElementById && document.getElementById(field) != null) {
         node = document.getElementById(field).style.visibility='hidden';
  } else if(document.all) {
      Object = document.all(field).style;
      Object.visibility = 'hidden';
  }

}

function showMe(field) {

  if (document.getElementById && document.getElementById(field) != null) {
    node = document.getElementById(field).style.visibility='visible';
  } else if(document.all) {
    Object = document.all(field).style;
    Object.visibility = 'visible';
  }

}

function hideRtrnDateAndTime() {

    hideMe('deptmonth2') ;
    hideMe('depttime2') ;
    hideMe('returndate') ;
    hideMe('returntime') ;

}

function showRtrnDateAndTime() {

    showMe('deptmonth2') ;
    showMe('depttime2') ;
    showMe('returndate') ;
    showMe('returntime') ;

}

