   

if (window.taValidate == undefined) {
   window.taOnLoad   = window.onload;
   window.taValList  = Array();
   window.taValIndex = 0;
   window.taValidate = function () {
      if (window.taOnLoad != null) {
         try {
         window.taOnLoad();
         } catch (err) { }
      }
      for (ii = 0; ii < window.taValIndex; ii=ii+1) {
         fname = window.taValList[ii]
         fname();
      }
   }
   window.taAddValidator = function (fname) {
      window.taValList[window.taValIndex] = fname;
      window.taValIndex                   = window.taValIndex + 1;
      }
   window.onload = window.taValidate
}
window.taAddValidator (injectcdsdmo1229)

                  if(document.createStyleSheet) {
        document.createStyleSheet("http://cdn.tripadvisor.com/css2/widget/cdswidDMO-v4154800712a.css");
      } else {
        var stylesImport = "@import url(' http://cdn.tripadvisor.com/css2/widget/cdswidDMO-v4154800712a.css ');";
        var newSS=document.createElement('link');
        newSS.rel='stylesheet';
        newSS.href='data:text/css,'+escape(stylesImport);
        if (document.getElementsByTagName("head")[0]) {
            document.getElementsByTagName("head")[0].appendChild(newSS);
        } else {             document.write('<link rel="stylesheet" href="data:text/css,' + escape(stylesImport) + '"/>');
        }
      }
        
      var newJs = document.createElement('script');
    newJs.setAttribute('type', 'text/javascript');
    newJs.setAttribute('src', 'http://cdn.tripadvisor.com/js2/widget/CdsWidgets-v4258900417a.js');
    document.getElementsByTagName("head")[0].appendChild(newJs);
  
function injectcdsdmo1229() {
    var container = document.getElementById('TA_cdsdmo865');
  if (container == null) {
        var scriptTags = document.getElementsByTagName("script");
    for (var i=0; i<scriptTags.length; i++)
    {
      if (scriptTags[i] != null && scriptTags[i].src != null &&
          scriptTags[i].src.indexOf("cdsdmo?uniq=865") >= 0)
      {
        var msgElem = document.createElement('div');
        if (msgElem != null && msgElem != 'undefined')
        {
          msgElem.style.margin='8px';
          msgElem.style.color='red';
          msgElem.innerHTML="Please check the TripAdvisor code and install again.";
          var parentElem = scriptTags[i].parentNode;
          if (parentElem != null && parentElem != 'undefined')
          {
            parentElem.appendChild(msgElem);
          }
          break;
        }
      }
    }
    return;
  }

    var validityRegEx = new RegExp('https?://([^/]+\.|)tripadvisor\.(com|co\.uk|fr|it|es|de|ie|in|jp|se|ca|com\.br)/.*');
  var taServerName = 'tripadvisor';
   var valid = true;
  var linksNum = 0;
      var links = container.getElementsByTagName("a");
    for (var i=0; i<links.length; i++) {
    var taLink = links[i];
    var taLinkStr = taLink.href;
    if (taLinkStr.indexOf(taServerName) != -1) {
      linksNum = linksNum + 1;
      if (typeof(taLink.rel) != 'undefined' && taLink.rel == 'nofollow') {
        valid = false;
        continue;
      }
            if (!taLinkStr.match(validityRegEx)) {
        valid = false;
        continue;
      }
    }
  }
  if (linksNum == 0) {
    valid = false;
  }
  if (!valid) {
    var tmpStr = '<dl><dt>' + "Please check the TripAdvisor code and install again." + '</dt></dl>';
    container.innerHTML = tmpStr;
  } else {
    container.innerHTML = '<div id="CDSWIDDMO" class="widDMO"> '+
'<div class="widDMOCnrs"> '+
'<span class="widDMOCnrLft"><!--/--></span><span class="widDMOCnrRgt"><!--\--></span> '+
'</div><!--/ cdsCnrs--> '+
'<div class="widDMOData"> '+
'<div class="widDMOBranding"> '+
'<dl> '+
'<dt> <img src="http://www.tripadvisor.com/img/cdsi/img2/sprites/cdsWdgtV1-11324-2.gif" alt="TripAdvisor"></dt> '+
'<dd><a target="_blank" href="http://www.tripadvisor.com/Tourism-g29354-Amana_Iowa-Vacations.html">Amana vacation</a> advice from real travelers</dd> </dl> '+
'</div><!--/ cdsBranding--> '+
'<dl class="widDMOComponent"> '+
'<dt class="widDMOH18">Real Traveler Photos</dt> <dd class="widDMOPhotos"> '+
'<table><tr><td><img id="photoImage865" src="http://cdn.tripadvisor.com/cds/media/photo-f/01/42/09/89/front-of-b-b.jpg" alt="Photo of Amana"></td></tr></table> '+
'<div class="widDMOGUI"><a onclick="changePhoto(-1,\'865\',0,\'[http://cdn.tripadvisor.com/cds/media/photo-f/01/42/09/89/front-of-b-b.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/73/out-side-the-hotel.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4f/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4e/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4d/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4c/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4b/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4a/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/47/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/2d/61/2f/amana.jpg]\')">&#xab;&#xa0;previous</a>&#xa0;&#xa0;|&#xa0;&#xa0;<a onclick="changePhoto(1,\'865\',0,\'[http://cdn.tripadvisor.com/cds/media/photo-f/01/42/09/89/front-of-b-b.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/73/out-side-the-hotel.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4f/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4e/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4d/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4c/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4b/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/4a/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/3c/3d/47/amana.jpg, http://cdn.tripadvisor.com/cds/media/photo-f/01/2d/61/2f/amana.jpg]\')">next&#xa0;&#xbb;</a></div><!--/ cdsGUI--> '+
'</dd><!--/ cdsPhotos--> '+
'</dl><!--/ cdsComponent--> '+
'<dl class="widDMOComponent"> '+
'<dt class="widDMOH18">Featured Hotel Review</dt> '+
'<dd class="widDMOReview"><b class="widDMOTitle">Colony Oaks at the Amanas</b> '+
'<dl> '+
'<dt class="widDMOQuote">&#x201c;Great Place&#x201d;</dt> '+
'<dd class="widDMORating"> <img src="http://cdn.tripadvisor.com/img2/ratings/traveler/s5.0.gif" alt="5 of 5 stars" class="rsImg"/> '+
'</dd> '+
'<dd class="widDMOAttribution"> '+
'<span>Nov 21, 2009</span>&#xa0; '+
'<span>mike1742,&#xa0;<span>St Louis, MO</span></span></dd> '+
'</dl> '+
'<p>We stayed in a one bedroom condo. Really just a bed bathroom and tv. '+
'It was really nice. Clean, Modern and wonderful '+
'Building 30 Room 1. If you need just...</p> '+
'<div class="widDMOWrapButton"> '+
'<div class="widDMOButton"><div><span><b><a rel="nofollow" href="javascript:doPopup(\'http://www.tripadvisor.com/WidgetEmbed-cdssinglereview?locationId=1155273&amp;lang=en_US&amp;partnerId=&amp;format=html&amp;number=1&amp;reviewId=49769988&amp;display=true\', \'review\');">Read More!</a></b></span></div></div><!--/ button--> '+
'</div><!--/ wrapButton--> '+
'</dd> '+
'</dl><!--/ cdsComponent--> '+
'<div class="widDMOLegal">&#169; 2009 TripAdvisor LLC. All rights reserved.</div><!--/ legal--> '+
'</div><!--/ cdsData--> '+
'</div><!--/ CDSSKY.cdsBx--> '+
'';
  }  
}
