/*
 * Copyright (c) 2007 John Resig (jquery.com)
 * Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Copyright (c) 2007 cody lindley
 * Copyright (c) 2007 Jörn Zaefferer
 * Copyright 2007 Yehuda Katz, Rein Henrichs
 * Copyright (c) 2007 Christian Bach
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * Copyright (c) 2008, Yahoo! Inc. All rights reserved.
 * Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt
 *
 * Copyright: 2006 Mark Wubben.
 * This software is licensed and provided under the CC-GNU LGPL.
 * See <http://creativecommons.org/licenses/LGPL/2.1/>
 *
 * Copyright 2005 Joe Walker
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Copyright (c)2005-2007 Matt Kruse (javascripttoolbox.com)
 * Dual licensed under the MIT and GPL licenses.
 *
 * Copyright (C) 2008 OnSurvey Inc.
 */
/*############ Begin common/js/base.js ############*/
jQuery.noConflict();
jQuery(document).ready(function($){jQuery(".jsShow").removeClass("hide");jQuery(".jsHide").hide();buttonizeAllSubmits();jQuery("a.thickbox").each(function(){var rel=jQuery(this).attr("rel");jQuery(this).attr("href",rel);});jQuery(".toggler").click(function(){var link=jQuery(this);href=link.attr("href");if(link.hasClass("collapsed")){jQuery(href).show();link.addClass("expanded").removeClass("collapsed");}else{jQuery(href).hide();link.removeClass("expanded").addClass("collapsed");}return false;});jQuery("div.jsTabCollection").find("div.tabSection:gt(0)").hide();
jQuery("div.jsTabCollection").find("ul.jsTabify li:eq(0)").addClass("on");jQuery("ul.jsTabify").addClass("ulTabs");jQuery("ul.jsTabify li a").click(function(){var onlink=jQuery(this);onlink.parents(".jsTabCollection").find("ul.jsTabify li").removeClass("on");onlink.parent("li").addClass("on");var href=onlink.attr("href");jQuery(href).siblings("div.tabSection").hide();jQuery(href).show();return false;});});function buttonizeAllSubmits(){jQuery("input.btnSearch").each(function(){var input=jQuery(this);
var txt=input.val();var click=input.attr("onclick");var userAgent=navigator.userAgent.toLowerCase();var notIE8=false;var isItIE8=userAgent.indexOf("msie 8.");if(isItIE8>0){notIE8=true;}var notIE9=false;var isItIE9=userAgent.indexOf("msie 9.");if(isItIE9>0){notIE9=true;}if(jQuery.browser.msie&&(notIE8==false)&&(notIE9==false)){var click=click.toString();clicklength=click.length;click=click.substring(23,clicklength-2);}input.after('<a class="btnSearch" href="#" onclick="'+click+'">'+txt+"</a>");input.addClass("hide2");
});jQuery("input.btn").each(function(){var input=jQuery(this);var txt=input.val();var click=input.attr("onclick");var userAgent=navigator.userAgent.toLowerCase();var notIE8=false;var isItIE8=userAgent.indexOf("msie 8.");if(isItIE8>0){notIE8=true;}var notIE9=false;var isItIE9=userAgent.indexOf("msie 9.");if(jQuery.browser.msie&&(notIE8==false)&&(notIE9==false)){var click=click.toString();clicklength=click.length;click=click.substring(23,clicklength-2);}input.after('<a class="btn" href="javascript:void(0)" onclick="'+click+'"><span>'+txt+"</span></a>");
input.addClass("hide2");});}function openPopup(link,width,height,popupname){width=width||300;height=height||400;popupname=popupname||"popup";if(typeof link!="string"){link=jQuery(link).attr("href");}try{window.open(link,popupname,"resizable=1,location=0,toolbar=0,scrollbars=1,width="+width+",height="+height);}catch(err){alert(err);}return false;}function clearThisField(textbox,defaultText){if(textbox.value==defaultText){textbox.value="";}}function restoreFieldText(textbox,defaultText){if(textbox.value==""){textbox.value=defaultText;
}}function toggle(link){var link=jQuery(link);href=link.attr("href");if(link.hasClass("collapsed")){jQuery(href).show();link.addClass("expanded").removeClass("collapsed");}else{jQuery(href).hide();link.removeClass("expanded").addClass("collapsed");}}var addSpecialRateCodes;
/*############ End common/js/base.js ############*/
/*############ Begin common/js/plug/footer.js ############*/
jQuery(document).ready(function(){SetupTooltips();var footerSearch=jQuery("input:text#footerSearch");footerSearch.each(function(){if(this.value==""){this.value=this.title;
}});footerSearch.focus(function(){if(this.value==this.title){this.value="";}});footerSearch.blur(function(){if(this.value==""){this.value=this.title;}});jQuery(document).keydown(function(e){if(e.which==27){footerSearch.blur();}});});function showBrands(){jQuery("#brandSelections").show();}ShowTooltip=function(e){var text=jQuery(this).next(".show-tooltip-text");if(text.attr("class")!="show-tooltip-text"){return false;}text.fadeIn();return false;};HideTooltip=function(e){var text=jQuery(this).next(".show-tooltip-text");
if(text.attr("class")!="show-tooltip-text"){return false;}text.fadeOut();};SetupTooltips=function(){jQuery(".show-tooltip").each(function(){jQuery(this).after(jQuery("<div></div>").attr("class","show-tooltip-text").html(jQuery(this).attr("title")).wrapInner("<p></p>")).attr("title","");}).hover(ShowTooltip,HideTooltip);jQuery(".show-tooltip-text").prepend('<div class="poptop"></div>').append('<div class="popbottom"></div>');}
/*############ End common/js/plug/footer.js ############*/
/*############ Begin common/js/plug/footerPullDown.js ############*/
;
function goToAndClose(){jQuery("#brandSelections").hide();jQuery("#brandPulldownLink").removeClass("brandPulldownLinkOpened").addClass("brandPulldownLinkClosed");}jQuery(document).keydown(function(e){if(e.which==27){jQuery("#brandSelections").hide();jQuery("#brandPulldownLink").removeClass("brandPulldownLinkOpened").addClass("brandPulldownLinkClosed");}});jQuery(document).ready(function(){var brandDropDownParent=jQuery("#hiltonBrandMenu");var findBrandDropDown=false;brandDropDownParent.click(function(){findBrandDropDown=true;
});jQuery(".brandPulldownLinkOpened").click(function(){jQuery("#brandSelections").hide();jQuery("#brandPulldownLink").removeClass("brandPulldownLinkOpened").addClass("brandPulldownLinkClosed");findBrandDropDown=false;});jQuery(document).click(function(){if(!findBrandDropDown){jQuery("#brandSelections").hide();jQuery("#brandPulldownLink").removeClass("brandPulldownLinkOpened").addClass("brandPulldownLinkClosed");findBrandDropDown=false;}else{findBrandDropDown=false;}});});function brandMenuToggler(){if(jQuery("#brandPulldownLink").hasClass("brandPulldownLinkClosed")){jQuery("#brandSelections").show();
jQuery("#brandPulldownLink").addClass("brandPulldownLinkOpened").removeClass("brandPulldownLinkClosed");}else{jQuery("#brandSelections").hide();jQuery("#brandPulldownLink").removeClass("brandPulldownLinkOpened").addClass("brandPulldownLinkClosed");}}
/*############ End common/js/plug/footerPullDown.js ############*/
/*############ Begin common/js/sifr/sifr.js ############*/
var parseSelector=(function(){var SEPERATOR=/\s*,\s*/;var WHITESPACE=/\s*([\s>+~(),]|^|$)\s*/g;var IMPLIED_ALL=/([\s>+~,]|[^(]\+|^)([#.:@])/g;
var STANDARD_SELECT=/^[^\s>+~]/;var STREAM=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function parseSelector(selector,node){node=node||document.documentElement;var argSelectors=selector.split(SEPERATOR),result=[];for(var i=0;i<argSelectors.length;i++){var nodes=[node],stream=toStream(argSelectors[i]);for(var j=0;j<stream.length;){var token=stream[j++],filter=stream[j++],args="";if(stream[j]=="("){while(stream[j++]!=")"&&j<stream.length){args+=stream[j];}args=args.slice(0,-1);}nodes=select(nodes,token,filter,args);
}result=result.concat(nodes);}return result;}function toStream(selector){var stream=selector.replace(WHITESPACE,"$1").replace(IMPLIED_ALL,"$1*$2");if(STANDARD_SELECT.test(stream)){stream=" "+stream;}return stream.match(STREAM)||[];}function select(nodes,token,filter,args){return(parseSelector.selectors[token])?parseSelector.selectors[token](nodes,filter,args):[];}var util={toArray:function(enumerable){var a=[];for(var i=0;i<enumerable.length;i++){a.push(enumerable[i]);}return a;}};var dom={isTag:function(node,tag){return(tag=="*")||(tag.toLowerCase()==node.nodeName.toLowerCase());
},previousSiblingElement:function(node){do{node=node.previousSibling;}while(node&&node.nodeType!=1);return node;},nextSiblingElement:function(node){do{node=node.nextSibling;}while(node&&node.nodeType!=1);return node;},hasClass:function(name,node){return(node.className||"").match("(^|\\s)"+name+"(\\s|$)");},getByTag:function(tag,node){return node.getElementsByTagName(tag);}};var selectors={"#":function(nodes,filter){for(var i=0;i<nodes.length;i++){if(nodes[i].getAttribute("id")==filter){return[nodes[i]];
}}return[];}," ":function(nodes,filter){var result=[];for(var i=0;i<nodes.length;i++){result=result.concat(util.toArray(dom.getByTag(filter,nodes[i])));}return result;},">":function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];for(var j=0,child;j<node.childNodes.length;j++){child=node.childNodes[j];if(child.nodeType==1&&dom.isTag(child,filter)){result.push(child);}}}return result;},".":function(nodes,filter){var result=[];for(var i=0,node;i<nodes.length;i++){node=nodes[i];
if(dom.hasClass([filter],node)){result.push(node);}}return result;},":":function(nodes,filter,args){return(parseSelector.pseudoClasses[filter])?parseSelector.pseudoClasses[filter](nodes,args):[];}};parseSelector.selectors=selectors;parseSelector.pseudoClasses={};parseSelector.util=util;parseSelector.dom=dom;return parseSelector;})();var sIFR=new function(){var SIFR=this;var CSS_ACTIVE="sIFR-active";var CSS_UNLOADING="sIFR-unloading";var CSS_REPLACED="sIFR-replaced";var CSS_FLASH="sIFR-flash";var CSS_IGNORE="sIFR-ignore";
var CSS_ALTERNATE="sIFR-alternate";var CSS_CLASS="sIFR-class";var CSS_LAYOUT="sIFR-layout";var CSS_FIX_FOCUS="sIFR-fixfocus";var CSS_DUMMY="sIFR-dummy";var CSS_ZOOM_DETECT="sIFR-zoomdetect";var MIN_FONT_SIZE=6;var MAX_FONT_SIZE=126;var MIN_FLASH_VERSION=8;var PREFETCH_COOKIE="SIFR-PREFETCHED";var DEFAULT_RATIOS=[];var FLASH_PADDING_BOTTOM=5;var VERSION="361";this.isActive=false;this.isEnabled=true;this.preserveSingleWhitespace=false;this.fixWrap=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;
this.cookiePath="/";this.domains=[];this.fromLocal=false;this.forceClear=false;this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.callbacks=[];var elementCount=0;var hasPrefetched=false,isInitialized=false;var dom=new function(){var XHTML_NS="http://www.w3.org/1999/xhtml";this.getBody=function(){var nodes=document.getElementsByTagName("body");if(nodes.length==1){return nodes[0];
}return null;};this.addClass=function(name,node){if(node){node.className=((node.className||"")==""?"":node.className+" ")+name;}};this.removeClass=function(name,node){if(node){node.className=node.className.replace(new RegExp("(^|\\s)"+name+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1");}};this.hasClass=function(name,node){return new RegExp("(^|\\s)"+name+"(\\s|$)").test(node.className);};this.hasOneOfClassses=function(names,node){for(var i=0;i<names.length;i++){if(this.hasClass(names[i],node)){return true;
}}return false;};this.create=function(name){if(document.createElementNS){return document.createElementNS(XHTML_NS,name);}return document.createElement(name);};this.nodeFromHtml=function(html){var temp=this.create("div");temp.innerHTML=html;return temp.firstChild;};this.getComputedStyle=function(node,property){var result;if(document.defaultView&&document.defaultView.getComputedStyle){result=document.defaultView.getComputedStyle(node,null)[property];}else{if(node.currentStyle){result=node.currentStyle[property];
}}return result||"";};this.getStyleAsInt=function(node,property,requirePx){var value=this.getComputedStyle(node,property);if(requirePx&&!/px$/.test(value)){return 0;}value=parseInt(value);return isNaN(value)?0:value;};this.getWidthFromStyle=function(node){var width=this.getStyleAsInt(node,"width",ua.ie);if(width==0){var paddingRight=this.getStyleAsInt(node,"paddingRight",true);var paddingLeft=this.getStyleAsInt(node,"paddingLeft",true);var borderRight=this.getStyleAsInt(node,"borderRightWidth",true);
var borderLeft=this.getStyleAsInt(node,"borderLeftWidth",true);width=node.offsetWidth-paddingLeft-paddingRight-borderLeft-borderRight;}return width;};this.getHeightFromStyle=function(node){var height=this.getStyleAsInt(node,"height",ua.ie);if(height==0){var paddingTop=this.getStyleAsInt(node,"paddingTop",true);var paddingBottom=this.getStyleAsInt(node,"paddingBottom",true);var borderTop=this.getStyleAsInt(node,"borderTopHeight",true);var borderBottom=this.getStyleAsInt(node,"borderBottomHeight",true);
height=node.offsetHeight-paddingBottom-paddingTop-borderBottom-borderTop;}return height;};this.blurElement=function(element){if(ua.gecko){element.blur();return ;}var input=dom.create("input");input.style.width="0px";input.style.height="0px";element.parentNode.appendChild(input);input.focus();input.blur();input.parentNode.removeChild(input);};this.getDimensions=function(node){var width=node.offsetWidth;var height=node.offsetHeight;if(width==0||height==0){for(var i=0;i<node.childNodes.length;i++){var child=node.childNodes[i];
if(child.nodeType!=1){continue;}width=Math.max(width,child.offsetWidth);height=Math.max(height,child.offsetHeight);}}return{width:width,height:height};};this.contentIsLink=function(node){var linkFound=false;for(var i=0;i<node.childNodes.length;i++){var child=node.childNodes[i];if(child.nodeType==3&&!child.nodeValue.match(/^\s*$/)){return false;}else{if(child.nodeType!=1){continue;}}var isLink=child.nodeName.toLowerCase()=="a";if(!isLink){return false;}else{linkFound=true;}}return linkFound;};var dom=this;
this.swf={create:function(builder,fixFocus,id,width,height,src,vars,wmode,backgroundColor){var obj=builder.object(fixFocus,id,src,width,height);return builder.params(obj,"flashvars",vars,"wmode",wmode,"bgcolor",backgroundColor,"allowScriptAccess","always","quality","best");},ie:{object:function(fixFocus,id,src,width,height){return'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+id+'" width="'+width+'" height="'+height+'" class="'+CSS_FLASH+'"><param name="movie" value="'+src+'"></param></object><script event=FSCommand(info,args) for='+id+">"+id+"_DoFSCommand(info, args);<\/script>";
},params:function(obj){var params="";for(var i=1;i<arguments.length;i+=2){params+='<param name="'+arguments[i]+'" value="'+arguments[i+1]+'"></param>';}return obj.replace(/(<\/object>)/,params+"$1");},insert:function(node,flash){node.innerHTML=flash;}},other:{object:function(fixFocus,id,src,width,height){var obj=dom.create("object");var attrs=["type","application/x-shockwave-flash","id",id,"name",id,"data",src,"width",width,"height",height];while(attrs.length){obj.setAttribute(attrs.shift(),attrs.shift());
}obj.className=CSS_FLASH;if(!fixFocus){return{root:obj,obj:obj};}var node=dom.create("div");node.className=CSS_FIX_FOCUS;node.appendChild(obj);return{root:node,obj:obj};},params:function(obj){for(var i=1;i<arguments.length;i+=2){if(arguments[i]=="name"){continue;}var param=dom.create("param");param.setAttribute("name",arguments[i]);param.setAttribute("value",arguments[i+1]);obj.obj.appendChild(param);}return obj.root;},insert:function(node,flash){while(node.firstChild){node.removeChild(node.firstChild);
}node.appendChild(flash);}}};};this.dom=dom;var ua=new function(){var ua=navigator.userAgent.toLowerCase();var product=(navigator.product||"").toLowerCase();this.macintosh=ua.indexOf("mac")>-1;this.windows=ua.indexOf("windows")>-1;this.quicktime=false;this.opera=ua.indexOf("opera")>-1;this.konqueror=product.indexOf("konqueror")>-1;this.ie=false
/*@cc_on || true @*/
;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(ua)
/*@cc_on && @_jscript_version >= 5.5 @*/
;this.ieWin=this.ie&&this.windows
/*@cc_on && @_jscript_version >= 5.1 @*/
;
this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.ie&&this.macintosh
/*@cc_on && @_jscript_version < 5.1 @*/
;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=ua.indexOf("safari")>-1;this.webkit=ua.indexOf("applewebkit")>-1&&!this.konqueror;this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&product=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(ua)?parseFloat(RegExp.$1):0;this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(ua)?parseFloat(RegExp.$2):0;
this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(ua)?parseFloat(RegExp.$1):0;this.geckoBuildDate=this.gecko&&/.*gecko\/(\d{8}).*/.exec(ua)?parseFloat(RegExp.$1):0;this.konquerorMajor=this.konqueror&&/.*konqueror\/(\d).*/.exec(ua)?parseFloat(RegExp.$1):0;this.konquerorMinor=this.konqueror&&/.*khtml\/\d\.(\d).*/.exec(ua)?parseFloat(RegExp.$1):0;this.konquerorSmall=this.konqueror&&/.*khtml\/\d\.\d\.(\d).*/.exec(ua)?parseFloat(RegExp.$1):0;this.flashVersion=0;if(this.ieWin){var axo;var stop=false;
try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=6;axo.AllowScriptAccess="always";}catch(e){stop=this.flashVersion==6;}if(!stop){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}}if(!stop&&axo){this.flashVersion=parseFloat(/([\d,?]+)/.exec(axo.GetVariable("$version"))[1].replace(/,/g,"."));}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){var flashPlugin=navigator.plugins["Shockwave Flash"];
this.flashVersion=parseFloat(/(\d+\.?\d*)/.exec(flashPlugin.description)[1]);var i=0;while(this.flashVersion>=MIN_FLASH_VERSION&&i<navigator.mimeTypes.length){var mime=navigator.mimeTypes[i];if(mime.type=="application/x-shockwave-flash"&&mime.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){this.flashVersion=0;this.quicktime=true;}i++;}}}this.flash=this.flashVersion>=MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||document.defaultView&&document.defaultView.getComputedStyle&&(!this.gecko||this.geckoBuildDate>=20030624);
this.requiresPrefetch=this.ieWin||this.khtml;this.fixFocus=this.gecko&&this.windows&&this.geckoBuildDate>20061206;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=525||this.konqueror&&this.konquerorMajor>3||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkit<523;this.properDocument=typeof (document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&(!this.opera)&&(!this.webkit||this.webkitVersion>=412)&&(!this.konqueror)&&this.computedStyleSupport&&(!this.gecko||this.geckoBuildDate>20040804);
};this.ua=ua;var util=new function(){var UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};var SINGLE_WHITESPACE=" ";function capitalize($){return $.toUpperCase();}this.normalize=function(str){if(SIFR.preserveSingleWhitespace){return str.replace(/\s/g,SINGLE_WHITESPACE);}return str.replace(/(\n|\r)+/g,SINGLE_WHITESPACE).replace(/(\s)\s+/g,"$1").replace(/\xA0/,SINGLE_WHITESPACE);};this.textTransform=function(type,str){switch(type){case"uppercase":str=str.toUpperCase();
break;case"lowercase":str=str.toLowerCase();break;case"capitalize":var strCopy=str;str=str.replace(/^\w|\s\w/g,capitalize);if(str.indexOf("function capitalize")!=-1){var substrs=strCopy.replace(/(^|\s)(\w)/g,"$1$1$2$2").split(/^\w|\s\w/g);str="";for(var i=0;i<substrs.length;i++){str+=substrs[i].charAt(0).toUpperCase()+substrs[i].substring(1);}}break;}return str;};this.toHexString=function(str){if(typeof (str)!="string"||!str.charAt(0)=="#"||str.length!=4&&str.length!=7){return str;}str=str.replace(/#/,"");
if(str.length==3){str=str.replace(/(.)(.)(.)/,"$1$1$2$2$3$3");}return"0x"+str;};this.toJson=function(obj){var json="";switch(typeof (obj)){case"string":json='"'+obj+'"';break;case"number":case"boolean":json=obj.toString();break;case"object":json=[];for(var prop in obj){if(obj[prop]==Object.prototype[prop]){continue;}json.push('"'+prop+'":'+util.toJson(obj[prop]));}json="{"+json.join(",")+"}";break;}return json;};this.convertCssArg=function(arg){if(!arg){return{};}if(typeof (arg)=="object"){if(arg.constructor==Array){arg=arg.join("");
}else{return arg;}}var obj={};var rules=arg.split("}");for(var i=0;i<rules.length;i++){var $=rules[i].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!$||$.length!=3){continue;}if(!obj[$[1]]){obj[$[1]]={};}var properties=$[2].split(";");for(var j=0;j<properties.length;j++){var $2=properties[j].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!$2||$2.length!=3){continue;}obj[$[1]][$2[1]]=$2[2].replace(/\s+$/,"");}}return obj;};this.extractFromCss=function(css,selector,property,remove){var value=null;if(css&&css[selector]&&css[selector][property]){value=css[selector][property];
if(remove){delete css[selector][property];}}return value;};this.cssToString=function(arg){var css=[];for(var selector in arg){var rule=arg[selector];if(rule==Object.prototype[selector]){continue;}css.push(selector,"{");for(var property in rule){if(rule[property]==Object.prototype[property]){continue;}var value=rule[property];if(UNIT_REMOVAL_PROPERTIES[property]){value=parseInt(value,10);}css.push(property,":",value,";");}css.push("}");}return css.join("");};this.bind=function(scope,method){return function(){scope[method].apply(scope,arguments);
};};this.escape=function(str){return escape(str).replace(/\+/g,"%2B");};this.copyProperties=function(from,to){for(var property in from){if(to[property]===undefined){to[property]=from[property];}}return to;};this.domain=function(){var domain="";try{domain=document.domain;}catch(e){}return domain;};this.domainMatches=function(domain,match){if(match=="*"||match==domain){return true;}var wildcard=match.lastIndexOf("*");if(wildcard>-1){match=match.substr(wildcard+1);var matchPosition=domain.lastIndexOf(match);
if(matchPosition>-1&&(matchPosition+match.length)==domain.length){return true;}}return false;};this.uriEncode=function(s){return encodeURI(decodeURIComponent(s));};};this.util=util;var hacks={};hacks.fragmentIdentifier=new function(){this.fix=true;var cachedTitle;this.cache=function(){cachedTitle=document.title;};function doFix(){document.title=cachedTitle;}this.restore=function(){if(this.fix){setTimeout(doFix,0);}};};this.hacks={fragmentIdentifier:hacks.fragmentIdentifier};hacks.pageLoad=new function(){var dummy=null;
function pollLoad(){try{if(ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left");}}catch(e){return setTimeout(pollLoad,10);}afterDomLoad();}function afterDomLoad(){if(SIFR.useStyleCheck){checkStyle();}else{if(!ua.mustCheckStyle){fire(null,true);}}}function checkStyle(){dummy=dom.create("div");dummy.className=CSS_DUMMY;dom.getBody().appendChild(dummy);pollStyle();}function pollStyle(){if(dom.getComputedStyle(dummy,"marginLeft")=="42px"){afterStyle();
}else{setTimeout(pollStyle,10);}}function afterStyle(){if(dummy&&dummy.parentNode){dummy.parentNode.removeChild(dummy);}dummy=null;fire(null,true);}function fire(evt,preserveReplacements){SIFR.initialize(preserveReplacements);if(evt&&evt.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",fire,false);}if(window.removeEventListener){window.removeEventListener("load",fire,false);}}}this.attach=function(){if(window.addEventListener){window.addEventListener("load",fire,false);
}else{window.attachEvent("onload",fire);}if(!SIFR.useDomLoaded||ua.forcePageLoad||ua.ie&&window.top!=window){return ;}if(ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",afterDomLoad,false);}else{if(ua.ie||ua.khtml){pollLoad();}}};};hacks.zoom=new function(){var element,lastOffset;function detect(){if(element.offsetLeft!=lastOffset){lastOffset=element.offsetLeft;resize(null,true);}}this.init=function(){if(!ua.ie||ua.ieVersion<7){return ;}element=dom.create("div");element.className=CSS_ZOOM_DETECT;
element.style.cssText="display:block;width:auto;position:absolute;left:10%;top:-100px;";dom.getBody().appendChild(element);lastOffset=element.offsetLeft;setInterval(detect,200);};};this.errors={fire:function(id){if(this[id+"Alert"]){alert(this[id+"Alert"]);}throw new Error(this[id]);},isFile:"sIFR: Did not activate because the page is being loaded from the filesystem.",isFileAlert:"Hi!\n\nThanks for using sIFR on your page. Unfortunately sIFR couldn't activate, because it was loaded directly from your computer.\nDue to Flash security restrictions, you need to load sIFR through a web server.\n\nWe apologize for the inconvenience.",getSource:"sIFR: Could not determine appropriate source"};
var replaceKwargsStore={kwargs:[],replaceAll:function(preserve){for(var i=0;i<this.kwargs.length;i++){SIFR.replace(this.kwargs[i]);}if(!preserve){this.kwargs=[];}}};function isValidDomain(){if(SIFR.domains.length==0){return true;}var domain=util.domain();for(var i=0;i<SIFR.domains.length;i++){var match=SIFR.domains[i];if(util.domainMatches(domain,match)){return true;}}return false;}function isFile(){if(!SIFR.fromLocal&&document.location.protocol=="file:"){if(SIFR.debug){SIFR.errors.fire("isFile");
}return true;}return false;}function resize(evt,force){var viewport=force?{}:resize.viewport;resize.viewport={width:window.innerWidth||document.documentElement.clientWidth||dom.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||dom.getBody().clientHeight};if(viewport&&resize.viewport.width==viewport.width&&resize.viewport.height==viewport.height){return ;}if(resize.timer){clearTimeout(resize.timer);}resize.timer=setTimeout(function(){delete resize.timer;for(var i=0;
i<SIFR.callbacks.length;i++){SIFR.callbacks[i].resize();}},200);}function scale(){for(var i=0;i<SIFR.callbacks.length;i++){SIFR.callbacks[i].call("scale");}}this.activate=function(){if(!ua.supported||!this.isEnabled||this.isActive||!isValidDomain()||isFile()){return ;}if(arguments.length>0){this.prefetch.apply(this,arguments);}this.isActive=true;this.setFlashClass();hacks.fragmentIdentifier.fix=ua.ieWin&&hacks.fragmentIdentifier.fix&&window.location.hash!="";if(hacks.fragmentIdentifier.fix){hacks.fragmentIdentifier.cache();
}if(!this.autoInitialize){return ;}hacks.pageLoad.attach();if(ua.ie){window.attachEvent("onunload",function(){dom.addClass(CSS_UNLOADING,document.documentElement);});}};this.setFlashClass=function(){if(this.hasFlashClassSet){return ;}dom.addClass(CSS_ACTIVE,dom.getBody()||document.documentElement);this.hasFlashClassSet=true;};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return ;}dom.removeClass(CSS_ACTIVE,dom.getBody());dom.removeClass(CSS_ACTIVE,document.documentElement);this.hasFlashClassSet=false;
};this.initialize=function(preserveReplacements){if(!this.isActive||!this.isEnabled){return ;}if(isInitialized){if(!preserveReplacements){replaceKwargsStore.replaceAll(false);}return ;}isInitialized=true;replaceKwargsStore.replaceAll(preserveReplacements);if(SIFR.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",resize,false);window.addEventListener("scroll",scale,false);}else{window.attachEvent("onresize",resize);window.attachEvent("onscroll",scale);}hacks.zoom.init();
}clearPrefetch();};function getSource(src){if(typeof (src)!="string"){if(src.src){src=src.src;}if(typeof (src)!="string"){var versions=[];for(var version in src){if(src[version]!=Object.prototype[version]){versions.push(version);}}versions.sort().reverse();var result="";var i=-1;while(!result&&++i<versions.length){if(parseFloat(versions[i])<=ua.flashVersion){result=src[versions[i]];}}src=result;}}if(!src&&SIFR.debug){SIFR.errors.fire("getSource");}if(ua.ie&&src.charAt(0)=="/"){src=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+src;
}return src;}this.prefetch=function(){if((!ua.requiresPrefetch&&!this.isActive)||!ua.supported||!this.isEnabled||!isValidDomain()){return ;}if(this.setPrefetchCookie&&new RegExp(";?"+PREFETCH_COOKIE+"=true;?").test(document.cookie)){return ;}try{hasPrefetched=true;if(ua.ieWin){prefetchIexplore(arguments);}else{prefetchLight(arguments);}if(this.setPrefetchCookie){document.cookie=PREFETCH_COOKIE+"=true;path="+this.cookiePath;}}catch(e){if(SIFR.debug){throw e;}}};function prefetchIexplore(args){for(var i=0;
i<args.length;i++){document.write('<script defer type="sifr/prefetch" src="'+getSource(args[i])+'"><\/script>');}}function prefetchLight(args){for(var i=0;i<args.length;i++){new Image().src=getSource(args[i]);}}function clearPrefetch(){if(!ua.ieWin||!hasPrefetched){return ;}try{var nodes=document.getElementsByTagName("script");for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.type=="sifr/prefetch"){node.parentNode.removeChild(node);}}}catch(e){}}function getRatio(size,ratios){for(var i=0;
i<ratios.length;i+=2){if(size<=ratios[i]){return ratios[i+1];}}return ratios[ratios.length-1]||1;}function getFilters(obj){var filters=[];for(var filter in obj){if(obj[filter]==Object.prototype[filter]){continue;}var properties=obj[filter];filter=[filter.replace(/filter/i,"")+"Filter"];for(var property in properties){if(properties[property]==Object.prototype[property]){continue;}filter.push(property+":"+util.escape(util.toJson(util.toHexString(properties[property]))));}filters.push(filter.join(","));
}return util.escape(filters.join(";"));}function calculate(node){var lineHeight,lines;if(!ua.ie){lineHeight=dom.getStyleAsInt(node,"lineHeight");lines=Math.floor(dom.getStyleAsInt(node,"height")/lineHeight);}else{if(ua.ie){var fontSize=dom.getComputedStyle(node,"fontSize");if(fontSize.indexOf("px")>0){lineHeight=parseInt(fontSize);}else{var html=node.innerHTML;node.style.visibility="visible";node.style.overflow="visible";node.style.position="static";node.style.zoom="normal";node.style.writingMode="lr-tb";
node.style.width=node.style.height="auto";node.style.maxWidth=node.style.maxHeight=node.style.styleFloat="none";var rectNode=node;var hasLayout=node.currentStyle.hasLayout;if(hasLayout){node.innerHTML='<div class="'+CSS_LAYOUT+'">X<br />X<br />X</div>';rectNode=node.firstChild;}else{node.innerHTML="X<br />X<br />X";}var rects=rectNode.getClientRects();lineHeight=rects[1].bottom-rects[1].top;lineHeight=Math.ceil(lineHeight*0.8);if(hasLayout){node.innerHTML='<div class="'+CSS_LAYOUT+'">'+html+"</div>";
rectNode=node.firstChild;}else{node.innerHTML=html;}rects=rectNode.getClientRects();lines=rects.length;if(hasLayout){node.innerHTML=html;}node.style.visibility=node.style.width=node.style.height=node.style.maxWidth=node.style.maxHeight=node.style.overflow=node.style.styleFloat=node.style.position=node.style.zoom=node.style.writingMode="";}}}return{lineHeight:lineHeight,lines:lines};}this.replace=function(kwargs,mergeKwargs){if(!ua.supported){return ;}if(mergeKwargs){kwargs=util.copyProperties(kwargs,mergeKwargs);
}if(!isInitialized){return replaceKwargsStore.kwargs.push(kwargs);}if(SIFR.onReplacementStart){SIFR.onReplacementStart(kwargs);}var nodes=kwargs.elements;if(!nodes&&parseSelector){nodes=parseSelector(kwargs.selector);}if(nodes.length==0){return ;}var src=getSource(kwargs.src);var css=util.convertCssArg(kwargs.css);var filters=getFilters(kwargs.filters);var forceClear=(kwargs.forceClear==null)?SIFR.forceClear:kwargs.forceClear;var fitExactly=(kwargs.fitExactly==null)?SIFR.fitExactly:kwargs.fitExactly;
var forceWidth=fitExactly||(kwargs.forceWidth==null?SIFR.forceWidth:kwargs.forceWidth);var preventWrap=!!(kwargs.preventWrap&&!kwargs.forceSingleLine);var leading=parseInt(util.extractFromCss(css,".sIFR-root","leading"))||0;var fontSize=util.extractFromCss(css,".sIFR-root","font-size",true)||0;var backgroundColor=util.extractFromCss(css,".sIFR-root","background-color",true)||"#FFFFFF";var kerning=util.extractFromCss(css,".sIFR-root","kerning",true)||"";var gridFitType=kwargs.gridFitType||util.extractFromCss(css,".sIFR-root","text-align")=="right"?"subpixel":"pixel";
var textTransform=SIFR.forceTextTransform?util.extractFromCss(css,".sIFR-root","text-transform",true)||"none":"none";var opacity=util.extractFromCss(css,".sIFR-root","opacity",true)||"100";var cursor=util.extractFromCss(css,".sIFR-root","cursor",true)||"default";var pixelFont=kwargs.pixelFont||false;var ratios=kwargs.ratios||DEFAULT_RATIOS;var tuneHeight=parseInt(kwargs.tuneHeight)||0;var events=!!kwargs.onRelease||!!kwargs.onRollOver||!!kwargs.onRollOut;if(parseInt(fontSize).toString()!=fontSize&&fontSize.indexOf("px")==-1){fontSize=0;
}else{fontSize=parseInt(fontSize);}if(parseFloat(opacity)<1){opacity=100*parseFloat(opacity);}var cssText="";if(fitExactly){util.extractFromCss(css,".sIFR-root","text-align",true);}if(!kwargs.modifyCss){cssText=util.cssToString(css);}var wmode=kwargs.wmode||"";if(!wmode){if(kwargs.transparent){wmode="transparent";}else{if(kwargs.opaque){wmode="opaque";}}}if(wmode=="transparent"){if(!ua.transparencySupport){wmode="opaque";}else{backgroundColor="transparent";}}for(var i=0;i<nodes.length;i++){var node=nodes[i];
if(dom.hasOneOfClassses([CSS_REPLACED,CSS_IGNORE,CSS_ALTERNATE],node)){continue;}var dimensions=dom.getDimensions(node);var height=dimensions.height;var width=dimensions.width;var display=dom.getComputedStyle(node,"display");if(!height||!width||display==null||display=="none"){continue;}if(forceClear&&ua.gecko){node.style.clear="both";}var html=null;if(SIFR.fixWrap&&ua.ie&&display=="block"){html=node.innerHTML;node.innerHTML="X";}width=dom.getWidthFromStyle(node);if(html&&SIFR.fixWrap&&ua.ie){node.innerHTML=html;
}var lineHeight,lines;if(!fontSize){var calculation=calculate(node);lineHeight=Math.min(MAX_FONT_SIZE,Math.max(MIN_FONT_SIZE,calculation.lineHeight));if(pixelFont){lineHeight=Math.max(8,8*Math.round(lineHeight/8));}lines=calculation.lines;if(isNaN(lines)||!isFinite(lines)||lines==0){lines=1;}if(lines>1&&leading){height+=Math.round((lines-1)*leading);}}else{lineHeight=fontSize;lines=1;}height=Math.round(lines*lineHeight);if(forceClear&&ua.gecko){node.style.clear="";}var alternate=dom.create("span");
alternate.className=CSS_ALTERNATE;var contentNode=node.cloneNode(true);node.parentNode.appendChild(contentNode);for(var j=0,l=contentNode.childNodes.length;j<l;j++){alternate.appendChild(contentNode.childNodes[j].cloneNode(true));}if(kwargs.modifyContent){kwargs.modifyContent(contentNode,kwargs.selector);}if(kwargs.modifyCss){cssText=kwargs.modifyCss(css,contentNode,kwargs.selector);}var fixHover=SIFR.fixHover&&dom.contentIsLink(contentNode);var content=handleContent(contentNode,textTransform,kwargs.uriEncode);
contentNode.parentNode.removeChild(contentNode);if(kwargs.modifyContentString){content.text=kwargs.modifyContentString(content.text,kwargs.selector);}if(content.text==""){continue;}var renderHeight=Math.round(lines*getRatio(lineHeight,ratios)*lineHeight)+FLASH_PADDING_BOTTOM+tuneHeight;var forcedWidth=forceWidth?width:"100%";var vars=["content="+util.escape(content.text),"antialiastype="+(kwargs.antiAliasType||""),"width="+width,"height="+height,"renderheight="+renderHeight,"fitexactly="+fitExactly,"tunewidth="+(kwargs.tuneWidth||0),"tuneheight="+tuneHeight,"offsetleft="+(kwargs.offsetLeft||""),"offsettop="+(kwargs.offsetTop||""),"thickness="+(kwargs.thickness||""),"sharpness="+(kwargs.sharpness||""),"kerning="+kerning,"gridfittype="+gridFitType,"flashfilters="+filters,"opacity="+opacity,"blendmode="+(kwargs.blendMode||""),"size="+lineHeight,"css="+util.escape(cssText),"selectable="+(kwargs.selectable==null?"true":kwargs.selectable),"fixhover="+fixHover,"preventwrap="+preventWrap,"forcesingleline="+(kwargs.forceSingleLine===true),"link="+util.escape(content.primaryLink[0]||""),"target="+util.escape(content.primaryLink[1]||""),"events="+events,"cursor="+cursor,"version="+VERSION];
var encodedVars=encodeVars(vars);var callbackName="sIFR_callback_"+elementCount++;var callbackInfo=new CallbackInfo(callbackName,vars,forceWidth,{onReplacement:kwargs.onReplacement,onRollOver:kwargs.onRollOver,onRollOut:kwargs.onRollOut,onRelease:kwargs.onRelease});window[callbackName+"_DoFSCommand"]=(function(callbackInfo){return function(info,arg){callbackInfo.handle(info,arg);};})(callbackInfo);alternate.setAttribute("id",callbackName+"_alternate");var builder=ua.ie?dom.swf.ie:dom.swf.other;var flash=dom.swf.create(builder,ua.fixFocus&&kwargs.fixFocus,callbackName,forcedWidth,renderHeight,src,encodedVars,wmode,backgroundColor);
builder.insert(node,flash);callbackInfo.html=flash;SIFR.callbacks.push(callbackInfo);if(kwargs.selector){if(!SIFR.callbacks[kwargs.selector]){SIFR.callbacks[kwargs.selector]=[callbackInfo];}else{SIFR.callbacks[kwargs.selector].push(callbackInfo);}}node.appendChild(alternate);dom.addClass(CSS_REPLACED,node);}hacks.fragmentIdentifier.restore();};this.getCallbackByFlashElement=function(node){for(var i=0;i<SIFR.callbacks.length;i++){if(SIFR.callbacks[i].id==node.getAttribute("id")){return SIFR.callbacks[i];
}}};this.redraw=function(){for(var i=0;i<SIFR.callbacks.length;i++){SIFR.callbacks[i].resetMovie();}};function encodeVars(vars){return vars.join("&").replace(/%/g,"%25");}function handleContent(source,textTransform,uriEncode){uriEncode=uriEncode||util.uriEncode;var stack=[],content=[],primaryLink=[];var nodes=source.childNodes;var i=0;while(i<nodes.length){var node=nodes[i];if(node.nodeType==3){var text=util.normalize(node.nodeValue);text=util.textTransform(textTransform,text);text=text.replace(/</g,"&lt;");
content.push(text);}if(node.nodeType==1){var attributes=[];var nodeName=node.nodeName.toLowerCase();var className=node.className||"";if(/\s+/.test(className)){if(className.indexOf(CSS_CLASS)>-1){className=className.match("(\\s|^)"+CSS_CLASS+"-([^\\s$]*)(\\s|$)")[2];}else{className=className.match(/^([^\s]+)/)[1];}}if(className!=""){attributes.push('class="'+className+'"');}if(nodeName=="a"){var href=uriEncode(node.getAttribute("href")||"");var target=node.getAttribute("target")||"";attributes.push('href="'+href+'"','target="'+target+'"');
if(primaryLink.length==0){primaryLink=[href,target];}}content.push("<"+nodeName+(attributes.length>0?" ":"")+attributes.join(" ")+">");if(node.hasChildNodes()){stack.push(i);i=0;nodes=node.childNodes;continue;}else{if(!/^(br|img)$/i.test(node.nodeName)){content.push("</",node.nodeName.toLowerCase(),">");}}}if(stack.length>0&&!node.nextSibling){do{i=stack.pop();nodes=node.parentNode.parentNode.childNodes;node=nodes[i];if(node){content.push("</",node.nodeName.toLowerCase(),">");}}while(i==nodes.length-1&&stack.length>0);
}i++;}return{text:content.join("").replace(/\n|\r/g,""),primaryLink:primaryLink};}function CallbackInfo(id,vars,forceWidth,events){this.id=id;this.vars=vars;this._events=events;this._forceWidth=forceWidth;this._firedReplacementEvent=!(events.onReplacement!=null);this.html=null;}CallbackInfo.prototype.getFlashElement=function(){return document.getElementById(this.id);};CallbackInfo.prototype.available=function(){var flashNode=this.getFlashElement();return flashNode&&flashNode.parentNode;};CallbackInfo.prototype.handle=function(info,arg){if(!this.available()){return ;
}switch(/(FSCommand\:)?(.+)/.exec(info)[2]){case"resize":var flashNode=this.getFlashElement();var $=arg.split(/\:|,/);flashNode.setAttribute($[0],$[1]);if($.length>2){flashNode.style[$[2]]=$[3]+"px";}if(ua.khtml){var repaint=flashNode.offsetHeight;}if(!this._firedReplacementEvent){this._events.onReplacement(this);this._firedReplacementEvent=true;}break;case"resetmovie":this.resetMovie();break;case"blur":dom.blurElement(this.getFlashElement());break;case"event":if(this._events[arg]){this._events[arg](this);
}break;default:if(this.debugHandler&&/(FSCommand\:)?debug/.test(info)){this.debugHandler(info,arg);}}};CallbackInfo.prototype.call=function(type,value){if(!this.available()){return false;}var flashNode=this.getFlashElement();try{flashNode.SetVariable("callbackType",type);flashNode.SetVariable("callbackValue",value);flashNode.SetVariable("callbackTrigger",true);}catch(e){return false;}return true;};CallbackInfo.prototype.replaceText=function(content,alternate){var escapedContent=util.escape(content);
this.updateVars("content",escapedContent);if(this.call("replacetext",escapedContent)){var node=this.getAlternate();if(alternate){while(node.firstChild){node.removeChild(node.firstChild);}for(var i=0;i<alternate.length;i++){node.appendChild(alternate[i]);}}else{try{node.innerHTML=content;}catch(e){}}return true;}return false;};CallbackInfo.prototype.updateVars=function(name,value){for(var i=0;i<this.vars.length;i++){if(this.vars[i].split("=")[0]==name){this.vars[i]=name+"="+value;break;}}};CallbackInfo.prototype.resetMovie=function(){if(!this.available()){return ;
}var flashNode=this.getFlashElement();var node=flashNode.parentNode;var vars=encodeVars(this.vars);if(ua.ie){this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+vars);node.replaceChild(dom.nodeFromHtml(this.html),flashNode);}else{var params=this.html.getElementsByTagName("param");for(var i=0;i<params.length;i++){if(params[i].getAttribute("name")=="flashvars"){params[i].setAttribute("value",vars);break;}}node.replaceChild(this.html.cloneNode(true),flashNode);}};CallbackInfo.prototype.resize=function(){if(!this.available()){return ;
}var flashNode=this.getFlashElement();var ancestor=this.getAncestor();var minHeight=dom.getHeightFromStyle(ancestor);var currentWidth=flashNode.offsetWidth;var originalWidth=flashNode.getAttribute("width");var originalHeight=flashNode.getAttribute("height");flashNode.style.width="0px";flashNode.style.height="0px";ancestor.style.minHeight=minHeight+"px";var nodes=this.getAlternate().childNodes;var clones=[];for(var i=0;i<nodes.length;i++){var node=nodes[i].cloneNode(true);clones.push(node);ancestor.appendChild(node);
}var width=dom.getWidthFromStyle(ancestor);for(var i=0;i<clones.length;i++){ancestor.removeChild(clones[i]);}flashNode.style.width=flashNode.style.height=ancestor.style.minHeight="";flashNode.setAttribute("width",this._forceWidth?width:originalWidth);flashNode.setAttribute("height",originalHeight);if(width!=currentWidth){this.call("resize",width);}else{this.call("scale");}};CallbackInfo.prototype.changeCSS=function(css){css=util.escape(util.cssToString(util.convertCssArg(css)));this.updateVars("css",css);
return this.call("changecss",css);};CallbackInfo.prototype.getAlternate=function(){return document.getElementById(this.id+"_alternate");};CallbackInfo.prototype.getAncestor=function(){var ancestor=this.getFlashElement().parentNode;return !dom.hasClass(CSS_FIX_FOCUS,ancestor)?ancestor:ancestor.parentNode;};};
/*############ End common/js/sifr/sifr.js ############*/
/*############ Begin common/js/sifr/sifr-config.js ############*/
var univers={src:G_SIFR_UNIVERS,ratios:[7,1.32,11,1.31,13,1.24,14,1.25,19,1.23,27,1.2,34,1.19,42,1.18,47,1.17,48,1.18,69,1.17,74,1.16,75,1.17,1.16]};
var fedrasans={src:G_SIFR_SANS};var universGI={src:G_SIFR_UNIVERS,ratios:[7,1.32,11,1.31,13,1.24,14,1.25,19,1.23,27,1.2,34,1.19,42,1.18,47,1.17,48,1.18,69,1.17,74,1.16,75,1.17,1.16]};sIFR.useStyleCheck=true;sIFR.activate(univers);sIFR.activate(universGI);sIFR.replace(univers,{selector:"h1.sifrHI",css:[".sIFR-root { text-align: left; font-weight: bold; color: #ffffff; }"],wmode:"transparent"});sIFR.replace(universGI,{selector:"h1.sifrGI",css:[".sIFR-root { color: #666666; font-size:24px; }"],wmode:"transparent"});
sIFR.replace(fedrasans,{selector:"h3.fedrasans",css:[".sIFR-root { color: #FFFFFF; }"],wmode:"transparent"});var sifrCss=".sIFR-root { color: #C60751; font-size:32px; }";if(G_LOCALE=="de_DE"){sifrCss=".sIFR-root { color: #C60751; font-size:28px; }";}sIFR.replace(fedrasans,{selector:"h2.fedrasans",css:[sifrCss],wmode:"transparent"});
/*############ End common/js/sifr/sifr-config.js ############*/
/*############ Begin common/js/plug/global.js ############*/
function addLoadEvent(func){jQuery(document).ready(function($){func();
});}function getId(strId){return document.getElementById(strId);}function getElementsByClassName(className,tag,elm){var testClass=new RegExp("(^|\\s)"+className+"(\\s|$)");var tag=tag||"*";var elm=elm||document;var elements=(tag=="*"&&elm.all)?elm.all:elm.getElementsByTagName(tag);var returnElements=[];var current;var length=elements.length;for(var i=0;i<length;i++){current=elements[i];if(testClass.test(current.className)){returnElements.push(current);}}return returnElements;}function addClassName(oElm,strClassName){var strCurrentClass=oElm.className;
if(!new RegExp(strClassName,"i").test(strCurrentClass)){oElm.className=strCurrentClass+((strCurrentClass.length>0)?" ":"")+strClassName;}}function removeClassName(oElm,strClassName){var oClassToRemove=new RegExp((strClassName+"s?"),"i");oElm.className=oElm.className.replace(oClassToRemove,"").replace(/^\s?|\s?$/g,"");}function ce(tag,name){if(name&&window.ActiveXObject){element=document.createElement("<"+tag+' name="'+name+'">');}else{element=document.createElement(tag);element.setAttribute("name",name);
}return element;}function popupFamilyPolicy(winURL){window.open(winURL,"popupfamilypolicy","resizable=1,location=0,toolbar=0,scrollbars=1,width=300,height=400");}function popupChargeDetails(winURL){window.open(winURL,"popupchargedetails","resizable=1,location=0,toolbar=0,scrollbars=1,width=400,height=400");}function popupRoomDetails(winURL){window.open(winURL,"popupRoomDetails","resizable=1,location=0,toolbar=0,scrollbars=1,width=400,height=400");}function popupTaxAndRateDetails(winURL){window.open(winURL,"popupTaxAndRateDetails","resizable=1,location=0,toolbar=0,scrollbars=1,width=400,height=400");
}function popupPlanDetails(winURL){window.open(winURL,"popupPlanDetails","resizable=1,location=0,toolbar=0,scrollbars=1,width=400,height=400");}function popupRoomPlanDetails(winURL){window.open(winURL,"popupRoomPlanDetails","resizable=1,location=0,toolbar=0,scrollbars=1,width=650,height=400");}function popupPurchasePoints(winURL){window.open(winURL,"popupPurchasePoints","resizable=1,location=0,toolbar=0,scrollbars=1,width=730,height=500");}function prepareLinks(){if(!document.getElementsByTagName){return false;
}var lnks=document.getElementsByTagName("a");for(var i=0;i<lnks.length;i++){if(lnks[i].className=="popup"){addClassName(lnks[i],"pops");if(!lnks[i].onclick){lnks[i].onclick=function(){openPopup(this.getAttribute("href"));return false;};}}if(lnks[i].className=="famPolicyLink"){addClassName(lnks[i],"pops");lnks[i].onclick=function(event){popupFamilyPolicy(this.getAttribute("href"));return false;};}if(lnks[i].className=="popupChargeDetails"){addClassName(lnks[i],"pops");lnks[i].onclick=function(){popupChargeDetails(this.getAttribute("href"));
return false;};}if(lnks[i].className=="popupRoomDetails"){addClassName(lnks[i],"pops");lnks[i].onclick=function(){popupRoomDetails(this.getAttribute("href"));return false;};}if(lnks[i].className=="popupTaxAndRateDetails"){addClassName(lnks[i],"pops");lnks[i].onclick=function(){popupTaxAndRateDetails(this.getAttribute("href"));return false;};}if(lnks[i].className=="popupPlanDetails"){addClassName(lnks[i],"pops");lnks[i].onclick=function(){popupPlanDetails(this.getAttribute("href"));return false;};
}if(lnks[i].className=="popupRoomPlanDetails"){addClassName(lnks[i],"pops");lnks[i].onclick=function(){popupRoomPlanDetails(this.getAttribute("href"));return false;};}if(lnks[i].className=="popupPurchasePoints"){addClassName(lnks[i],"pops");lnks[i].onclick=function(){popupPurchasePoints(this.getAttribute("href"));return false;};}if(lnks[i].className=="view3DvirtualTour"){lnks[i].onclick=function(){popupRoomDetails(this.getAttribute("href"));return false;};}}}addLoadEvent(prepareLinks);function globalshow(el,blockorinline){var el=getId(el);
el.style.display=blockorinline;}function globalhide(el){var el=getId(el);el.style.display="none";}jQuery(document).ready(function(){});function limitText(textArea,limitCountSpan,limitNum){var limitField=jQuery(textArea);var limitCount=jQuery("#"+limitCountSpan);if(limitField.length==0){return ;}if(limitField.val().length>limitNum){limitField.val(limitField.val().substring(0,limitNum));}limitCount.html(Number(limitNum)-Number(limitField.val().length));if(limitNum-limitField.val().length==0){limitCount.html("0");
}}function calculateNumberOfNights(startDate,endDate){if(startDate!=null&&endDate!=null){var non=0;if(endDate.isBefore(startDate)){var swapDate=startDate;startDate=endDate;endDate=swapDate;}if(startDate.isBefore(endDate)){while(startDate.isBefore(endDate)&&non<2000){non++;startDate=startDate.add("d",1);}}return non;}return null;}function chomp(text){return text.replace(/(\n|\r)+$/,"");}function submitFormByAnchor(anchor){anchor=jQuery(anchor);var href=anchor.attr("href");anchor.attr("href","#");submitFormByElementAndURL(anchor,href);
}function submitFormByElementAndURL(element,url){var form=findParent(element,"form");form.attr("method","POST");form.attr("action",url);form.submit();}function findParent(element,parentTagName){var parentArray=jQuery(element).parents();for(var i=0;i<parentArray.size();i++){var parent=parentArray[i];if(parent.tagName.toLowerCase()==parentTagName.toLowerCase()){return jQuery(parent);}}return jQuery();}
/*############ End common/js/plug/global.js ############*/
/*############ Begin common/js/plug/search_validation.js ############*/
function checkSpecialCodes(){clearSpecialCodesErrorFields();
checkCorporateAccountValidity();checkTravelAgentAccountValidity();}function checkCorporateAccountValidity(){var corpAccount=jQuery("#specialCodeCorporate");if(isTextNotEmpty(corpAccount.val())){AccountUtils.isValidCorporateAccount(corpAccount.val(),validateCorporateCode);}else{hideSpecialCodesError(jQuery("#corpNumberError"));jQuery("#fsSpecialCodeCorporate").removeClass("error");}}function validateCorporateCode(valid){if(!valid){showSpecialCodesError(jQuery("#corpNumberError"));jQuery("#fsSpecialCodeCorporate").addClass("error");
}else{hideSpecialCodesError(jQuery("#corpNumberError"));jQuery("#fsSpecialCodeCorporate").removeClass("error");}}function checkTravelAgentAccountValidity(){var travelAgent=jQuery("#specialCodeTravelAgent");if(isTextNotEmpty(travelAgent.val())){AccountUtils.isValidTravelAgentAccount(travelAgent.val(),validateTravelAgentCode);}else{hideSpecialCodesError(jQuery("#travelAgentNotFoundError"));jQuery("#fsSpecialCodeTravelAgent").removeClass("error");}}function validateTravelAgentCode(valid){if(!valid){showSpecialCodesError(jQuery("#travelAgentNotFoundError"));
jQuery("#fsSpecialCodeTravelAgent").addClass("error");}else{hideSpecialCodesError(jQuery("#travelAgentNotFoundError"));jQuery("#fsSpecialCodeTravelAgent").removeClass("error");}}function isTextNotEmpty(text){if(!text||text==null||text.length==0){return false;}return true;}function clearDatesErrorFields(){jQuery("#datesErrorList").hide();jQuery("#datesErrorList").children("ul").children("li").hide();}function showDateErrorNotification(errorKey){}function clearSpecialCodesErrorFields(){jQuery("#specialRatesErrorList").hide();
jQuery("#specialRatesErrorList").children("ul").children("li").hide();}function showSpecialCodesError(errorKey){jQuery("#specialRatesErrorList").show();errorKey.show();}function hideSpecialCodesError(errorKey){errorKey.hide();}function clearNumberOfNights(){jQuery("#numberOfNights").html("");}function clearCheckinDay(){jQuery("#checkinDayOfWeekLabel").html("");}function clearCheckoutDay(){jQuery("#checkoutDayOfWeekLabel").html("");}function updateNumberOfNights(nbr){if(!jQuery("#nightStayText")){return ;
}var nightStayText=jQuery("#nightStayText").html();var zeroNightStayText=jQuery("#zeroNightStayText").html();if(nbr>0){jQuery("#numberOfNights").html("<span id='numberOfNightsSpan'></span> "+nightStayText);jQuery("#numberOfNightsSpan").html(nbr);}else{if(nbr==0){jQuery("#numberOfNights").html(zeroNightStayText);}else{jQuery("#numberOfNights").html("");}}}function validateDateRange(inDateStr,outDateStr,calId){var locale=G_LOCALE;if(locale=="en_US"){var month=inDateStr.substring(0,2);month--;var day=inDateStr.substring(3,5);
var year=inDateStr.substring(6);var outMonth=outDateStr.substring(0,2);outMonth--;var outDay=outDateStr.substring(3,5);var outYear=outDateStr.substring(6);}else{if(locale=="de_DE"||locale=="en_GB"){var month=inDateStr.substring(3,5);month--;var day=inDateStr.substring(0,2);var year=inDateStr.substring(6);var outMonth=outDateStr.substring(3,5);outMonth--;var outDay=outDateStr.substring(2,0);var outYear=outDateStr.substring(6);}else{if(locale=="ja_JP"){var month=inDateStr.substring(5,7);month--;var day=inDateStr.substring(8);
var year=inDateStr.substring(0,4);var outMonth=outDateStr.substring(5,7);outMonth--;var outDay=outDateStr.substring(8);var outYear=outDateStr.substring(0,4);}}}var d1=new Date();d1.setFullYear(year,month,day);var today=new Date();if(today>d1){clearNumberOfNights();showDateErrorNotification(jQuery("#arrivalDateEarlierThanToday"));return false;}var twoYear=new Date;if(Math.round((d1-twoYear)/86400000)>729){clearNumberOfNights();showDateErrorNotification(jQuery("#reservationBeyondTwoYears"));return false;
}var d2=new Date();d2.setFullYear(outYear,outMonth,outDay);if((outMonth==month)&&(outYear==year)&&(outDay==day)){updateNumberOfNights(0);updateCheckindayofweek(d1,locale);updateCheckoutdayofweek(d2,locale);return true;}else{if(d2>d1){var one_day=1000*60*60*24;var nbr=Math.round((d2-d1)/86400000);if(nbr>90){clearNumberOfNights();showDateErrorNotification(jQuery("#stayOver99Night_PartOne"));showDateErrorNotification(jQuery("#nbrOfNightsOver99"));jQuery("#nbrOfNightsOver99").html(nbr);showDateErrorNotification(jQuery("#stayOver99Night_PartTwo"));
return false;}else{updateNumberOfNights(nbr);updateCheckindayofweek(d1,locale);updateCheckoutdayofweek(d2,locale);return true;}}else{updateCheckindayofweek(d1,locale);if(calId=="cal1"){updateDepartureDate(locale,year,month,day);}else{showDateErrorNotification(jQuery("#departureLaterThanArrival"));}return true;}}return true;}function validateDateFormats(inDateStr,outDateStr){var validformatInDate=datePatternValidation(inDateStr);var validformatOutDate=datePatternValidation(outDateStr);if(validformatInDate==false||validformatOutDate==false){if(validformatInDate==false){clearNumberOfNights();
clearCheckinDay();showDateErrorNotification(jQuery("#arrivalDateNotValid"));jQuery("#checkin").focus();}else{jQuery("#checkin").val(validformatInDate);}if(validformatOutDate==false){clearNumberOfNights();clearCheckoutDay();showDateErrorNotification(jQuery("#departureDateNotValid"));}else{jQuery("#checkout").val(validformatOutDate);}return false;}}function dateChangeValidation(calId){var locale=G_LOCALE;var arrivalDateField=jQuery("#checkin");var departureDateField=jQuery("#checkout");var inDateStr=jQuery("#checkin").val();
var outDateStr=jQuery("#checkout").val();var checkindayofweekField=jQuery("#checkinDayOfWeekLabel");var checkoutdayofweekField=jQuery("#checkoutDayOfWeekLabel");clearDatesErrorFields();if(inDateStr==""||outDateStr==""){if(inDateStr==""){showDateErrorNotification(jQuery("#arrivalDateFieldEmpty"));clearNumberOfNights();clearCheckinDay();}if(outDateStr.type!="hidden"&&outDateStr==""){showDateErrorNotification(jQuery("#departureDateFieldEmpty"));clearNumberOfNights();clearCheckoutDay();}return false;
}var validDateFormats=validateDateFormats(inDateStr,outDateStr);if(validDateFormats==false){return false;}inDateStr=jQuery("#checkin").val();outDateStr=jQuery("#checkout").val();var validRange=validateDateRange(inDateStr,outDateStr,calId);if(validRange==false){return false;}return true;}function updateCheckindayofweek(today,locale){var checkindayofweekField=jQuery("#checkinDayOfWeekLabel");if(locale=="en_US"||locale=="en_GB"){var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
checkindayofweekField.html(weekday[today.getDay()]);}if(locale=="de_DE"){var weekday=new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");checkindayofweekField.html(weekday[today.getDay()]);}if(locale=="ja_JP"){var weekdayJP=new Array("\u65E5","\u6708","\u706B","\u6C34","\u6728","\u91D1","\u571F");checkindayofweekField.html(weekdayJP[today.getDay()]);}}function updateCheckoutdayofweek(tomorrow,locale){var checkoutdayofweekField=jQuery("#checkoutDayOfWeekLabel");if(locale=="en_US"||locale=="en_GB"){var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
checkoutdayofweekField.html(weekday[tomorrow.getDay()]);}if(locale=="de_DE"){var weekday=new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");checkoutdayofweekField.html(weekday[tomorrow.getDay()]);}if(locale=="ja_JP"){var weekday=new Array("\u65E5","\u6708","\u706B","\u6C34","\u6728","\u91D1","\u571F");checkoutdayofweekField.html(weekday[tomorrow.getDay()]);}}function updateDepartureDate(locale,year,month,day){var checkoutdayofweekField=jQuery("#checkoutDayOfWeekLabel");
var departureDateField=jQuery("#checkout");var date=new Date();date.setFullYear(year,month,day);date.setDate(date.getDate()+1);month=date.getMonth();day=date.getDate();year=date.getFullYear();month++;day=addLeadingZero(day);month=addLeadingZero(month);if(locale=="en_US"){departureDateField.val(month+"/"+day+"/"+year);month--;date.setFullYear(year,month,day);updateCheckoutdayofweek(date,locale);}if(locale=="en_GB"){departureDateField.val(day+"/"+month+"/"+year);month--;date.setFullYear(year,month,day);
updateCheckoutdayofweek(date,"en_GB");}if(locale=="de_DE"){departureDateField.val(day+"."+month+"."+year);month--;date.setFullYear(year,month,day);updateCheckoutdayofweek(date,"de_DE");}if(locale=="ja_JP"){departureDateField.val(year+"/"+month+"/"+day);month--;date.setFullYear(year,month,day);updateCheckoutdayofweek(date,"ja_JP");}updateNumberOfNights(1);updateCalendarSelectedDate("","","cal2");}function datePatternValidation(dateStr){if(dateStr==null){return ;}dateStr=dateStr.toString();var locale=G_LOCALE;
if(locale=="ja_JP"){if(/^(\d{2})[\/.\\](\d{1})[\/.\\]\d{1}$/.test(dateStr)||/^(\d{2})[\/.\\](\d{2})[\/.\\]\d{1}$/.test(dateStr)||/^(\d{2})[\/.\\](\d{1})[\/.\\]\d{2}$/.test(dateStr)||/^(\d{2})[\/.\\](\d{2})[\/.\\]\d{2}$/.test(dateStr)||/^(\d{4})[\/.\\](\d{2})[\/.\\]\d{2}$/.test(dateStr)||/^(\d{4})[\/.\\](\d{1})[\/.\\]\d{1}$/.test(dateStr)||/^(\d{4})[\/.\\](\d{2})[\/.\\]\d{1}$/.test(dateStr)||/^(\d{4})[\/.\\](\d{1})[\/.\\]\d{2}$/.test(dateStr)){if(RegExp.$3*1>31){return false;}if(RegExp.$2*1>12){return false;
}if((RegExp.$2*1==2)||(RegExp.$2*1==4)||(RegExp.$2*1==6)||(RegExp.$2*1==9)){if(RegExp.$3*1>30){return false;}}if((RegExp.$2*1==2)){if(RegExp.$3*1>29){return false;}}if((RegExp.$2*1==2)){if(!isLeapYear(dateStr)){if(RegExp.$3*1>28){return false;}}}return reformatDate(dateStr);}else{return false;}}if(/^(\d{2})[\/.\\](\d{1})[\/.\\]\d{2}$/.test(dateStr)||/^(\d{1})[\/.\\](\d{2})[\/.\\]\d{2}$/.test(dateStr)||/^(\d{1})[\/.\\](\d{1})[\/.\\]\d{2}$/.test(dateStr)||/^(\d{2})[\/.\\](\d{2})[\/.\\]\d{2}$/.test(dateStr)||/^(\d{2})[\/.\\](\d{2})[\/.\\]\d{4}$/.test(dateStr)||/^(\d{1})[\/.\\](\d{1})[\/.\\]\d{4}$/.test(dateStr)||/^(\d{1})[\/.\\](\d{2})[\/.\\]\d{4}$/.test(dateStr)||/^(\d{2})[\/.\\](\d{1})[\/.\\]\d{4}$/.test(dateStr)){if(locale=="en_US"){if(RegExp.$2*1>31){return false;
}if(RegExp.$1*1>12){return false;}if((RegExp.$1*1==2)||(RegExp.$1*1==4)||(RegExp.$1*1==6)||(RegExp.$1*1==9)){if(RegExp.$2*1>30){return false;}}if((RegExp.$1*1==2)){if(RegExp.$2*1>29){return false;}}if((RegExp.$1*1==2)){if(!isLeapYear(dateStr)){if(RegExp.$2*1>28){return false;}}}}if(locale=="de_DE"||locale=="en_GB"){if(RegExp.$1*1>31){return false;}if(RegExp.$2*1>12){return false;}if((RegExp.$2*1==2)||(RegExp.$2*1==4)||(RegExp.$2*1==6)||(RegExp.$2*1==9)||(RegExp.$2*1==11)){if(RegExp.$1*1>30){return false;
}}if((RegExp.$2*1==2)){if(RegExp.$1*1>29){return false;}}if((RegExp.$2*1==2)){if(!isLeapYear(dateStr)){if(RegExp.$1*1>28){return false;}}}}return reformatDate(dateStr);}else{return false;}}function reformatDate(dateStr){dateStr=dateStr.toString();var locale=G_LOCALE;if(locale=="en_US"){var index11=dateStr.toString().indexOf("/");if(index11==-1){index11=10;}index12=dateStr.toString().indexOf("\\");if(index12==-1){index12=10;}index13=dateStr.toString().indexOf(".");if(index13==-1){index13=10;}var index1=Math.min(index11,index12);
index1=Math.min(index1,index13);var month=dateStr.substring(0,index1);month=addLeadingZero(month);var index21=dateStr.lastIndexOf("/");var index22=dateStr.lastIndexOf("\\");var index23=dateStr.lastIndexOf(".");var index2=Math.max(index21,index22);index2=Math.max(index2,index23);var day=dateStr.substring(index1+1,index2);day=addLeadingZero(day);var year=dateStr.substring(index2+1);year=addLeadingTwenty(year);var formatedDate=month+"/"+day+"/"+year;return formatedDate;}if(locale=="en_GB"){var index11=dateStr.toString().indexOf("/");
if(index11==-1){index11=10;}index12=dateStr.toString().indexOf("\\");if(index12==-1){index12=10;}index13=dateStr.toString().indexOf(".");if(index13==-1){index13=10;}var index1=Math.min(index11,index12);index1=Math.min(index1,index13);var month=dateStr.substring(0,index1);month=addLeadingZero(month);var index21=dateStr.lastIndexOf("/");var index22=dateStr.lastIndexOf("\\");var index23=dateStr.lastIndexOf(".");var index2=Math.max(index21,index22);index2=Math.max(index2,index23);dateStr=dateStr.toString();
var day=dateStr.substring(0,index1);day=addLeadingZero(day);var month=dateStr.substring(index1+1,index2);month=addLeadingZero(month);var year=dateStr.substring(index2+1);year=addLeadingTwenty(year);var formatedDate=day+"/"+month+"/"+year;return formatedDate;}if(locale=="de_DE"){var index11=dateStr.toString().indexOf("/");if(index11==-1){index11=10;}index12=dateStr.toString().indexOf("\\");if(index12==-1){index12=10;}index13=dateStr.toString().indexOf(".");if(index13==-1){index13=10;}var index1=Math.min(index11,index12);
index1=Math.min(index1,index13);var month=dateStr.substring(0,index1);month=addLeadingZero(month);var index21=dateStr.lastIndexOf("/");var index22=dateStr.lastIndexOf("\\");var index23=dateStr.lastIndexOf(".");var index2=Math.max(index21,index22);index2=Math.max(index2,index23);dateStr=dateStr.toString();var day=dateStr.substring(0,index1);day=addLeadingZero(day);var month=dateStr.substring(index1+1,index2);month=addLeadingZero(month);var year=dateStr.substring(index2+1);year=addLeadingTwenty(year);
var formatedDate=day+"."+month+"."+year;return formatedDate;}if(locale=="ja_JP"){var index11=dateStr.toString().indexOf("/");if(index11==-1){index11=10;}index12=dateStr.toString().indexOf("\\");if(index12==-1){index12=10;}index13=dateStr.toString().indexOf(".");if(index13==-1){index13=10;}var index1=Math.min(index11,index12);index1=Math.min(index1,index13);var index21=dateStr.lastIndexOf("/");var index22=dateStr.lastIndexOf("\\");var index23=dateStr.lastIndexOf(".");var index2=Math.max(index21,index22);
index2=Math.max(index2,index23);dateStr=dateStr.toString();var day=dateStr.substring(index2+1,dateStr.length);day=addLeadingZero(day);var month=dateStr.substring(index1+1,index2);month=addLeadingZero(month);var year=dateStr.substring(0,index1);year=addLeadingTwenty(year);var formatedDate=year+"/"+month+"/"+day;return formatedDate;}}function isLeapYear(date){var locale=G_LOCALE;var formatedDate=reformatDate(date);if(locale=="ja_JP"){var year=formatedDate.substring(0,4);}else{var year=formatedDate.substring(6);
}return new Date(year,2-1,29).getDate()==29;}function addLeadingZero(el){el="0"+el;el=el.substring(el.length-2,el.length);return el;}function addLeadingTwenty(el){el="20"+el;el=el.substring(el.length-4,el.length);return el;}function localDefaultTravelDates(){var locale=G_LOCALE;var arrivalDateField=jQuery("#checkin");var departureDateField=jQuery("#checkout");var errorField=jQuery("#errornotifications");if(errorField!=null){errorField.disabled="true";}var inDateStr=arrivalDateField.val();var outDateStr=departureDateField.val();
if(locale=="en_US"){var month1=inDateStr.substring(0,2);month1--;var day1=inDateStr.substring(3,5);var year1=inDateStr.substring(6);var month2=outDateStr.substring(0,2);month2--;var day2=outDateStr.substring(3,5);var year2=outDateStr.substring(6);var d1=new Date();var d2=new Date();d1.setFullYear(year1,month1,day1);d2.setFullYear(year2,month2,day2);updateCheckindayofweek(d1,"en_US");updateCheckoutdayofweek(d2,"en_US");var one_day=1000*60*60*24;var nbr=Math.round((d2-d1)/86400000);}if(locale=="de_DE"){var month1=inDateStr.substring(3,5);
var day1=inDateStr.substring(0,2);var year1=inDateStr.substring(6);month1--;var month2=outDateStr.substring(3,5);var day2=outDateStr.substring(0,2);var year2=outDateStr.substring(6);month2--;var d1=new Date();var d2=new Date();d1.setFullYear(year1,month1,day1);d2.setFullYear(year2,month2,day2);updateCheckindayofweek(d1,"de_DE");updateCheckoutdayofweek(d2,"de_DE");var one_day=1000*60*60*24;var nbr=Math.round((d2-d1)/86400000);}if(locale=="en_GB"){var month1=inDateStr.substring(3,5);var day1=inDateStr.substring(0,2);
var year1=inDateStr.substring(6);month1--;var month2=outDateStr.substring(3,5);var day2=outDateStr.substring(0,2);var year2=outDateStr.substring(6);month2--;var d1=new Date();var d2=new Date();d1.setFullYear(year1,month1,day1);d2.setFullYear(year2,month2,day2);updateCheckindayofweek(d1,"en_GB");updateCheckoutdayofweek(d2,"en_GB");var one_day=1000*60*60*24;var nbr=Math.round((d2-d1)/86400000);}if(locale=="ja_JP"){var month1=inDateStr.substring(5,7);month1--;var day1=inDateStr.substring(8);var year1=inDateStr.substring(0,4);
var month2=outDateStr.substring(5,7);month2--;var day2=outDateStr.substring(8);var year2=outDateStr.substring(0,4);var d1=new Date();var d2=new Date();d1.setFullYear(year1,month1,day1);d2.setFullYear(year2,month2,day2);updateCheckindayofweek(d1,"ja_JP");updateCheckoutdayofweek(d2,"ja_JP");var one_day=1000*60*60*24;var nbr=Math.round((d2-d1)/86400000);}updateNumberOfNights(1);}addLoadEvent(function(){});
/*############ End common/js/plug/search_validation.js ############*/
/*############ Begin hiway/en_GB/js/plug/onsite.js ############*/
var onImagesPath=onSurveyImage;
var onSecureImagePath=onSurveyImage;var onErrorPath=error404page;var onCookieDomain=G_DOMAIN;var onCookieName="OnSiteHilton";var onBulletPath="http://onsite.hilton-research.com/images/hilton_uks.gif";var onCookiePath="/";var onCookieDuration=null;var onPopFreq=tempSurveyFreq;var onPopDelay=2000;var onPagePop=true;var onRun=false;var onFlashParam='<param name="play" value="true" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="allowScriptAccess" value="always" />';
function onClientWidth(){return typeof (window.innerWidth)=="number"?window.innerWidth:dD.documentElement&&dD.documentElement.clientWidth?dD.documentElement.clientWidth:dD.body&&dD.body.clientWidth?dD.body.clientWidth:0;}function onClientHeight(){return typeof (window.innerWidth)=="number"?window.innerHeight:dD.documentElement&&dD.documentElement.clientHeight?dD.documentElement.clientHeight:dD.body&&dD.body.clientHeight?dD.body.clientHeight:0;}function onScrollX(){return typeof (window.pageXOffset)=="number"?window.pageXOffset:dD.body&&dD.body.scrollLeft?dD.body.scrollLeft:dD.documentElement&&dD.documentElement.scrollLeft?dD.documentElement.scrollLeft:0;
}function onScrollY(){return typeof (window.pageYOffset)=="number"?window.pageYOffset:dD.body&&dD.body.scrollTop?dD.body.scrollTop:dD.documentElement&&dD.documentElement.scrollTop?dD.documentElement.scrollTop:0;}function ONS_getObj(n){return dD.getElementById?dD.getElementById(n):dD.all?dD.all[n]:dD.layers[n];}function ONS_chkIndex(v1){var onsi=v1.split("/");if((onsi[3]=="")||(typeof (onsi[4])=="undefined"&&onsi[3].indexOf("index")!=-1)){return true;}return false;}function ONS_getRandom(){return Math.random();
}function ONS_getSiteID(v1){var siteID=ONS_getCookie("SiteID");if(siteID==null){var t=new Date();siteID=Math.floor(Math.random()*10000000000000)+""+t.getTime();ONS_setCookie("SiteID",siteID,onCookieDuration,24);}return siteID;}function ONS_getURL(v1,v2){if((v1==null)||(v1=="")){return"NONE";}v1=v1.toString().toLowerCase();return v1.substring(0,(pos=v1.indexOf(v2))>0?pos:v1.length);}function ONS_getParameter(pl,pStr){if((pl==null)||(pl=="")){return false;}pl=pl.toString().toLowerCase();pStr=pStr+"=";
var bpos=pl.indexOf(pStr);if(bpos!=-1){bpos+=pStr.length;var epos=pl.indexOf("&",bpos);if(epos==-1){epos=pl.length;}return unescape(pl.substring(bpos,epos));}return"";}function ONS_getCookie(n){var name=n+"=",ca=dD.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(name)==0){return c.substring(name.length,c.length);}}return null;}function ONS_setCookie(n,v,d,h){var t=new Date(),g=v.toString().toLowerCase();t.setTime(t.getTime()+(d*h*60*60*1000));
var exp=d?";expires="+t.toGMTString():"";if(v!=""){v=v.toString().replace(/[!<}#;]/g,"");}if(d==null){dD.cookie=n+"="+v+(onCookieDomain?"; domain="+onCookieDomain:"")+";path="+onCookiePath;}else{dD.cookie=n+"="+v+exp+(onCookieDomain?";domain="+onCookieDomain:"")+";path="+onCookiePath;}}function ONS_SiteTrack(){onSiteCount=ONS_getCookie("OnSiteNum");if((onSiteCount=="")||(onSiteCount==null)){onSiteCount="0";}ONS_SiteSave();}function ONS_PopSurvey(v1){onSStage=ONS_getCookie(onCookieName+"S");if(onSStage<8&&onSStage!=null){if(onTracking){onChildWin=window.open(v1+"?onsid="+onSiteID+"&lang="+onKey,"On2Survey",onWSetting);
ONS_SiteSave("End");}else{onChildWin=window.open(v1+"?3q=1&onsid="+onSiteID+"&lang="+onKey+"&loc="+escape(onLocation),"On2Survey",onSSetting);ONS_setCookie(onCookieName+"S",9,null,2);}}ONS_setCookie(onCookieName,0,onCookieDuration,24);if(onTracking){ONS_setCookie(onCookieName+"SV",3,90,24);}ONS_setCookie(onCookieName+"S","",-1,24);ONS_setCookie(onCookieName+"C","",-1,24);ONS_IconHide("OnSiteFloatIcon");return false;}function ONS_SubmitInfo(v1,v2,v3,v4){var strparam="onsid="+v1;var onPValue=new Image();
strparam=strparam+"&onifo="+escape(v3);strparam=strparam+"&onend="+v4;strparam=strparam+"&rf="+escape(ONS_getCookie(onCookieName+"C"));strparam=strparam+"&ul="+navigator.userLanguage;strparam=strparam+"&sl="+navigator.systemLanguage;strparam=strparam+"&lang="+onKey;strparam=strparam+"&stype="+onSurveyType;if(onLocation.indexOf("https")==-1){onPValue.src=onServerPath+"?"+strparam;}else{onPValue.src=onServerSPath+"?"+strparam;}}function ONS_SiteSave(n){onTStage=ONS_getCookie(onCookieName+"S");var t=new Date();
var onSTime=Date.UTC(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());var onSData=(onSData=ONS_getCookie("ONSData"))?onSData:"";var onSInfo=(onSInfo=ONS_getCookie("ONSInfo"))?onSInfo:"";var onSINum=(onSINum=ONS_getCookie("ONSINum"))?onSINum:0;var r1=onSInfo.substring(onSInfo.lastIndexOf("^")+1,onSInfo.length);if(onTStage<8&&onTStage!=null){if(n=="End"){ONS_setCookie("ONSInfo","",-1,24);ONS_setCookie("ONSData","",-1,24);ONS_setCookie("ONSINum","",-1,24);ONS_setCookie(onCookieName+"S",9,null,2);
onSData=onSData+"999"+onSInfo.substring(onSInfo.indexOf("^"),onSInfo.lastIndexOf("^")+1)+((onSTime-r1)/1000)+"^";ONS_SubmitInfo(onSiteID,onLocation,onSData,"true");}else{onSINum=parseInt(onSINum)+1;if(r1!=""){onSData=onSData+onSInfo.substring(0,onSInfo.lastIndexOf("^")+1)+((onSTime-r1)/1000)+"^";}onSInfo=onSINum+"^"+onLocation+"^"+onSTime;ONS_setCookie("ONSInfo",onSInfo,null,null);ONS_setCookie("ONSData",onSData,null,null);ONS_setCookie("ONSINum",onSINum,null,null);if(onSData.length>=500){ONS_SubmitInfo(onSiteID,onLocation,onSData,"false");
ONS_setCookie("ONSData",onSData="",null,null);}}}}function ONS_Tags(){var onTagSyntax=[["","","Provide<BR>Feedback"],["",""],["",""],["",""],["","","&#12450;&#12531;&#12465;&#12540;&#12488;&#12395;&#31572;&#12360;&#12427;"],["","","Umfrage starten"]];var onMsgText="";var onMsgButt="";var onMsgFoot="";var newObj;var onFlashObj='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" pluginspage="http://www.macromedia.com/shockwave/download/" width="290" height="165" id="popup" align="middle"><param name="movie" value="'+onImagesPath+"popup"+onKey+'.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" />'+onFlashParam+'<embed src="'+onImagesPath+"popup"+onKey+'.swf" FlashVars="onKey='+onKey+"&onImagesPath="+onImagesPath+'" quality="high" wmode="transparent" width="290" height="165" name="popup" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always" /></object>';
var onIconObj='<A href="'+onSurveyPath+'" target="OnSiteSurvey" onClick="return ONS_PopSurvey(this.href);" style="color:#0860a8;text-decoration:none" onmouseout="this.style.textDecoration=\'none\'" onmouseover="this.style.textDecoration=\'underline\'"><IMG src="'+onImagesPath+'icon.gif" border="0" style="opacity:0.6;filter:alpha(opacity=70)" alt="Click here to provide feedback!"><BR>'+onTagSyntax[onKey][2]+"</A>";if(!blnSecureSite){newObj=dD.createElement("DIV");newObj.setAttribute("id","OnSiteFloatWin");
dD.body.appendChild(newObj);onObj=ONS_getObj("OnSiteFloatWin");onObj.style.display="none";onObj.style.width=onFloatWidth+px;onObj.style.backgroundColor="transparent";onObj.style.position="absolute";onObj.style.zIndex="10001";dD.getElementById("OnSiteFloatWin").innerHTML=onFlashObj;}newObj=dD.createElement("DIV");newObj.setAttribute("id","OnSiteFloatIcon");dD.body.appendChild(newObj);onObj=ONS_getObj("OnSiteFloatIcon");onObj.style.display="none";onObj.style.width="60"+px;onObj.style.backgroundColor="transparent";
onObj.style.position="absolute";onObj.style.zIndex="10001";onObj.style.fontSize="8pt";onObj.style.fontFamily="verdana";onObj.style.textAlign="center";dD.getElementById("OnSiteFloatIcon").innerHTML=onIconObj;return true;}function ONS_FloatHide(v1){onTracking=false;ONS_InitTrack();if(eval(onObj)&&onObj.id=="OnSiteFloatWin"){onObj.style.display="none";}return ;}function ONS_FloatHide2(){if(eval(onObj)&&onObj.id=="OnSiteFloatWin"){onObj.style.display="none";}return ;}function ONS_InitTrack(){ONS_FloatHide2();
if(!ONS_getCookie(onCookieName+"S")){if(onTracking){ONS_setCookie(onCookieName,1,onCookieDuration,24);}else{ONS_setCookie(onCookieName,2,onCookieDuration,24);}ONS_setCookie(onCookieName+"S",1,null,2);ONS_IconInit("OnSiteFloatIcon");}return ;}function ONS_FloatInit(id){onObj=ONS_getObj(id);onObj.style.left=250+px;onObj.style.top=20+px;onObj.style.display="block";return ;}function ONS_IconFloat(iX,iY,id){var L=ONS_getObj(id);L.style.display="block";this[id+"O"]=L;if(dD.layers){L.style=L;}L.nX=iX;L.nY=iY;
L.P=function(x,y){this.style.left=x+px;this.style.top=y+px;};L.Fm=function(){this.nX=onScrollX()+(onClientWidth()-100);this.nY=onScrollY()+(onClientHeight()-70);this.P(this.nX,this.nY);onTimerID=setTimeout(this.id+"O.Fm()",50);};return L;}function ONS_IconHide(){if(eval(onObj)){clearTimeout(onTimerID);onObj.style.display="none";}}function ONS_IconInit(id){if(onLocation.indexOf("https")==-1&&onTracking){ONS_SiteTrack();}onObj=ONS_getObj(id);onObj.style.display="block";ONS_IconFloat(-80,-80,id).Fm();
return ;}function ON_ChkStatus(id){if(onblnStatus&&id=="pop"){setTimeout("ONS_FloatInit('OnSiteFloatWin')",onPopDelay);}else{onChkStatus=onChkStatus+1;if(onblnStatus==false&&onBulletStatus.complete){onblnStatus=true;}if(onChkStatus<5){setTimeout("ON_ChkStatus('"+id+"')",1000);}else{if(onChildWin){onChildWin.location=onErrorPath;}}}}function ONS_InitPop(){onAccess=[];onDisable=[];return true;}function ONS_SpecPop(qL,qA,qD,qP){for(var c=0;c<qD.length;c++){if(qL.indexOf(qD[c])!=-1){return false;}}if(qL.indexOf("https")!=-1){onImagesPath=onSecureImagePath;
blnSecureSite=true;}if(qP==null){if(qL.indexOf("https")!=-1){return false;}for(var c=0;c<qA.length;c++){if(qL.indexOf(qA[c][0])!=-1){if((qA[c][1]>onPopFreq&&onPopFreq!=0)||qA[c][1]==0){onPopFreq=qA[c][1];}}}}return true;}function ONS_Survey(){if(ONS_InitPop()){if(ONS_SpecPop(onLocation,onAccess,onDisable,onSStage)){onTagbln=ONS_Tags();if(onSStage==null){if((ONS_getRandom()<=onPopFreq)&&onSurvey==null){onBullet.src=onBulletPath;onBulletStatus.src=onStatusPath+"?rnd="+(ONS_getRandom*100);ON_ChkStatus("pop");
}else{onTracking=false;if(!onIndexPgr){ONS_InitTrack();}}}else{if(onSStage<8){ONS_IconInit("OnSiteFloatIcon");}}}}}function ONS_OnSite(){if((onSIntel!=null&&onSStage!=null)||(onSIntel==null&&onSStage==null)){onEXE=true;}if(onRun&&onEXE&&dD.cookie){if(dD.cookie){if(((onSIntel==1||onSIntel==2)&&(onSStage<8&&onSStage!=null))||onSIntel==null){ONS_Survey();}}}else{onObj=ONS_getObj("OnSiteFloatIcon");if(onObj){onObj.style.display="none";}}}var onFloatWidth=290;var onServerPath="http://onsite.hilton-research.com/engine/saventinfo.asp";
var onServerSPath="https://onsite.hilton-research.com/engine/saventinfo.asp";var onSurveyPath="http://onsite.hilton-research.com/engine/savenfinal.asp";var onStatusPath="http://onsite.hilton-research.com/images/hilton.gif";var onSiteCount=0;var onTagbln=false;var onblnStatus=false;var onChkStatus=0;var onEXE=false;var onMX,onMDf,onMD,onMY,onMLf,onML;var onFloatOn;var onChildWin;var onObj=null;var onImage=new Image();var onBullet=new Image();var onBulletStatus=new Image();var dD=document;var nN=navigator;
var wN=window;var px=dD.layers?"":"px";var onKey="0";var onTracking=true;var onAccess,onDisable,blnSecureSite=false;var onWSetting="width="+(screen.availWidth-150)+",height="+(screen.availHeight-100)+",left=0,top=0,resizable=1,scrollbars=1";var onSSetting="width=550,height=400,left="+(onClientWidth()-560)+",top="+((onClientHeight()-300))+",resizable=1,scrollbars=0";var onisNN=(nN.appName.indexOf("Netscape")!=-1);var onisIE=(nN.appName.indexOf("Microsoft")!=-1);var onisOP=(nN.userAgent.toLowerCase().indexOf("opera")>-1)?true:false;
var onisNS=(nN.userAgent.toLowerCase().indexOf("mozilla")!=-1)&&(parseInt(nN.appVersion)>=5);var onisMAC=(nN.appVersion.indexOf("Macintosh")>-1);var onSurveyType="0";var onLocation=ONS_getURL(dD.location,"");var onReferrer=ONS_getURL(dD.referrer,"?");var onIndexPgr=ONS_chkIndex(onLocation);var onSIntel=ONS_getCookie(onCookieName);var onSurvey=ONS_getCookie(onCookieName+"SV");var onSStage=ONS_getCookie(onCookieName+"S");var onCookie=ONS_getCookie(onCookieName+"C");var onSiteID=ONS_getSiteID();var pre_onload=window.onload;
if(onSIntel==2){onTracking=false;}if(onCookie==null){ONS_setCookie(onCookieName+"C",onReferrer,null,24);}if(wN.attachEvent){wN.attachEvent("onload",ONS_OnSite);}else{if(dD.addEventListener){dD.addEventListener("DOMContentLoaded",ONS_OnSite,false);
/*############ End hiway/en_GB/js/plug/onsite.js ############*/
}}