default_amonth =  '';
default_aday = '';
default_dmonth = '';
default_dday = '';

function clearForm(f)
{
   f.p_rooms.selectedIndex = 0;
   f.p_adults.selectedIndex = 0;

   f.otCorpId.value = "";
   f.otFrequentGuest.value = "";
   f.otTravelAgent.value = "";

   f.p_amonth.selectedIndex = 0;
   f.p_aday.selectedIndex = 0;
   f.p_dmonth.selectedIndex = 0;
   f.p_dday.selectedIndex = 0;
   f.p_ayear.selectedIndex = 0;
   f.p_dyear.selectedIndex = 0;
}

function checkDates(x, y, z, x1, y1, z1){

 var amonth=0;
 var dmonth=0;

  if (y=='JAN'){ var amonth=0;}
  if (y=='FEB'){ var amonth=1;}
  if (y=='MAR'){ var amonth=2;}
  if (y=='APR'){ var amonth=3;}
  if (y=='MAY'){ var amonth=4;}
  if (y=='JUN'){ var amonth=5;}
  if (y=='JUL'){ var amonth=6;}
  if (y=='AUG'){ var amonth=7;}
  if (y=='SEP'){ var amonth=8;}
  if (y=='OCT'){ var amonth=9;}
  if (y=='NOV'){ var amonth=10;}
  if (y=='DEC'){ var amonth=11;}

  if (y1=='JAN'){ var dmonth=0;}
  if (y1=='FEB'){ var dmonth=1;}
  if (y1=='MAR'){ var dmonth=2;}
  if (y1=='APR'){ var dmonth=3;}
  if (y1=='MAY'){ var dmonth=4;}
  if (y1=='JUN'){ var dmonth=5;}
  if (y1=='JUL'){ var dmonth=6;}
  if (y1=='AUG'){ var dmonth=7;}
  if (y1=='SEP'){ var dmonth=8;}
  if (y1=='OCT'){ var dmonth=9;}
  if (y1=='NOV'){ var dmonth=10;}
  if (y1=='DEC'){ var dmonth=11;}
  
  if (x == 31) {
     x= 30;
   x0 = 1;
  }
   else {ls
    x0 = 0;
    }


  Arr=new Date();
  Arr.setDate(x);
  Arr.setMonth(amonth);
  Arr.setYear(z);

  Dep=new Date();
  Dep.setDate(x1);
  Dep.setMonth(dmonth);
  Dep.setYear(z1);

  if(Arr.getTime() < Dep.getTime()){
     difference=Dep.getTime()-Arr.getTime();
     difference=Math.floor(difference/(1000*60*60*24));
     
  if (x0 > 0) 
        difference= difference+1;


    if (difference>6){
       open_win();
    }
   }
}


function open_win(){
   var new_win=window.open('http://www.wingateinns.com/Wingate/control/Booking/7NightWarning', 'new_win','toolbars=no,scrollbars=yes,resizable=yes,height=110,width=300');
}


browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

function CheckPromo1() {
  if (browser) {
    if (document.forms['theForm'].promo_code.value!=''){
      document.forms['theForm'].promo_code.value = '';
      document.forms['theForm'].as_srp.value = document.forms['theForm'].promo_drop.options[ document.forms['theForm'].promo_drop.selectedIndex].value;
    }
  }
}

function CheckForm()
{
  // CheckPromo1();
}

// End of comment game-->
