/*  JS Resource: lib/i2rd-util.js  */

if(typeof __i2rd_initted=='undefined'){__i2rd_initted=true;if(!Array.prototype.push){Array.prototype.push=function(i){if(i){this[this.length]=i;}};}
if(!Array.prototype.pop){Array.prototype.pop=function(){if(this.length==0){return;}
var i,n=this.length -1;i=this[n];delete this[n];this.length=n;return i;};}
Array.prototype.pushAll=function(list){for(var h=0,hb=list.length;h<hb;h++)this.push(list[h]);};if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};}
if(typeof __i2rd_domupdate_event=='undefined'){__i2rd_domupdate_event="dom:update";__i2rd_domupdate_handlers=[];__i2rd_domupdate_fire=function(element,e){var i,h,a=[];if(e){a.push(e);}
for(i=0;(h=__i2rd_domupdate_handlers[i]);i++){try{h.apply(element,a);}catch(e){}}};}
log4js={_log:function(msg,e){if(typeof console!='undefined'&&console.log){console.log(msg);if(e)console.log(e);}}};log4js.logger={log:log4js._log,debug:log4js._log,info:log4js._log,warn:log4js._log,error:log4js._log};if(typeof i2rd=='undefined'){window.i2rd={};}
i2rd.isIE=!+'\v1';i2rd.getConfigMap=function(el){if(typeof el=='string')el=document.getElementById(el);if(!el)return{};var e=el.childNodes,b={},n=0,mx=e.length;for(;n<mx;n++)b[e[n].className]=e[n].innerHTML;return b;};i2rd.xmlToString=function(xml){var str='',ib,i=0,cn;if(typeof xml!='string'){cn=xml.childNodes;if(xml.xml){for(ib=cn.length;i<ib;i++){str+=cn[i].xml;}}else{var xs=new XMLSerializer();for(ib=cn.length;i<ib;i++){str+=xs.serializeToString(cn[i]);}}}else{str=xml;}
return str;};i2rd.scriptRX=/<script[^>]*>([\S\s]*?)<\/script>/gim;i2rd.stripScripts=function(h){return{html:h.replace(i2rd.scriptRX,''),scripts:(function(){try{i2rd.scriptRX.lastIndex=0;}catch(e){}
var m=[],i,arr;while((arr=i2rd.scriptRX.exec(h))){if(arr[1]){m[m.length]=arr[1].replace(/^\s*<!\[CDATA\[/,'').replace(/\]\]>\s*$/,'');}}
return m;})(),addScripts:function(){var e,t,i,s=this.scripts,h=document.getElementsByTagName("head")[0];if(!s||s.length<1)return;for(i=0;t=s[i];i++){e=document.createElement("script");e.setAttribute("type","text/javascript");e.text=t;h.appendChild((s[i]=e));}
setTimeout(function(){for(var i=0;i<s.length;i++)h.removeChild(s[i]);},30000);}};};i2rd.acopy=function(s,sp,d){var i=sp;for(;i<s.length;i++)d.push(s[i]);return d;}
i2rd._dl='dom:loaded';i2rd.w3cevt=!!document.addEventListener;i2rd.ieevt=!!document.attachEvent;i2rd.addEvent=function(el,type,handler){if(type==__i2rd_domupdate_event){__i2rd_domupdate_handlers.push(handler);}else if(type==i2rd._dl&&i2rd.rdy){handler.call(el,i2rd.createEvent('HTMLEvents',i2rd._dl,false,false));}else if(i2rd.w3cevt){el.addEventListener(type,handler,false);}else{if(!handler.$$guid){handler.$$guid=i2rd.addEvent_guid++;}
if(!el.events){el.events={};}
var handlers=el.events[type];if(!handlers){handlers=el.events[type]={};if(el["on" +type]){handlers[0]=el["on" +type];}}
handlers[handler.$$guid]=handler;el["on" +type]=i2rd.handleEvent;}};i2rd.createEvent=function(module,type){var d=document,a=i2rd.acopy(arguments,2,[type]);if(i2rd.w3cevt){d=d.createEvent(module);d['init'+module.replace(/(HTML)?([A-Z][a-z]*vent)s?/,'$2')].apply(d,a);return d;}else if(i2rd.ieevt){d=d.createEventObject();d.type=type;i2rd.fixEvent(d);return d;}else{return{type:type};}};i2rd.createMouseEvent=function(type,p){p=p||{};return i2rd.createEvent('MouseEvents',type,p.canBubble||true,p.cancelable||true,p.view||window,p.detail||1,p.screenX||0,p.screenY||0,p.clientX||0,p.clientY||0,p.ctrlKey||false,p.altKey||false,p.shiftKey||false,p.metaKey||false,p.button||0,p.relatedTarget||null);};i2rd.fireEvent=function(el,evt){var a=i2rd.acopy(arguments,2,['HTMLEvents',evt]);if(typeof evt=='string'){if(arguments.length==2)a=a.concat([false,false]);evt=i2rd.createEvent.apply(this,a);}
if(i2rd.w3cevt)el.dispatchEvent(evt);else if(evt.cancelBubble===false){try{el.fireEvent('on'+evt.type,evt);}catch(e){i2rd.handleEvent.call(el,evt);}}else i2rd.handleEvent.call(el,evt);};i2rd.removeEvent=function(el,type,handler){if(type==__i2rd_domupdate_event){var hl=[];for(i=0;(h=__i2rd_domupdate_handlers[i]);i++){if(h!==handler){hl.push(h);}}
__i2rd_domupdate_handlers=hl;}else if(i2rd.w3cevt){el.removeEventListener(type,handler,false);}else{if(el.events&&el.events[type]){delete el.events[type][handler.$$guid];}}};i2rd.addEvent_guid=1;i2rd.handleEvent=function(event){if(!this.events)return;var i,hl,rv=true;event=event||i2rd.fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);hl=this.events[event.type];for(i in hl){if(hl[i].call(this,event)==false){rv=false;}}
return rv;};i2rd.fixEvent=function(event){event.preventDefault=i2rd.fixEvent_preventDefault;event.stopPropagation=i2rd.fixEvent_stopPropagation;return event;};i2rd.fixEvent_preventDefault=function(){this.returnValue=false;};i2rd.fixEvent_stopPropagation=function(){this.cancelBubble=true;};i2rd.rdy=document.readyState=='complete';i2rd.DOMCL=function(){if(i2rd.rdy)return;if(i2rd.w3cevt){i2rd.rdy=true;document.removeEventListener("DOMContentLoaded",i2rd.DOMCL,false);window.removeEventListener("load",i2rd.DOMCL,false);}else if(i2rd.ieevt){if(document.readyState==="complete"){i2rd.rdy=true;document.detachEvent("onreadystatechange",i2rd.DOMCL);window.detachEvent("onload",i2rd.DOMCL);}}
i2rd.fireEvent(document,i2rd._dl);};if(i2rd.w3cevt){document.addEventListener("DOMContentLoaded",i2rd.DOMCL,false);window.addEventListener("load",i2rd.DOMCL,false);}else if(i2rd.ieevt){document.attachEvent("onreadystatechange",i2rd.DOMCL);window.attachEvent("onload",i2rd.DOMCL);}
i2rd.getAjaxTransport=function(){try{return new XMLHttpRequest();}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
return null;};i2rd.bind=function(m,caller){var a=i2rd.acopy(arguments,2,[]),_m=m,obj=caller;return function(){_m.apply(obj,i2rd.acopy(arguments,0,a));};};i2rd.bindAsEventListener=function(m,caller){var a=i2rd.acopy(arguments,2,[]),_m=m,obj=caller;return function(evt){i2rd.acopy(arguments,0,a)
_m.apply(obj,[evt||window.event].concat(a));};};i2rd.eventElement=function(evt){evt=evt||window.event;return(evt.target||evt.srcElement);};i2rd.getInnerText=function(el){if(typeof el=="string"){return el;}
var cn,i,str="",children=el.childNodes;for(i=0;(cn=children[i]);i++){switch(cn.nodeType){case 1:str +=i2rd.getInnerText(cn);break;case 3:case 4:str +=cn.nodeValue;break;}}
return str;};i2rd._p={x:0,y:0};i2rd._mt=false;i2rd.coord=function(e){var x=0,y=0;e=e||window.event;if(e.pageX||e.pageY){x=evt.pageX;y=evt.pageY;}
else if(e.clientX||e.clientY){var d=document,b=d.body,de=d.documentElement;x=evt.clientX +de.scrollLeft +b.scrollLeft;y=evt.clientY +de.scrollTop +b.scrollLeft;}
return i2rd._p={x:x,y:y};};i2rd.getMouseCoord=function(e){if(!i2rd._mt){i2rd._mt=true;if((e=e||window.event)){i2rd.coord(e);}
i2rd.addEvent(document,'mousemove',i2rd.coord);setTimeout(function(){i2rd._mt=false;i2rd.removeEvent(document,'mousemove',i2rd.coord);},60000);}
return i2rd._p;};i2rd.addClassName=function(el,cn){var cn=cn.trim();if(!i2rd.hasClassName(el,cn))
el.className=((el.className||'') +' ' +cn).trim();};i2rd.removeClassName=function(el,cn){if(!i2rd.hasClassName(el,cn))return;el.className=(el.className||'').replace(RegExp("(^|\\s+)" +cn.trim() +"(\\s+|$)",'g'),' ').trim();};i2rd.hasClassName=function(el,cn){var cur=(el.className||'');return cur==cn||(RegExp("(^|\\s+)"+cn+"(\\s+|$)").test(cur));};i2rd.getCookie=function(name){var i=0,c,cn=name+"=",ca=document.cookie.split(';');for(;c=ca[i];i++){while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(cn)==0)return c.substring(cn.length,c.length);}
return null;};i2rd.setCookie=function(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");};i2rd.deleteCookie=function(name,path,domain){document.cookie=name+"; expires=Thu, 01-Jan-1970 00:00:01 GMT" +((path)?"; path="+path:"") +((domain)?"; domain="+domain:"");};i2rd.owfDefault={menubar:false,location:false,toolbar:false,scrollbars:true,statusbar:false};i2rd.openWindow=function(url,name,dim,features,pbMesg,evt){name=name||'_blank';features=features||i2rd.owfDefault;pbMesg=pbMesg||'Please disable any popup blockers for this site.';var fstr='';for(var key in features){var val=i2rd.getOWFeature(features,key);if(val!=null){fstr +=','+key+'='+(val?'yes':'no');}}
if(dim){if(dim.x&&dim.x>0){dim.x+=30;fstr+=',width='+dim.x;}
if(dim.y&&dim.y>0){dim.y+=50;fstr+=',height='+dim.y;}}
if(fstr.length>0){fstr=fstr.substring(1);}
var nw=window.open(url,name,fstr);if(name!='_top'&&name!='_parent'&&name!='_self'){if(nw.opener!=window){alert(pbMesg);}}
try{nw.focus();if(dim&&dim.x&&dim.y){if(dim.x>0&&dim.y>0){nw.resizeTo(dim.x,dim.y);}}}catch(e){}
evt=evt||window.event;if(evt){if(evt.preventDefault){evt.preventDefault();evt.stopPropagation();}
else{evt.cancelBubble=true;evt.returnValue=false;}}
return false;};i2rd.getOWFeature=function(m,prop){var val=m[prop];if(typeof val=='undefined'||val==null){return null;}
else{return!!val;}};i2rd.each=function(array,fn,filter){var ct=0,all=(typeof filter!=='function');for(var i=0,mx=array.length;i<mx;i++){var el=array[i];if(all||filter.call(el,i,el,ct)){fn.call(el,i,el,ct++);}}};i2rd.serialize=function(form){var t,e,i,s=[];for(i=0;e=form.elements[i];i++){t=e.type;if(e.serializeValue)e.serializeValue(form,s,e.name,e.value);else if(e.name&&!e.disabled&&t!='submit'&&t!='file'){switch(e.nodeName.toLowerCase()){case'input':switch(t){case'checkbox':case'radio':if(e.checked)i2rd.serializeValue(form,s,e.name,e.value);break;case'button':break;default:i2rd.serializeValue(form,s,e.name,e.value);break;}
break;case'select':for(var o,j=0;o=e.options[j];j++)if(o.selected)i2rd.serializeValue(form,s,e.name,o.value);break;case'button':break;default:i2rd.serializeValue(form,s,e.name,e.value);break;}}}
return s.join('&');};i2rd.serializeValue=function(f,s,n,v){if(n&&v!=null){s.push(encodeURIComponent(n) +'=' +encodeURIComponent(v));}};i2rd._lf=null;i2rd.focusListener=function(evt){var el=i2rd.eventElement(evt);if(i2rd._lf){i2rd.removeClassName(i2rd._lf,"focused");}
i2rd.lastFocus=el;i2rd.addClassName(el,"focused");};i2rd.addEvent(window,'load',function(){var i=0,j,e,f,el,fl=document.forms;if(!fl)return;for(;f=fl[i];i++){el=f.elements;for(j=0;e=el[j];j++){if(e.type=='hidden')continue;i2rd.addEvent(e,'focus',i2rd.focusListener);if(e.nodeName.toLowerCase()=='select'&&i2rd.hasClassName(e,'autosubmitselect'))
e.onchange=function(evt){this.form.submit();};}}});}
/*  JS Resource: lib/logger.js  */

if(typeof log4jsdefined=='undefined'){log4jsdefined=true;var log4js={hasConsole:function(){return(typeof console!='undefined'&&typeof console.info!='undefined');}};log4js.getAjaxTransport=function(){try{return new XMLHttpRequest();}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
return null;};log4js.funcname=function(f){var s,v=/function (\w*)/.exec(f.toString());if(v&&v.length>1){s=v[1];}
if(!s||(s.length==0)){return"anonymous";}
return s;};log4js.stacktrace=function(){try{var ac,s="";for(ac=arguments.callee;!!ac;ac=ac.caller){if(ac==log4js.stacktrace||ac==log4js.logger.log){continue;}
s +=log4js.funcname(ac) +"\n";if(ac.caller==ac){break;}}
return s;}catch(ee){alert("Unable to get stack trace. " +ee.message +"\n" +ee.stack);}};log4js.LogEvent=function(logLevel,message,exceptionName,exceptionMessage,stackTrace){this.logLevel=logLevel;this.message=message;this.exceptionName=exceptionName;this.exceptionMessage=exceptionMessage;this.stackTrace=stackTrace;};log4js.LogEvent.prototype={encodeParam:function(queueId){var b="&loglevel."+queueId+"="+this.logLevel+"&message."+queueId+"="+encodeURIComponent(this.message);if(this.exceptionName){b+="&exceptionname."+queueId+"="+encodeURIComponent(this.exceptionName);}
if(this.exceptionMessage){b+="&exceptionmessage."+queueId+"="+encodeURIComponent(this.exceptionMessage);}
if(this.stackTrace){b+="&exceptionstacktrace."+queueId+"="+encodeURIComponent(this.stackTrace);}
return b;}};log4js.storage=window.sessionStorage||{};log4js.LogLevel={FATAL:"FATAL",ERROR:"ERROR",WARN:"WARN",INFO:"INFO",DEBUG:"DEBUG"};log4js.__Logger=function(){this.ajaxSync=false;this.logTarget=window.location||document.location||document.URL;this.internalError=false;this.currentLevel= -1;this.timeout=null;this.lastlog=new Date();var level=log4js["loglevel"];if(level){this.currentLevel=this.getLogLevelInt(level);}
var me=this,unload=function OnUnload(){me.cleanup();delete me;};if(window.attachEvent)window.attachEvent('onunload',unload);else window.addEventListener('unload',unload,false);};log4js.__Logger.prototype={queue:[],cleanup:function(evt){if(this.timeout){window.clearTimeout(this.timeout);}
this.ajaxSync=true;this.flushQueue(true);},getLogLevelInt:function(level){switch(level){case log4js.LogLevel.FATAL:return 50000;case log4js.LogLevel.ERROR:return 40000;case log4js.LogLevel.WARN:return 30000;case log4js.LogLevel.INFO:return 20000;case log4js.LogLevel.DEBUG:return 10000;default:return 20000;}},canLog:function(level){return this.currentLevel<=this.getLogLevelInt(level);},setLogLevel:function(level){this.currentLevel=this.getLogLevelInt(level);log4js.storage["logLevel"]=level;},setInternalError:function(){this.internalError=true;},isOn:function(){return!this.internalError;},log:function(logLevel,msg,ex){var shouldLog=this.canLog(logLevel);try{if(!msg){return;}
var level=log4js.LogLevel.INFO;if(logLevel){level=logLevel;}
if(!this.isOn()||!shouldLog){return;}
this.lastlog=new Date();var en,em,st;if(ex){if(ex.name){en=ex.name;}
if(ex.message){em=ex.message;}
if(ex.stack){st=ex.stack;}
else{st=log4js.stacktrace();}}
var le=new log4js.LogEvent(logLevel,msg,en,em,st);this.queue.push(le);if(this.queue.length>50){this.flushQueue(true);}
else if(!this.timeout){var me=this;this.timeout=window.setTimeout(function(){me.flushQueue();delete me;},1500);}}
catch(e){alert("Logger misconfigured: " +e.message);}},fatal:function(msg,ex){this.log(log4js.LogLevel.FATAL,msg,ex);},error:function(msg,ex){this.log(log4js.LogLevel.ERROR,msg,ex);},warn:function(msg,ex){this.log(log4js.LogLevel.WARN,msg,ex);},info:function(msg,ex){this.log(log4js.LogLevel.INFO,msg,ex);},debug:function(msg,ex){this.log(log4js.LogLevel.DEBUG,msg,ex);},clog:function(msg,ll){if(!log4js.hasConsole()){return;}
switch(ll){case log4js.LogLevel.FATAL:case log4js.LogLevel.ERROR:console.error(msg);break;case log4js.LogLevel.WARN:console.warn(msg);break;case log4js.LogLevel.INFO:console.info(msg);break;case log4js.LogLevel.DEBUG:default:console.debug(msg);break;}},flushQueue:function(force){this.timeout=null;var size=this.queue.length;if(size==0){return;}
var now=new Date();if(!force&&(now.getTime() -this.lastlog.getTime())<250){var me=this;this.timeout=window.setTimeout(function(){me.flushQueue();delete me;},500);return;}
var h,b="?log4js.queue_size=" +size;for(h=0;h<size;h++){var qe=this.queue[h];try{this.clog(qe.message,qe.logLevel);if(qe.exceptionMessage){this.clog(qe.exceptionMessage,qe.logLevel);}
if(qe.stackTrace){this.clog(qe.stackTrace,qe.logLevel);}}catch(e){}
b +=qe.encodeParam(h);}
var ajax=log4js.getAjaxTransport();if(ajax){if(!this.ajaxSync){ajax.onreadystatechange=log4js.__getReqCallback(ajax,this);}
ajax.open("POST",window.location.href,!this.ajaxSync);ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');ajax.setRequestHeader("Filter-Logging","on");ajax.setRequestHeader("Filter-Logging_Queue_Size",size);ajax.send(b);}
this.queue.length=0;}};log4js.logger=new log4js.__Logger();log4js.__getReqCallback=function(ajax,log){var req=ajax,logger=log;return function(){if(req.readyState==4){if(req.status==200||req.status==0){if(req.responseText){logger.setLogLevel(req.responseText);}}else{logger.setInternalError();}
try{if(req&&req.onreadystatechange){delete req.onreadystatechange;}}catch(e){}}};};}
/*  JS Resource: cms/js/bean/articlecontainer.js  */

if(typeof AC=='undefined'){AC={};AC.getElementsByTagName=function(tagName,start){if(!start){start=document;}
var elements=start.getElementsByTagName(tagName);if(!elements||elements.length===0){elements=start.getElementsByTagName(tagName.toUpperCase());}
return elements;};AC.countWords=function(text){var count=0;if(text){var list=text.split(/\s+/);for(var h=0;h<list.length;h++){if(!(list[h]=='')){count++;}}}
return count;};AC.Article=function(li,wpm){this.article=li;var text="";var components=AC.getElementsByTagName("div",li);for(var el=null,idx=0;(el=components[idx]);idx++){var cn=el.className||"";if(cn.match(/article_heading/)||cn.match(/article_subheading/)||cn.match(/article_teaser/)||cn.match(/article_post_time/)||cn.match(/article_link_read_more/)||cn.match(/article_byline/)||cn.match(/article_content/)){text=text +this.getText(el);}else if(cn!=''){log4js.logger.info("Unexpected component with classname: " +cn);}}
this.wordCount=AC.countWords(text);wpm=wpm||120.0;var t1=(this.wordCount/wpm);t1=Math.ceil(t1*60)*1000;this.minShowTime=t1 +2000;};AC.Article.prototype={getRecommendedInterval:function(){return this.minShowTime;},show:function(cb){var opacity=this.getOpacity();if(this.article.style.display!='block'){opacity=0.0;this.setOpacity(opacity);this.article.style.display='block';}
if(opacity>0.9){if(cb){cb.apply(this);}}else{opacity=opacity +0.1;this.setOpacity(opacity);if(parseInt(opacity*100)!=parseInt(this.getOpacity()*100)){if(cb){cb.apply(this);}}
else
window.setTimeout(i2rd.bind(this.show,this,cb),100);}},hide:function(cb){var opacity=this.getOpacity();if(opacity<0.1){if(cb){cb.apply(this);}}else{opacity=opacity -0.1;this.setOpacity(opacity);if(parseInt(opacity*100)!=parseInt(this.getOpacity()*100)){if(cb){cb.apply(this);}}
else
window.setTimeout(i2rd.bind(this.hide,this,cb),100);}},getText:function(el){if(!el){return el;}
if(typeof el=="string"){return el;}
var str="",children=el.childNodes;var cn,i;for(i=0;(cn=children[i]);i++){switch(cn.nodeType){case 1:str +=this.getText(cn);break;case 3:if(cn.nodeValue){str +=cn.nodeValue;}else if(str.length>0&&str[str.length -1]!=""){str +=" ";}
break;}}
return str;},setOpacity:function(value){if(value>=1){value=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1.0;if(/MSIE [678]/.test(navigator.userAgent)&&!window.opera){this.article.style.filter=this.article.style.filter.replace(/alpha\([^\)]*\)/gi,'');}}else{if(value<0.00001)value=0;if(/MSIE [678]/.test(navigator.userAgent)&&!window.opera){this.article.style.filter=this.article.style.filter.replace(/alpha\([^\)]*\)/gi,'') +'alpha(opacity='+parseInt(value*100) +')';}}
this.article.style.opacity=value;},getOpacity:function(){var value=this.article.style.opacity;if(this.article.style.filter){value=/alpha\(opacity=([^\)]+)\)/gi.exec((this.article.style.filter||''));if(value&&value[1]){value=parseFloat(value[1])/100.0;}}
if(value)return parseFloat(value);return this.article.style.filter?100:1.0;}};AC.RotatingHeadline=function(ol){this.container=ol;var articleContainer=ol.parentNode;while(articleContainer&&(articleContainer.className||"").toLowerCase().indexOf('articlecontainer')== -1){articleContainer=articleContainer.parentNode;}
if(!articleContainer){log4js.logger.error("Unable to find article container.");return;}
var article,idx,el,lis=AC.getElementsByTagName("var",articleContainer),wpm=95.0;for(el=null,idx=0;(el=lis[idx]);idx++){if(el.className=="wpm"){wpm=parseFloat(el.innerHTML+"");}}
this.containerId=articleContainer.id;this.articles=[];this.paused=false;lis=AC.getElementsByTagName("li",ol);if(lis.length<=1){return;}
for(el=null,idx=0;(el=lis[idx]);idx++){article=new AC.Article(el,wpm);this.articles[this.articles.length]=article;article.article.style.display='none';}
this.currentIdx=0;i2rd.addEvent(ol,"mouseover",i2rd.bind(this.pause,this));i2rd.addEvent(ol,"mouseout",i2rd.bind(this.start,this));var startIdx=0;if(this.containerId){var articleId=i2rd.getCookie(this.containerId +"-la");for(var el=null,idx=0;(el=lis[idx]);idx++){var article=this.articles[idx];if(article.article.id==articleId){startIdx=idx;break;}}}
this.currentArticle=this.articles[startIdx];this.currentIdx=startIdx;this.currentArticle.show();window.setTimeout(i2rd.bind(this.showNextArticle,this),this.currentArticle.getRecommendedInterval());};AC.RotatingHeadline.prototype={pause:function(){this.paused=true;},start:function(){this.paused=false;},showNextArticle:function(){if(this.paused){window.setTimeout(i2rd.bind(this.showNextArticle,this),750);return;}
this.prevArticle=null;this.currentIdx++;if(this.currentIdx>=this.articles.length)this.currentIdx=0;if(this.currentIdx==0)this.prevArticle=this.articles[this.articles.length -1];else this.prevArticle=this.articles[this.currentIdx -1];this.currentArticle=this.articles[this.currentIdx];this.prevArticle.hide(i2rd.bind(this.showNext,this));if(this.containerId){var time=new Date();time.setHours(time.getHours() +48);i2rd.setCookie(this.containerId +"-la",this.currentArticle.article.id,time);}},showNext:function(nextFunc){if(this.prevArticle)
this.prevArticle.article.style.display='none';this.currentArticle.show(i2rd.bind(this.startTimer,this));},startTimer:function(){window.setTimeout(i2rd.bind(this.showNextArticle,this),this.currentArticle.getRecommendedInterval());}};AC.init=function(evt){var lists=AC.getElementsByTagName("ol");for(var el=null,idx=0;(el=lists[idx]);idx++){var cn=el.className||"";if(cn.match(/ac_style_rotating_headline/)){new AC.RotatingHeadline(el);}}};i2rd.addEvent(window,'load',AC.init);}
/*  JS Resource: cms/js/bean/MenuBean.js  */

if(typeof MB=='undefined'){var MB={};}
MB.array=function(nl){var i,l=[];for(i=0;i<nl.length;i++)l.push(nl.item(i));return l;};MB.lastEventTime=new Date();MB.addClassName=function(el,cn){if(!MB.hasClassName(el,cn))
el.className=((el.className||'') +' ' +cn);};MB.err=function(m,e){if(typeof log4js!='undefined')log4js.logger.error(m,e);else if(typeof console!='undefined')console.log(m);};MB.data=window.localStorage;MB.getData=function(key){if(!!MB.data)return MB.data[key];else{var i=0,c,cn=key+"=",ca=document.cookie.split(';');for(;c=ca[i];i++){while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(cn)==0)return c.substring(cn.length,c.length);}
return null;}};MB.setData=function(key,val){if(!!MB.data)MB.data[key]=val;else{var d=new Date();d.setDate(d.getDate()+5);document.cookie=key +"=" +val +"; expires=" +d.toUTCString() +"; path=/";}};MB.removeClassName=function(el,cn){if(!MB.hasClassName(el,cn))return;el.className=(el.className||'').replace(RegExp("(^|\\s+)" +cn +"(\\s+|$)",'g'),' ');};MB.hasClassName=function(el,cn){var cur=(el.className||'');return cur==cn||(RegExp('\\b'+cn+'\\b').test(cur));};MB.getTarget=function(evt){evt=evt||window.event;var el=(evt.srcElement||evt.target);while(el&&el.nodeName.toLowerCase()!="li")
el=el.parentNode;return el;};MB.getTop=function(li){var parent=li;while(parent&&parent.className!='menubean'&&parent.nodeName.toLowerCase()!='div'){parent=parent.parentNode;}
if(parent==null)
throw new Error("Unable to find top of menu");return parent;};MB.GetChildUL=function(li){if(!MB.hasClassName(li,'mi_parent'))return null;var h,ul,hb,t;var children=li.getElementsByTagName("ul");if(!children||children.length==0){children=li.getElementsByTagName("UL");}
for(h=0,hb=children.length;(t=children[h]);h++){if(t.parentNode===li){if(ul){MB.err("Invalid DOM structure for menu. li.id = "+li.id+", children.length = " +(children==null?"null":children.length));break;}else{ul=t;}}}
return ul;};MB.SetInactiveClass=function(el){var elements=el.getElementsByTagName("li");if(!elements||elements.length==0){try{elements=el.getElementsByTagName("LI");}catch(e){}}
var liElements=MB.array(elements);var node=null;while((node=liElements.pop())){MB.removeClassName(node,'mi_active');MB.addClassName(node,'mi_inactive');}};MB.SetActive=function(li,activate){if(!MB.hasClassName(li,'over')){MB.addClassName(li,'over');var ul=MB.GetChildUL(li);if(ul&&ul.className.match("_persistent")){var nodelist=MB.GetOpenState(li);var entry=new RegExp("\\b" +li.id +"\\b");if(!entry.test(nodelist)){nodelist=(nodelist +"," +li.id);}
MB.SetOpenState(li,nodelist)}}
if(activate){var top=MB.getTop(li);MB.SetInactiveClass(top);if(!MB.hasClassName(li,'mi_active')){MB.removeClassName(li,'mi_inactive');MB.addClassName(li,'mi_active');}}
var ps=li.previousSibling,ns=li.nextSibling;if(ps&&!MB.hasClassName(ps,'prev_sibling')){MB.addClassName(ps,'prev_sibling');}
if(ns&&!MB.hasClassName(ns,'next_sibling')){MB.addClassName(ns,'next_sibling');}};MB.SetInActive=function(li){if(!MB.hasClassName(li,'over'))
return;MB.removeClassName(li,'over');var ul=MB.GetChildUL(li);if(ul&&ul.className.match("_persistent")){var nodelist=MB.GetOpenState(li);nodelist=nodelist.replace(new RegExp("," +li.id +"\\b"),"");MB.SetOpenState(li,nodelist);}
var ps=li.previousSibling,ns=li.nextSibling;if(ps){MB.removeClassName(ps,'prev_sibling');}
if(ns){MB.removeClassName(ns,'next_sibling');}};MB.GetOpenState=function(li){return MB.getData(MB.getTop(li).id +"-CMO")||"";};MB.SetOpenState=function(li,nodelist){MB.setData(MB.getTop(li).id +"-CMO",nodelist);};MB.MenuBeanInit=function(div){if(typeof div=='string')div=document.getElementById(div);if(!!div.mbinited)return;div.mbinited=true;var nodelist=MB.getData(div.id +"-CMO")||"";var item=null;var elements=div.getElementsByTagName("li");var liElements=MB.array(elements);while((item=liElements.pop())){var pn=item.parentNode;if(pn&&pn.nodeName.toLowerCase()=="ul"){pn=pn.parentNode;if(pn&&pn.nodeName.toLowerCase()=="li"&&!MB.hasClassName(pn,'mi_parent')){MB.addClassName(pn,'mi_parent');}}
item.onclick=function(evt){var now=new Date();if((now -MB.lastEventTime)<200)return;MB.lastEventTime=new Date();var target=MB.getTarget(evt);if(MB.hasClassName(target,'over')){MB.SetInActive(target,true);}
else{MB.SetActive(target);}};if(!item.parentNode.className.match(/_persistent/)){item.onmouseover=function(evt){try{MB.SetActive(this);}catch(e){}};item.onmouseout=function(evt){try{MB.SetInActive(this);}catch(e){}};}else{var tmpId="," +item.id;if(nodelist.indexOf(tmpId)== -1){MB.SetInActive(item);}}}
if(document.getElementById){var liList=nodelist.split(",");for(var h=0;h<liList.length;h++){var id=liList[h];if(id){var li=document.getElementById(id);if(li){MB.SetActive(li);}}}}};MB.scan=function(start){if(typeof start=='string')start=document.getElementById(start);var m,div,s=(start||document),i,ib;if(document.evalute){var result=document.evaluate("//div[contains(@class,'menubean')]",s,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(i=0,ib=result.snapshotLength;i<ib;i++){m[m.length]=result.snapshotItem(i);}}else{m=s.getElementsByTagName("div");}
for(i=0,ib=m.length;i<ib;i++){div=m[i];if((div.className||'').match(/menubean/))
MB.MenuBeanInit(div);}};
/*  JS Resource: cms/js/cms-iefix.js  */

if(typeof cmsiepermiatefix=='undefined'){cmsiepermiatefix=true;if(typeof cms=='undefined'){cms={};}
cms_hiddenElements=[];cms.hideObscuredElements=function(exclude){if(!(navigator.userAgent.match(/MSIE [456]/)&&!window.opera)){return;}
if(!exclude){return;}
cms.showObscuredElements();var elements=[];elements.pushAll(document.body.childNodes);var el;while((el=elements.pop())){if(el==exclude){continue;}
elements.pushAll(el.childNodes);if(el.nodeType==1){if(el.nodeName.toLowerCase()=="select"){try{el.style.visibility="hidden";cms_hiddenElements.push(el);}catch(e){log4js.logger.error("Error accessing element in hideObscuredElement.",e);}}}}};cms.showObscuredElements=function(){var el;while((el=cms_hiddenElements.pop())){try{el.style.visibility="visible";}catch(e){log4js.logger.error("Error accessing element in showObscuredElement.",e);}}};cms.__fixIEButtonHandling=function(evt){try{var button=(evt.target||evt.srcElement);var form=button.form,name=button.name,value=button.value;var alt=$(button.id +"_value");if(alt&&alt.value){value=alt.value;}
for(var h=0;h<form.elements.length;h++){var el=form.elements[h];if(el.nodeName.toLowerCase()=='button'){var type=el.getAttribute('type');if(type=='submit'){el.parentNode.removeChild(el);}}}
if(!form[name]){var input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name",name);input.setAttribute("id",name);input.setAttribute("value",value);form.appendChild(input);}else{}
form.submit();}catch(ee){log4js.logger.error("Caught error manipulating form.",ee);}
return true;};cms.__fixIEButtonInit=function(){var i,ib,type,cn,el,buttons=document.getElementsByTagName("button");for(i=0,ib=buttons.length;i<ib;i++){el=buttons[i];type=el.getAttribute('type');cn=el.className||"";if(cn.match("fixie")&&(!type||type=='submit')){if(typeof el.iesetup=='undefined'){i2rd.addEvent(el,'click',cms.__fixIEButtonHandling);el.iesetup=true;}}}};if((navigator.userAgent.match(/MSIE [4567]/)&&!window.opera)){i2rd.addEvent(window,'onload',cms.__fixIEButtonInit);window.setTimeout(cms.__fixIEButtonInit,750);}}
/*  JS Resource: cms/js/cms-dim.js  */

if(typeof cmsdim=='undefined'){cmsdim=true;if(typeof cms=='undefined'){cms={};}
cms.getStyle=function(el,sp){var v;if(el.currentStyle){v=el.currentStyle[sp];}
else if(window.getComputedStyle){v=document.defaultView.getComputedStyle(el,null).getPropertyValue(sp);}
else{v=el.style[sp];}
return v;}
cms.getScrollOffset=function(){var x,y;if(self.pageYOffset){x=self.pageXOffset;y=self.pageYOffset;}else{var b=document.body,de=document.documentElement;if(de&&de.scrollTop){x=de.scrollLeft;y=de.scrollTop;}else if(b){x=b.scrollLeft;y=b.scrollTop;}}
return{x:x,y:y};};cms.getDocumentDim=function(){var b=document.body,de=document.documentElement;var x=(de?de.scrollWidth:b.scrollWidth);var y=(de?de.scrollHeight:b.scrollHeight);var x2=0,y2=0;if(self.innerHeight){x2=self.innerWidth;y2=self.innerHeight;}else if(de.clientHeight){x2=de.clientWidth;y2=de.clientHeight;}else if(b){x2=b.clientWidth;y2=b.clientHeight;}
var max=x*y;var max2=x2*y2;if(max2>max){x=x2;y=y2;}
return{x:x,y:y};};cms.getWindowDim=function(){var x,y;if(self.innerHeight){x=self.innerWidth;y=self.innerHeight;}else{var b=document.body,de=document.documentElement;if(de&&de.clientHeight){x=de.clientWidth;y=de.clientHeight;}
else if(b){x=b.clientWidth;y=b.clientHeight;}}
return{x:x,y:y};};cms.positionAtEvt=function(evt,el){var els=el.style,vis=(cms.getStyle(el,"visibility")||"visible"),disp=(cms.getStyle(el,"display")||"block");if(vis!='hidden'){els.visibility="hidden";}
if(disp=='none'){els.display='block';}
var coord=i2rd.getMouseCoord(evt),wdim=cms.getWindowDim(),x=coord.x,y=coord.y,eh=el.clientHeight,ew=el.clientWidth;if((x+ew)>wdim.x){x=x -ew -10;if(x<0){x=0;}}
el.style.left=x +10 +"px";el.style.top=y +10 +"px";els.visibility=vis;els.display=disp;};cms.positionAtCenter=function(el){var els=el.style,vis=(cms.getStyle(el,"visibility")||"visible"),disp=(cms.getStyle(el,"display")||"block");if(vis!='hidden'){els.visibility="hidden";}
if(disp=='none'){els.display='block';}
if(!els.left){els.left="0px";}
if(!els.top){els.top="0px";}
var wdim=cms.getWindowDim(),offset=cms.getScrollOffset(),ddim=cms.getDocumentDim(),eh=el.clientHeight,ew=el.clientWidth,x=0,y=0;if(ew<wdim.x){x=(ddim.x -ew)/2;y=((wdim.y/2) -(eh/2));}
if(x<0){x=0;}
if(y<0){y=0;}
x=x +offset.x;y=y +offset.y;els.left=x +"px";els.top=y +"px";els.visibility=vis;els.display=disp;};}
/*  JS Resource: cms/js/cms-pageeffect.js  */

if(typeof cms_page_effect=='undefined'){cms_page_effect=true;if(typeof cms=='undefined')cms={};cms.bg=null;cms.bg_clickEvent=null;cms.bg_loadingCN="content_loading";cms.setBackgroundLoading=function(tf){if(tf)i2rd.addClassName(cms.bg,cms.bg_loadingCN);else i2rd.removeClassName(cms.bg,cms.bg_loadingCN);};cms.resizeBackground=function(){if(cms.bg){var dv=cms.bg.style.display||"none",cb=cms.bg;cb.style.display="block";var dim=cms.getScrollOffset();cb.style.display=dv;cb.style.top=dim.y +"px";}};cms.createBackground=function(){if(cms.bg)return;var d=window.document;var bg=d.createElement("div");bg.style.textAlign="center";bg.style.position="absolute";bg.style.left=0;bg.style.top=0;bg.style.height="100%";bg.style.width="100%";bg.className="page_background";bg.style.display="none";d.body.appendChild(bg);cms.bg=bg;};cms.showBackground=function(cn,zIndex,clickEvent){cms.createBackground();cms.bg.style.zIndex=zIndex||((zIndex===0)?0:501);cms.bg.className="page_background";if(cn&&!cms.bg.className.match(' ' +cn)){cms.bg.className +=(" " +cn);}
cms.bg.style.display="block";i2rd.addEvent(window,"resize",cms.resizeBackground);i2rd.addEvent(window,"scroll",cms.resizeBackground);cms.bg_clickEvent=clickEvent;if(clickEvent)i2rd.addEvent(cms.bg,'click',clickEvent);cms.resizeBackground();};cms.hideBackground=function(){if(!cms.bg)return;i2rd.removeEvent(window,"resize",cms.resizeBackground);i2rd.removeEvent(window,"scroll",cms.resizeBackground);cms.bg.style.display="none";if(cms.bg_clickEvent)i2rd.removeEvent(cms.bg,'click',cms.bg_clickEvent);};}
/*  JS Resource: cms/js/bean/emailpage.js  */

if(typeof EP=='undefined'){EP={};EP.Popup=function(beanNode,formDiv,form,link,cancelBtn,statusCon){this.beanNode=beanNode;this.formDiv=formDiv;this.form=form;this.link=link;this.cancelBtn=cancelBtn;this.statusCon=statusCon;this.init();};EP.Popup.prototype={init:function(){var body=document.body;this.background=document.createElement("div");this.background.className="ep_popup_background";this.background.style.display="none";body.appendChild(this.background);this.background.style.position="absolute";this.background.style.left=0;this.background.style.top=0;this.background.style.bottom=0;this.background.style.right=0;this.background.style.zIndex="599";this.popup=document.createElement("div");this.popup.style.display="none";body.appendChild(this.popup);this.popup.appendChild(this.formDiv);this.popup.style.zIndex="600";this.popup.id="popup_" +this.beanNode.id;this.popup.className="ep_popup";if(document.createComment)
this.popup.appendChild(document.createComment("Auto generated popup for EmailPage component."));this.link.href="#";this.checkEscFunc=i2rd.bind(this.checkEsc,this);this.hideFunc=i2rd.bind(this.hide,this);i2rd.addEvent(this.link,"click",i2rd.bind(this.toggle,this));i2rd.addEvent(this.background,"click",this.hideFunc);i2rd.addEvent(this.cancelBtn,"click",this.hideFunc);i2rd.addEvent(this.form,"submit",i2rd.bind(this.submitForm,this));},toggle:function(evt){evt.stopPropagation();evt.preventDefault();if(this.popup.style.display=="none")
this.show();else
this.hide();},checkEsc:function(evt){if(evt.keyCode==27||evt.which==27){this.hide();}},show:function(){cms.showBackground("ep_popup_background","599",this.hideFunc);this.popup.style.display="block";var el=this.form.getElementsByTagName("input")[0];i2rd.addEvent(document,"keypress",this.checkEscFunc);this.scrollTo(this.popup);if(window.scrollBy)
window.scrollBy(0, -20);cms.hideObscuredElements(this.popup);try{el.focus();}catch(e){}},scrollTo:function(element){var x=element.x?element.x:element.offsetLeft,y=element.y?element.y:element.offsetTop;window.scrollTo(x,y);},hide:function(){cms.showObscuredElements();this.popup.style.display="none";this.form.reset();this.statusCon.innerHTML="<span>&#160;</span>";i2rd.removeEvent(document,"keypress",this.checkEscFunc);cms.hideBackground();},serialize:function(){var enc,fe,i,ib,el=this.form.elements;;enc='';for(i=0,ib=el.length;(fe=el[i]);i++){if(!fe.name){continue;}
enc +='&' +fe.name +'=' +escape(fe.value);}
return enc.substring(1);},submitForm:function(evt){if(evt){evt.stopPropagation();evt.preventDefault();}
this.form.onsubmit=function(){return false;};var encodedForm=this.serialize();this.ajax=i2rd.getAjaxTransport();this.ajax.onreadystatechange=i2rd.bind(this.handleResponse,this);this.ajax.open("POST",this.form.action,true);this.ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');this.ajax.send(encodedForm);},handleResponse:function(){if(this.ajax.readyState!=4){return;}
if(!(this.ajax.status==200||this.ajax.status==0))
alert("Unable to send email. Please try again later.");try{var success=true;var resp=this.ajax.responseText||this.ajax.responseXML;var processed=i2rd.stripScripts(i2rd.xmlToString(resp));var success=processed.html.match(/success/ig);this.statusCon.innerHTML=processed.html;if(success){this.hide();}
this.ajax.onreadystatechange=null;delete this.ajax;}catch(e){log4js.logger.error("Unable to process AJAX response.",e);}},cleanup:function(){delete this.checkEscFunc;}};EP.init=function(evt){var divList=document.getElementsByTagName("div");for(var el=null,idx=0;(el=divList[idx]);idx++){var cn=el.className||"";cn=cn.toLowerCase();if(cn.match(/ep_email_form/)){if(el.ep_configured)continue;el.ep_configured=true;var epNode=el.parentNode;var epForm=epNode.getElementsByTagName("form")[0];var epDiv=epForm.parentNode;if(epDiv&&epDiv.processed)continue;epDiv.processed=true;var epLink=epNode.getElementsByTagName("span")[0].getElementsByTagName("a")[0];var epCancel=null;var epStatusCon=null;var elList=epForm.getElementsByTagName("input");for(var el2=null,idx2=0;(el2=elList[idx2]);idx2++){if(el2.type=="button"&&el2.name=="ep_cancel"){epCancel=el2;break;}}
elList=epDiv.getElementsByTagName("div");for(var el2=null,idx2=0;(el2=elList[idx2]);idx2++){var cn2=el2.className||"";cn2=cn2.toLowerCase();if(cn2=="status_messages"){epStatusCon=el2;break;}}
if(!epForm||!epLink||!epCancel||!epStatusCon){if(!el.id)el.id="check_" +idx;}else{var popup=new EP.Popup(epNode,epDiv,epForm,epLink,epCancel,epStatusCon);i2rd.addEvent(window,'unload',function(evt){popup.cleanup();delete popup;});}}}};i2rd.addEvent(window,'load',EP.init);}
if(typeof cms_js_includes != 'undefined') {
 cms.addJSInclude('/resources/dyn/docroot/lib/i2rd-util.js/_fn/i2rd-util.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/logger.js/_fn/logger.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/bean/articlecontainer.js/_fn/articlecontainer.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/bean/MenuBean.js/_fn/MenuBean.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-iefix.js/_fn/cms-iefix.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-dim.js/_fn/cms-dim.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-pageeffect.js/_fn/cms-pageeffect.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/bean/emailpage.js/_fn/emailpage.js');
}

