

	var hbcontent = '';
	var hbcount = 0;
	var writeForm = function(content) {
		hbcontent += content;
		hbcount += 1;
		if(hbcount >= 6) {
			$(function(){
				$('#accommodationDiv #searchFormGeneral, #accommodationDiv #sideSearchFormGeneral').append(hbcontent);
			});
		}
	};


		var rooturl='http://www.hb-247.com';
		var baseurl=rooturl+'/aff/?fuseaction=search&affiliate=theword';
		writeForm('<scri'+'pt language="JavaScript" src="http://www.hb-247.com/aff/js/dateformat.js"></scri'+'pt>');
		writeForm('<scri'+'pt language="JavaScript" src="http://www.hb-247.com/aff/js/searchform.js"></scri'+'pt>');
		writeForm('<scr'+'ipt language="javascript" type="text/javascript" src="http://www.hb-247.com/js/dictionaries/jserrors_en.js"></scr'+'ipt>');
		
		

var today=new Date('July 30, 2010');

var maxdate=new Date('July 30, 2011');	

function Location(id,name){
	this.id=id;this.name=name;
}
var aCountryLoc=new Array();


	aCountryLoc[196]=new Array();
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1096,'Airlie Beach    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1700,'Alice Springs    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(3833,'Blue Mountains    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1503,'Brisbane    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1713,'Byron Bay    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1520,'Cairns    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1480,'Canberra    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(12399,'Coolangatta    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1091,'Darwin    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1644,'Gold Coast    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(2087,'Hervey Bay    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1568,'Hobart    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1924,'Magnetic Island    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1546,'Melbourne    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1770,'Mission Beach    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(3846,'Port Stephens    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1786,'Surfers Paradise    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1120,'Sydney    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1779,'Sydney - Bondi Beach    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(9579,'Sydney - Coogee Beach    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(2155,'Sydney - Manly    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(151034,'Thredbo    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(150190,'Whitsundays    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(1136,'Wollongong    ');

	
	aCountryLoc[196][aCountryLoc[196].length]=new Location(3880,'Yungaburra    ');

	aCountryLoc[7]=new Array();
	aCountryLoc[7][aCountryLoc[7].length]=new Location(2607,'Bruges    ');

	
	aCountryLoc[7][aCountryLoc[7].length]=new Location(1046,'Brussels    ');

	
	aCountryLoc[7][aCountryLoc[7].length]=new Location(2785,'Ghent    ');

	
	aCountryLoc[7][aCountryLoc[7].length]=new Location(150940,'Ypres    ');

	aCountryLoc[212]=new Array();
	aCountryLoc[212][aCountryLoc[212].length]=new Location(1138,'Auckland    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(9194,'Bay of Islands    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(1476,'Christchurch    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(1471,'Queenstown    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(1466,'Rotorua    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(1475,'Taupo    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(2374,'Tauranga    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(2451,'Wanaka    ');

	
	aCountryLoc[212][aCountryLoc[212].length]=new Location(1473,'Wellington    ');

	aCountryLoc[235]=new Array();
	aCountryLoc[235][aCountryLoc[235].length]=new Location(1022,'Glasgow    ');

	

		writeForm('<form action=\"http://www.hb-247.com/aff/index.cfm\" method=\"post\" target=\"_top\" name=\"hb247form\" id=\"hb247form\">\n\t<input name=\"affiliate\" type=\"hidden\" value=\"theword\">\n\t<input name=\"fuseaction\" type=\"hidden\" value=\"search\">\n');
		writeForm('<table id=\"hb247outer\">\r\n\t\t\t\t\r\n\t\t\t\t<tr id=\"hb247country\">\r\n\t\t\t\t<td class=\"hb247label\">Country</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<select name=\"country\" class=\"hb247sel\" onChange=\"if(this.selectedIndex>0)loadLocs(this.form);\">\r\n\t\t\t\t<option value=\"0\">- select country -</option>\r\n\t\t\t\t\r\n\t\t\t\t\t<option value=\"196\">Australia</option>\r\n\t\t\t\t\r\n\t\t\t\t\t<option value=\"7\">Belgium</option>\r\n\t\t\t\t\r\n\t\t\t\t\t<option value=\"212\">New Zealand</option>\r\n\t\t\t\t\r\n\t\t\t\t\t<option value=\"235\">Scotland</option>\r\n\t\t\t\t\r\n\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr id=\"hb247city\">\r\n\t\t\t\t<td class=\"hb247label\">City</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<select name=\"loc\" class=\"hb247sel\">\r\n\t\t\t\t<option value=\"0\">- select city -</option>\r\n\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t\r\n\r\n\t\t\t\r\n\t<tr id=\"hb247date\">\r\n\t<td class=\"hb247label\">Arrival</td>\r\n\t<td>\r\n\t\t\r\n\r\n\r\n\t\t\r\n\t\r\n\t<select name=\"day\"\r\n\t  class=\"hb247sel\">\r\n\t\t<option value=\"0\">day</option>\r\n\t\t<option value=\"01\" selected>1</option><option value=\"02\" >2</option><option value=\"03\" >3</option><option value=\"04\" >4</option><option value=\"05\" >5</option><option value=\"06\" >6</option><option value=\"07\" >7</option><option value=\"08\" >8</option><option value=\"09\" >9</option><option value=\"10\" >10</option><option value=\"11\" >11</option><option value=\"12\" >12</option><option value=\"13\" >13</option><option value=\"14\" >14</option><option value=\"15\" >15</option><option value=\"16\" >16</option><option value=\"17\" >17</option><option value=\"18\" >18</option><option value=\"19\" >19</option><option value=\"20\" >20</option><option value=\"21\" >21</option><option value=\"22\" >22</option><option value=\"23\" >23</option><option value=\"24\" >24</option><option value=\"25\" >25</option><option value=\"26\" >26</option><option value=\"27\" >27</option><option value=\"28\" >28</option><option value=\"29\" >29</option><option value=\"30\" >30</option><option value=\"31\" >31</option>\r\n\t</select>\r\n\t\r\n\t\t\r\n\t\t\r\n\t<select name=\"month\" \r\n\t  class=\"hb247sel\">\r\n \t\t<option value=\"0\">month</option>\r\n\t\t<option value=\"01\" >\r\n\t\r\n\tJan</option><option value=\"02\" >\r\n\t\r\n\tFeb</option><option value=\"03\" >\r\n\t\r\n\tMar</option><option value=\"04\" >\r\n\t\r\n\tApr</option><option value=\"05\" >\r\n\t\r\n\tMay</option><option value=\"06\" >\r\n\t\r\n\tJun</option><option value=\"07\" >\r\n\t\r\n\tJul</option><option value=\"08\" selected=\"selected\">\r\n\t\r\n\tAug</option><option value=\"09\" >\r\n\t\r\n\tSep</option><option value=\"10\" >\r\n\t\r\n\tOct</option><option value=\"11\" >\r\n\t\r\n\tNov</option><option value=\"12\" >\r\n\t\r\n\tDec</option>\r\n\t</select>\r\n\t\r\n\t\t\r\n\t\r\n\t<select name=\"year\"\r\n\t  class=\"hb247sel\">\r\n\t\t<option value=\"0\">year</option>\r\n\t\t<option value=\"2010\" selected=\"selected\">2010</option><option value=\"2011\" >2011</option>\r\n\t</select>\r\n\t\r\n\r\n\r\n\t</td>\r\n\t</tr>\r\n\t<tr id=\"hb247nights\">\r\n\t<td class=\"hb247label\">Nights</td>\r\n\t<td>\r\n\t<select name=\"nights\" class=\"hb247sel\">\r\n\t\t<option value=\"0\">- nights -\r\n\t\t<option value=\"1\">1 night\r\n\t\t<option value=\"2\" selected>2 nights\r\n\t\t\r\n\t\t\t<option value=\"3\">3 nights\r\n\t\t\r\n\t\t\t<option value=\"4\">4 nights\r\n\t\t\r\n\t\t\t<option value=\"5\">5 nights\r\n\t\t\r\n\t\t\t<option value=\"6\">6 nights\r\n\t\t\r\n\t\t\t<option value=\"7\">7 nights\r\n\t\t\r\n\t\t\t<option value=\"8\">8 nights\r\n\t\t\r\n\t\t\t<option value=\"9\">9 nights\r\n\t\t\r\n\t\t\t<option value=\"10\">10 nights\r\n\t\t\r\n\t\t\t<option value=\"11\">11 nights\r\n\t\t\r\n\t\t\t<option value=\"12\">12 nights\r\n\t\t\r\n\t\t\t<option value=\"13\">13 nights\r\n\t\t\r\n\t\t\t<option value=\"14\">14 nights\r\n\t\t\r\n\t\t\t<option value=\"15\">15 nights\r\n\t\t\r\n\t\t\t<option value=\"16\">16 nights\r\n\t\t\r\n\t\t\t<option value=\"17\">17 nights\r\n\t\t\r\n\t\t\t<option value=\"18\">18 nights\r\n\t\t\r\n\t\t\t<option value=\"19\">19 nights\r\n\t\t\r\n\t\t\t<option value=\"20\">20 nights\r\n\t\t\r\n\t\t\t<option value=\"21\">21 nights\r\n\t\t\r\n\t\t\t<option value=\"22\">22 nights\r\n\t\t\r\n\t\t\t<option value=\"23\">23 nights\r\n\t\t\r\n\t\t\t<option value=\"24\">24 nights\r\n\t\t\r\n\t\t\t<option value=\"25\">25 nights\r\n\t\t\r\n\t\t\t<option value=\"26\">26 nights\r\n\t\t\r\n\t\t\t<option value=\"27\">27 nights\r\n\t\t\r\n\t\t\t<option value=\"28\">28 nights\r\n\t\t\r\n\t\t\t<option value=\"29\">29 nights\r\n\t\t\r\n\t\t\t<option value=\"30\">30 nights\r\n\t\t\r\n\t\t\t<option value=\"31\">31 nights\r\n\t\t\r\n\t</select>\r\n\t</td>\r\n\t</tr>\r\n\t\r\n\t<tr>\r\n\t<td class=\"hb247label\"></td>\r\n\t<td id=\"hb247submit\">\r\n\t<input type=\"button\"\r\n\t\t\t\tvalue=\"search now\" onClick=\"checkForm(this.form);\" id=\"hb247button\">\r\n\t</td>\r\n\t</tr>\r\n\t\r\n\t</table>\r\n\t');
		writeForm('</form>');
		if(document.getElementById('hb247country'))document.getElementById('hb247country').selectedIndex=0;
		if(document.getElementById('hb247city'))document.getElementById('hb247city').selectedIndex=0;
		
	
