/* WSGC Copyright */
dojo.provide("wsgc");if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(_1,_2){return _1.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_2&&_2.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(_4,re,_6){if(!(_4 instanceof Array)){return re(_4);}var b=[];for(var i=0;i<_4.length;i++){b.push(re(_4[i]));}return dojo.regexp.group(b.join("|"),_6);};dojo.regexp.group=function(_9,_a){return "("+(_a?"?:":"")+_9+")";};}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(_b,_c,_d){var c=document.cookie;if(arguments.length==1){var _f=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(_b)+"=([^;]*)"));return _f?decodeURIComponent(_f[1]):undefined;}else{_d=_d||{};var exp=_d.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_d.expires=d;}if(exp&&exp.toUTCString){_d.expires=exp.toUTCString();}_c=encodeURIComponent(_c);var _12=_b+"="+_c,_13;for(_13 in _d){_12+="; "+_13;var _14=_d[_13];if(_14!==true){_12+="="+_14;}}document.cookie=_12;}};dojo.cookie.isSupported=function(){if(!("cookieEnabled" in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__djCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};}if(!dojo._hasResource["wsgc.js.Utils"]){dojo._hasResource["wsgc.js.Utils"]=true;dojo.provide("wsgc.js.Utils");dojo.declare("wsgc.js.Utils",null,{constructor:function(_15,_16){this._savedCartCookie=_15;this._sessionCartCookie=_16;this._registerSearchFieldEvents();this._registerSignUpEmail();this._registerNavHoverEventsForIE();this._registerPopupNewWindowEvents();this._scrollToPaymentPageErrors();this._registerSVCApply();this._registerCreditCardFieldEvents();this._registerPopulateShippingFromBilling();this._registerChangeShipToEvents();this._registerInterstitialEvents();this._setBasketCount();this._registerPlaceOrder();this._registerSVCLRC();this._registerMultiSelect();this._setCellHeightByRow();this._footerJOELPopup();this._sidebarJOELPopup();this._registerThankYouNotesEvents();this._registerPromotionsEvents();dojo.query(".forgotPassword").forEach(dojo.hitch(this,function(_17){dojo.connect(_17,"onclick",this,"handleForgotPasswordClick");}));dojo.connect(dojo.byId("cartForm"),"onsubmit",function(evt){dojo.query(".delete-item").forEach("item.disabled = true");return true;});dojo.query("#choose-another-category-drop").forEach(function(_19){dojo.connect(_19,"onchange",this,function(evt){location.href=evt.currentTarget.value;});});dojo.query(".goBack").forEach(function(_1b){dojo.connect(_1b,"onclick",function(evt){evt.preventDefault();history.back();});});},DEFAULT_SEARCH_TEXT:"keyword or item #",DEFAULT_EMAIL_TEXT:"Enter your email address",POPUP_DEFAULT_HEIGHT:560,POPUP_DEFAULT_WIDTH:820,POPUP_DEFAULT_RESIZE:1,POPUP_DEFAULT_NAME:"AppPopup",_savedCartCookie:"",_sessionCartCookie:"",MULTI_BUY_CARTURL:"/shoppingcart/style-and-quantity.html",_multi_buy_items:null,MULTI_BUY_ERROR:"<p class=\"error\">Please select a product to add to your cart.</p>",_setBasketCount:function(){var _1d=dojo.cookie(this._sessionCartCookie.toUpperCase());if(typeof _1d=="undefined"){_1d=dojo.cookie(this._savedCartCookie.toUpperCase());}if((typeof _1d=="undefined")||(_1d.split("|").length<4)){return;}var _1e=_1d.split("|")[3];if(dojo.byId("cart-count")){if(_1e!=="0"){dojo.byId("cart-count").innerHTML="<span> : </span>"+_1e;}else{dojo.byId("cart-count").innerHTML="";}}},_registerSearchFieldEvents:function(){var _1f=dojo.byId("search-field");if(_1f){dojo.connect(_1f,"onfocus",this,function(evt){if(evt.currentTarget.value===this.DEFAULT_SEARCH_TEXT){evt.currentTarget.value="";}});dojo.connect(_1f,"onblur",this,function(evt){if(evt.currentTarget.value==""){evt.currentTarget.value=this.DEFAULT_SEARCH_TEXT;}});}},_registerInterstitialEvents:function(){var _22=null;dojo.query("form.interstitialForm .btn-edit, form.interstitialForm .edit").forEach(function(_23){dojo.connect(_23,"onclick",this,"_handleInterstitialEditClick");},this);dojo.query("form.interstitialForm .btn-preview").forEach(function(_24){dojo.connect(_24,"onclick",this,"_handleInterstitialPreviewClick");},this);dojo.query("form.interstitialForm #btn-continue").forEach(function(_25){dojo.connect(_25,"onclick",this,"_handleInterstitialContinueClick");},this);dojo.query(".interstitialForm .btn-continue-path").forEach(function(_26){dojo.connect(_26,"onclick",this,"_handleInterstitialContinueClick");},this);},_registerNavHoverEventsForIE:function(){if(dojo.isIE==6){dojo.query("#nav-container li[class~=\"dropDown\"]").forEach(function(_27){dojo.connect(_27,"onmouseover",function(evt){dojo.addClass(evt.currentTarget,"dropDownHover");if(dojo.byId("store-locator-form")){dojo.query("#state, #country","store-locator-form").forEach(function(_29){dojo.style(_29,"visibility","hidden");});}if(dojo.byId("address-create-edit")){dojo.query("#address.state","address-create-edit").forEach(function(_2a){dojo.style(_2a,"visibility","hidden");});}if(dojo.byId("create-registry")){dojo.query("select","event-info").forEach(function(_2b){dojo.style(_2b,"visibility","hidden");});}if(dojo.byId("catalog-request")){dojo.query("#address.state","catalog-request").forEach(function(_2c){dojo.style(_2c,"visibility","hidden");});}});dojo.connect(_27,"onmouseout",function(evt){dojo.removeClass(evt.currentTarget,"dropDownHover");if(dojo.byId("store-locator-form")){dojo.query("#state, #country","store-locator-form").forEach(function(_2e){dojo.style(_2e,"visibility","visible");});}if(dojo.byId("address-create-edit")){dojo.query("#address.state","address-create-edit").forEach(function(_2f){dojo.style(_2f,"visibility","visible");});}if(dojo.byId("create-registry")){dojo.query("select","event-info").forEach(function(_30){dojo.style(_30,"visibility","visible");});}if(dojo.byId("catalog-request")){dojo.query("#address.state","catalog-request").forEach(function(_31){dojo.style(_31,"visibility","visible");});}});});}},_registerPopupNewWindowEvents:function(){dojo.query(".popup").forEach(dojo.hitch(this,function(_32){dojo.connect(_32,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();var _34=dojo.attr(evt.currentTarget,"rel");var _35;var _36,_37,_38,_39;try{_35=dojo.fromJson(_34);_36=(_35&&typeof _35.dim!=="undefined"&&typeof _35.dim.height!=="undefined"&&_35.dim.height)?_35.dim.height:this.POPUP_DEFAULT_HEIGHT;_37=(_35&&typeof _35.dim!=="undefined"&&typeof _35.dim.width!=="undefined"&&_35.dim.width)?_35.dim.width:this.POPUP_DEFAULT_WIDTH;_38=(_35&&typeof _35.dim!=="undefined"&&typeof _35.dim.resize!=="undefined"&&_35.dim.resize)?_35.dim.resize:this.POPUP_DEFAULT_RESIZE;_39=(_35&&typeof _35.name!=="undefined"!=="undefined"&&_35.name)?_35.name:this.POPUP_DEFAULT_NAME;}catch(e){_36=this.POPUP_DEFAULT_HEIGHT;_37=this.POPUP_DEFAULT_WIDTH;_38=this.POPUP_DEFAULT_RESIZE;_39=this.POPUP_DEFAULT_NAME;}var url=evt.currentTarget.href;var _3b="toolbar=no,location=no,directories=no,scrollbars=1,resizable="+_38+",height="+_36+",width="+_37+",screenX=4,screenY=4,top=4,left=4";var win=window.open(url,_39,_3b);win.focus();});if(dojo.attr(_32,"pophref")){_32.href=dojo.attr(_32,"pophref");}}));dojo.query(".newWindow").forEach(function(_3d){dojo.connect(_3d,"onclick",this,function(evt){evt.preventDefault();evt.stopPropagation();var _3f=dojo.attr(evt.currentTarget,"rel");var _40;var _41;try{_40=dojo.fromJson(_3f);_41=(_40&&typeof _40.name!=="undefined"!=="undefined"&&_40.name)?_40.name:this.POPUP_DEFAULT_NAME;}catch(e){_41=this.POPUP_DEFAULT_NAME;}var url=evt.currentTarget.href;var _43="toolbar=yes,location=yes,directories=no,scrollbars=1,resizable=1";var win=window.open(url,_41,_43);if(window.focus){win.focus();}});},this);dojo.query(".close").forEach(function(_45){dojo.connect(_45,"onclick",function(evt){evt.preventDefault();evt.stopPropagation();window.close();});});dojo.query(".closeAndContinue").forEach(function(_47){dojo.connect(_47,"onclick",this,"_newParentWindow");},this);dojo.query(".driveParent").forEach(function(_48){dojo.connect(_48,"onclick",this,"_redirectParent");},this);dojo.query(".redirectParent").forEach(function(_49){dojo.connect(_49,"onclick",this,"_redirectParentNoClose");},this);dojo.query(".print, .printButton").forEach(function(_4a){dojo.connect(_4a,"onclick",function(evt){evt.preventDefault();evt.stopPropagation();window.print();});});dojo.query(".rollover").forEach(function(_4c){dojo.connect(_4c,"onmouseover",function(evt){var _4e=evt.currentTarget.src.replace("_off","_on");evt.currentTarget.src=_4e;});dojo.connect(_4c,"onmouseout",function(evt){var _50=evt.currentTarget.src.replace("_on","_off");evt.currentTarget.src=_50;});dojo.connect(_4c,"onfocus",function(evt){var _52=evt.currentTarget.src.replace("_off","_on");evt.currentTarget.src=_52;});dojo.connect(_4c,"onblur",function(evt){var _54=evt.currentTarget.src.replace("_on","_off");evt.currentTarget.src=_54;});});dojo.query(".delete-item").forEach(function(_55){dojo.connect(_55,"onclick",function(evt){var _57=_55.name;document.cartForm[_57].value="true";});});dojo.query(".checkoutButton").forEach(function(_58){dojo.connect(_58,"onclick",function(evt){dojo.stopEvent(evt);dojo.byId("checkout").value="true";dojo.byId("cartForm").submit();});});},_registerChangeShipToEvents:function(){var _5a=dojo.byId("shipToChanged");if(!_5a){return;}opener.location="/shoppingcart/";opener.location.reload(true);window.close();},_registerSVCApply:function(){var _5b=dojo.byId("applysvc");if(!_5b){return;}dojo.connect(_5b,"onclick",function(evt){var _5d=dojo.byId("svcApply");_5d.value="yes";});},_registerPlaceOrder:function(){var _5e=dojo.byId("placeOrderButton");if(!_5e){return;}dojo.connect(_5e,"onclick",function(evt){dojo.byId("placeOrder").value="yes";});},_scrollToPaymentPageErrors:function(){var _60=dojo.byId("paymentInformation");if(!_60){return;}this.deferredPayment();var _61=dojo.byId("svcError");var _62=dojo.byId("discountsApplied");var _63=dojo.byId("ccError");if(_61&&dojo.trim(_61.innerHTML)!==""){if(dojo.query(".gift-cards-and-help").length>0){dojo.query(".gift-cards-and-help")[0].scrollIntoView(true);}}else{if(_63&&dojo.trim(_63.innerHTML)!==""){if(dojo.query(".payment-information-block").length>0){dojo.query(".payment-information-block")[0].scrollIntoView(true);}}else{if(_62&&dojo.trim(_62.innerHTML)!==""){if(dojo.query(".gift-cards-and-help").length>0){dojo.query(".gift-cards-and-help")[0].scrollIntoView(true);}}}}var _64=dojo.byId("creditCard.payType");if(_64.value==8){dojo.attr("creditCard.cardExpMonth","disabled",true);dojo.attr("creditCard.cardExpYear","disabled",true);dojo.attr("creditCard.cardVerificationNumber","disabled",true);}},_registerCreditCardFieldEvents:function(){var _65=dojo.byId("creditCard.payType");if(!_65){return;}dojo.connect(_65,"onchange",dojo.hitch(this,function(evt){var _67=evt.target.value;var _68=dojo.byId("creditCard.cardExpMonth");var _69=dojo.byId("creditCard.cardExpYear");var _6a=dojo.byId("creditCard.cardVerificationNumber");var _6b=dojo.byId("allowZeroExp");if(_67==="8"){_68.selectedIndex=0;dojo.attr(_68,"disabled",true);_69.selectedIndex=0;dojo.attr(_69,"disabled",true);dojo.attr(_6a,"disabled",true);_6b.value="Y";}else{dojo.attr(_68,"disabled",false);dojo.attr(_69,"disabled",false);dojo.attr(_6a,"disabled",false);_6b.value="N";}this.deferredPayment();}));},_registerPopulateShippingFromBilling:function(){var _6c=dojo.byId("applyBillingAddtoShipping");if(_6c){dojo.connect(_6c,"onclick",function(evt){var _6e=evt.target.checked;if(_6e){dojo.attr("shiptoAddress.fullName",{"value":dojo.byId("billtoAddress.fullName").value,"disabled":"disabled"});dojo.attr("shiptoAddress.addrLine1",{"value":dojo.byId("billtoAddress.addrLine1").value,"disabled":"disabled"});dojo.attr("shiptoAddress.addrLine2",{"value":dojo.byId("billtoAddress.addrLine2").value,"disabled":"disabled"});dojo.attr("shiptoAddress.city",{"value":dojo.byId("billtoAddress.city").value,"disabled":"disabled"});document.getElementById("shiptoAddress.state").value=document.getElementById("billtoAddress.state").value;dojo.byId("shiptoAddress.state").selectedIndex=dojo.byId("billtoAddress.state").selectedIndex;dojo.attr("shiptoAddress.state","disabled","true");dojo.attr("shiptoAddress.zip",{"value":dojo.byId("billtoAddress.zip").value,"disabled":"disabled"});dojo.attr("shiptoAddress.dayPhone",{"value":dojo.byId("billtoAddress.dayPhone").value,"disabled":"disabled"});dojo.attr("shiptoAddress.eveningPhone",{"value":dojo.byId("billtoAddress.eveningPhone").value,"disabled":"disabled"});dojo.query("#ship-account-info input, #ship-account-info select").addClass("disabled");}else{dojo.query("#ship-account-info input, #ship-account-info select").forEach(function(_6f){_6f.removeAttribute("disabled");});dojo.query("#ship-account-info input, #ship-account-info select").removeClass("disabled");}});if(dojo.attr(_6c,"checked")===true){dojo.query("#ship-account-info input, #ship-account-info select").forEach(function(_70){_70.setAttribute("disabled","disabled");});}}},handleForgotPasswordClick:function(evt){dojo.stopEvent(evt);var _72=dojo.byId("loginForm");if(_72){_72.action=secureAppUrl+"account/password-request-confirmation.html";_72.submit();}},_handleInterstitialEditClick:function(evt){dojo.stopEvent(evt);evt.preventDefault();dojo.byId("isEditMode").value="1";this._postInterstitialForm();},_handleInterstitialPreviewClick:function(evt){if(dojo.byId("isPreview")){dojo.byId("isPreview").value="1";}if(evt&&evt.currentTarget&&evt.currentTarget.id){var _75=evt.currentTarget.id.substr(10);if(dojo.byId("previewIndex")){dojo.byId("previewIndex").value=_75;}}dojo.stopEvent(evt);this._postInterstitialForm();},_handleInterstitialContinueClick:function(evt){dojo.stopEvent(evt);dojo.byId("isEditMode").value="0";this._postInterstitialForm();},_postInterstitialForm:function(){if(dojo.query(".interstitialForm").length>0){var _77=dojo.query(".interstitialForm")[0];_77.submit();}},_forwardToExternalSite:function(win,url){if(win){win.close();}var _7a=window.open(url);},_registerSVCLRC:function(){var _7b="";dojo.query(".removeSVCLRCButton").forEach(function(_7c){dojo.connect(_7c,"onclick",function(evt){if(!dojo.attr(evt.currentTarget,"svcnumber")){return false;}_7b=dojo.attr(evt.currentTarget,"svcnumber");dojo.byId("removeSvcLrc").value=_7b;return true;});});},_newParentWindow:function(evt){var win;var url=evt.currentTarget.href;if(dojo.isFF){try{if(dojo.exists("window.opener.utils._forwardToExternalSite")){window.opener.utils._forwardToExternalSite(window,url);}else{win=window.open(url);window.close();}}catch(e){win=window.open(url);window.close();}}else{win=window.open(url);window.close();}},_redirectParent:function(evt){evt.preventDefault();evt.stopPropagation();var url=evt.currentTarget.href;if(dojo.exists("window.opener")){window.opener.location.href=url;if(dojo.exists("window.opener.focus")){window.opener.focus();}}else{var win=window.open(url);window.close();}window.close();},_redirectParentNoClose:function(evt){evt.preventDefault();evt.stopPropagation();var url=evt.currentTarget.href;if(dojo.exists("window.opener")){window.opener.location.href=url;}else{var win=window.open(url);}},deferredPayment:function(){var _87=dojo.byId("creditCard.payType").value;var _88=dojo.byId("deferredPayment");if(_88){var _89=dojo.byId("deferPayments");var _8a=_89.value.split(",");var _8b=dojo.byId("creditCard.payType").options;var _8c=dojo.byId("deferredCardType");for(var i=0;i<_8a.length;i++){if(_87===_8a[i]){for(var j=0;j<_8b.length;j++){if(_8b[j].value==_87){_8c.innerHTML=_8b[j].text;}}dojo.style(_88,{"display":"block"});break;}else{dojo.style(_88,{"display":"none"});}}}},_registerMultiSelect:function(){this._multi_buy_items=[];if(dojo.byId("productGroupIds")&&dojo.byId("productGroupIds").value!==""){this._multi_buy_items=dojo.byId("productGroupIds").value.split(",");}if(dojo.query("form[name='multiSelect']").length>0){dojo.query(".pagination a").connect("onclick",this,function(evt){var _90=dojo.query("form[name='multiSelect']")[0];var _91=evt.currentTarget.href;evt.preventDefault();this._writeMultiBuyItemsToField();_90.action=_91;_90.submit();});dojo.query(".btn-add-selected a").connect("onclick",this,function(evt){var _93=dojo.query("form[name='multiSelect']")[0];var _94=this.MULTI_BUY_CARTURL;evt.preventDefault();this._writeMultiBuyItemsToField();if(dojo.byId("productGroupIds")&&dojo.trim(dojo.byId("productGroupIds").value)!==""){_93.action=_94;_93.submit();}else{if(dojo.byId("pageErrorHook")){dojo.byId("pageErrorHook").innerHTML=this.MULTI_BUY_ERROR;window.scroll(0,0);}}});dojo.query(".muliBuyCheckbox").connect("onclick",this,"_handleMutliBuyCheckboxClick");}},_writeMultiBuyItemsToField:function(){if(dojo.byId("productGroupIds")&&this._multi_buy_items){dojo.byId("productGroupIds").value=this._multi_buy_items.join(",");}},_handleMutliBuyCheckboxClick:function(evt){var _96=evt.currentTarget;var _97=evt.currentTarget.value;if(_96.checked){if(dojo.indexOf(this._multi_buy_items,_97)===-1){this._multi_buy_items.push(_97);}}else{if(dojo.indexOf(this._multi_buy_items,_97)>-1){this._multi_buy_items.splice(dojo.indexOf(this._multi_buy_items,_97),1);}}},_setCellHeightByRow:function(){if(dojo.byId("recipes")){var _98=dojo.query("ul.recipe-list");if(_98.length>0){dojo.forEach(_98,function(row){var _9a=0;var _9b=dojo.query("li",row);_9b.forEach(function(el){_9a=dojo.marginBox(el).h>_9a?dojo.marginBox(el).h:_9a;});_9b.forEach(function(el){dojo.marginBox(el,{h:_9a});});});}}if(dojo.query("ul.product-list").length>0){var _98=dojo.query("ul.product-list");if(_98.length>0){var _9e=dojo.query("div.subcat-list",_98[0]).length>0;if(!_9e){dojo.forEach(_98,function(row){var _a0=0;var _a1=dojo.query("li",row);_a1.forEach(function(el){_a0=dojo.marginBox(el).h>_a0?dojo.marginBox(el).h:_a0;});_a1.forEach(function(el){dojo.marginBox(el,{h:_a0});el.style.borderBottomWidth="1px";});});}else{dojo.forEach(_98,function(row){var _a5=0;var _a6=dojo.query("li div.product-name a",row);_a6.forEach(function(el){_a5=dojo.marginBox(el).h>_a5?dojo.marginBox(el).h:_a5;});_a6.forEach(function(el){var _a9=_a5-dojo.marginBox(el).h+"px";dojo.style(el,"marginTop",_a9);});var _aa=0;var _ab=dojo.query("div.subcat-list",row);_ab.forEach(function(el){_aa=dojo.marginBox(el).h>_aa?dojo.marginBox(el).h:_aa;});_ab.forEach(function(el){dojo.marginBox(el,{h:_aa});});});}}}},_footerJOELPopup:function(){var _ae=dojo.byId("joinEmail");if(_ae){dojo.connect(_ae,"onsubmit",function(evt){evt.preventDefault();evt.stopPropagation();var url=document.forms.joinEmail.action+"?email="+document.forms.joinEmail.email.value;var _b1="toolbar=no,location=no,directories=no,scrollbars=1,resizable=0,height=250,width=500,screenX=4,screenY=4,top=4,left=4";var win=window.open(url,"joinemail",_b1);win.focus();});}},_sidebarJOELPopup:function(){var _b3=dojo.byId("joinEmail2");if(_b3){dojo.connect(_b3,"onsubmit",function(evt){evt.preventDefault();evt.stopPropagation();var url=document.forms.joinEmail2.action+"?email="+document.forms.joinEmail2.email.value;var _b6="toolbar=no,location=no,directories=no,scrollbars=1,resizable=0,height=250,width=500,screenX=4,screenY=4,top=4,left=4";var win=window.open(url,"joinemail",_b6);win.focus();});}},_registerThankYouNotesEvents:function(){if(dojo.byId("registry-thank-you-notes")){dojo.query(".thankYouSort").forEach(function(_b8){dojo.connect(_b8,"onchange",null,function(evt){dojo.byId("frmSort").submit();});});dojo.query(".submitChanges").forEach(function(_ba){dojo.connect(_ba,"onclick",null,function(evt){dojo.byId("thank-you-notes-form").submit();});});}},_registerSignUpEmail:function(){var _bc=dojo.byId("footer-email-field");if(_bc){dojo.connect(_bc,"onfocus",this,function(evt){if(evt.currentTarget.value===this.DEFAULT_EMAIL_TEXT){evt.currentTarget.value="";}});dojo.connect(_bc,"onblur",this,function(evt){if(evt.currentTarget.value==""){evt.currentTarget.value=this.DEFAULT_EMAIL_TEXT;}});}},_registerPromotionsEvents:function(){var _bf=dojo.byId("apply-tax-exemption");if(!_bf){return;}var _c0=dojo.byId("yesexemption");var _c1=dojo.byId("noexemption");dojo.connect(_c0,"onclick",function(evt){dojo.byId("termsBlock").className="";dojo.query(".message").forEach("item.className='hide';");});dojo.connect(_c1,"onclick",function(evt){dojo.byId("termsBlock").className="hide";dojo.query(".message").forEach("item.className='hide';");});dojo.connect(dojo.byId("accepttoc"),"onclick",function(evt){dojo.query(".message").forEach("item.className='hide';");});},bvCheckLoadState:function(){if(!BVisLoaded){dojo.byId("BVSubmissionFrame").src="";dojo.byId("BVSubmissionContainer").innerHTML="Review Submission Currently Unavailable";}}});}if(!dojo._hasResource["dojox.xml.parser"]){dojo._hasResource["dojox.xml.parser"]=true;dojo.provide("dojox.xml.parser");dojox.xml.parser.parse=function(str){if(dojo.isIE){var _c6=new ActiveXObject("Microsoft.XMLDOM");_c6.async="false";_c6.loadXML(str);var pe=_c6.parseError;if(pe.errorCode!==0){throw new Error("Line: "+pe.line+"\n"+"Col: "+pe.linepos+"\n"+"Reason: "+pe.reason+"\n"+"Error Code: "+pe.errorCode+"\n"+"Source: "+pe.srcText);}return _c6;}else{var _c8=new DOMParser();var _c6=_c8.parseFromString(str,"text/xml");var de=_c6.documentElement;var _ca="http://www.mozilla.org/newlayout/xml/parsererror.xml";if(de.nodeName=="parsererror"&&de.namespaceURI==_ca){var _cb=de.getElementsByTagNameNS(_ca,"sourcetext")[0];if(!_cb){_cb=_cb.firstChild.data;}throw new Error("Error parsing text "+_c6.documentElement.firstChild.data+" \n"+_cb);}return _c6;}};}if(!dojo._hasResource["dojox.embed.Flash"]){dojo._hasResource["dojox.embed.Flash"]=true;dojo.provide("dojox.embed.Flash");(function(){var _cc,_cd;var _ce="dojox-embed-flash-",_cf=0;function prep(_d0){_d0=dojo.mixin({expressInstall:false,width:320,height:240,style:null,redirect:null},_d0||{});if(!("path" in _d0)){console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided.");return null;}if(!("id" in _d0)){_d0.id=(_ce+_cf++);}return _d0;};if(dojo.isIE){_cc=function(_d1){_d1=prep(_d1);if(!_d1){return null;}var _d2=_d1.path;if(_d1.vars){var a=[];for(var p in _d1.vars){a.push(p+"="+_d1.vars[p]);}_d2+=((_d2.indexOf("?")==-1)?"?":"&")+a.join("&");}var s="<object id=\""+_d1.id+"\" "+"classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "+"width=\""+_d1.width+"\" "+"height=\""+_d1.height+"\""+((_d1.style)?" style=\""+_d1.style+"\"":"")+">"+"<param name=\"movie\" value=\""+_d2+"\" />";if(_d1.params){for(var p in _d1.params){s+="<param name=\""+p+"\" value=\""+_d1.params[p]+"\" />";}}s+="</object>";return {id:_d1.id,markup:s};};_cd=(function(){var _d6=10,_d7=null;while(!_d7&&_d6>6){try{_d7=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_d6--);}catch(e){}}if(_d7){var v=_d7.GetVariable("$version").split(" ")[1].split(",");return {major:(v[0]!=null)?parseInt(v[0]):0,minor:(v[1]!=null)?parseInt(v[1]):0,rev:(v[2]!=null)?parseInt(v[2]):0};}return {major:0,minor:0,rev:0};})();}else{_cc=function(_d9){_d9=prep(_d9);if(!_d9){return null;}var _da=_d9.path;if(_d9.vars){var a=[];for(var p in _d9.vars){a.push(p+"="+_d9.vars[p]);}_da+=((_da.indexOf("?")==-1)?"?":"&")+a.join("&");}var s="<embed type=\"application/x-shockwave-flash\" "+"src=\""+_da+"\" "+"id=\""+_d9.id+"\" "+"name=\""+_d9.id+"\" "+"width=\""+_d9.width+"\" "+"height=\""+_d9.height+"\""+((_d9.style)?" style=\""+_d9.style+"\" ":"")+"swLiveConnect=\"true\" "+"allowScriptAccess=\"always\" "+"pluginspage=\""+window.location.protocol+"//www.adobe.com/go/getflashplayer\" ";if(_d9.params){for(var p in _d9.params){s+=" "+p+"=\""+_d9.params[p]+"\"";}}s+=" />";return {id:_d9.id,markup:s};};_cd=(function(){var _de=navigator.plugins["Shockwave Flash"];if(_de&&_de.description){var v=_de.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".");return {major:(v[0]!=null)?parseInt(v[0]):0,minor:(v[1]!=null)?parseInt(v[1]):0,rev:(v[2]!=null)?parseInt(v[2]):0};}return {major:0,minor:0,rev:0};})();}dojox.embed.Flash=function(_e0,_e1){this.id=null;this.movie=null;this.domNode=null;if(_e0&&_e1){this.init(_e0,_e1);}};dojo.extend(dojox.embed.Flash,{onReady:function(_e2){},onLoad:function(_e3){},init:function(_e4,_e5){this.destroy();_e5=_e5||this.domNode;if(!_e5){throw new Error("dojox.embed.Flash: no domNode reference has been passed.");}this._poller=null;this._pollCount=0,this._pollMax=250;if(dojox.embed.Flash.initialized&&dojox.embed.Flash.available!==0){this.id=dojox.embed.Flash.place(_e4,_e5);this.domNode=_e5;setTimeout(dojo.hitch(this,function(){this.movie=(dojo.isIE)?dojo.byId(this.id):document[this.id];this.onReady(this.movie);this._poller=setInterval(dojo.hitch(this,function(){if(this.movie&&typeof this.movie.PercentLoaded==="function"&&(this.movie.PercentLoaded()==100||this._pollCount++>this._pollMax)){clearInterval(this._poller);delete this._poller;delete this._pollCount;delete this._pollMax;this.onLoad(this.movie);}}),10);}),1);}else{dojo.query("img",dojo.byId(this.domNode)).forEach("dojo.style(item, 'display', 'inline')");}},_destroy:function(){this.domNode.removeChild(this.movie);this.id=this.movie=this.domNode=null;},destroy:function(){if(!this.movie){return;}var _e6=dojo.mixin({},{id:true,movie:true,domNode:true,onReady:true,onLoad:true});for(var p in this){if(!_e6[p]){delete this[p];}}if(this._poller){dojo.connect(this,"onLoad",this,"_destroy");}else{this._destroy();}}});dojo.mixin(dojox.embed.Flash,{minSupported:8,available:_cd.major,supported:(_cd.major>=8),version:_cd,initialized:false,onInitialize:function(){dojox.embed.Flash.initialized=true;},__ie_markup__:function(_e8){return _cc(_e8);},proxy:function(obj,_ea){dojo.forEach((dojo.isArray(_ea)?_ea:[_ea]),function(_eb){this[_eb]=dojo.hitch(this,function(){return (function(){return eval(this.movie.CallFunction("<invoke name=\""+_eb+"\" returntype=\"javascript\">"+"<arguments>"+dojo.map(arguments,function(_ec){return __flash__toXML(_ec);}).join("")+"</arguments>"+"</invoke>"));}).apply(this,arguments||[]);});},obj);}});if(dojo.isIE){dojox.embed.Flash.place=function(_ed,_ee){var o=dojox.embed.Flash.__ie_markup__(_ed);_ee=dojo.byId(_ee);if(!_ee){_ee=dojo.doc.createElement("div");_ee.id=o.id+"-container";dojo.body().appendChild(_ee);}if(o){_ee.innerHTML=o.markup;return o.id;}return null;};dojox.embed.Flash.onInitialize();}else{dojox.embed.Flash.place=function(_f0,_f1){var o=_cc(_f0);_f1=dojo.byId(_f1);if(!_f1){_f1=dojo.doc.createElement("div");_f1.id=o.id+"-container";dojo.body().appendChild(_f1);}if(o){_f1.innerHTML=o.markup;return o.id;}return null;};dojox.embed.Flash.onInitialize();}})();}if(!dojo._hasResource["wsgc.js.MetricsWrapper"]){dojo._hasResource["wsgc.js.MetricsWrapper"]=true;dojo.provide("wsgc.js.MetricsWrapper");dojo.declare("wsgc.js.MetricsWrapper",null,{constructor:function(){dojo.query("[metrics]").forEach(dojo.hitch(this,function(_f3){dojo.connect(_f3,"onclick",this,"_executeMetricsCall");}));},_executeMetricsCall:function(evt){try{var _f5=dojo.attr(evt.currentTarget,"metrics");eval(_f5);}catch(e){console.debug("Metrics call failed.");}}});}
