	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).

	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('<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 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!="") {
		if (hotelName != 'hover'){
			tipobj.style.backgroundColor=thecolor
		}
		else {
			tipFormobj.style.backgroundColor=thecolor
		}
	}
	var html
	if (hotelName != 'hover') {
		html = '<table width="190" border="0"><tr><td colspan="2" class="maintext">'
		html = html+'<b>'+hotelName+'</b><br/><b>Rate: </b>'+rate+'<br><b>Arriving: </b>'+dateLong
		html = html+'<br/>'
		html = html+'<img src="/images/space.gif" width="1" height="6" border="0"><br/>'
		html = html+'<img src="/images/ROBE/resPanel/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="xmlRequest" name="xmlRequest" action="/ROBE/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><img src="/images/ROBE/resPanel/Noofnights.gif" width="51" height="10" border="0" alt="departure date"><br>'
		html = html+'<select name="numNights" 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+'<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"><img src="/images/ROBE/resPanel/Rooms.gif" width="35" height="9" border="0" alt="rooms"><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"><img src="/images/ROBE/resPanel/Adults.gif" width="32" height="9" border="0" alt="adults"><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/ROBE/resPanel/Children.gif" width="41" height="9" border="0" alt="children"><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="2"><input type="image" src="/images/ROBE/resPanel/Check-Rates-And-Availability.gif" alt="Check Rates And Availability"></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">close window</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"><center>Click the rate to check availability.</center></td></tr></table>'	
		tipobj.innerHTML=html
		enabletip=true
	}
	return false
	}
	}
	
	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+offsetfromcursorX-offsetdivfrompointerX+"px"
		pointerobj.style.left=curX+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 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=''
	}
	}
	document.domain = "rydges.co.uk"