document.writeln("<form id='RemoteSearchWidget' name='RemoteSearchWidget' method='POST' onsubmit='javascript:return ValidateSearch()' action='http://www.groople.com/hotels/default.aspx' style='border: solid 2px #426494; width: 210px; height: 395px; background-color: #F4F4FF; font-family: Verdana, Arial; font-size: 11px; display: block; white-space: nowrap;text-align: left;'>");
document.writeln("<table cellpadding='0' cellspacing='0' width='100%' height='100%' border='0'>");
document.writeln("<tr><td style='white-space: normal; text-align: left; padding-left: 7px; color: #426494; font-size: 22px; '>Rest easy &#150;<br/> you will find great group hotel rates</td></tr>");
document.writeln("<tr><td style='padding-left: 7px; font-size: 11px;'><label id='ValSum' name='ValSum' style='color:Red;display:none;'>Oops! Please correct the fields below.<br/></label>Location<br/><input id='txtDest' name='txtDest' style='width: 170px;' value='city, landmark, or airport' onclick='javascript:select();'  onchange='javascript:ClearValidation(txtDest, rfvtxtDest);' /><span id='rfvtxtDest' name='rfvtxtDest' style='color:Red;display:none;'>*</span></td></tr>");
document.writeln("<tr><td style='padding-left: 7px;'>");
document.writeln("<table cellpadding='0' cellspacing='0' style='width: 100%;'>");
document.writeln("<tr><td style='font-size: 11px;'>Check-in</td></tr><tr><td>");
document.writeln("<input name='dcCheckin' id='dcCheckin' value='mm/dd/yyyy' type='text' style='width:80px;' maxlength='10' onclick='javascript:select();' onchange='javascript:ClearValidation(dcCheckin, rfvdcCheckin);' />");
document.writeln("<a name='dcCheckinImg' id='dcCheckinImg'  >");
document.writeln("<img src='http://www.groople.com/images/calendar.gif' border='0' />");
document.writeln("</a>");
document.writeln("<span id='rfvdcCheckin' name='rfvdcCheckin' style='color:Red;display:none;'>*</span>");
document.writeln("<DIV id='dcCheckin_CalendarPopup' style='VISIBILITY: hidden; POSITION: absolute; BACKGROUND-COLOR: white; z-index: 9999;'></DIV>");
document.writeln("<br/><br/></td></tr>");
document.writeln("<tr><td style='font-size: 11px;'>Check-out</td></tr><tr><td>");
document.writeln("<input name='dcCheckout' id='dcCheckout' value='mm/dd/yyyy' type='text' style='width:80px;' maxlength='10' onclick='javascript:select();' onchange='javascript:ClearValidation(dcCheckout, rfvdcCheckout);' />");
document.writeln("<a name='dcCheckoutImg' id='dcCheckoutImg' >");
document.writeln("<img src='http://www.groople.com/images/calendar.gif' border='0' />");
document.writeln("</a>");
document.writeln("<span id='rfvdcCheckout' name='rfvdcCheckout'  style='color:Red;display:none;'>*</span>");
document.writeln("<DIV id='dcCheckout_CalendarPopup' style='VISIBILITY: hidden; POSITION: absolute; BACKGROUND-COLOR: white; z-index: 9999;'></DIV>");
document.writeln("</td></tr>");
document.writeln("</table></td></tr>");
document.writeln("<tr><td style='padding-left: 7px'>");
document.writeln("<table cellpadding='0' cellspacing='0' style='width: 100%;'>");
document.writeln("<tr><td style='width: 60px; white-space: nowrap; display: block; font-size: 11px;'># Rooms</td></tr>");
document.writeln("<tr><td><input name='txtRooms' id='txtRooms' style='width: 50px;' value='' onclick='javascript:select();'  onchange='javascript:ClearValidation(txtRooms, rfvtxtRooms);' /><span id='rfvtxtRooms' name='rfvtxtRooms' style='color:Red;display:none;'>*</span></td>");
document.writeln("</tr>");
document.writeln("<tr><td colspan='2' style='font-size: 9px;'><br/></td></tr>");
document.writeln("<tr><td style='font-size: 11px;'>Group Type</td></tr>");
document.writeln("<tr><td><select name='ddlGroupType' id='ddlGroupType' ><option value='(Please Select)' selected='selected'>(Please Select)</option><option value='Class Reunions'>Class Reunions</option><option value='Conventions/Meetings'>Conventions/Meetings</option><option value='Corporate Incentives'>Corporate Incentives</option><option value='Family Reunions'>Family Reunions</option><option value='Family Vacations'>Family Vacations</option><option value='Friends Getaways'>Friends Getaways</option><option value='Gatherings/Celebrations'>Gatherings/Celebrations</option><option value='Luxury Vacations'>Luxury Vacations</option><option value='Religious Events'>Religious Events</option><option value='Senior Travel Group'>Senior Travel Group</option><option value='Sport Team Travel Group'>Sport Team Travel Group</option><option value='Student/Youth Groups'>Student/Youth Groups</option><option value='Weddings'>Weddings</option><option value='Other'>Other</option></select></td></tr>");
document.writeln("</table>");
document.writeln("</td></tr>");
document.writeln("<tr><td style='text-align: center; width: 100%; margin-left: 0px;'>");
document.writeln("<input id='btnSubmit' type='submit' value='Search Hotels' onclick='javascript:BuildQueryString();' style='font-family: Verdana, Arial; background-color: #EE8A23; color: #FFFFFF; text-transform: uppercase; font-weight: bold;' />");
document.writeln("</td></tr>");
document.writeln("</table>");
document.writeln("<script type='text/javascript'>");
document.writeln("var ValSum = document.getElementById('ValSum');");
document.writeln("var Destination = document.getElementById('txtDest');");
document.writeln("var Rooms = document.getElementById('txtRooms');");
document.writeln("var GroupType = document.getElementById('ddlGroupType');");
document.writeln("var Checkin = document.getElementById('dcCheckin');");
document.writeln("var Checkout = document.getElementById('dcCheckout');");
document.writeln("var rfvtxtDest = document.getElementById('rfvtxtDest');");
document.writeln("var rfvdcCheckin = document.getElementById('rfvdcCheckin');");
document.writeln("var rfvdcCheckout = document.getElementById('rfvdcCheckout');");
document.writeln("var rfvtxtRooms = document.getElementById('rfvtxtRooms');");
document.writeln("var rswError = 0;");
document.writeln("function ValidateSearch()");
document.writeln("{");
document.writeln("  if (Destination.value == '' || Destination.value == 'city, landmark, or airport') ");
document.writeln("  { ValSum.style.display = 'inline'; rfvtxtDest.style.display = 'inline'; rswError = 1; }");
document.writeln("  if (Checkin.value == '' || Checkin.value == 'mm/dd/yyyy') ");
document.writeln("  { ValSum.style.display = 'inline'; rfvdcCheckin.style.display = 'inline'; rswError = 1; }");
document.writeln("  if (Checkout.value == '' || Checkout.value == 'mm/dd/yyyy') ");
document.writeln("  { ValSum.style.display = 'inline'; rfvdcCheckout.style.display = 'inline'; rswError = 1; }");
document.writeln("  if (Rooms.value == '' || Rooms.value == '0') ");
document.writeln("  { ValSum.style.display = 'inline'; rfvtxtRooms.style.display = 'inline'; rswError = 1; }");
document.writeln("  if (rswError == 1) {");
document.writeln("     return false; }");
document.writeln("  else { ");
document.writeln("     return true;");
document.writeln("  }");
document.writeln("}");
document.writeln("function ClearValidation(sender,rfv)");
document.writeln("{");
document.writeln("  if (sender.value != '' && sender.value != 'city, landmark, or airport' && sender.value != 'mm/dd/yyyy' && sender.value != '0') ");
document.writeln("  { ValSum.style.display = 'none'; rfv.style.display = 'none'; rswError = 0; }");
document.writeln("}");
document.writeln("function BuildQueryString()");
document.writeln("{");
document.writeln("  var sQuery = '';");
document.writeln("  sQuery += 'CoBrandID=66&'; ");
document.writeln("  if (typeof(Destination) != 'undefined' && Destination != null && Destination.value != '' && Destination.value != 'city, landmark, or airport')");
document.writeln("  { sQuery += 'City=' + Destination.value + '&'; }");
document.writeln("  if (typeof(Checkin) != 'undefined' && Checkin != null && Checkin.value != '' && Checkin.value != 'mm/dd/yyyy')");
document.writeln("  { sQuery += 'Checkin=' + Checkin.value + '&'; }");
document.writeln("  if (typeof(Checkout) != 'undefined' && Checkout != null && Checkout.value != '' && Checkout.value != 'mm/dd/yyyy')");
document.writeln("  { sQuery += 'Checkout=' + Checkout.value + '&'; }");
document.writeln("  if (typeof(Rooms) != 'undefined' && Rooms != null && Rooms.value != '')");
document.writeln("  { sQuery += 'Rooms=' + Rooms.value + '&'; }");
document.writeln("  if (typeof(GroupType) != 'undefined' && GroupType != null && GroupType.value != '' && GroupType.value != '(Please Select)')");
document.writeln("  { sQuery += 'GroupType=' + GroupType.value + '&'; }");
document.writeln("  sQuery += 'SourceID=HAA&'; ");
document.writeln("  sQuery += 'Keyword=denvertripplanner.com&'; ");
document.writeln("  if (sQuery != '')");
document.writeln("  { sQuery = '?' + sQuery; }");
document.writeln("  document.forms['RemoteSearchWidget'].action = 'http://www.groople.com/HAA/hotels/HotelSearchResults.aspx' + sQuery;");
document.writeln("  document.forms['RemoteSearchWidget'].target = '_blank';");
document.writeln("}");
document.writeln(" var dcCheckin_CalendarPopup = new CalendarPopup('dcCheckin_CalendarPopup');");
document.writeln(" var dcCheckout_CalendarPopup = new CalendarPopup('dcCheckout_CalendarPopup');");
document.writeln(" dcCheckin_CalendarPopup.addDisabledDates('11/25/2008', '11/20/2009');");
document.writeln(" dcCheckout_CalendarPopup.addDisabledDates('11/25/2008', '11/20/2009');");
document.writeln(" dcCheckin_CalendarPopup.RemoteImgPath = 'http://www.groople.com';");
document.writeln(" dcCheckout_CalendarPopup.RemoteImgPath = 'http://www.groople.com';");
document.writeln(" document.write(getCalendarStyles());");
document.writeln(" var CheckinImg = document.getElementById('dcCheckinImg');");
document.writeln(" var CheckoutImg = document.getElementById('dcCheckoutImg');");
document.writeln("  if (typeof(CheckinImg) != 'undefined' && CheckinImg != null)");
document.writeln("  { ");
document.writeln("     CheckinImg.href = \x22javascript:dcCheckin_CalendarPopup.select(document.getElementById(\'dcCheckin\'), \'dcCheckin\', \'M/d/yyyy\');\x22; ");
document.writeln("  } ");
document.writeln("  if (typeof(CheckoutImg) != 'undefined' && CheckoutImg != null)");
document.writeln("  { ");
document.writeln("     CheckoutImg.href = \x22javascript:dcCheckout_CalendarPopup.select(document.getElementById(\'dcCheckout\'), \'dcCheckout\', \'M/d/yyyy\');\x22; ");
document.writeln("  } ");
document.writeln("</script>");
document.writeln("</form>");
