coma="'";
cgiurl = 'http://service.bfast.com/bfast/click';
imgurl = 'http://www.indo.com/images';


aff_html1  ='<form name="form1" action="' + cgiurl + '" method="post" onSubmit="form_date();"> \n';
aff_html1 +='<INPUT  Type="hidden" name="HotID" VALUE="';

aff_html1a ='"><INPUT  Type="hidden" name="bfmid" VALUE="26917872"> \n';
aff_html1a +='<INPUT  Type="hidden" name="bfpage" VALUE="deeplink">  \n'; 
aff_html1a +='<INPUT  Type="hidden" name="GOTO" VALUE="HotAvail">  \n'; 
aff_html1a +='<INPUT  Type="hidden" name="InDate" VALUE="">  \n'; 
aff_html1a +='<INPUT  Type="hidden" name="OutDate" VALUE="">  \n'; 
aff_html1a +='<table align=center BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="412" >  \n';
aff_html1a +='<tr ALIGN=CENTER><td WIDTH="1"></td><td WIDTH="410"></td><td WIDTH="1"></td></tr>  \n';
aff_html1a +='<tr BGCOLOR="#cccccc"><td align=center COLSPAN="3"><span STYLE="font:11pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;">';





aff_html2 ='</span></td></tr>  \n';
aff_html2 +='<tr><td BGCOLOR="#cccccc"><spacer width="1" type="block"></td><td ALIGN=CENTER VALIGN=TOP>  \n';
aff_html2 +='<table BORDER=0 BGCOLOR="#ffffff" CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="410" > \n';
aff_html2 +='<tr STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" > \n';
aff_html2 +='<td WIDTH="130">&nbsp;</td> \n';
aff_html2 +='<td WIDTH="267">&nbsp;</td> \n';
aff_html2 +='<td WIDTH="13">&nbsp;</td> \n';
aff_html2 +='</tr> \n';

aff_html2 +='<tr> \n';
aff_html2 +='<td STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" valign="center" align="right">check in&nbsp;&nbsp;</td> \n';
aff_html2 +='<td STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" valign="top"> \n';
aff_html2 +='<select name="gcid" STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;"> \n';
aff_html2 +='	<option  >------ \n';
aff_html2 +='	<option  VALUE="1">1 \n';
aff_html2 +='	<option  VALUE="2">2 \n';
aff_html2 +='	<option  VALUE="3">3 \n';
aff_html2 +='	<option  VALUE="4">4 \n';
aff_html2 +='	<option  VALUE="5">5 \n';
aff_html2 +='	<option  VALUE="6">6 \n';
aff_html2 +='	<option  VALUE="7">7 \n';
aff_html2 +='	<option  VALUE="8">8 \n';
aff_html2 +='	<option  VALUE="9">9 \n';
aff_html2 +='	<option  VALUE="10">10 \n';
aff_html2 +='	<option  VALUE="11">11 \n';
aff_html2 +='	<option  VALUE="12">12 \n';
aff_html2 +='	<option  VALUE="13">13 \n';
aff_html2 +='	<option  VALUE="14">14 \n';
aff_html2 +='	<option  VALUE="15">15 \n';
aff_html2 +='	<option  VALUE="16">16 \n';
aff_html2 +='	<option  VALUE="17">17 \n';
aff_html2 +='	<option  VALUE="18">18 \n';
aff_html2 +='	<option  VALUE="19">19 \n';
aff_html2 +='	<option  VALUE="20">20 \n';
aff_html2 +='	<option  VALUE="21">21 \n';
aff_html2 +='	<option  VALUE="22">22 \n';
aff_html2 +='	<option  VALUE="23">23 \n';
aff_html2 +='	<option  VALUE="24">24 \n';
aff_html2 +='	<option  VALUE="25">25 \n';
aff_html2 +='	<option  VALUE="26">26 \n';
aff_html2 +='	<option  VALUE="27">27 \n';
aff_html2 +='	<option  VALUE="28">28 \n';
aff_html2 +='	<option  VALUE="29">29 \n';
aff_html2 +='	<option  VALUE="30">30 \n';
aff_html2 +='	<option  VALUE="31">31 \n';
aff_html2 +='</select> \n';

aff_html2 +='<select name="gcim" STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;"> \n';
aff_html2 +='	<option  >------ \n';
aff_html2 +='	<option  VALUE="1">January \n';
aff_html2 +='	<option  VALUE="2">February \n';
aff_html2 +='	<option  VALUE="3">March \n';
aff_html2 +='	<option  VALUE="4">April \n';
aff_html2 +='	<option  VALUE="5">May \n';
aff_html2 +='	<option  VALUE="6">June \n';
aff_html2 +='	<option  VALUE="7">July \n';
aff_html2 +='	<option  VALUE="8">August \n';
aff_html2 +='	<option  VALUE="9">September \n';
aff_html2 +='	<option  VALUE="10">October \n';
aff_html2 +='	<option  VALUE="11">November \n';
aff_html2 +='	<option  VALUE="12">December \n';
aff_html2 +='</select> \n';
aff_html2 +='&nbsp;<select name="gciy" STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;"> \n';
aff_html2 +='	<option SELECTED VALUE="2002">2002 \n';
aff_html2 +='	<option  VALUE="2003">2003 \n';
aff_html2 +='	<option  VALUE="2004">2004 \n';
aff_html2 +='	<option  VALUE="2005">2005 \n';
aff_html2 +='</select> \n';
aff_html2 +='</td><td>&nbsp;</td></tr> \n';





aff_html2 +='<tr><td STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" valign="center" align="right"> \n';
aff_html2 +='check out&nbsp;&nbsp;</td><td STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" valign="top"> \n';
aff_html2 +='<select name="gcod" STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;"> \n';
aff_html2 +='	<option  >------ \n';
aff_html2 +='	<option  VALUE="1">1 \n';
aff_html2 +='	<option  VALUE="2">2 \n';
aff_html2 +='	<option  VALUE="3">3 \n';
aff_html2 +='	<option  VALUE="4">4 \n';
aff_html2 +='	<option  VALUE="5">5 \n';
aff_html2 +='	<option  VALUE="6">6 \n';
aff_html2 +='	<option  VALUE="7">7 \n';
aff_html2 +='	<option  VALUE="8">8 \n';
aff_html2 +='	<option  VALUE="9">9 \n';
aff_html2 +='	<option  VALUE="10">10 \n';
aff_html2 +='	<option  VALUE="11">11 \n';
aff_html2 +='	<option  VALUE="12">12 \n';
aff_html2 +='	<option  VALUE="13">13 \n';
aff_html2 +='	<option  VALUE="14">14 \n';
aff_html2 +='	<option  VALUE="15">15 \n';
aff_html2 +='	<option  VALUE="16">16 \n';
aff_html2 +='	<option  VALUE="17">17 \n';
aff_html2 +='	<option  VALUE="18">18 \n';
aff_html2 +='	<option  VALUE="19">19 \n';
aff_html2 +='	<option  VALUE="20">20 \n';
aff_html2 +='	<option  VALUE="21">21 \n';
aff_html2 +='	<option  VALUE="22">22 \n';
aff_html2 +='	<option  VALUE="23">23 \n';
aff_html2 +='	<option  VALUE="24">24 \n';
aff_html2 +='	<option  VALUE="25">25 \n';
aff_html2 +='	<option  VALUE="26">26 \n';
aff_html2 +='	<option  VALUE="27">27 \n';
aff_html2 +='	<option  VALUE="28">28 \n';
aff_html2 +='	<option  VALUE="29">29 \n';
aff_html2 +='	<option  VALUE="30">30 \n';
aff_html2 +='	<option  VALUE="31">31 \n';
aff_html2 +='</select> \n';
aff_html2 +='<select name="gcom" STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;"> \n';
aff_html2 +='	<option  >------ \n';
aff_html2 +='	<option  VALUE="1">January \n';
aff_html2 +='	<option  VALUE="2">February \n';
aff_html2 +='	<option  VALUE="3">March \n';
aff_html2 +='	<option  VALUE="4">April \n';
aff_html2 +='	<option  VALUE="5">May \n';
aff_html2 +='	<option  VALUE="6">June \n';
aff_html2 +='	<option  VALUE="7">July \n';
aff_html2 +='	<option  VALUE="8">August \n';
aff_html2 +='	<option  VALUE="9">September \n';
aff_html2 +='	<option  VALUE="10">October \n';
aff_html2 +='	<option  VALUE="11">November \n';
aff_html2 +='	<option  VALUE="12">December \n';
aff_html2 +='</select> \n';
aff_html2 +='&nbsp;<select name="gcoy" STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;"> \n';
aff_html2 +='	<option SELECTED VALUE="2002">2002 \n';
aff_html2 +='	<option  VALUE="2003">2003 \n';
aff_html2 +='	<option  VALUE="2004">2004 \n';
aff_html2 +='	<option  VALUE="2005">2005 \n';
aff_html2 +='</select></td> \n';
aff_html2 +='<td>&nbsp;</td></tr> \n';






aff_html2 +='<tr><td STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" valign="center" align="right"> \n';
aff_html2 +='adults&nbsp;&nbsp;</td><td STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" valign="top"> \n';
aff_html2 +='<input  STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" type="text" name="NumAdult" value="1" size="3" maxlength="3">&nbsp;&nbsp; \n';
aff_html2 +='children&nbsp;&nbsp; \n';
aff_html2 +='<input  STYLE="font:9pt verdana; color:#7D7D7D; font-weight:bold; font-style:Normal;" type="text" name="NumChild" value="0" size="3" maxlength="3">&nbsp;<INPUT TYPE="hidden" NAME="mode" VALUE="SEARCH"><input type="submit" name="dummy" VALUE="CHECK AVAILABILITY"></td><td>&nbsp;</td></tr> \n';




aff_html3 ='<tr><td colspan="3" height="10">&nbsp;</td></tr></table> \n';
aff_html3 +='</td><td BGCOLOR="#cccccc"><spacer width="1" type="block"></td></tr> \n';
aff_html3 +='<tr BGCOLOR="#cccccc"><td COLSPAN="3"><spacer width="1" type="block"></td></tr> \n';
aff_html3 +='</table> \n';
aff_html3 +='</form> \n';




function find_hotel(xx, yy) {
  aff_html = aff_html1 + xx + aff_html1a + yy + aff_html2 + aff_html3;
  document.write(aff_html);
}


function form_date() {
  theform = document.form1;
  theform.InDate.value = theform.gcim.value + "/" + theform.gcid.value + "/" + theform.gciy.value;
  theform.OutDate.value = theform.gcom.value + "/" + theform.gcod.value + "/" + theform.gcoy.value;
  theform.submit();
}


function local_date () {

startoffset = 30;
duration = 7;
servertz = -5;
  
theday = new Date ();
theday2 = new Date ();

theyearfirst = document.form1.gciy.options[0].value;
thetz = theday.getTimezoneOffset ();

epoch = theday.getTime () + (24 * 3600 * startoffset + 60 * thetz + 3600 * servertz) * 1000;

theday.setTime (epoch);
thedate = theday.getDate ();
themonth = theday.getMonth () + 1;
theyear = theday.getFullYear ();

theyearoffset = theyear - theyearfirst;

document.form1.gcid.options[thedate].selected = true;
document.form1.gcim.options[themonth].selected = true;
document.form1.gciy.options[theyearoffset].selected = true;

epoch2 = epoch + 24 * 3600 * duration * 1000;

theday2.setTime (epoch2);
thedate2 = theday2.getDate ();
themonth2 = theday2.getMonth () + 1;
theyear2 = theday2.getFullYear ();

theyearoffset2 = theyear2 - theyearfirst;

document.form1.gcod.options[thedate2].selected = true;
document.form1.gcom.options[themonth2].selected = true;
document.form1.gcoy.options[theyearoffset2].selected = true;

}

