if(!Array.prototype.indexOf){Array.prototype.indexOf=function(B){var A=this.length;var C=Number(arguments[1])||0;C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A;
}for(;C<A;C++){if(C in this&&this[C]===B){return C;}}return -1;};}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(B){var A=this.length;var C=Number(arguments[1]);
if(isNaN(C)){C=A-1;}else{C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A;}else{if(C>=A){C=A-1;}}}for(;C>-1;C--){if(C in this&&this[C]===B){return C;}}return -1;};
}if(!Array.prototype.some){Array.prototype.some=function(B){var A=this.length;if(typeof B!=="function"){throw new TypeError();}var D=arguments[1];for(var C=0;C<A;
C++){if(C in this&&B.call(D,this[C],C,this)){return true;}}return false;};}if(!Array.prototype.every){Array.prototype.every=function(B){var A=this.length;if(typeof B!=="function"){throw new TypeError();
}var D=arguments[1];for(var C=0;C<A;C++){if(C in this&&!B.call(D,this[C],C,this)){return false;}}return true;};}if(!Array.prototype.forEach){Array.prototype.forEach=function(B){var A=this.length;
if(typeof B!=="function"){throw new TypeError();}var D=arguments[1];for(var C=0;C<A;C++){if(C in this){B.call(D,this[C],C,this);}}};}if(!Array.prototype.filter){Array.prototype.filter=function(B){var A=this.length;
if(typeof B!=="function"){throw new TypeError();}var E=[];var D=arguments[1];for(var C=0;C<A;C++){if(C in this){var F=this[C];if(B.call(D,F,C,this)){E.push(F);}}}return E;
};}if(!Array.prototype.map){Array.prototype.map=function(B){var A=this.length;if(typeof B!=="function"){throw new TypeError();}var E=[];var D=arguments[1];for(var C=0;
C<A;C++){if(C in this){E[C]=B.call(D,this[C],C,this);}}return E;};}if(!Array.prototype.reduce){Array.prototype.reduce=function(B){var A=this.length;if(typeof B!=="function"){throw new TypeError();
}if(A===0&&arguments.length===1){throw new TypeError();}var D,C=0;if(arguments.length>=2){D=arguments[1];}else{do{if(C in this){D=this[C++];break;}if(++C>=A){throw new TypeError();
}}while(true);}for(;C<A;C++){if(C in this){D=B.call(null,D,this[C],C,this);}}return D;};}if(!Array.prototype.reduceRight){Array.prototype.reduceRight=function(B){var A=this.length;
if(typeof B!=="function"){throw new TypeError();}if(A===0&&arguments.length===1){throw new TypeError();}var D,C=A-1;if(arguments.length>=2){D=arguments[1];}else{do{if(C in this){D=this[C--];
break;}if(--C<0){throw new TypeError();}}while(true);}for(;C>=0;C--){if(C in this){D=B.call(null,D,this[C],C,this);}}return D;};}PB={toString:function(){return"Photobooks, Inc.";
},JumpSelect:function(A){if(A.value&&A.value!==""){document.location.href=A.value;}},CloseChild:function(A){A.close();},ContentClass:"layout_eWEP",FormFill:{toString:function(){return"Photobooks Form Repopulation Manager";
},Load:function(E,D,G){if(G===null){return ;}var C,A;var F=$(E);var B;if(F){B=F[D];}if(B){switch(B.type){case"select-one":C=B.options.length;while(C--){if((B[C].value===G)||(B[C].text===G)){B.selectedIndex=C;
}}break;case"select-multiple":C=B.options.length;while(C--){for(A=0;A<G.split(", ").length;A++){if((B[C].value===G.split(", ")[A])||(B[C].text===G.split(", ")[A])){B.options[C].selected=true;
}}}break;case"radio":case"checkbox":if(B.value===G){B.checked=true;}break;case"file":break;case undefined:if(B.length&&B.length>0){switch(B[0].type){case"radio":C=B.length;
while(C--){if(B[C].value===G){B[C].checked=true;}}break;case"checkbox":C=B.length;G=G.split(", ");while(C--){A=G.length;while(A--){if(B[C].value===G[A]){B[C].checked=true;
}}}break;}}break;default:B.value=G;break;}}}},MouseOvers:{toString:function(){return"Photobooks Mouseover Manager";},elements:[],waiting:false,add:function(B,A){this.elements.push({el:B,src:null,hoverEl:null,hoverSrc:A,applied:false});
},apply:function(){if(this.waiting===true){return ;}this.waiting=true;Event.onDOMReady(function(){this.waiting=false;var C=this.elements;var A,E,D,B=[];for(A=0;A<C.length;
A++){if(C[A].applied===true){continue;}D=$(C[A].el);if(D===null||D.nodeName.toLowerCase()!=="img"){continue;}E=C.length;while(E--){if(C[E].el===D&&C[E].applied===true){C[A].applied=true;
continue;}}C[A].el=D;C[A].src=D.src;C[A].hoverEl=new Image(D.width,D.height);C[A].hoverEl.alt=D.alt;C[A].hoverEl.src=C[A].hoverSrc;C[A].hoverSrc=C[A].hoverEl.src;
Event.addListener(D,"mouseover",this.doHover,C[A]);Event.addListener(D,"mouseout",this.doHover,C[A]);C[A].applied=true;}},this,true);},doHover:function(B,C){var A=Event.getTarget(B);
A.src=(B.type==="mouseover")?C.hoverSrc:C.src;}},FontResizer:{toString:function(){return"Photobooks Font Resizer";},Icon:"/images/Icons/font_resize_btn.gif",ContentID:"layout_eWEP",Content:null,ContainerID:"FontResizer",Container:null,ActiveState:null,DefaultState:"Size1",Icons:[],FindActiveState:function(){var D="";
var B=document.cookie;var E=B.split("; ");var C,A;for(A=0;A<E.length;A++){C=E[A].substr(0,E[A].indexOf("="));if(C!=="FontSize"){continue;}D=E[A].substring(E[A].indexOf("=")+1);
break;}switch(D.toLowerCase()){case"size1":D="Size1";break;case"size2":D="Size2";break;case"size3":D="Size3";break;case"size4":D="Size4";break;default:D=this.DefaultState;
break;}this.ActiveState=D;document.cookie="FontSize="+D;},Render:function(){var B;var A;for(A=4;A>0;A--){B=document.createElement("a");B.href="#null";B.id=this.ContainerID+A;
Dom.addClass(B,"Icon");Dom.addClass(B,"Size"+A);if(this.ActiveState==="Size"+A){Dom.addClass(B,"Active");Dom.addClass(B,"S"+A+"Active");}this.Icons.push(B);this.Container.appendChild(B);
}Dom.setStyle(this.Container,"display","block");Event.addListener(this.Container,"click",this.onClick,this,true);},Init:function(){this.Container=$(this.ContainerID);
if(!this.Container){return ;}this.Content=$(this.ContentID);this.FindActiveState();this.Render();if(this.ActiveState!==this.DefaultState){this.ChangeSize(this.ActiveState);
}},onClick:function(E,G){var B=E.target||E.srcElement;if(!B.nodeName||B.nodeName.toLowerCase()!=="a"){return ;}if(Dom.hasClass(B,"Active")===true){return ;}var A=B.id;
var D=A.substring(this.ContainerID.length);var F="Size"+D;var C;Dom.removeClass(this.Icons,"Active");for(C=1;C<=4;C++){Dom.removeClass(this.Icons,"S"+C+"Active");
}Dom.addClass(B,"Active");Dom.addClass(B,"S"+D+"Active");this.ChangeSize(F);},ChangeSize:function(B){var A;switch(B){case"Size1":A="small";break;case"Size2":A="medium";
break;case"Size3":A="large";break;case"Size4":A="x-large";break;default:return ;}Dom.setStyle(this.Content,"fontSize",A);this.ActiveState=B;document.cookie="FontSize="+B;
}}};