  var agt = navigator.userAgent.toLowerCase();
  var is_ie     = (agt.indexOf("msie") != -1);

  var ReservationWindow = null;
function reserveRoom(RoomCode) {
  var hotelcode = '1013';
  URL = 'https://www.resontheweb.com/ManageReservationServlet?MakeNewReservation=MakeNewReservation&HotelCode='+hotelcode+'&f206='+RoomCode;
  if (is_ie) {
    txt = typeof(document.parentWindow.top.opener);
    if (txt == "object") {
        ReservationWindow = document.parentWindow.top.opener;
		ReservationFrame = ReservationWindow.top.shMain;
		ReservationFrame.location.replace(URL);
		ReservationWindow.focus();
		window.close();
	} else {
	  txt2 = typeof(top.shMain);
	  if (txt2 == "object") {
		top.shMain.location.replace(URL);
	  }
	}
  } else {
    txt = typeof(opener);
   if ((txt == "object") && (opener != null)) {
        ReservationWindow = opener;
		var ReservationFrame = null;
		if (ReservationWindow.length < 1) {
		  ReservationFrame = ReservationWindow;
		} else {
		  ReservationFrame = ReservationWindow.shMain;
		}
		ReservationFrame.location.replace(URL);
		ReservationWindow.focus();
		window.close();
	} else {
	  txt2 = typeof(top.shMain);
	  if (txt2 == "object") {
		top.shMain.location.replace(URL);
	  }
	}
  } 
}