	function displaySearch(strBookingURL,strAffiliateID, strProviderID, strPremisesCode)
	{	
		

		document.write('<FORM id=CheckPremfrm name=CheckPremfrm>')
		
		//hidden controls to hold parameters passed in for button click event below 
		document.write('<input type= "hidden" name="hdnBookingURL" value=' + strBookingURL + '>')
		document.write('<input type= "hidden" name="hdnAffiliateID" value=' + strAffiliateID + '>')
		document.write('<input type= "hidden" name="hdnProviderID" value=' + strProviderID + '>')
		document.write('<input type= "hidden" name="hdnPremisesCode" value=' + strPremisesCode + '>')

		document.write('<TABLE width="228" cellSpacing="0" cellPadding="0" border="0">')
		document.write('<TR>')
		document.write('<TD>')
		document.write('<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">')
		document.write('<TR>')
		document.write('<TD valign="top" align="left">Adults<br><select name="selNumAdults" style="MARGIN-TOP:1px;">')
		document.write('<option value="1">1</option>')
		document.write('<option value="2" selected>2</option>')
		document.write('<option value="3">3</option>')
		document.write('<option value="4">4</option>')
		document.write('<option value="5">5</option>')
		document.write('<option value="6">6</option>')
		document.write('<option value="7">7</option>')
		document.write('<option value="8">8</option>')
		document.write('</select>')
		document.write('</TD>')
		document.write('<TD valign="top" align="left">Children<br><select name="selNumChildren" style="MARGIN-TOP:1px;">')
		document.write('<option value="0" selected>0</option>')
		document.write('<option value="1">1</option>')
		document.write('<option value="2">2</option>')
		document.write('<option value="3">3</option>')
		document.write('<option value="4">4</option>')
		document.write('<option value="5">5</option>')
		document.write('<option value="6">6</option>')
		document.write('<option value="7">7</option>')
		document.write('<option value="8">8</option>')
		document.write('</select>')
		document.write('</TD>')
		document.write('<TD valign="top" align="left">Infants<br><select name="selNumInfants" style="MARGIN-TOP:1px;">')
		document.write('<option value="0" selected>0</option>')
		document.write('<option value="1">1</option>')
		document.write('<option value="2">2</option>')
		document.write('<option value="3">3</option>')
		document.write('<option value="4">4</option>')
		document.write('<option value="5">5</option>')
		document.write('<option value="6">6</option>')
		document.write('<option value="7">7</option>')
		document.write('<option value="8">8</option>')
		document.write('</SELECT>')
		document.write('</TD>')

		document.write('<TD valign="top" align="left">')
		document.write('Night(s)<br>')
		document.write('<select name="selNumNights" style="MARGIN-TOP:1px;">')
		document.write('<option value="1" >1</option>')
		document.write('<option value="2" >2</option>')
		document.write('<option value="3" >3</option>')
		document.write('<option value="4" >4</option>')
		document.write('<option value="5" >5</option>')
		document.write('<option value="6" >6</option>')
		document.write('<option value="7" >7</option>')
		document.write('<option value="8" >8</option>')
		document.write('<option value="9" >9</option>')
		document.write('<option value="10" >10</option>')
		document.write('<option value="11" >11</option>')
		document.write('<option value="12" >12</option>')
		document.write('<option value="13" >13</option>')
		document.write('<option value="14" >14</option>')
		document.write('<option value="15" >15</option>')
		document.write('<option value="16" >16</option>')
		document.write('<option value="17" >17</option>')
		document.write('<option value="18" >18</option>')
		document.write('<option value="19" >19</option>')
		document.write('<option value="20" >20</option>')
		document.write('<option value="21" >21</option>')
		document.write('<option value="22" >22</option>')
		document.write('<option value="23" >23</option>')
		document.write('<option value="24" >24</option>')
		document.write('<option value="25" >25</option>')
		document.write('<option value="26" >26</option>')
		document.write('<option value="27" >27</option>')
		document.write('<option value="28" >28</option>')
		document.write('<option value="29" >29</option>')
		document.write('<option value="30" >30</option>')
		document.write('<option value="31" >31</option>')
		document.write('</select>')
		document.write('</TD>')
		document.write('</TR>')
		document.write('</TABLE>')
		document.write('<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">')
		document.write('<TR>')
		document.write('<TD valign="top" colspan="3">')
		document.write('Arrival date<br>')
		document.write('<INPUT TYPE="TEXT" NAME="selCalendar" SIZE="10" style="WIDTH: 150px;Cursor:hand;" VALUE="Click Here for Calendar" READONLY="TRUE" ONCLICK="JavaScript:createCalendar(document.CheckPremfrm.selArriveMonth.value, document.CheckPremfrm.selArriveYear.value)"><br>')

		document.write('<input type="hidden" value="25" name="selArriveDay" >')
		document.write('<input type="hidden" value="7" name="selArriveMonth">')
		document.write('<input type="hidden" value="2006" name="selArriveYear">')


		var today = new Date();
		if(today.getDay()==0){document.forms['CheckPremfrm'].selCalendar.value ='Sun' + " " + parseInt(today.getDate())  + " " + monthName[today.getMonth()] + " " + today.getFullYear()} else {document.forms['CheckPremfrm'].selCalendar.value = weekName[parseInt(today.getDay())-1]  + " " + parseInt(today.getDate())  + " " + monthName[today.getMonth()] + " " + today.getFullYear()}
		document.forms['CheckPremfrm'].selArriveMonth.value=today.getMonth()+1;
		document.forms['CheckPremfrm'].selArriveYear.value= today.getFullYear(); 
		document.forms['CheckPremfrm'].selArriveDay.value=parseInt(today.getDate());

		document.write('</TD></tr>')

		document.write('<tr><TD colspan="3"><input type=button id=Search_Button value="Search" alt="Check Availability" class="submit" onclick="javascript:Search();"></TD>')
		document.write('<TR>')
		document.write('</TABLE>')
		document.write('</TD>')
		document.write('</TR>')
		document.write('</TABLE>')

		document.write('</FORM>')
	}

	//declare variable to hold URL - build URL from controls on page - redirect page to this URL
	function Search() 
	{
	//variable to hold our deepLink
	var deepLink

	//build the URL for deepLinking
	deepLink = document.forms['CheckPremfrm'].hdnBookingURL.value 	
	deepLink = deepLink + "?affiliateid=" + document.forms['CheckPremfrm'].hdnAffiliateID.value 	
	deepLink = deepLink + "&ProvID=" + document.forms['CheckPremfrm'].hdnProviderID.value 	
	deepLink = deepLink + "&PremisesCode=" + document.forms['CheckPremfrm'].hdnPremisesCode.value 	
	deepLink = deepLink + "&AffiliatevisitID=" + "1"
	deepLink = deepLink + "&selNumAdults=" + document.forms['CheckPremfrm'].selNumAdults.value 	
	deepLink = deepLink + "&selNumChildren=" + document.forms['CheckPremfrm'].selNumChildren.value 
	deepLink = deepLink + "&selNumInfants=" + document.forms['CheckPremfrm'].selNumInfants.value 
	deepLink = deepLink + "&selArriveMonth=" + document.forms['CheckPremfrm'].selArriveMonth.value 
	deepLink = deepLink + "&selArriveYear=" + document.forms['CheckPremfrm'].selArriveYear.value 
	deepLink = deepLink + "&selArriveDay=" + document.forms['CheckPremfrm'].selArriveDay.value 
	deepLink = deepLink + "&selNumNights=" + document.forms['CheckPremfrm'].selNumNights.value 
	deepLink = deepLink + "&isAdvanced=" + "1"
	deepLink = deepLink + "&hdnAction=" + "search"
	deepLink = deepLink + "&selCurrency=" + "978"

	//redirect page to our deepLink URL
	window.location.href = deepLink;
	}
