/*********************************************
<Author>
Landon Williams
2/16/04

<Description>
HTML document can call this file using meathod showSearch() to display the Search Module on a site. The module will redirect the user with his information to the ICHotelsGroup main search site.
The showSearch function recieves three variables, cityName, stateName, countryName.
		- cityName: The name of the city the user wan't to initaly be listen in the "City" form tag. Pass "" if no default is desired.
		- stateName: The two letter abbreviation of the State which the user would like the "State" drop down list to default to. Pass "" to default with no State listed.
		- countryName: The COUNTRY NAME -or- COUNTRY CODE which the user would like the "Country" drop down list to default to. Passing "" will default to the United States.

<Dependenceies>
This file includes and requires for use two files.
  -- Main site Style Sheet: "http://images1.ichotelsgroup.com/css/6c_styles.css"
  -- Motified Static Site Calendar (Typically named cal2.js): "JSSearchCalendar.js"

<Other>
Much of this code is reproduced from either the existing static sites or ICHotelsGroup main website.
*********************************************/
var redirectVars=[["brandCode","6c"],["regionCode","1"],["localeCode","en"],["city",""],["state",""],["country",""],["hotelCode",""],["rateCode",""],["IATAno",""],["corpNum",""],["GPC",""],["searchHI",""],["searchEX",""],["searchCP",""],["searchIC",""],["searchSB",""],["searchCW",""]]
for (var i=0; i<redirectVars.length ;i++ )
{
	var evalString='var '+redirectVars[i][0]+'="'+redirectVars[i][1]+'";';
	eval(evalString);
}

var st=["","AB","AK","AL","AR","AZ","BC","CA","CO","CT","DC","DE","FL","GA","HI","IA","ID","IL","IN","KS","KY","LA","MA","MB","MD","ME","MI","MN","MO","MS","MT","NB","NC","ND","NE","NF","NH","NJ","NM","NS","NV","NY","OH","OK","ON","OR","PA","PE","QC","RI","SC","SD","SK","TN","TX","UT","VA","VT","WA","WI","WV","WY"];

var b=[["0001","United States"],["0140","Andorra"],["0150","Argentina"],["0100","Aruba"],["0160","Australia"],["0165","Austria"],["0180","Bahamas"],["0181","Bahrain"],["0190","Belgium"],["0185","Bosnia & Herzegovina"],["0220","Brazil"],["0255","Cambodia"],["0260","Canada"],["0107","Caribbean"],["0268","Cayman Islands"],["0275","Chile"],["0280","China-Peoples Rep"],["0285","Colombia"],["0295","Costa Rica"],["0305","Cyprus"],["0311","Czech Republic"],["0320","Dominican Republic"],["0325","Ecuador"],["0922","Egypt"],["0330","El Salvador"],["0926","England"],["0327","Eritrea"],["0338","Fiji Islands"],["0340","Finland"],["0350","France"],["0367","French Polynesia"],["0388","Gabon"],["0394","Germany"],["0400","Greece"],["0066","Guam"],["0415","Guatemala"],["0430","Honduras"],["0435","Hong Kong"],["0445","Hungary"],["0455","India"],["0458","Indonesia"],["0470","Ireland"],["0475","Israel"],["0480","Italy"],["0487","Jamaica"],["0490","Japan"],["0500","Jordan"],["0525","Kazakhstan"],["0505","Kenya"],["0515","Korea-Republic Of"],["0520","Kuwait"],["0540","Lebanon"],["0532","Lithuania"],["0573","Macau"],["0574","Macedonia"],["0580","Malaysia"],["0590","Malta"],["0595","Mexico"],["0610","Morocco"],["0615","Mozambique"],["0625","Nepal"],["0630","Netherlands"],["0660","New Zealand"],["0665","Nicaragua"],["0616","Oman"],["0700","Pakistan"],["0710","Panama"],["0712","Papua New Guinea"],["0720","Peru"],["0725","Philippines"],["0730","Poland"],["0735","Portugal"],["0072","Puerto Rico"],["0747","Qatar"],["0755","Romania"],["0825","Russia"],["0785","Saudi Arabia"],["0760","Scotland"],["0795","Singapore"],["0796","Slovakia"],["0801","South Africa"],["0830","Spain"],["0272","Sri Lanka"],["0855","Switzerland"],["0281","Taiwan"],["0865","Tanzania"],["0875","Thailand"],["0887","Trinidad & Tobago"],["0890","Tunisia"],["0905","Turkey"],["0888","United Arab Emirates"],["0925","United Kingdom"],["0930","Uruguay"],["0001","United States"],["0078","US Virgin Islands"],["0931","Uzbekistan"],["0548","Vanuatu"],["0940","Venezuela"],["0950","Wales"],["0968","Yemen"],["0990","Zambia"],["0818","Zimbabwe"]];

var w = document;
w.r = w.write; 

function writeSelectNumbers(i){
	for(var x=1;x<i;x++)w.r("<option value="+x+">"+x+"</option>");
}

function monthName(month_value){
	switch (month_value){
		case 0: return "January"
		case 1: return "Feburary"
		case 2: return "March"
		case 3: return "April"
		case 4: return "May"
		case 5: return "June"
		case 6: return "July"
		case 7: return "August"
		case 8: return "September"
		case 9: return "October"
		case 10: return "November"
		case 11: return "December"
	}
}

function writeMonthYear(){
var date_now = new Date()
var month_now = date_now.getMonth()
var year_now = date_now.getFullYear()
var temp_year
for(var i=month_now;i<month_now+12;i++){
	temp_year = year_now
	if(i>11)
	  temp_year = temp_year + 1
	w.r("<option value="+(i%12)+temp_year+">"+monthName(i%12)+" "+temp_year+"</option>");
	}
}

function writeStateId(stateName){
	for(var i=0;i<61;i++){
		if ((st[i]==stateName)&&(stateName!=""))
			w.r("<option selected value=\""+st[i]+"\">"+st[i]+"</option>");
		else 
			w.r("<option value=\""+st[i]+"\">"+st[i]+"</option>");
	}
}

function writeCountryId(countryName){
	w.r("<select name=countryId class=f12quickres>");
	for(var i=0;i<102;i++){
		if ((b[i][0]==countryName)||(b[i][1]==countryName))
			w.r("<option selected value="+b[i][0]+">"+b[i][1]+"</option>");
		else
			w.r("<option value="+b[i][0]+">"+b[i][1]+"</option>");
	}
	w.r("</select>");
}


function populateCheckOut()
{
    var theForm = document.searchForm;
    if ((theForm.checkOutMonthYear.selectedIndex == 0)    ||
        (theForm.checkOutMonthYear.selectedIndex < theForm.checkInMonthYear.selectedIndex) ||
        ((theForm.checkOutMonthYear.selectedIndex == theForm.checkInMonthYear.selectedIndex) &&
         (theForm.checkOutDate.selectedIndex <= theForm.checkInDate.selectedIndex))) {
           if(theForm.checkInMonthYear.selectedIndex != 0) {
               if (theForm.checkInDate.selectedIndex > 29 ) {
                    theForm.checkOutDate.selectedIndex = 1;
                    theForm.checkOutMonthYear.selectedIndex = theForm.checkInMonthYear.selectedIndex + 1;
                }
                else if ((theForm.checkInDate.selectedIndex == 29 ) &&
                     ((theForm.checkInMonthYear.selectedIndex == 4) ||
                      (theForm.checkInMonthYear.selectedIndex == 6)  ||
                      (theForm.checkInMonthYear.selectedIndex == 9) ||
                      (theForm.checkInMonthYear.selectedIndex == 11))) {
                          theForm.checkOutDate.selectedIndex = 1;
                          theForm.checkOutMonthYear.selectedIndex = theForm.checkInMonthYear.selectedIndex + 1;
                }
                else {
                      theForm.checkOutDate.selectedIndex = theForm.checkInDate.selectedIndex + 1;
                      theForm.checkOutMonthYear.selectedIndex = theForm.checkInMonthYear.selectedIndex;
                }
            }
    }
}

                                                                           
var calendarSwap = 0; //set to 0 for checkIn, 1 for checkOut;');                                              
                                                                                                           
//This function will be called from cal2.js to set the defualt fields on this page.');                        
function setDateFields(){ 
	    var today = new Date();
        if (calendarSwap == 0){  //Check IN Date                                                                          
			var date = document.searchForm.firstinput.value ;                                              
			dateArray = date.split("/");                                                                 
			document.searchForm.checkInDate.selectedIndex = dateArray[1];                                 
                                                                                                           
   			index = 0;                                                                                     
   			for (i=2003;i<=dateArray[2];i++){ index = index + 1;}                                         
			if((dateArray[0]-1)<today.getMonth())
				document.searchForm.checkInMonthYear.selectedIndex = (12-today.getMonth()+1)+(dateArray[0]-1);
			else	
				document.searchForm.checkInMonthYear.selectedIndex = (dateArray[0]-1);// + "" + (index +2002);
			if (document.searchForm.checkOutMonthYear.selectedIndex == 0)  {
				populateCheckOut();
			}
		}                                                                                                  
		else {        //Check OUT Date                                                                           
			var date = document.searchForm.firstinput.value ;                                       
			dateArray = date.split("/");                                                               
			document.searchForm.checkOutDate.selectedIndex = dateArray[1];                                 
                                                                                                        
   			index = 0;                                                                                 
   			for (i=2003;i<=dateArray[2];i++){ index = index + 1;}                                          
			if((dateArray[0]-1)<today.getMonth())
				document.searchForm.checkOutMonthYear.selectedIndex = (12-today.getMonth()+1)+(dateArray[0]-1);
			else
				document.searchForm.checkOutMonthYear.selectedIndex = (dateArray[0]-1);// + "" + (index +2002);
		}                                                                                                  
  	}                                                                                                  
                                                                                               






function showSearch(cityPass, statePass, countryPass, IATAnoPass){
//alert(brandCode);
//backwards compatible support
if(cityPass!=null){city=cityPass;}
if(statePass!=null){state=statePass;}
if(countryPass!=null){country=countryPass;}
if(IATAnoPass!=null){IATAno=IATAnoPass;}
//end



document.write('<script language="JavaScript" type="text/javascript" src="http://images.ichotelsgroup.com/jsquickres/JSSearchCalendar.js"></script>');
document.write('<link rel="stylesheet" type="text/css" href="http://images1.ichotelsgroup.com/css/6c_styles.css">');

document.write('<form action="http://www.ichotelsgroup.com/redirect" name="searchForm" method="POST">');
document.write('<INPUT type=hidden name=firstinput>'); 

document.write('<INPUT type="hidden" name="path" value="asearch">');
document.write('<INPUT type="hidden" name="regionCode" value="'+regionCode+'">');
document.write('<INPUT type="hidden" name="localeCode" value="'+localeCode+'">');
document.write('<INPUT type="hidden" name="brandCode" value="'+brandCode+'">');

if ((searchHI!="")||(searchEX!="")||(searchCP!="")||(searchIC!="")||(searchSB!="")||(searchCW!=""))
{//User has set at least one individual brand to search..
	if (searchHI!="")document.write('<INPUT type="hidden" name="searchGroupCodes" value="HI">');
	if (searchEX!="")document.write('<INPUT type="hidden" name="searchGroupCodes" value="EX">');
	if (searchCP!="")document.write('<INPUT type="hidden" name="searchGroupCodes" value="CP">');
	if (searchIC!="")document.write('<INPUT type="hidden" name="searchGroupCodes" value="IC">');
	if (searchSB!="")document.write('<INPUT type="hidden" name="searchGroupCodes" value="SB">');
	if (searchCW!="")document.write('<INPUT type="hidden" name="searchGroupCodes" value="CW">');
}
else //user wants to search all brands
{
	document.write('<INPUT type="hidden" name="searchGroupCodes" value="all">');
}


                                                                                           


document.write('<table width="165" border="0" cellpadding="0" cellspacing="0">'); 
document.write('	<tr>'); 
if(hotelCode=="")
	{
		document.write('		<td><a href="http://www.ichotelsgroup.com/h/d/6c/1/en/hotelsearch"><img  src="http://poppy.enoch.com.au/intercon/img/find-hotel-top.gif" height="28" width="165" border="0"></a></td>'); 
	}
else
	{
		document.write('		<td width="165" height="28" class="qresHeader" nowrap>&nbsp;&nbsp;&nbsp;RESERVE THIS HOTEL</td>');
	}
document.write('	</tr>'); 
document.write('	<tr>'); 
document.write('		<td colspan="1"><img  src="http://images1.ichotelsgroup.com/cq/etc/media_library/common.Par.0001.Image.gif" height="1" width="165"></td>'); 
document.write('	</tr>'); 
document.write('</table>'); 

document.write('<table width="165" border="0" cellspacing="0" cellpadding="0" class=qresHome>');
document.write('	<tr>');
document.write('	<td height=1 bgcolor="ffffff"></td>');
document.write('	</tr>');
document.write('	<tr>');
document.write('	<td>');
document.write('	<table width="100%" border="0" cellspacing="3" cellpadding="0">');
document.write('	<tr>');
document.write('	<td>');
document.write('	<table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');
document.write('	');
if(hotelCode=="")
	{
		document.write('	<tr> ');
		document.write('     <td> ');
		document.write('        <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');
		document.write('          <tr class=qresHome> ');
		document.write('            <td >');
		document.write('              <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');
		document.write('                 <tr class=qresHome> ');
		//document.write('                  <td align="left">City:</td>');
		//document.write('                  <td align="right">State/Prov. (US/Canada)</td>');
		document.write('                 </tr>');
		document.write('              </table>');


		document.write('            </td>');
		//document.write('            <td>&nbsp;</td>');
		//document.write('            <td>State/Prov. (US/Canada)</td>');
		document.write('          </tr>');
		document.write('          <tr> ');

		document.write('           <td width="50%" align="right">');
		document.write('           City:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="city" width="115" size="12" maxlength="35" class="f12quickres" value="'+city+'">');
		document.write('           </td>');
		document.write('           </tr> ');
		document.write('          <tr> ');


		document.write('            <td width="50%" align="right">');
		document.write('            State/Prov.(US/Can):&nbsp;<select name=stateId class="f12quickres">');
		//document.write('          <script language="javascript">');
		writeStateId(state);
		//document.write('			writeStateId("'+stateName+'");');
		//document.write('			</script>');
		document.write('        </select>');
		document.write('            </td>');
		document.write('          </tr>');
		document.write('          <tr>');
		document.write('            <td width="50%">&nbsp;Country:</td>');
		document.write('            <td width="50%"></td>');
		document.write('          </tr>');
		document.write('          <tr>');
		document.write('            <td width="50%">');
		writeCountryId(country);
		//document.write('             <script>writeCountryId("'+countryName+'");</script>');
		document.write('            </td>');
		document.write('            <td width="50%"></td>');
		document.write('          </tr>');
								
		document.write('        </table>');
		document.write('      </td>');
		document.write('    </tr>');
	
		document.write('    <tr> ');
		document.write('      <td>&nbsp;</td>');
		document.write('    </tr>');
	}//end hotelCode if statement
else //hotelCode!=null
	{
		city=null;state=null;country=null;
		document.write('<INPUT type="hidden" name="hotelCode" value="'+hotelCode+'">');
	}
document.write('	<tr>');
document.write('	<td>');
document.write('	<table width="100%" border="0" cellspacing="2" cellpadding="0" bgcolor="#000000">');
document.write('	<tr>');
document.write('	<td class=qresHomeOption>');
document.write('	<table width="100%" border="0" cellspacing="3" cellpadding="0" class=qresHomeOption>');
document.write('	<tr class=qresHomeOption>');
document.write('	<td>');
document.write('	<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('');
document.write('    <tr> ');
document.write('      <td>');
document.write('        <table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('          <tr>');
document.write('           <td>');
document.write('             <table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('               <tr>');
document.write('                 <td class="qresHomeOptionBold">Optional Travel Information</td>');
document.write('               </tr>');
document.write('               <tr>');
document.write('                 <td class="f11">Check-In Date:</td>');
document.write('               </tr>');
document.write('               <tr>');
document.write('                 <td>');
document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.write('                    <tr> ');
document.write('                       <td class="qresHomeOption" width="12%"> ');
document.write('                         <select name="checkInDate" class="f11" onchange=\'javascript:populateCheckOut()\'>');
document.write('							<option value="-1" ></option>');
writeSelectNumbers(32);
//document.write('							<script>writeSelectNumbers(32);</script>');
document.write('						  </select>');
document.write('                        </td>');
document.write('                        <td class="qresHomeOption" width="44%"> ');
document.write('                          <select name="checkInMonthYear" class="f11" onchange=\'javascript:populateCheckOut()\'>');
document.write('							<option value="-1" ></option>');
writeMonthYear();
//document.write('							<script>writeMonthYear();</script>');
document.write('						  </select>');
document.write('                        </td>');
//document.write('                        <td class="qresHomeOption" valign="bottom" align="right" width="40%">');
//document.write('							<a onclick="javascript:calendarSwap=0; javascript:showCal(\'Calendar1\')" href="#"><img  src="http://images1.ichotelsgroup.com/cq/etc/media_library/common/1/en/calendar.Par.0002.Image.gif" alt="Calendar" name="Calendar"  align="top" border="0"></a>');
//document.write('						</td>');
document.write('                        <td class="qresHomeOption" valign="bottom" align="left" width="4%">');
document.write('						</td>');
document.write('                      </tr>');
document.write('                    </table>');
document.write('                  </td>');
document.write('                </tr>');
document.write('                <tr>');
document.write('                  <td class="f11">Check-Out Date:</td>');
document.write('                </tr>');
document.write('                <tr>');
document.write('                  <td>');
document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHomeOption>');
document.write('                      <tr> ');
document.write('                        <td width="12%"> ');
document.write('                          <select name="checkOutDate" class="f11" onchange=\'javascript:populateCheckOut()\'>');
document.write('							 <option value="-1" ></option>');
writeSelectNumbers(32);

//document.write('							 <script>writeSelectNumbers(32);</script>');
document.write('						  </select>');
document.write('                        </td>');
document.write('                        <td width="44%"> ');
document.write('                          <select name="checkOutMonthYear" class="f11" onchange=\'javascript:populateCheckOut()\'>');
document.write('                          	<option value="-1" ></option>');
writeMonthYear();
//document.write('							<script>writeMonthYear();</script>');
document.write('						  </select>');
document.write('                        </td>');
//document.write('                        <td class="qresHomeOption" valign="bottom" align="right" width="40%">');
//document.write('							<a href="javascript:calendarSwap=1; javascript:showCal(\'Calendar1\')"><img  src="http://images1.ichotelsgroup.com/cq/etc/media_library/common/1/en/calendar.Par.0002.Image.gif" alt="Calendar" name="Calendar" align="top" border="0"></a>');
//document.write('						</td>');
document.write('                        <td class="qresHomeOption" valign="bottom" align="left" width="4%">');
document.write('						</td>');

document.write('                      </tr>');
document.write('                    </table>');
document.write('                  </td>');
document.write('                </tr>');
document.write('              </table>');
document.write('            </td>');
document.write(' </tr><tr>');
document.write('            <td>');
document.write('              <table width="100%" border="0" cellspacing="0" cellpadding="0" >');
document.write('                <tr> ');
document.write('                  <td height="8"></td>');
document.write('                </tr>');
document.write('                <tr> ');
document.write('                  <td> ');
document.write('                    <table width="95%" border="0" cellspacing="0" cellpadding="0">');
document.write('                      <tr class="f11"> ');
document.write('                        <td>Adult(s):</td>');
document.write('                        <td></td>');
document.write('                        <td>Child(ren)</td>');
document.write('                        <td></td>');
document.write('                        <td>Room(s):</td>');
document.write('                      </tr>');
document.write('                      <tr> ');
document.write('                        <td> ');
document.write('                          <select name="numberOfAdults" class="f11">');
writeSelectNumbers(21);
//document.write('							<script>writeSelectNumbers(21);</script>');
document.write('						  </select>');
document.write('                        </td>');
document.write('                        <td></td>');
document.write('                       <td> ');
document.write('                          <select name= "numberOfChildren" class="f11">');
document.write('							<option value=0>0</option>');
writeSelectNumbers(21);
//document.write('							<script>writeSelectNumbers(21);</script>');
document.write('						  </select>');
document.write('                        </td>');
document.write('                        <td></td>');
document.write('                        <td> ');
document.write('                          <select name="numberOfRooms" class="f11">');
writeSelectNumbers(10);
//document.write('							<script>writeSelectNumbers(10);</script>');
document.write('						  </select>');
document.write('                        </td>');
document.write('                      </tr>');
document.write('                    </table>');
document.write('                  </td>');
document.write('                </tr>');
document.write('                <tr> ');
document.write('                  <td height="9"></td>');
document.write('                </tr>');
if(rateCode=="")
	{
		document.write('                <tr> ');
		document.write('                  <td>');
		document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.write('                      <tr>');
		document.write('                        <td class="f11">Rate Preference:</td>');
		document.write('                        <td>&nbsp;</td>');
		document.write('                      </tr>');
		document.write('                      <tr>');
		document.write('                        <td>');
		document.write('                         <select name="rateTypeCodes" class="f11">');
		document.write('							<option value="6CBARC">&#34;Best Available.** &#34;');
		document.write('							<OPTION VALUE="AAA" >AAA-CAA*</OPTION><BR><OPTION VALUE="ARP" >AARP*</OPTION><BR><OPTION VALUE="CGV" >Canadian Govt*</OPTION><BR><OPTION VALUE="ENI" >Entertainment Card*</OPTION><BR><OPTION VALUE="GOV" >Gov\'t-Military*</OPTION><BR><OPTION VALUE="ANI" >Reward Nights*</OPTION><BR><OPTION VALUE="STI" >State-Gov\'t Rate*</OPTION><BR>');
	    document.write('						  </select>');
		document.write('                        </td>');
		document.write('                        <td>&nbsp;</td>');
		document.write('                      </tr>');
		document.write('                    </table>');
		document.write('                  </td>');
		document.write('                </tr>');
	}
else
	{
		document.write('<INPUT type="hidden" name="rateTypeCodes" value="'+rateCode+'">');
	}
if(hotelCode!="")
	{
		document.write('                <tr> ');
		document.write('                  <td height="9"></td>');
		document.write('                </tr>');
		document.write('                <tr> ');
		document.write('                  <td>');
		document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.write('                      <tr>');
		document.write('                        <td class="f11">Corporate ID:</td>');
		document.write('                        <td class="f11">IATA #:</td>');
		document.write('                      </tr>');
		document.write('                      <tr>');
		document.write('                        <td class="f12quickres">');
if (corpNum!="")
	{
		document.write('							'+corpNum);
	}
else
	{
		document.write('							<input type="text" name="corpNum" width="115" size="16" maxlength="35" class="f12quickres" value="'+corpNum+'">');
	}
		document.write('                        </td>');
		document.write('                        <td class="f12quickres">');
if (IATAno!="")
	{
		document.write('							'+IATAno);
	}
else
	{
		document.write('							 <input type="text" name="IATAno" width="115" size="16" maxlength="35" class="f12quickres" value="'+IATAno+'">');
	}
		document.write('                        </td>');
		document.write('                      </tr>');
		document.write('                    </table>');
		document.write('                  </td>');
		document.write('                </tr>');

		document.write('                <tr> ');
		document.write('                  <td height="9"></td>');
		document.write('                </tr>');
		document.write('                <tr> ');
		document.write('                  <td>');
		document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.write('                      <tr>');
		document.write('                        <td class="f11">Group Booking Code:</td>');
		document.write('                        <td class="f11">&nbsp;</td>');
		document.write('                      </tr>');
		document.write('                      <tr>');
		document.write('                        <td class="f12quickres">');
if (GPC!="")
	{
		document.write('							'+GPC);
	}
else
	{
		document.write('							 <input type="text" name="GPC" width="115" size="16" maxlength="35" class="f12quickres" value="'+GPC+'">');
	}
		document.write('                        </td>');
		document.write('                        <td>&nbsp;</td>');
		document.write('                      </tr>');
		document.write('                    </table>');
		document.write('                  </td>');
		document.write('                </tr>');
	}
document.write('              </table>');
document.write('            </td>');
document.write('          </tr>');
document.write('        </table>');
document.write('      </td>');
document.write('    </tr>');
document.write('	</table>');
document.write('	</td></tr></table></td></tr></table></td></tr>');
document.write('    <tr> ');
document.write('      <td>');
document.write('        <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');
document.write('          <tr>');
document.write('            <td>&nbsp;</td>');
document.write('            <td align=center><font size="2" face="Arial, Helvetica, sans-serif">');
if(hotelCode=="")
	{
		document.write('        <input type="image" src="http://poppy.enoch.com.au/intercon/img/find-hotel.gif" name="smartQuickSearch">');
	}
else
	{
		document.write('        <input type="image" src="http://images1.ichotelsgroup.com/cq/etc/media_library/cn/0/en/reservation/qres.Par.0004.Image.gif" name="hotelDetailAvailabilitySearch">');
	}
document.write('        </font></td>');
document.write('          </tr>');
document.write('        </table>');
document.write('      </td>');
document.write('    </tr>');
document.write('  </table>');
document.write('  </td>');
document.write('  </tr>');
document.write(' </table>');
document.write('  </td>');
document.write('  </tr>');
document.write('  </table>');

document.write('  </form>');


	
}

