	var offsetfromcursorX=12 //Customize x offset of tooltip
	var offsetfromcursorY=10 //Customize y offset of tooltip

	var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
	var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

	var html
	var buildDates="";
	var DateName = "startDate"
	var Required = true
	var DateFormat = "DD/MM/YYYY"

	document.write('<div id="dhtmltooltip" class="maintext"></div>') //write out tooltip DIV
	document.write('<div id="dhtmltoolFormtip" class="maintext"></div>') //write out tooltip DIV
	document.write('<div id="emailFormTip" class="maintext"></div>') //write out tooltip DIV
	document.write('<img id="dhtmlpointer" style="visibility:hidden" src="/images/gen/arrowpointer.gif">') //write out pointer image	

	var ie=document.all
	var ns6=document.getElementById && !document.all
	if (!ie) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = positiontip;
	document.onmouseover = getMouseXY
	
	var enabletip=false
	var enableDockedtip=false
	if (ie||ns6)
	var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
	var tipFormobj=document.all? document.all["dhtmltoolFormtip"] : document.getElementById? document.getElementById("dhtmltoolFormtip") : ""
	var emailFormobj=document.all? document.all["emailFormTip"] : document.getElementById? document.getElementById("emailFormTip") : ""
	var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

	function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}

	function ddrivetip(hotelName, hotelCode, roomCode, dateLong, year, month, day, endDate, rate, thewidth, thecolor){
	if (ns6||ie){
	if (typeof thewidth!="undefined") {
		if (hotelName != 'hover'){
			tipobj.style.width=thewidth+"px"
		}
		else {
			tipFormobj.style.width=thewidth+"px"
		}
	}
	if (typeof thecolor!="undefined" && thecolor!="") {
		tipobj.style.backgroundColor=thecolor
		tipFormobj.style.backgroundColor=thecolor
	}
	if (hotelName == 'region') {
		var x = new Date()
		var year = x.getFullYear()
		var month = x.getMonth()+1
		var day = x.getDate()
		var DefaultDate = year+'-'+month+'-'+day	

		if ((year==2006)&&(month<=12)&&(day<15)) {
			month = 12
			day = 15
		}		
		DefaultDate = year+'-'+month+'-'+day		
		html = '<table width="260" border="0"><tr><td colspan="3" class="maintext">'
		html = html+'<b>Destination: </b>'+hotelCode+'<br>'
		html = html+'<img src="/images/space.gif" width="1" height="6" border="0"><br/>'
		html = html+'<img src="/images/28days/BrownLine.gif" width="195" height="1" border="0">'
		html = html+'</td>'
		html = html+'</tr><tr>'
		html = html+'<td align="top" valign="top" colspan="3">'
		html = html+'<form id="xmlRequest" name="xmlRequest" action="http://www.sleepandgo.com.au/bookings/availability.asp" method="get" style="padding:0;margin:0">'
		html = html+'<input type="hidden" name="rat" value="GRPPRO">'	
		html = html+'<table width="70"><tr>'		
		html = html+'<td colspan="3">'
		html = html+'<select name="hotelCode" class="genForm">'
		if (hotelCode == 'Sydney') {
			html = html+'<option value="RNNSYD">Rydges North Sydney</option>'
			html = html+'<option value="RNPARR">Rydges Parramatta</option>'
			html = html+'<option value="RNCAPS">Capitol Square Hotel Sydney</option>'
			html = html+'<option value="RNCRON">Rydges Cronulla Sydney</option>'
			html = html+'<option value="RNBANK">Rydges Bankstown Sydney</option>'
			html = html+'<option value="RNCAMP">Rydges Camperdown Sydney</option>'
		}
		else if (hotelCode == 'Melbourne') {
			html = html+'<option value="RVMELB">Rydges Melbourne</option>'
			html = html+'<option value="RVNMEL">Rydges North Melbourne</option>'
			html = html+'<option value="RVCARL">Rydges Carlton Melbourne</option>'
			html = html+'<option value="RVPRES">Rydges On Bell Preston Melbourne</option>'
		}
		else if (hotelCode == 'Brisbane') {
			html = html+'<option value="RQSOUT">Rydges South Bank Brisbane</option>'
		}		
		else if (hotelCode == 'Canberra') {
			html = html+'<option value="RACANB">Rydges Lakeside Canberra</option>'
			html = html+'<option value="RAEAGL">Rydges Eagle Hawk Resort Canberra</option>'
			html = html+'<option value="RACAPH">Rydges Capital Hill Canberra</option>'
		}
		else if (hotelCode == 'Perth') {
			html = html+'<option value="RWPERT">Rydges Perth</option>'
		}
		else if (hotelCode == 'Adelaide') {
			html = html+'<option value="RSADEL">Rydges South Park Adelaide</option>'
		}		
		else if (hotelCode == 'Hobart') {
			html = html+'<option value="RTHOBA">Rydges Hobart</option>'
		}	
		else if (hotelCode == 'Cairns') {
			html = html+'<option value="RQCAIR">Rydges Plaza Cairns</option>'
			html = html+'<option value="RQESPL">Rydges Esplanade Resort Cairns</option>'
			html = html+'<option value="RQTRAD">Rydges Tradewinds Cairns</option>'
		}
		else if (hotelCode == 'Sunshine Coast') {
			html = html+'<option value="RQOASI">Rydges Oasis Resort Caloundra</option>'
		}
		else if (hotelCode == 'Capricorn Coast') {
			html = html+'<option value="RQCAPR">Rydges Capricorn Resort Yeppoon</option>'
		}
		else if (hotelCode == 'Regional NSW') {
			html = html+'<option value="RQOASI">Rydges Wollongong</option>'
			html = html+'<option value="RQOASI">Rydges Thredbo Alpine Hotel</option>'
			html = html+'<option value="RQOASI">Rydges Port Macquarie</option>'
		}
		else if (hotelCode == 'New Zealand') {
			html = html+'<option value="RZAUCK">Rydges Hotel Auckland</option>'
			html = html+'<option value="RZCHCH">Rydges Christchurch</option>'
			html = html+'<option value="RZROTO">Rydges Rotorua</option>'
			html = html+'<option value="RZQUEE">Rydges Lakeland Resort Queenstown</option>'
			html = html+'<option value="RZPALM">Rydges Palmerstown North</option>'
			html = html+'<option value="RZHAMI">Rydges Le Grand Hamilton</option>'
		}
		else {
			html = html+'<option value="RNCAPS">Capitol Square Hotel Sydney</option>'
		}
		html = html+'</select>'
		html = html+'</td></tr><tr><td colspan="3"><img src="/images/space.gif" width="1" height="5" border="0"></td></tr><tr>'
		html = html+'<td colspan="2"><font color="white">Arriving</font><br>'
		// DATES
		var tmpYear = ""	
		buildDates = ""	
		// Define the current date if it wasn't set already
		if (!CurrentDate) var CurrentDate = new storedMonthObject(DateFormat, Today.getFullYear(), Today.getMonth(), Today.getDate())
		// Handle DefaultDate
		// Creates the calendar object!
		eval(DateName + '_Object=new calendarObject(\'' + DateName + '\',\'' + DateFormat + '\',\'' + DefaultDate + '\')')
		// Determine initial viewable state of day, year, and calendar icon
		if (Required) {
			var InitialStatus = ''
			var InitialDate = eval(DateName + '_Object.picked.formatted')
		}
		else {
			var InitialStatus = ' style="visibility:hidden"'
			var InitialDate = ''
			eval(DateName + '_Object.setPicked(' + Today.getFullYear() + ',' + Today.getMonth() + ',' + Today.getDate() + ')')
		}
		// Create the form elements
		with (document) {
		buildDates = buildDates+'<input type="hidden" name="' + DateName + '" Id="' + DateName + '" value="' + InitialDate + '">'
		// Find this form number
		for (var f=0;f<forms.length;f++) {
			for (var e=0;e<forms[f].elements.length;e++) {
				if (typeof forms[f].elements[e].type == 'string') {
					if ((forms[f].elements[e].type == 'hidden') && (forms[f].elements[e].name == DateName)) {
						eval(DateName + '_Object.formNumber='+f)
						break
					}
				}
			}
		}
		buildDates = buildDates+'<table cellpadding="0" cellspacing="0" border="0"><tr>' + String.fromCharCode(13) + '<td valign="middle">'
		buildDates = buildDates+'<select class="genform" name="' + DateName + '_Month_ID" id="' + DateName + '_Month_ID" onChange="' + DateName + '_Object.changeMonth(this); endDate_Object.changeMonth(this); updateEndDate(\''+DateName+'\')">'
		if (!Required) {
			var NoneSelected = (DefaultDate == '') ? ' selected' : ''
			buildDates = buildDates+'<option value=""' + NoneSelected + '>' + UnselectedMonthText + '</option>'
		}
		for (var i=0;i<12;i++) {
			MonthSelected = ((DefaultDate != '') && (eval(DateName + '_Object.picked.monthIndex') == i)) ? ' selected' : ''			
			if (DateName == 'endDate'){
				if (startDate_Object.picked.dayCount == startDate_Object.picked.day)
					MonthSelected = ((DefaultDate != '') && (eval(DateName + '_Object.picked.monthIndex')  == i)) ? ' selected' : ''
			}
			buildDates = buildDates+'<option value="' + i + '"' + MonthSelected + '>' + MonthNames[i].substr(0,3) + '</option>'
		}
		buildDates = buildDates+'</select>' + String.fromCharCode(13) + '</td><td><img src="/images/space.gif" width="3" height="1" border="0"></td>' + String.fromCharCode(13) + '<td valign="middle">'
		buildDates = buildDates+'<select' + InitialStatus + ' class="genform" name="' + DateName + '_Day_ID" id="' + DateName + '_Day_ID" onChange="' + DateName + '_Object.changeDay(this); updateEndDate(\''+DateName+'\')">'		
		for (var j=1;j<=eval(DateName + '_Object.picked.dayCount');j++) {
			DaySelected = ((DefaultDate != '') && (eval(DateName + '_Object.picked.day') == j)) ? ' selected' : ''
			buildDates = buildDates+'<option' + DaySelected + '>' + j + '</option>'
		}
		buildDates = buildDates+'</select>' + String.fromCharCode(13) + '</td><td><img src="/images/space.gif" width="3" height="1" border="0"></td>' + String.fromCharCode(13) + '<td valign="middle">'
		//Year
		tmpYear = eval(DateName + '_Object.picked.yearPad')
		if ((DateName == 'endDate') && (eval(startDate_Object.picked.monthIndex) == '11') && (eval(startDate_Object.picked.day) == '31')) {
			tmpYear = (eval(startDate_Object.picked.yearPad)*1)+1
		}
		buildDates = buildDates+'<input' + InitialStatus + ' class="genform" type="text" name="' + DateName + '_Year_ID" id="' + DateName + '_Year_ID" size="' + eval(DateName + '_Object.picked.yearPad.length') + '" maxlength="' + eval(DateName + '_Object.picked.yearPad.length') + '" title="Year" value="' + tmpYear + '" onKeyPress="return YearDigitsOnly(window.event)" onKeyUp="' + DateName + '_Object.checkYear(this)" onBlur="' + DateName + '_Object.fixYear(this)">' 
		buildDates = buildDates+'<td><img src="/images/space.gif" width="3" height="1" border="0"></td><td valign="bottom">' + String.fromCharCode(13) + '<br><img src="/images/space.gif" width="1" height="1" border="0">'
		buildDates = buildDates+'<span id="' + DateName + '_ID" style="position:absolute;visibility:hidden;width:' + (CellWidth * 7) + 'px;background-color:' + CalBGColor + ';border:0px solid black;" onMouseOver="' + DateName + '_Object.handleTimer(true)" onMouseOut="' + DateName + '_Object.handleTimer(false)">'
		buildDates = buildDates+'<table width="' + (CellWidth * 7) + '" cellspacing="0" cellpadding="0" border="0">' + String.fromCharCode(13) + '<tr style="background-color:' + TopRowBGColor + ';">'
		buildDates = buildDates+'<td id="' + DateName + '_Previous_ID" style="cursor:default" align="center" bgcolor="#FFFFFF" style="height:' + CellHeight + '" onClick="' + DateName + '_Object.previous.go()" onMouseDown="VirtualButton(this,true)" onMouseUp="VirtualButton(this,false)" onMouseOver="return ' + DateName + '_Object.previous.hover(this,true)" onMouseOut="return ' + DateName + '_Object.previous.hover(this,false)" title="' + eval(DateName + '_Object.previous.monthName') + '"><img src="' + PrevURL + '"></td>'
		buildDates = buildDates+'<td id="' + DateName + '_Current_ID" style="cursor:pointer" align="center" class="genform" style="height:' + CellHeight + '" colspan="5" onClick="' + DateName + '_Object.displayed.goCurrent()" onMouseOver="self.status=\'Click to view ' + CurrentDate.fullName + '\';return true;" onMouseOut="self.status=\'\';return true;" title="Show Current Month"><b>' + eval(DateName + '_Object.displayed.fullName') + '</td>'
		buildDates = buildDates+'<td id="' + DateName + '_Next_ID" style="cursor:default" align="center" bgcolor="#FFFFFF" style="height:' + CellHeight + '" onClick="' + DateName + '_Object.next.go()" onMouseDown="VirtualButton(this,true)" onMouseUp="VirtualButton(this,false)" onMouseOver="return ' + DateName + '_Object.next.hover(this,true)" onMouseOut="return ' + DateName + '_Object.next.hover(this,false)" title="' + eval(DateName + '_Object.next.monthName') + '"><img src="' + NextURL + '"></td></tr>' + String.fromCharCode(13) + '<tr>'
		for (var w=0;w<7;w++) buildDates = buildDates+'<td width="' + CellWidth + '" align="center" class="genform" style="height:' + CellHeight + ';width:' + CellWidth + ';font-weight:bold;">' + WeekDays[w] + '</td>'
		buildDates = buildDates+'</tr>' + String.fromCharCode(13) + '</table>' + String.fromCharCode(13) + '<span id="' + DateName + '_DayTable_ID"></span>' + String.fromCharCode(13) + '</span>' + String.fromCharCode(13) + '</td>' + String.fromCharCode(13) + '</tr>' + String.fromCharCode(13) + '</table>'
		}
		
		//END DATES		
		html = html+buildDates
		html = html+'</td><td><img src="/images/space.gif" width="5" height="1" border="0"><font color="white">N&deg; Nights</font><br>'
		html = html+'<img src="/images/space.gif" width="5" height="1" border="0"><select name="numNights" class="genForm">'
		if (nightCode=='') {
		    html = html+'<option value="5">5</option>'		
		}
		else {
		    html = html+'<option value="1">1</option>'
		    html = html+'<option value="2">2</option>'
		    html = html+'<option value="3">3</option>'
		    html = html+'<option value="4">4</option>'
		    html = html+'<option value="5">5</option>'
		    html = html+'<option value="6">6</option>'
		    html = html+'<option value="7">7</option>'
		    html = html+'<option value="8">8</option>'
		    html = html+'<option value="9">9</option>'
		    html = html+'<option value="10">10</option>'
		    html = html+'<option value="11">11</option>'
		    html = html+'<option value="12">12</option>'
		    html = html+'<option value="13">13</option>'
		    html = html+'<option value="14">14</option>'
		}    
		html = html+'</select>'
		html = html+'</td></tr><tr><td colspan="2"><img src="/images/space.gif" width="1" height="5" border="0"></td></tr><tr>'		
		html = html+'<td valign="top" class="mainText"><br/><font color=white>Rooms</font><br>'		
		html = html+'<select name="numRooms" class="genForm">'
		html = html+'<option value="1">1</option>'
		html = html+'<option value="2">2</option>'
		html = html+'<option value="3">3</option>'
		html = html+'<option value="4">4</option>'
		html = html+'<option value="5">5</option>'
		html = html+'</select></td>'
		html = html+'<td valign="top" class="mainText"><font color="white">Adults</font><br>'
		html = html+'<select name="numAdults" class="genForm">'
		html = html+'<option value="1">1</option>'
		html = html+'<option value="2">2</option>'
		html = html+'<option value="3">3</option>'
		html = html+'<option value="4">4</option>'
		html = html+'<option value="5">5</option>'
		html = html+'<option value="6">6</option>'
		html = html+'</select></td>'
		html = html+'<td valign="top"><img src="/images/space.gif" width="5" height="1" border="0"><font color="white">Children</font><br>'
		html = html+'<img src="/images/space.gif" width="5" height="1" border="0"><select name="numChildren" class="genForm">'
		html = html+'<option value="0" selected >0</option>'
		html = html+'<option value="1">1</option>'
		html = html+'<option value="2">2</option>'
		html = html+'<option value="3">3</option>'
		html = html+'<option value="4">4</option>'
		html = html+'<option value="5">5</option>'
		html = html+'<option value="6">6</option>'
		html = html+'</select></td></tr>'	
		html = html+'<tr>'
		html = html+'<td colspan="3"><img src="/images/space.gif" width="1" height="6" border="0"></td>'
		html = html+'</tr>'
		html = html+'<tr>'		
		html = html+'<td colspan="3"><input type="button" onclick="js_submit_1();" id="searchButton" value="Search" onclick="this.disabled=true;this.value=\'Please Wait...\';document.xmlRequest.submit();" /></td>'	
		html = html+'</tr>'
		html = html+'<tr>'
		html = html+'<td colspan="3"><img src="/images/space.gif" width="1" height="3" border="0"></td>'
		html = html+'</tr>'
		html = html+'<tr>'
		html = html+'<td colspan="3" class="maintext"><a href="Javascript:hideDockedddrivetip()" class="brownlink">close window</a></td>'
		html = html+'</tr>'				
		html = html+'</table></form></td>'	
		html = html+'</tr></table>'
		tipFormobj.innerHTML=html
		enabletip=false
		enableDockedtip=true
	}
	else if (hotelName=='sold'){
		html='<table width="210"><tr><td class="maintext" valign="center" bgcolor="#EF5C19"><center><font color="white">Unfortunately we do not have any rooms available on this day - please choose another date.</font></center></td></tr></table>'	
		tipobj.innerHTML=html
		enabletip=true
	}
	else if (hotelName != 'hover') {
		html = '<table width="190" border="0" bgcolor="#EF5C19"><tr><td colspan="2" class="maintext">'
		html = html+'<b><font color=white>'+hotelName+'</b><br/><b>Rate: </b>'+rate+'<br><b>Arriving: </b>'+dateLong + '</font>'
		html = html+'<br/>'
		html = html+'<img src="/images/space.gif" width="1" height="6" border="0"><br/>'
		html = html+'<img src="/images/28days/BrownLine.gif" width="180" height="1" border="0">'
		html = html+'</td>'
		html = html+'</tr><tr>'
		html = html+'<td align="top" valign="top" colspan="2">'

		html = html+'<form id="xmlRequestHotel" name="xmlRequestHotel" action="http://www.sleepandgo.com.au/bookings/availability.asp" method="get" style="padding:0;margin:0">'
		html = html+'<input type="hidden" name="hotelCode" value="'+hotelCode+'">'	
		html = html+'<input type="hidden" name="startDate" value="'+year+'-'+month+'-'+day+'">'
		html = html+'<input type="hidden" name="startDate_Month_ID" value="'+month+'">'
		html = html+'<input type="hidden" name="startDate_Day_ID" value="'+day+'">'
		html = html+'<input type="hidden" name="startDate_Year_ID" value="'+year+'">'		
		html = html+'<table width="70"><tr>'
		html = html+'<td class="mainText"><font color="white">N&deg; Nights</font><br>'
		html = html+'<select name="numNights" class="genForm">'

		if (roomCode=='') {
		    html = html+'<option value="5">5</option>'		
		    html = html+'<option value="6">6</option>'
		    html = html+'<option value="7">7</option>'
		    html = html+'<option value="8">8</option>'
		    html = html+'<option value="9">9</option>'
		    html = html+'<option value="10">10</option>'
		    html = html+'<option value="11">11</option>'
		    html = html+'<option value="12">12</option>'
		    html = html+'<option value="13">13</option>'
		    html = html+'<option value="14">14</option>'		    
		}
		else {
		    html = html+'<option value="1">1</option>'
		    html = html+'<option value="2">2</option>'
		    html = html+'<option value="3">3</option>'
		    html = html+'<option value="4">4</option>'
		    html = html+'<option value="5">5</option>'
		    html = html+'<option value="6">6</option>'
		    html = html+'<option value="7">7</option>'
		    html = html+'<option value="8">8</option>'
		    html = html+'<option value="9">9</option>'
		    html = html+'<option value="10">10</option>'
		    html = html+'<option value="11">11</option>'
		    html = html+'<option value="12">12</option>'
		    html = html+'<option value="13">13</option>'
		    html = html+'<option value="14">14</option>'
		} 
		html = html+'</select>'	
		html = html+'</td>'
		html = html+'<td valign="top" class="mainText"><br/><font color=white>Rooms</font><br>'		
		html = html+'<select name="numRooms" class="genForm">'
		html = html+'<option value="1">1</option>'
		html = html+'<option value="2">2</option>'
		html = html+'<option value="3">3</option>'
		html = html+'<option value="4">4</option>'
		html = html+'<option value="5">5</option>'
		html = html+'</select></td>'
		html = html+'</tr>'
		html = html+'<tr><td colspan="2"><img src="/images/space.gif" width="1" height="5" border="0"></td></tr>'
		html = html+'<tr>'
		html = html+'<td valign="top" class="mainText"><font color="white">Adults</font><br>'
		html = html+'<select name="numAdults" class="genForm">'
		html = html+'<option value="1">1</option>'
		html = html+'<option value="2">2</option>'
		html = html+'<option value="3">3</option>'
		html = html+'<option value="4">4</option>'
		html = html+'<option value="5">5</option>'
		html = html+'<option value="6">6</option>'
		html = html+'</select></td>'
		html = html+'<td valign="top" class="mainText"><font color="white">Children</font><br>'
		html = html+'<select name="numChildren" class="genForm">'
		html = html+'<option value="0" selected >0</option>'
		html = html+'<option value="1">1</option>'
		html = html+'<option value="2">2</option>'
		html = html+'<option value="3">3</option>'
		html = html+'<option value="4">4</option>'
		html = html+'<option value="5">5</option>'
		html = html+'<option value="6">6</option>'
		html = html+'</select></td></tr>'	
		html = html+'<tr>'
		html = html+'<td colspan="2"><img src="/images/space.gif" width="1" height="6" border="0"></td>'
		html = html+'</tr>'
		html = html+'<tr>'		
		html = html+'<td colspan="3"><a href="javascript:js_submit_2()"><input type="button" id="searchButton" value="Search" onclick="this.disabled=true;this.value=\'Please Wait...\';document.getElementById(\'xmlRequestHotel\').submit();" /></a></td>'	
		html = html+'</tr>'
		html = html+'<tr>'
		html = html+'<td colspan="2"><img src="/images/space.gif" width="1" height="3" border="0"></td>'
		html = html+'</tr>'
		html = html+'<tr>'
		html = html+'<td colspan="2" class="maintext"><a href="Javascript:hideDockedddrivetip()" class="brownlink"><font color=white>close window</font></a></td>'
		html = html+'</tr>'				
		html = html+'</table></form></td>'	
		html = html+'</tr></table>'
		tipFormobj.innerHTML=html
		enabletip=false
		enableDockedtip=true
	}
	else {
		html='<table width="210"><tr><td class="maintext" valign="center" bgcolor="#EF5C19"><center><font color="white">Click the rate to check availability.</font></center></td></tr></table>'	
		tipobj.innerHTML=html
		enabletip=true
	}
	return false
	}
	}
	
	function showHover(bgColor) {	
   		tipobj.style.backgroundColor=bgColor
		html='<table width="210"><tr><td class="maintext" valign="center"><center>Click the rate to check availability.</center></td></tr></table>'
		tipobj.innerHTML=html
		enabletip=true
	}	
	
	var tempX
	var tempY
	
	function getMouseXY(e) {
		if (ie) { // grab the x-y pos.s if browser is IE
			tempX = event.clientX + document.body.scrollLeft
			tempY = event.clientY + document.body.scrollTop
		} else {  // grab the x-y pos.s if browser is NS
			tempX = e.pageX
			tempY = e.pageY
		} 	
	}
	function positionForm(x,y){
		var nondefaultpos=false	
		var curX=x//(ns6)?x : x+ietruebody().scrollLeft;
		var curY=y//(ns6)?y : y+ietruebody().scrollTop;
		//Find out how close the mouse is to the corner of the window
		var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
		var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

		var rightedge=ie&&!window.opera? winwidth-x-offsetfromcursorX : winwidth-x-offsetfromcursorX
		var bottomedge=ie&&!window.opera? winheight-y-offsetfromcursorY : winheight-y-offsetfromcursorY

		var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

		//if the horizontal distance isn't enough to accomodate the width of the context menu
		if (rightedge<tipFormobj.offsetWidth){
		//move the horizontal position of the menu to the left by it's width
		tipFormobj.style.left=curX-tipFormobj.offsetWidth+"px"
		nondefaultpos=true
		}
		else if (curX<leftedge)
		tipFormobj.style.left="5px"
		else{
		//position the horizontal position of the menu where the mouse is positioned
		tipFormobj.style.left=curX+30+offsetfromcursorX-offsetdivfrompointerX+"px"
		pointerobj.style.left=curX+30+offsetfromcursorX+"px"
		}

		//same concept with the vertical position
		if (bottomedge<tipobj.offsetHeight){
		tipFormobj.style.top=curY-10-tipFormobj.offsetHeight-offsetfromcursorY+"px"
		nondefaultpos=true
		}
		else{
		tipFormobj.style.top=curY-10+offsetfromcursorY+offsetdivfrompointerY+"px"
		pointerobj.style.top=curY+offsetfromcursorY+"px"
		}
		//pointerobj.style.visibility="visible"
		tipFormobj.style.visibility="visible"	
	}

	function positiontip(e){
		if (enabletip && enableDockedtip == false){
			var nondefaultpos=false
			var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
			var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
			//Find out how close the mouse is to the corner of the window
			var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
			var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

			var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
			var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

			var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

			//if the horizontal distance isn't enough to accomodate the width of the context menu
			if (rightedge<tipobj.offsetWidth){
			//move the horizontal position of the menu to the left by it's width
			tipobj.style.left=curX-tipobj.offsetWidth+"px"
			nondefaultpos=true
			}
			else if (curX<leftedge)
			tipobj.style.left="5px"
			else{
			//position the horizontal position of the menu where the mouse is positioned
			tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
			pointerobj.style.left=curX+offsetfromcursorX+"px"
			}

			//same concept with the vertical position
			if (bottomedge<tipobj.offsetHeight){
			tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
			nondefaultpos=true
			}
			else{
			tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
			pointerobj.style.top=curY+1+offsetfromcursorY+"px"
			}
			tipobj.style.visibility="visible"
			if (!nondefaultpos)
			pointerobj.style.visibility="visible"
			else
			pointerobj.style.visibility="hidden"
		}
	}
	
	function positionEmailForm(x,y){
		var nondefaultpos=false	
		var curX=x//(ns6)?x : x+ietruebody().scrollLeft;
		var curY=y//(ns6)?y : y+ietruebody().scrollTop;
		//Find out how close the mouse is to the corner of the window
		var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
		var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

		var rightedge=ie&&!window.opera? winwidth-x-offsetfromcursorX : winwidth-x-offsetfromcursorX
		var bottomedge=ie&&!window.opera? winheight-y-offsetfromcursorY : winheight-y-offsetfromcursorY

		var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

		//if the horizontal distance isn't enough to accomodate the width of the context menu
		if (rightedge<emailFormobj.offsetWidth){
		//move the horizontal position of the menu to the left by it's width
		emailFormobj.style.left=curX-emailFormobj.offsetWidth+"px"
		nondefaultpos=true
		}
		else if (curX<leftedge)
		emailFormobj.style.left="5px"
		else{
		//position the horizontal position of the menu where the mouse is positioned
		emailFormobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
		pointerobj.style.left=curX+offsetfromcursorX+"px"
		}

		//same concept with the vertical position
		if (bottomedge<tipobj.offsetHeight){
		emailFormobj.style.top=curY+10-emailFormobj.offsetHeight-offsetfromcursorY+"px"
		nondefaultpos=true
		}
		else{
		emailFormobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
		pointerobj.style.top=curY+1+offsetfromcursorY+"px"
		}
		emailFormobj.style.visibility="visible"	
		pointerobj.style.visibility="visible"
	}	
	
	function hideDockedddrivetip(){
	if (ns6||ie){
	enableDockedtip=false
	tipFormobj.style.visibility="hidden"
	pointerobj.style.visibility="hidden"
	tipFormobj.style.left="-1000px"
	tipFormobj.style.backgroundColor=''
	tipFormobj.style.width=''
	}
	}	

	function hideddrivetip(){
	if (ns6||ie){
	enabletip=false
	tipobj.style.visibility="hidden"
	pointerobj.style.visibility="hidden"
	tipobj.style.left="-1000px"
	tipobj.style.backgroundColor=''
	tipobj.style.width=''
	}
	}
	
	function hideEmailForm(){
	if (ns6||ie){
	enabletip=false
	emailFormobj.style.visibility="hidden"
	pointerobj.style.visibility="hidden"
	emailFormobj.style.left="-1000px"
	emailFormobj.style.backgroundColor=''
	emailFormobj.style.width=''
	}
	}		
	
	function showEmailForm(){
		hideEmailForm()
		if (ns6||ie){
			if (typeof thewidth!="undefined") {
				emailFormobj.style.width=thewidth+"px"
			}
			if (typeof thecolor!="undefined" && thecolor!="") {
				emailFormobj.style.backgroundColor=thecolor
			}
			var html = ''
			html = html + "<form name='frmSendEmail' action='' method='post'>"
				html = html + "<table>"
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "<b>Email this article to:</b><br/>"
							html = html + "<img src='/images/28days/BrownLine.gif' width='180' height='1' border='0'>"
						html = html + "</td>"
					html = html + "</tr>"
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "Friend\'s Name:<br/>"
							html = html + "<input type='text' id='friendName' size='25' class='genform'>"
						html = html + "</td>"
					html = html + "</tr>"
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "Friend\'s Email:<br/>"
							html = html + "<input type='text' id='friendEmail' size='25' class='genform'>"
						html = html + "</td>"
					html = html + "</tr>"
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "Your Name:<br/>"
							html = html + "<input type='text' id='yourName' size='25' class='genform'>"
						html = html + "</td>"
					html = html + "</tr>"
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "Your Email:<br/>"
							html = html + "<input type='text' id='yourEmail' size='25' class='genform'>"
						html = html + "</td>"
					html = html + "</tr>"
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "Message/Comments:<br/>"
							html = html + "<textarea cols='22' rows='3' class='genform' id='comments'></textarea>"
						html = html + "</td>"
					html = html + "</tr>"
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "<a onclick='sendMail()'><image src='/images/buttons/submitdetails.gif' alt='Email Your Friend Now'></a>"
						html = html + "</td>"
					html = html + "</tr>"					
					html = html + "<tr>"
						html = html + "<td class='maintext'>"
							html = html + "<a href='Javascript:hideEmailForm()' class='brownlink'>close window</a>"
						html = html + "</td>"
					html = html + "</tr>"
				html = html + "</table>"
			html = html + "</form>"	
			emailFormobj.innerHTML=html
			enabletip=false
			enableDockedtip=true
			return false
		}
	}	
	
	
	//AJAX CODE
	var xmlHttp;
	var requestURL = 'http://www.rydges.com/locations-asp/sendMail.asp';
	var is_ie = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0; 
	var is_ie5 = (navigator.appVersion.indexOf("MSIE 5.5")!=-1) ? 1 : 0; 
	var is_opera = ((navigator.userAgent.indexOf("Opera6")!=-1)||(navigator.userAgent.indexOf("Opera/6")!=-1)) ? 1 : 0; 
	var is_netscape = (navigator.userAgent.indexOf('Netscape') >= 0) ? 1 : 0; 
	var folder_array;
	var count;
	var image;
	var htmlBuild = "";

	function sendMail(){						
		var url;
		var error = false;
		var link = window.location.href;
		link = link.replace(".htm","")
		if (document.getElementById) {
			url = requestURL + '?friendName=' + document.getElementById('friendName').value + '&friendEmail=' + document.getElementById('friendEmail').value +'&yourName=' + document.getElementById('yourName').value + '&yourEmail=' + document.getElementById('yourEmail').value + '&comments=' + document.getElementById('comments').value + '&link=' + link;
			if ((document.getElementById('friendName').value == '') || (document.getElementById('friendEmail').value == '') || (document.getElementById('yourName').value == '') || (document.getElementById('yourEmail').value == ''))
				error =  true;
		} else if (document.all) {
			url = requestURL + '?friendName=' + document.all["friendName"].value + '&friendEmail=' + document.all["friendEmail"].value +'&yourName=' + document.all["yourName"].value + '&yourEmail=' + document.all["yourEmail"].value + '&comments=' + document.all["comments"].value + '&link=' + link;		
			if ((document.all["friendName"].value == '') || (document.all["friendEmail"].value == '') || (document.all["yourName"].value == '') || (document.all["yourEmail"].value == ''))
				error =  true;
		} else if (document.layers) {
			url = requestURL + '?friendName=' + document.layers["friendName"].value + '&friendEmail=' + document.layers["friendEmail"].value +'&yourName=' + document.layers["yourName"].value + '&yourEmail=' + document.layers["yourEmail"].value + '&comments=' + document.layers["comments"].value + '&link=' + link;
			if ((document.layers["friendName"].value == '') || (document.layers["friendEmail"].value == '') || (document.layers["yourName"].value == '') || (document.layers["yourEmail"].value == ''))
				error =  true;			
		}
		
		if (!error) {
			xmlHttp = GetXmlHttpObject(stateChangeHandler);
			xmlHttp_Get(xmlHttp, url);			
		} else {
			alert('Please complete all the fields.');
		}
	}

	function stateChangeHandler()
	{
		var oDiv = null;		
		if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete'){
			//var str = xmlHttp.responseText;
			var str = "<table><tr><td class='maintext'><b>Thank you.</b> Your email has been sent.<br/><a href='Javascript:hideEmailForm()' class='brownlink'>close window</a></td></tr></table>"
			emailFormobj.style.width = "250px";
			emailFormobj.innerHTML = str;
		}
	}

	function xmlHttp_Get(xmlhttp, url) {
		xmlhttp.open('GET', url, true);
		xmlhttp.send(null);
	} 

	function GetXmlHttpObject(handler) { 
		var objXmlHttp = null;   
		if (is_ie){
			var strObjName = (is_ie5) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP';
			try{ 
				objXmlHttp = new ActiveXObject(strObjName);
				objXmlHttp.onreadystatechange = handler;
			}
			catch(e){
				alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled');
				return;
			}
		}
		else if (is_opera){ 
			alert('Opera detected. The page may not behave as expected.'); 
			return;
		}
		else{
			objXmlHttp = new XMLHttpRequest(); 
			objXmlHttp.onload = handler; 
			objXmlHttp.onerror = handler; 
		}
		return objXmlHttp;
	}		

	function js_submit_1(){
		alert('');
		hideDockedddrivetip();
		document.xmlRequest.submit();
	}
	
	function js_submit_2(){
		hideDockedddrivetip();
		document.xmlRequestHotel.submit();
	}
