if(typeof gnc=="undefined"){var gnc={}}if(typeof gnc.fitdocument=="undefined"){gnc.fitdocument={}}gnc.fitdocument.FitDocument=(function(){var a=function(){this.__fctCallback=null;this.__objBackground=null;this.__nBgRatio=0;this.__bScrollable=false;this.__objTimerId=null};(function(b){b.activate=function(d,c){if((typeof c!="undefined")&&(null!=c)){this.__fctCallback=c}else{this.__fctCallback=null}this.__initializeBackground(d);this.__resizeHandler();this.__addListeners()};b.__initializeBackground=function(d){this.__objBackground=jQuery(d);if(0==this.__objBackground.size()){return}if(0==this.__objBackground.height()){return}var c=this.__objBackground.width()/this.__objBackground.height();this.__nBgRatio=c.toFixed(2);this.__objBackground.css({"z-index":-10,overflow:"hidden",left:0,top:0,position:"absolute"});this.__objBackground.show()};b.__update=function(){this.__clearTimer();this.__setCenterX("#header_content",-150,1276);this.__setCenterX("#content_global",-150,1276);this.__setCenterX("#footer_content",-150,1276);this.__updateHeader(980);this.__updateFooter(980,775);this.__updateBackground(980,775);this.__setDocumentRect(980,775);if(null!=this.__fctCallback){this.__fctCallback()}};b.__updateHeader=function(c){var d=Math.max(c,jQuery(window).width());jQuery("#header").width(d)};b.__updateFooter=function(c,e){var d=jQuery(window);var h=Math.max(e,d.height());var g=Math.max(c,d.width());var f=jQuery("#footer");f.width(g);f.css({position:"absolute",left:"0",top:(h-f.outerHeight())+"px"})};b.__updateBackground=function(d,g){var f=jQuery(window);var j=this.__getScrolls(d,g);var c=0;var e=0;var i=f.height();var h=f.width();if(j.isScrollX||j.isScrollY){c=j.isScrollX?d:h;e=j.isScrollY?g:i;this.__objBackground.css({left:0,top:0})}else{c=h;e=Math.ceil(h/this.__nBgRatio);if(e<i){e=i;c=Math.ceil(i*this.__nBgRatio)}this.__objBackground.css({left:h-c,top:i-e})}this.__objBackground.height(e);this.__objBackground.width(c);this.__objBackground.css("clip","rect(0 "+c+"px "+e+"px 0)")};b.__setDocumentRect=function(f,g){var k=jQuery(window);var c=Math.max(g,k.height());var d=Math.max(f,k.width());var i=this.__getScrolls(f,g);if((!i.isScrollX)&&(!i.isScrollY)){this.__bScrollable=false;jQuery("html").css({"overflow-x":"hidden","overflow-y":"hidden"});scrollTo(0,0)}else{this.__bScrollable=true;jQuery("html").css({"overflow-x":"auto","overflow-y":"auto"})}var h=jQuery("#content_global");var j=h.offset();var e={left:-j.left,top:-j.top,right:d-j.left,bottom:c-j.top};h.width(e.right);h.css({clip:"rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"})};b.__setCenterY=function(d,c,e){jQuery(d).each(function(g){var f=0;if(typeof e!="undefined"){f=(e>>1)}else{var j=jQuery(this).height();var k=jQuery(this).outerHeight();var f=(j+(k-j))>>1}jQuery(this).css({"margin-top":"-"+f+"px",top:"50%",position:"absolute"});if(c>jQuery(this).offset().top){jQuery(this).css({"margin-top":"0",top:c+"px"})}})};b.__setCenterX=function(d,c,e){jQuery(d).each(function(h){var j=0;if(typeof e!="undefined"){j=(e>>1)}else{var f=jQuery(this).width();var g=jQuery(this).outerWidth();j=(f+(g-f))>>1}jQuery(this).css({"margin-left":"-"+j+"px",left:"50%",position:"absolute"});if(c>jQuery(this).offset().left){jQuery(this).css({"margin-left":"0",left:c+"px"})}})};b.__getScrolls=function(c,e){var d=jQuery(window);var g=Math.max(e,d.height());var f=Math.max(c,d.width());return{isScrollX:f>d.width(),isScrollY:g>d.height()}};b.__addListeners=function(){jQuery(window).bind("resize",kapit.lang.createDelegate(this,this.__resizeHandler))};b.__resizeHandler=function(){this.__update();this.__clearTimer();this.__objTimerId=setTimeout(kapit.lang.createDelegate(this,this.__update),100)};b.__clearTimer=function(){if(null!=this.__objTimerId){clearTimeout(this.__objTimerId)}this.__objTimerId=null}})(a.prototype);return new a()})();
