function writeTermsConditions(userLocale) {
var printPath = ""
var closePath = ""
var popup = window.open(parent.document.URL, "terms", "width=375,height=400,screenX=300,screenY=250,scrollbars=yes,resizable=yes");
var doc = popup.document;
var tandc = document.getElementById("termsconditions");
doc.writeln('
Terms & Conditions');
doc.writeln(tandc.innerHTML);
doc.writeln('');
doc.writeln(printPath);
doc.writeln(closePath);
doc.writeln('');
doc.close();
}
InlineRateSearchModule.prototype.show = function(propIds, container, ratePlanName, promotionCode, selectedPropId, offerCode, propPrices, corporateAccountNumber) {
var moduleEl = this.getModuleElement();
if (moduleEl != null) {
// hide module while updating
YAHOO.util.Dom.setStyle(moduleEl, 'opacity', 0);
var theForm = moduleEl.getElementsByTagName("form")[0];
// populate properties
fillPropertySelect(
theForm.inlinePropSelect, propIds, selectedPropId, null,
function() {
// display module after properties have been populated
moduleEl.style.display = "block";
YAHOO.util.Dom.setStyle(moduleEl, 'opacity', 1);
if (propPrices) {
appendOptions(propPrices);
}
});
// update rate plan name, promotion code, and rate plan name
theForm.ratePlanName.value = ratePlanName;
theForm.promotionCode.value = promotionCode;
theForm.offerCode.value = offerCode;
theForm.corporateAccountNumber.value = corporateAccountNumber;
if (YAHOO.lang.isString(container))
container = document.getElementById(container);
if (container != null) {
moduleEl.parentNode.removeChild(moduleEl);
container.appendChild(moduleEl);
// update z-index of module to match container's z-index
moduleEl.style.zIndex = container.style.zIndex ? container.style.zIndex : 0;
}
}
}
function appendOptions(propPrices) {
propPrices.forEach(function(pair) {
var propId = pair[0];
var price = pair[1];
var inlinePropSelect = yuiDom.get("inlinePropSelect");
var i;
for (i = 0; i < inlinePropSelect.options.length; i++) {
var sVal = inlinePropSelect.options[i].value ;
if (propId == sVal) {
inlinePropSelect.options[i].text = inlinePropSelect.options[i].text + " " + price;
}
}
});
}
function HotelExploreSelectModule(moduleElement) {
this._moduleElement = moduleElement;
this.lastContainer = null;
}
HotelExploreSelectModule.prototype.show = function(propIds, container) {
var moduleEl = this.getModuleElement();
if (moduleEl != null) {
if (YAHOO.lang.isString(container))
container = document.getElementById(container);
if (container != null) {
moduleEl.parentNode.removeChild(moduleEl);
container.appendChild(moduleEl);
var theForm = moduleEl.getElementsByTagName("form")[0];
// populate properties
fillPropertySelect(
theForm.propSelect, propIds, null, null,
function() {
// display module after properties have been populated
moduleEl.style.display = "block";
YAHOO.util.Dom.setStyle(moduleEl, 'opacity', 1);
});
// update z-index of module to match container's z-index
moduleEl.style.zIndex = container.style.zIndex ? container.style.zIndex : 0;
}
}
}
/**
* Returns module element object
*/
HotelExploreSelectModule.prototype.getModuleElement = function() {
if (YAHOO.lang.isString(this._moduleElement))
return document.getElementById(this._moduleElement);
else
return this._moduleElement;
}
HotelExploreSelectModule.prototype.hide = function() {
var moduleEl = this.getModuleElement();
if (moduleEl != null) {
moduleEl.style.display = "none";
}
}
// instantiate global instance
var hotelExploreSelect = new HotelExploreSelectModule('exploreSelectFormContainer');