function IBEprogress()
	{
document.afpForm.action="http://www.res99.com/nexres/search/search_results.cgi?ses=b3041d06578fa7a4e4e0a3eef8d935c451982ps&src=10007115";
document.afpForm.method="get";
document.afpForm.submit();
return false;
}
function wit(text,id)
{
    if (document.layers){
		x = document.layers[id];
		x.document.write(text);
	}
	else {
	    document.write(text);
	}
}

function ddd(dof, w) {
  dd = new Date();
  dd.setUTCDate(dd.getDate()+(dof==null?0:dof));
  d = dd.getUTCDate();
  for (i=1;i<32;i++) {
    if (d==i) {
	     wit("<option selected value=" + i + ">" + i, w);
    } else {
      wit("<option value=" + i + ">" + i, w);
    }
  }
}


function mmm(dof, w) {
  dd = new Date();
  dd.setUTCDate(dd.getDate()+(dof==null?0:dof));
  m = dd.getMonth();
  wit("<option " + (m==0?"selected ": "") + "value=JAN>January", w);
  wit("<option " + (m==1?"selected ": "") + "value=FEB>February", w);
  wit("<option " + (m==2?"selected ": "") + "value=MAR>March", w);
  wit("<option " + (m==3?"selected ": "") + "value=APR>April", w);
  wit("<option " + (m==4?"selected ": "") + "value=MAY>May", w);
  wit("<option " + (m==5?"selected ": "") + "value=JUN>June", w);
  wit("<option " + (m==6?"selected ": "") + "value=JUL>July", w);
  wit("<option " + (m==7?"selected ": "") + "value=AUG>August", w);
  wit("<option " + (m==8?"selected ": "") + "value=SEP>September", w);
  wit("<option " + (m==9?"selected ": "") + "value=OCT>October", w);
  wit("<option " + (m==10?"selected ": "") + "value=NOV>November", w);
  wit("<option " + (m==11?"selected ": "") + "value=DEC>December", w);
}

function set_date()
 {
	var doa_dd=document.afpForm.doa_dd.selectedIndex;
	var doa_mm=document.afpForm.doa_mm.selectedIndex;
	var calendar=new Date();
	var advpurchase=1+3;
	calendar.setDate(calendar.getDate()+advpurchase);
	document.afpForm.doa_dd.selectedIndex=calendar.getDate()-1;
	document.afpForm.doa_mm.selectedIndex=calendar.getMonth();
	calendar.setDate(calendar.getDate()+7);
	document.afpForm.dod_dd.selectedIndex=calendar.getDate()-1;
	document.afpForm.dod_mm.selectedIndex=calendar.getMonth();
}

function setdate()
{
	var doa_dd=document.afpForm.cinday.selectedIndex;
	var doa_mm=document.afpForm.cinmonth.selectedIndex;
	var calendar=new Date();
	var advpurchase=1+3;
	calendar.setDate(calendar.getDate());
	document.afpForm.cinday.selectedIndex=calendar.getDate()-1;
	document.afpForm.cinmonth.selectedIndex=calendar.getMonth();
}

function setdateBookingCalendar(D,M,Y)
{
	if(D == 0 && M == 0 && Y == 0)
	{ 
		var doa_dd=document.afpForm.cinday.selectedIndex;
		var doa_mm=document.afpForm.cinmonth.selectedIndex;
		var calendar=new Date();
		var advpurchase=1+3;
		calendar.setDate(calendar.getDate());
		document.afpForm.cinday.selectedIndex=calendar.getDate()-1+3;
		document.afpForm.cinmonth.selectedIndex=calendar.getMonth();
	}
	else
	{
		var doa_dd=parseInt(D);
		var doa_mm=parseInt(M);
		var calendar=new Date();
		var advpurchase=1+3;
		//calendar.setDate('2/1/2006');
		
		document.afpForm.cinday.selectedIndex = parseInt(D);
		document.afpForm.cinmonth.selectedIndex = parseInt(M);
		document.afpForm.year.value = parseInt(Y);
	}
}
