/* * jQuery idleTimer plugin * version 0.8.092209 * by Paul Irish. * http://github.com/paulirish/yui-misc/tree/ * MIT license * adapted from YUI idle timer by nzakas: * http://github.com/nzakas/yui-misc/ * Copyright (c) 2009 Nicholas C. Zakas * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ (function($){ $.idleTimer = function f(newTimeout){ //$.idleTimer.tId = -1 //timeout ID var idle = false, //indicates if the user is idle enabled = true, //indicates if the idle timer is enabled timeout = 30000, //the amount of time (ms) before the user is considered idle events = 'click DOMMouseScroll mousewheel', // activity is one of these events //mousemove keydown DOMMouseScroll mousewheel mousedown //f.olddate = undefined, // olddate used for getElapsedTime. stored on the function /* (intentionally not documented) * Toggles the idle state and fires an appropriate event. * @return {void} */ toggleIdleState = function(){ //toggle the state idle = !idle; // reset timeout counter f.olddate = +new Date; //fire appropriate event $(document).trigger( $.data(document,'idleTimer', idle ? "idle" : "active" ) + '.idleTimer'); }, /** * Stops the idle timer. This removes appropriate event handlers * and cancels any pending timeouts. * @return {void} * @method stop * @static */ stop = function(){ //set to disabled enabled = false; //clear any pending timeouts clearTimeout($.idleTimer.tId); //detach the event handlers $(document).unbind('.idleTimer'); }, /* (intentionally not documented) * Handles a user event indicating that the user isn't idle. * @param {Event} event A DOM2-normalized event object. * @return {void} */ handleUserEvent = function(){ //clear any existing timeout clearTimeout($.idleTimer.tId); //if the idle timer is enabled if (enabled){ //if it's idle, that means the user is no longer idle if (idle){ toggleIdleState(); } //set a new timeout $.idleTimer.tId = setTimeout(toggleIdleState, timeout); } }; /** * Starts the idle timer. This adds appropriate event handlers * and starts the first timeout. * @param {int} newTimeout (Optional) A new value for the timeout period in ms. * @return {void} * @method $.idleTimer * @static */ f.olddate = f.olddate || +new Date; //assign a new timeout if necessary if (typeof newTimeout == "number"){ timeout = newTimeout; } else if (newTimeout === 'destroy') { stop(); return this; } else if (newTimeout === 'getElapsedTime'){ return (+new Date) - f.olddate; } //assign appropriate event handlers $(document).bind($.trim((events+' ').split(' ').join('.idleTimer ')),handleUserEvent); //set a timeout to toggle state $.idleTimer.tId = setTimeout(toggleIdleState, timeout); // assume the user is active for the first x seconds. // $.data(document,'idleTimer',"active"); }; // end of $.idleTimer() })(jQuery); /* * jQuery Idle Timeout 1.2 * Copyright (c) 2011 Eric Hynds * * http://www.erichynds.com/jquery/a-new-and-improved-jquery-idle-timeout-plugin/ * * Depends: * - jQuery 1.4.2+ * - jQuery Idle Timer (by Paul Irish, http://paulirish.com/2009/jquery-idletimer-plugin/) * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ (function($, win){ var idleTimeout = { init: function( element, resume, options ){ var self = this, elem; this.warning = elem = $(element); this.resume = $(resume); this.options = options; this.countdownOpen = false; this.failedRequests = options.failedRequests; this._startTimer(); // expose obj to data cache so peeps can call internal methods $.data( elem[0], 'idletimeout', this ); // start the idle timer $.idleTimer(options.idleAfter * 1000); // once the user becomes idle $(document).bind("idle.idleTimer", function(){ //Call attention by scrolling the window to the top scroll(0,0); // if the user is idle and a countdown isn't already running if( $.data(document, 'idleTimer') === 'idle' && !self.countdownOpen ){ self._stopTimer(); self.countdownOpen = true; self._idle(); } }); // bind continue link this.resume.bind("click", function(e){ e.preventDefault(); win.clearInterval(self.countdown); // stop the countdown self.countdownOpen = false; // stop countdown self._startTimer(); // start up the timer again self._keepAlive( false ); // ping server options.onResume.call( self.warning ); // call the resume callback }); }, _idle: function(){ var self = this, options = this.options, warning = this.warning[0], counter = options.warningLength; // fire the onIdle function options.onIdle.call(warning); // set inital value in the countdown placeholder options.onCountdown.call(warning, counter); // create a timer that runs every second this.countdown = win.setInterval(function(){ if(--counter === 0){ window.clearInterval(self.countdown); options.onTimeout.call(warning); } else { options.onCountdown.call(warning, counter); } }, 1000); }, _startTimer: function(){ var self = this; this.timer = win.setTimeout(function(){ self._keepAlive(); }, this.options.pollingInterval * 1000); }, _stopTimer: function(){ // reset the failed requests counter this.failedRequests = this.options.failedRequests; win.clearTimeout(this.timer); }, _keepAlive: function( recurse ){ var self = this, options = this.options; // assume a startTimer/keepAlive loop unless told otherwise if( typeof recurse === "undefined" ){ recurse = true; } // if too many requests failed, abort if( !this.failedRequests ){ this._stopTimer(); options.onAbort.call( this.warning[0] ); return; } $.ajax({ timeout: options.AJAXTimeout, url: options.keepAliveURL, error: function(){ self.failedRequests--; }, success: function(response){ if($.trim(response) !== options.serverResponseEquals){ self.failedRequests--; } }, complete: function(){ if( recurse ){ self._startTimer(); } } }); } }; // expose $.idleTimeout = function(element, resume, options){ idleTimeout.init( element, resume, $.extend($.idleTimeout.options, options) ); return this; }; // options $.idleTimeout.options = { // number of seconds after user is idle to show the warning warningLength: 60, // url to call to keep the session alive while the user is active keepAliveURL: "", // the response from keepAliveURL must equal this text: serverResponseEquals: "OK", // user is considered idle after this many seconds. 10 minutes default idleAfter: 600, // a polling request will be sent to the server every X seconds pollingInterval: 60, // number of failed polling requests until we abort this script failedRequests: 5, // the $.ajax timeout in MILLISECONDS! AJAXTimeout: 10000, /* Callbacks "this" refers to the element found by the first selector passed to $.idleTimeout. */ // callback to fire when the session times out onTimeout: $.noop, // fires when the user becomes idle onIdle: $.noop, // fires during each second of warningLength onCountdown: $.noop, // fires when the user resumes the session onResume: $.noop, // callback to fire when the script is aborted due to too many failed requests onAbort: $.noop }; })(jQuery, window); var feedBackOffState = "反馈"; var feedBackOnState = "选择此处为此页面评分。"; var UHF = (function($) { // -------------------------------------------------------------------- // Document Ready Handler // -------------------------------------------------------------------- $(document).ready(function(){ setupNotYouLink(); setupSignOutLink(); setupSignInDialog(); setupGenericDialog(); setupSecureConsentDialog(); setupForgotPinDialog(); setupCreatePinDialog(); setupCreateEmailDialog(); setupLanguageMenu(); setupCountryLanguageDialog(); setupPcrProfilesMenu(); setupWallet(); setup0871Dialog(); setupBookWithConfidenceDialog(); setupTopDestinations(); setupWalletFlyout(); setupWalletActivity(); showEUModal(); // Close any open dialogs when escape key is pressed. $(document).keypress(function(e) { if (e.keyCode == 27) { closeAllDialogs(); } }); /* OnlineOpinion v5.7.7 Released: 11/19/2013. Compiled 11/19/2013 03:08:33 PM -0600 Branch: master Nov Components: Full UMD: disabled The following code is Copyright 1998-2013 Opinionlab, Inc. All rights reserved. Unauthorized use is prohibited. This product and other products of OpinionLab, Inc. are protected by U.S. Patent No. 6606581, 6421724, 6785717 B1 and other patents pending. http://www.opinionlab */ (function(a,b){if(('disabled'==='enabled')&&(typeof define==='function')&&define.amd){define([],b)}else{window.OOo=b()}}(this,function(){var d={__detectBrowser:function(a){var b=Object.prototype.toString.call(window.opera)==='[object Opera]',c/*@cc_on=parseFloat((/MSIE[\s]*([\d\.]+)/).exec(navigator.appVersion)[1])@*/,e={IE:!!c,Opera:b,WebKit:a.indexOf('AppleWebKit/')>-1,Chrome:a.indexOf('Chrome')>-1,Gecko:a.indexOf('Gecko')>-1&&a.indexOf('KHTML')===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(a),iOs:a.indexOf('iPad')>-1||a.indexOf('iPhone')>-1||a.indexOf('iPod')>-1,iOS67:a.search(/OS (6_0|7_0) like Mac OS/i)>-1,PalmPre:a.indexOf('Pre/')>-1,BlackBerry:a.indexOf('BlackBerry')>-1,Fennec:a.indexOf('Fennec')>-1,IEMobile:a.indexOf('IEMobile')>-1,OperaMobile:a.search(/Opera (?:Mobi|Mini)/)>-1,Kindle:a.search(/[ ](Kindle|Silk)/)>-1,ua:a},f=false;e.isMobile=(e.MobileSafari||e.PalmPre||e.BlackBerry||e.Fennec||e.IEMobile||e.OperaMobile||e.Kindle);e.isMobileNonIOS=(e.isMobile&&(!e.MobileSafari||a.search('Android')!==-1));return e}};d.Browser=d.__detectBrowser(navigator.userAgent);d.Cache={};d.instanceCount=0;d.K=function(){};var F=F||d;(function(){function k(a){return document.getElementById(a)}function l(a,b){var c;for(c in b){if(b.hasOwnProperty(c)){a[c]=b[c]}}return a}function m(a,b,c,e){if(a.addEventListener){a.addEventListener(b,c,e)}else if(a.attachEvent){a.attachEvent('on'+b,c)}}function r(a,b,c,e){if(a.removeEventListener){a.removeEventListener(b,c,e)}else if(a.detachEvent){a.detachEvent('on'+b,c)}}function o(a){var b=[],c;for(c in a){if(a.hasOwnProperty(c)){b.push(c+'='+(encodeURIComponent(a[c])||''))}}return b.join('&')}function t(a){var b=o(a.metrics),c=a.tealeafId+'|'+a.clickTalePID+'/'+a.clickTaleUID+'/'+a.clickTaleSID;b+='&custom_var='+d.createLegacyVars(a.legacyVariables,c);if(a.metrics.type==='OnPage'){b+='|iframe'}if(a.asm){b+='&asm=2'}b+="&_"+'rev=2';if(a.customVariables){b+='&customVars='+encodeURIComponent(d.serialize(a.customVariables))}return b}function n(a,b){var c=document,e=c.createElement('form'),f=c.createElement('input'),g=a.referrerRewrite;a.metrics.referer=location.href;if(g){a.metrics.referer=d.referrerRewrite(g)}e.style.display='none';e.method='post';e.target=b||'OnlineOpinion';e.action=a.onPageCard?'https://secure.opinionlab.com/ccc01/comment_card_json_4_0_b.asp?r='+location.href:'https://secure.opinionlab.com/ccc01/comment_card_d.asp?referer=http%3A//www.ihg.com/hotels/cn/zh/reservation';if(a.commentCardUrl){e.action=a.commentCardUrl;if(a.onPageCard){e.action+='?r='+location.href}}f.name='params';f.value=t(a);e.appendChild(f);c.body.appendChild(e);return e}function s(){return{width:screen.width,height:screen.height,referer:location.href,prev:document.referrer,time1:(new Date()).getTime(),time2:null,currentURL:location.href,ocodeVersion:'5.7.7'}}function u(a){var b='';if(a&&a.search('://')>-1){var c=a.split('/');for(var e=3;e=0;c-=1){b+='0123456789abcdef'.charAt((a>>(c*4))&0x0F)}return b}function u(a){var b=((a.length+8)>>6)+1,c=new Array(b*16),e;for(e=0;e>2]|=a.charCodeAt(e)<<(24-(e%4)*8)}c[e>>2]|=0x80<<(24-(e%4)*8);c[b*16-1]=a.length*8;return c}function p(a,b){var c=(a&0xFFFF)+(b&0xFFFF),e=(a>>16)+(b>>16)+(c>>16);return(e<<16)|(c&0xFFFF)}function q(a,b){return(a<>>(32-b))}function w(a,b,c,e){if(a<20){return(b&c)|((~b)&e)}if(a<40){return b^c^e}if(a<60){return(b&c)|(b&e)|(c&e)}return b^c^e}function x(a){return(a<20)?1518500249:(a<40)?1859775393:(a<60)?-1894007588:-899497514}function v(a){var b=u(a),c=new Array(80),e=1732584193,f=-271733879,g=-1732584194,h=271733878,i=-1009589776,j,k,l,m,r,o,t,n;for(t=0;t=0;b-=1){if(a[b].read){c=d.readCookie(a[b].name);if(!!c&&c===a[b].value){return true}else if(typeof a[b].value==='undefined'&&!!d.readCookie(a[b].name)){return true}}}return false}function f(a){var b;for(b=a.length-1;b>=0;b-=1){if(a[b].set){d.createCookie(a[b].name,a[b].value,a[b].expiration)}}}d.extend(d,{checkThirdPartyCookies:e,setThirdPartyCookies:f})}());d.extend(Function.prototype,(function(){if(typeof Function.prototype.bind!=="undefined"){return}var f=Array.prototype.slice;function g(a,b){var c=a.length,e=b.length;while(e){e-=1;a[c+e]=b[e]}return a}function h(a,b){a=f.call(a,0);return g(a,b)}function i(b){if(arguments.length<2&&typeof b==="undefined"){return this}var c=this,e=f.call(arguments,1);return function(){var a=h(e,arguments);return c.apply(b,a)}}return{bind:i}}()));(function(){function g(a){if(!a){a=location}var b;if(a.host.search(/\.[a-z]+/)!==-1){b=a.host.split('.').reverse();if(b.length>3){return a.host}b='.'+b[1]+'.'+b[0]}else{b=a.host}return b}function h(a,b,c){var e='',f='';if(c){e=new Date();e.setTime(e.getTime()+(c*1000));f="; expires="+e.toGMTString()}if(location.host!==g()){document.cookie=a+"="+b+f+"; path=/; domain="+g()+";"}else{document.cookie=a+"="+b+f+"; path=/;"}}function i(a){var b=a+"=",c=document.cookie.split(';'),e,f;for(f=0;f=0;h-=1){f=c[h];if(a[f]instanceof Array){i=a[f];j=i.length;while(j&&!b[h]){j-=1;if(window.location.href.search(i[j].url)!==-1&&Math.random()>=1-i[j].p/100){b[h]=true}}}else if(a[f]&&Math.random()>=1-a[f]/100){b[h]=true}}if(b[0]){d.addEventListener(window,e,this.show.bind(this,'onExit'),false)}if(b[1]){if(a.delayEntry){window.setTimeout(function(){if(a.prompt)this.getPrompt();else this.show()}.bind(this,'onEntry'),a.delayEntry*1000)}else{if(a.prompt)this.getPrompt();else this.show('onEntry')}}}function l(a){var b=a||window.event,c=a.target||a.srcElement,e=this.options.events,f=c.parentNode,g=5,h=0;while(f&&(c.nodeName!=='A'||c.nodeName!=='INPUT')&&h!==g){if(f.nodeName==='A'){c=f}f=f.parentNode;h+=1}if(e.disableFormElements&&(c.tagName==="INPUT"||c.tagName==="BUTTON")&&(c.type==='submit'||c.type==='image'||c.type==='reset'||c.type==='button')){this.interruptShow=true}if(e.disableLinks&&(c.nodeName==='A'||c.nodeName==='AREA')&&c.href.substr(0,4)==='http'&&c.href.search(e.disableLinks)!==-1){this.interruptShow=true}}function m(a){this.interruptShow=true}function r(){d.addEventListener(document.body,'mousedown',l.bind(this));if(!this.options.events.disableFormElements){return}var a=document.getElementsByTagName('form'),b;for(b=a.length-1;b>=0;b-=1){d.addEventListener(a[b],'submit',m.bind(this))}}d.extend(d.Ocode.prototype,{setupEvents:k,setupDisableElements:r,getPrompt:function(){d.getPrompt.call(this)},showPrompt:function(a){if(this.options.cookie){d.Ocode.tagUrl(this.options.cookie)}d.showPrompt.call(this,a,this.show)}})}());d.extend(d.Ocode.prototype,{floating:function(){var e=document,f=this.floatingLogo=document.createElement('div'),g=e.createElement('div'),h=e.createElement('div'),i=e.createElement('div'),j=e.createElement('span'),k=this.options.floating,l=d.$(k.contentId),m='10px',r=k.id,o=e.createElement('span'),t,n,s,u,p,q,w,x;function v(a){return a.offsetLeft+a.offsetWidth}function B(a){u.style.left=v(l)+'px'}o.innerHTML="Screen reader users: Please switch to forms mode for this link.";o.className="screen_reader";if(r){f.id=r}f.className='oo_feedback_float';h.className='oo_transparent';g.className='olUp';i.className='olOver';g.tabIndex=0;g.onkeyup=function(a){t=a||window.event;if(t.keyCode!==13){return}this.show()}.bind(this);g.innerHTML=k.caption||'Feedback';f.appendChild(o);f.appendChild(g);j.innerHTML=k.hoverCaption||'Click here to
rate this page';i.appendChild(j);f.appendChild(i);f.appendChild(h);function y(a){var b=e.documentElement.scrollTop||e.body.scrollTop,c=e.documentElement.clientHeight||document.body.clientHeight;f.style.top=(b+c-(w||0)-10)+'px'}if(d.Browser.MobileSafari){if(d.Browser.ua.search('OS 4')!==-1){n=window.innerHeight;f.style.bottom=null;f.style.top=(window.pageYOffset+window.innerHeight-60)+'px';x=function(a){s=window.pageYOffset-(n-window.innerHeight);f.style.webkitTransform='translateY('+s+'px)'};d.addEventListener(window,'scroll',x,false);setTimeout(x,100)}}else if(!d.POSITION_FIXED_SUPPORTED){f.style.position='absolute';f.style.bottom='';d.addEventListener(window,'scroll',y,false);d.addEventListener(window,'resize',y,false);if(e.compatMode==="BackCompat"){f.style.background="white"}}if(k.position&&k.position.search(/Content/)&&l){u=this.spacer=e.createElement('div');p=d.Browser.WebKit?e.body:e.documentElement;u.id='oo_feedback_fl_spacer';u.style.left=v(l)+'px';e.body.appendChild(u);switch(k.position){case'rightOfContent':q=function(a){f.style.left=(v(l)-p.scrollLeft)+'px';if(!d.POSITION_FIXED_SUPPORTED){q=null}};break;case'fixedPreserveContent':q=function(a){var b=d.Browser.IE?e.body.clientWidth:window.innerWidth,c=d.POSITION_FIXED_SUPPORTED?p.scrollLeft:0;if(b<=v(l)+f.offsetWidth+parseInt(m,10)){f.style.left=(v(l)-c)+'px'}else{f.style.left='';f.style.right=m}};break;case'fixedContentMax':q=function(a){var b=d.Browser.IE?e.body.clientWidth:window.innerWidth;if(b<=v(l)+f.offsetWidth+parseInt(m,10)){f.style.left='';f.style.right=m;if(!d.POSITION_FIXED_SUPPORTED&&a&&a.type==='scroll'){f.style.left=(e.body.clientWidth+e.body.scrollLeft-105)+'px'}}else{f.style.left=(v(l)-p.scrollLeft)+'px';f.style.right=''}};break}window.setTimeout(q,0);d.addEventListener(window,'scroll',q,false);d.addEventListener(window,'resize',q,false);d.addEventListener(window,'resize',B,false)}else{f.style.right=m}d.addEventListener(f,'click',this.show.bind(this,'Floating'),false);d.addEventListener(f,'touchend',this.show.bind(this,'Floating'),false);e.body.appendChild(f);if(!d.POSITION_FIXED_SUPPORTED&&!d.Browser.MobileSafari){h.style.height=f.clientHeight+'px';w=f.clientHeight;setTimeout(y,100)}},removeFloatingLogo:function(){document.body.removeChild(this.floatingLogo);if(this.spacer){document.body.removeChild(this.spacer)}}});d.extend(d.Ocode.prototype,{bar:function(){var e=document,f=this.floatingLogo=e.createElement('div'),g=e.createElement('span'),h,i,j,k=e.documentElement.scrollTop||e.body.scrollTop,l=e.createElement('div');function m(a){var b=0,c=0;if(a.offsetParent){do{b+=a.offsetLeft;c+=a.offsetTop}while(a=a.offsetParent);return[b,c]}}function r(a){var b=document.activeElement,c;if(!b)return;c=m(b);if(!c)return;if(c[1]+b.clientHeight>(window.innerHeight||document.body.clientHeight)+(window.pageYOffset||document.body.scrollTop)-f.clientHeight)window.scrollBy(0,b.clientHeight+20)}l.innerHTML='Link opens comment card';l.className='screen_reader';f.appendChild(l);this.reflowBar=d.K;f.id='oo_bar';g.innerHTML=this.options.bar.caption||'Feedback';f.appendChild(g);f.tabIndex=0;f.onkeyup=function(a){var b=a||window.event;if(b.keyCode!==13){return}this.show()}.bind(this);d.addEventListener(f,'click',this.show.bind(this,'Bar'));document.body.className+=document.body.className<1?'oo_bar':' oo_bar';document.body.appendChild(f);var o=/MSIE ([\d\.]+);/.exec(window.navigator.userAgent);if(d.Browser.IE&&o&&+o[1]<8){if(e.compatMode==='CSS1Compat'){h=function(a){if(a&&a.type==='resize'){setTimeout(h,50)}f.style.top=(e.documentElement.scrollTop+document.documentElement.clientHeight-f.clientHeight-1)+'px';f.style.width=(Math.max(e.documentElement.clientWidth,e.body.offsetWidth))+'px'}}else{h=function(a){f.style.top=(e.body.scrollTop+document.body.clientHeight-f.clientHeight-1)+'px';f.style.width=(Math.max(e.documentElement.clientWidth,e.body.offsetWidth)-22)+'px'}}f.style.position='absolute';d.addEventListener(window,'scroll',h,false);d.addEventListener(window,'resize',h,false);this.reflowBar=function(){f.style.display='none';h();f.style.display='block'};h()}else if(d.Browser.MobileSafari&&d.Browser.ua.search('OS 4')!==-1){i=window.innerHeight;f.style.bottom=null;f.style.top=(window.pageYOffset+window.innerHeight-22)+'px';h=function(a){j=window.pageYOffset-(i-window.innerHeight);f.style.webkitTransform='translateY('+j+'px)'};d.addEventListener(window,'scroll',h,false);setTimeout(h,100)}d.addEventListener(document.body,'keyup',r,false)}});d.extend(d.Ocode.prototype,{tab:function(){var f=document,g=this.floatingLogo=f.createElement('div'),h=f.createElement('div'),i=f.createElement('div'),j=f.createElement('span'),k=this.options.tab;if(k.wcagBasePath){i=f.createElement('a');i.setAttribute('href','#');j=f.createElement('img');j.className='logo';j.setAttribute('alt',"Feedback");j.setAttribute('src',k.wcagBasePath+((d.Browser.ua.search('IE 6')!==-1)?"oo_tabie6.png":"oo_tab.png"))}function l(a){var b=f.documentElement.scrollTop||f.body.scrollTop,c=f.documentElement.scrollLeft||f.body.scrollLeft,e=f.documentElement.clientHeight||document.body.clientHeight;g.style.top=(b+(e/2-g.clientHeight/2))+'px';if((!k.position||k.position==='right'))g.style.right=(-1*c+2)+'px'}function m(a){g.style.top=pageYOffset+(innerHeight/2-g.clientHeight/2)+'px';g.style.right=document.documentElement.clientWidth-window.innerWidth-window.pageXOffset-15+'px'}g.id='oo_tab';g.className='oo_tab_'+(k.position||'right');if(k.wcagBasePath){g.className+=' wcag'}if(!d.POSITION_FIXED_SUPPORTED&&!d.Browser.MobileSafari){g.style.position='absolute';if((!k.position||k.position==='right')&&d.Browser.IE){g.className+=' oo_tab_ie_right';if(d.Browser.ua.search('IE 6')!==-1||d.Browser.ua.search('IE 7')!==-1){g.className+=' oo_tab_ie67_right'}if(d.Browser.ua.search('IE 6')===-1){d.addEventListener(window,'scroll',l,false);d.addEventListener(window,'resize',l,false)}}}if(typeof k.tabIndex==='number'){g.tabIndex=k.tabIndex}else if(typeof k.tabIndex==='undefined'){g.tabIndex=0}g.onkeyup=function(a){var b=a||window.event;if(b.keyCode!==13){return}this.show()}.bind(this);i.appendChild(j);g.appendChild(i);if(h){h.className='screen_reader';h.innerHTML='Activate to launch comment card';g.appendChild(h)}d.addEventListener(g,'click',this.show.bind(this,'Tab'),false);f.body.appendChild(g);if(d.Browser.MobileSafari&&d.Browser.ua.search('OS 4')!==-1){g.style.position='absolute';d.addEventListener(window,'scroll',m,false);setTimeout(m,100)}}});d.extend(d.Ocode.prototype,{setupOnPageCC:function(){var f=document,g=d.Cache.overlay||f.createElement('div'),h=this.wrapper=f.createElement('div'),i=f.createElement('div'),j=f.createElement('div'),k=f.createElement('span'),l=this.frameName,m=f.createElement(d.DYNAMIC_FRAME_NAME_IS_BUGGY?'