var rr_addedToCartItemIds;function rr_parseQueryValue(a){var b=location.href.indexOf(a);var c;if(b!=-1){var d=location.href.indexOf("&",b);if(d!=-1){c=location.href.substring(b+a.length+1,d)}else{c=location.href.substring(b+a.length+1,location.href.length)}}else{c=''}return c}function rr_addStrategy(a){if(typeof this.forcedStrategies=='undefined'){this.forcedStrategies=''}this.forcedStrategies+='|'+a}function rr_addPlacementType(a){if(typeof this.placementTypes=='undefined'){this.placementTypes=''}this.placementTypes+='|'+a}function rr_blockItemId(a){if(typeof this.blockeditemIds=='undefined'){this.blockeditemIds=''}this.blockeditemIds+='|'+a}function rr_addItemId(a){if(typeof this.itemIds=='undefined'){this.itemIds=''}this.itemIds+='|'+a}function rr_addItemIdDollarsAndCentsQuantity(a,b,c){if(typeof this.itemIds=='undefined'){this.itemIds=''}this.itemIds+='|'+a;if(typeof this.purchasesDollarsAndCents=='undefined'){this.purchasesDollarsAndCents=''}if(typeof b=='undefined'){b=0}this.purchasesDollarsAndCents+='|'+b;if(typeof this.quantities=='undefined'){this.quantities=''}if(typeof c=='undefined'){c=-1}this.quantities+='|'+c}function rr_addItemIdCentsQuantity(a,b,c){if(typeof this.itemIds=='undefined'){this.itemIds=''}this.itemIds+='|'+a;if(typeof this.purchasesCents=='undefined'){this.purchasesCents=''}if(typeof b=='undefined'){b=0}this.purchasesCents+='|'+b;if(typeof this.quantities=='undefined'){this.quantities=''}if(typeof c=='undefined'){c=-1}this.quantities+='|'+c}function rr_addItemIdPriceQuantity(a,b,c){if(typeof this.itemIds=='undefined'){this.itemIds=''}this.itemIds+='|'+a;if(typeof this.purchasesPrice=='undefined'){this.purchasesPrice=''}if(typeof b=='undefined'){b=0}this.purchasesPrice+='|'+b;if(typeof this.quantities=='undefined'){this.quantities=''}if(typeof c=='undefined'){c=-1}this.quantities+='|'+c}function rr_addAttribute(a,b){if(typeof this.attributes=='undefined'){this.attributes=''}this.attributes+='|'+a+':'+b}function rr_addCategory(a,b){if(typeof this.categories=='undefined'){this.categories=''}if(typeof b=='undefined'){b=a}this.categories+='|'+a+':'+b}function rr_addCategoryId(a){if(typeof this.categoryIds=='undefined'){this.categoryIds=''}this.categoryIds+='|'+a}function rr_addCategoryHintId(a){if(typeof this.categoryHintIds=='undefined'){this.categoryHintIds=''}this.categoryHintIds+='|'+a}function rr_addItemIdToCart(a){if(typeof rr_addedToCartItemIds=='undefined'){rr_addedToCartItemIds=''}rr_addedToCartItemIds+='|'+a}function rr_setOrderNumber(a){this.orderNumber=a}function rr_setBaseUrl(a){if('http://media.richrelevance.com/rrserver/'==a){a='http://recs.richrelevance.com/rrserver/'}if('https://media.richrelevance.com/rrserver/'==a){a='https://recs.richrelevance.com/rrserver/'}this.baseUrl=a}function rr_setClickthruServer(a){this.clickthruServer=a}function rr_setJsFileName(a){this.jsFileName=a}function rr_setApiKey(a){this.apiKey=a}function rr_enableJson(){this.jsonEnabled='t'}function rr_setUserId(a){this.userId=a}function rr_setSessionId(a){this.sessionId=a}function rr_setForcedTreatment(a){this.forcedTreatment=a}function rr_setTopLevelGenre(a){this.topLevelGenre=a}function rr_setId(a){this.id=a}function rr_setName(a){this.name=a}function rr_setDescription(a){this.description=a}function rr_setImageId(a){this.imageId=a}function rr_setReleaseDate(a){this.releaseDate=a}function rr_setDollarsAndCents(a){this.dollarsAndCents=a}function rr_setCents(a){this.cents=a}function rr_setSaleDollarsAndCents(a){this.saleDollarsAndCents=a}function rr_setSaleCents(a){this.saleCents=a}function rr_setPrice(a){this.price=a}function rr_setSalePrice(a){this.salePrice=a}function rr_setLinkId(a){this.linkId=a}function rr_setEndDate(a){this.endDate=a}function rr_setRating(a){this.rating=a}function rr_setBrand(a){this.brand=a}function rr_setRecommendable(a){this.recommendable=a}function rr_setParentId(a){this.parentId=a}function rr_setTopName(a){this.topName=a}function rr_setTerms(a){this.terms=a}function rr_forceListenMode(){this.listenModeForced='t'}function rr_forceDisplayMode(){this.displayModeForced='t'}function rr_forceDevMode(){this.devModeForced='t'}function rr_useDummyData(){this.dummyDataUsed='t';this.displayModeForced='t'}function rr_addForcedTemplate(a){if(typeof this.forcedTemplates=='undefined'){this.forcedTemplates=''}this.forcedTemplates+='|'+a}function rr_addForcedPoolItem(a){if(typeof this.forcedPoolItems=='undefined'){this.forcedPoolItems=''}this.forcedPoolItems+='|'+a}function rr_createCommonScript(a,b){if(a.clickthruServer){b+='&cts='+encodeURIComponent(a.clickthruServer)}if(a.jsonEnabled&&a.jsonEnabled=='t'){b+='&je=t'}if(a.placementTypes){b+='&pt='+encodeURIComponent(a.placementTypes)}if(rr_addedToCartItemIds){b+='&atcid='+encodeURIComponent(rr_addedToCartItemIds)}if(a.userId){b+='&u='+encodeURIComponent(a.userId)}if(a.sessionId){b+='&s='+encodeURIComponent(a.sessionId)}if(a.forcedStrategies){b+='&fs='+encodeURIComponent(a.forcedStrategies)}if(a.listenModeForced&&a.listenModeForced=='t'){b+='&flm=t'}if(a.forcedTreatment&&a.forcedTreatment!==''){b+='&ftr='+encodeURIComponent(a.forcedTreatment)}if(a.viewGuid&&a.viewGuid!==''){b+='&vg='+encodeURIComponent(a.viewGuid)}if(a.fromRichMail&&a.fromRichMail!==''){b+='&rm='+encodeURIComponent(a.fromRichMail)}if(a.categoryHintIds){b+='&chi='+encodeURIComponent(a.categoryHintIds)}if(a.debugMode){if(a.displayModeForced&&a.displayModeForced=='t'){b+='&fdm=t'}if(a.devModeForced&&a.devModeForced=='t'){b+='&dev=t'}if(a.dummyDataUsed&&a.dummyDataUsed=='t'){b+='&udd=t'}if(a.forcedTemplates){b+='&ft='+encodeURIComponent(a.forcedTemplates)}if(a.forcedPoolItems){b+='&fp='+encodeURIComponent(a.forcedPoolItems)}}return b}function rr_createItemScript(a,b){if(a.topLevelGenre){b+='&tg='+encodeURIComponent(a.topLevelGenre)}if(a.categories){b+='&cs='+encodeURIComponent(a.categories)}if(a.categoryIds){b+='&cis='+encodeURIComponent(a.categoryIds)}if(a.id){b+='&p='+encodeURIComponent(a.id)}if(a.name){b+='&n='+encodeURIComponent(a.name)}if(a.description){b+='&d='+encodeURIComponent(a.description)}if(a.imageId){b+='&ii='+encodeURIComponent(a.imageId)}if(a.linkId){b+='&li='+encodeURIComponent(a.linkId)}if(a.releaseDate){b+='&rd='+encodeURIComponent(a.releaseDate)}if(a.dollarsAndCents){b+='&np='+encodeURIComponent(a.dollarsAndCents)}if(a.cents){b+='&npc='+encodeURIComponent(a.cents)}if(a.saleDollarsAndCents){b+='&sp='+encodeURIComponent(a.saleDollarsAndCents)}if(a.saleCents){b+='&spc='+encodeURIComponent(a.saleCents)}if(a.price){b+='&np='+encodeURIComponent(a.price)}if(a.salePrice){b+='&sp='+encodeURIComponent(a.salePrice)}if(a.endDate){b+='&ed='+encodeURIComponent(a.endDate)}if(a.rating){b+='&r='+encodeURIComponent(a.rating)}if(typeof a.recommendable!='undefined'){b+='&re='+encodeURIComponent(a.recommendable)}if(a.brand){b+='&b='+encodeURIComponent(a.brand)}if(a.attributes){b+='&at='+encodeURIComponent(a.attributes)}if(a.blockeditemIds){b+='&bi='+encodeURIComponent(a.blockeditemIds)}return b}function rr_createCategoryScript(a,b){if(a.topLevelGenre){b+='&tg='+encodeURIComponent(a.topLevelGenre)}if(a.name){b+='&cn='+encodeURIComponent(a.name)}if(a.id){b+='&c='+encodeURIComponent(a.id)}if(a.parentId){b+='&pc='+encodeURIComponent(a.parentId)}if(a.topName){b+='&tcn='+encodeURIComponent(a.topName)}if(a.brand){b+='&b='+encodeURIComponent(a.brand)}if(a.itemIds){b+='&p='+encodeURIComponent(a.itemIds)}return b}function rr_createCartScript(a,b){if(a.itemIds){b+='&p='+encodeURIComponent(a.itemIds)}if(a.purchasesCents){b+='&ppc='+encodeURIComponent(a.purchasesCents)}if(a.purchasesDollarsAndCents){b+='&pp='+encodeURIComponent(a.purchasesDollarsAndCents)}if(a.quantities){b+='&q='+encodeURIComponent(a.quantities)}if(a.purchasesPrice){b+='&pp='+encodeURIComponent(a.purchasesPrice)}return b}function rr_createAddToCartScript(a,b){if(a.itemIds){b+='&p='+encodeURIComponent(a.itemIds)}if(a.purchasesCents){b+='&ppc='+encodeURIComponent(a.purchasesCents)}if(a.purchasesDollarsAndCents){b+='&pp='+encodeURIComponent(a.purchasesDollarsAndCents)}if(a.quantities){b+='&q='+encodeURIComponent(a.quantities)}if(a.purchasesPrice){b+='&pp='+encodeURIComponent(a.purchasesPrice)}return b}function rr_createPurchasedScript(a,b){if(a.orderNumber){b+='&o='+encodeURIComponent(a.orderNumber)}if(a.itemIds){b+='&p='+encodeURIComponent(a.itemIds)}if(a.purchasesCents){b+='&ppc='+encodeURIComponent(a.purchasesCents)}if(a.purchasesDollarsAndCents){b+='&pp='+encodeURIComponent(a.purchasesDollarsAndCents)}if(a.quantities){b+='&q='+encodeURIComponent(a.quantities)}if(a.purchasesPrice){b+='&pp='+encodeURIComponent(a.purchasesPrice)}return b}function rr_createSearchScript(a,b){if(a.terms){b+='&st='+encodeURIComponent(a.terms)}if(a.brand){b+='&b='+encodeURIComponent(a.brand)}if(a.itemIds){b+='&p='+encodeURIComponent(a.itemIds)}return b}function rr_createHomeScript(a,b){return b}function rr_createErrorScript(a,b){return b}function rr_createMyRecsScript(a,b){return b}function r3_common(){this.baseUrl='http://recs.richrelevance.com/rrserver/';this.jsFileName='p13n_generated.js';this.setBaseUrl=rr_setBaseUrl;this.setClickthruServer=rr_setClickthruServer;this.setJsFileName=rr_setJsFileName;this.setApiKey=rr_setApiKey;this.enableJson=rr_enableJson;this.setUserId=rr_setUserId;this.setSessionId=rr_setSessionId;this.addStrategy=rr_addStrategy;this.addPlacementType=rr_addPlacementType;this.addItemIdToCart=rr_addItemIdToCart;this.setForcedTreatment=rr_setForcedTreatment;this.forceListenMode=rr_forceListenMode;this.forceDisplayMode=rr_forceDisplayMode;this.forceDevMode=rr_forceDevMode;this.useDummyData=rr_useDummyData;this.addForcedTemplate=rr_addForcedTemplate;this.addForcedPoolItem=rr_addForcedPoolItem;this.addCategoryHintId=rr_addCategoryHintId}function r3_item(){this.setTopLevelGenre=rr_setTopLevelGenre;this.addCategory=rr_addCategory;this.addCategoryId=rr_addCategoryId;this.setId=rr_setId;this.setName=rr_setName;this.setDescription=rr_setDescription;this.setImageId=rr_setImageId;this.setReleaseDate=rr_setReleaseDate;this.setDollarsAndCents=rr_setDollarsAndCents;this.setCents=rr_setCents;this.setSaleDollarsAndCents=rr_setSaleDollarsAndCents;this.setSaleCents=rr_setSaleCents;this.setPrice=rr_setPrice;this.setSalePrice=rr_setSalePrice;this.setBrand=rr_setBrand;this.setRecommendable=rr_setRecommendable;this.setLinkId=rr_setLinkId;this.setEndDate=rr_setEndDate;this.setRating=rr_setRating;this.addAttribute=rr_addAttribute;this.blockItemId=rr_blockItemId}function r3_category(){this.setTopLevelGenre=rr_setTopLevelGenre;this.setName=rr_setName;this.setId=rr_setId;this.setParentId=rr_setParentId;this.setTopName=rr_setTopName;this.setBrand=rr_setBrand;this.addItemId=rr_addItemId}function r3_cart(){this.addItemId=rr_addItemId;this.addItemIdDollarsAndCentsQuantity=rr_addItemIdDollarsAndCentsQuantity;this.addItemIdCentsQuantity=rr_addItemIdCentsQuantity;this.addItemIdPriceQuantity=rr_addItemIdPriceQuantity}function r3_addtocart(){this.addItemIdToCart=rr_addItemIdToCart}function r3_purchased(){this.setOrderNumber=rr_setOrderNumber;this.addItemIdDollarsAndCentsQuantity=rr_addItemIdDollarsAndCentsQuantity;this.addItemIdCentsQuantity=rr_addItemIdCentsQuantity;this.addItemIdPriceQuantity=rr_addItemIdPriceQuantity;this.addItemId=rr_addItemIdCentsQuantity}function r3_search(){this.setTerms=rr_setTerms;this.setBrand=rr_setBrand;this.addItemId=rr_addItemId}function r3_home(){}function r3_error(){}function r3_myrecs(){}var rr_placement_place_holders=new Array();function r3_placement(a){document.write('<div id="rr_placement_'+rr_placement_place_holders.length+'"></div>');rr_placement_place_holders[rr_placement_place_holders.length]=a}function r3_getRecs(){return false}var rr_placements=new Array();function rr_append_parsed_element(a,b){var c=a.cloneNode(false);if(c.nodeName=='SCRIPT'){c.text=a.innerHTML;b.appendChild(c)}else if(c.nodeName=='#text'){b.appendChild(c)}else{b.appendChild(c);for(var i=0,len=a.childNodes.length;i<len;i++){rr_append_parsed_element(a.childNodes[i],c)}}}function rr_scroll(a,b){var c;var d=eval('rr_cells['+a+']');var e=eval('rr_showing['+a+']');var f=eval('rr_display_count['+a+']');if(f>d.length){document.getElementById('rr_scroller'+a).parentNode.removeChild(document.getElementById('rr_scroller'+a));f=d.length}if(e.length===0){c=0}else if(b<0){var g=e[0];c=g-f;if(c<0){c=d.length+c}}else{var h=e[e.length-1];c=h+1;if(c>d.length-1){c=c-d.length}}var j=c;for(var i=0;i<f;i++){document.getElementById('rr_cell'+a+'_'+i).innerHTML=d[j];e[i]=j;j++;if(j==d.length){j=0}}}var rr_cells=new Array();var rr_showing=new Array();function rr_addCell(a,b){if(typeof rr_cells[a]=='undefined'){rr_cells[a]=new Array();rr_showing[a]=new Array()}rr_cells[a][rr_cells[a].length]=b}var rr_display_count=new Array();function rr_setDisplayCount(a,b){rr_display_count[a]=b}function rr_insert_placement(a,b){for(var i=0;i<rr_placements.length;i++){if(rr_placements[i][0]===0&&rr_placements[i][1]==b){rr_placements[i][0]=1;if(rr_placements[i][2].indexOf('<script')==-1){a.innerHTML=rr_placements[i][2]}else if(document.implementation.hasFeature('Range','2.0')){var c=document.createRange();c.selectNodeContents(a);var e=c.createContextualFragment(rr_placements[i][2]);a.appendChild(e);c.detach()}else{var d=document.createElement('div');d.innerHTML=rr_placements[i][2];for(var j=0,len=d.childNodes.length;j<len;j++){rr_append_parsed_element(d.childNodes[j],a)}}return}}return}var rr_onload_called=false;function rr_flush(){}function rr_flush_onload(){if(!rr_onload_called){rr_onload_called=true;rr_flush()}}function rr_addLoadEvent(a){var b=window.onload;if(typeof window.onload!='function'){window.onload=a}else{window.onload=function(){b();a()}}}rr_addLoadEvent(rr_flush_onload);var p13nGeneratedScriptSrc;function rr_create_script(a){var b=document.createElement('script');b.type='text/javascript';b.src=a;document.getElementsByTagName('head')[0].appendChild(b)}function rr_create_inline_style(a){var b=document.createElement('style');b.type='text/css';b.innerHTML=a;document.getElementsByTagName('head')[0].appendChild(b)}function r3(a,b){var c=false;if(typeof(b)=='undefined'||!b){if(typeof R3_COMMON!='undefined'&&location.href.indexOf('r3_forceDisplay=true')!=-1){R3_COMMON.debugMode=true;R3_COMMON.displayModeForced='t'}if(location.href.indexOf('r3_forceDev=true')!=-1){R3_COMMON.debugMode=true;R3_COMMON.devModeForced='t'}if(location.href.indexOf('r3_debugMode=true')!=-1){c=true}else if(location.href.indexOf('r3_debugMode=false')!=-1){c=false}else if(typeof(a)!='undefined'&&a){c=a}if(location.href.indexOf('r3_useDummyData=true')!=-1){R3_COMMON.debugMode=true;R3_COMMON.dummyDataUsed='t';R3_COMMON.displayModeForced='t'}var e=rr_parseQueryValue('r3_addTemplates');if(e!==''){R3_COMMON.debugMode=true;if(typeof R3_COMMON.forcedTemplates=='undefined'){R3_COMMON.forcedTemplates=''}R3_COMMON.forcedTemplates+=e}var f=rr_parseQueryValue('r3_addPoolItems');if(f!==''){R3_COMMON.debugMode=true;if(typeof R3_COMMON.forcedPoolItems=='undefined'){R3_COMMON.forcedPoolItems=''}R3_COMMON.forcedPoolItems+=f}R3_COMMON.forcedTreatment=rr_parseQueryValue('r3_forcedTreatment');if(location.href.indexOf('vg=')!=-1){R3_COMMON.viewGuid=rr_parseQueryValue('vg')}if(location.href.indexOf('rm=')!=-1){R3_COMMON.fromRichMail=rr_parseQueryValue('rm')}}if(typeof R3_COMMON!='undefined'){if(c){R3_COMMON.debugMode=true;setTimeout('rr_create_script(R3_COMMON.baseUrl+\'js/0.3/p13n_debug.js\')',10)}else if(R3_COMMON.baseUrl&&R3_COMMON.apiKey){var g=R3_COMMON.baseUrl+R3_COMMON.jsFileName+'?es=f&a='+encodeURIComponent(R3_COMMON.apiKey);var d=new Date();g+='&ts='+d.getTime();if(R3_COMMON.baseUrl.toLowerCase().indexOf('https://')==0){g+='&ssl=t'}var h=false;if(typeof R3_COMMON.placementTypes=='undefined'||R3_COMMON.placementTypes===''){h=true;g+='&pte=t'}if(typeof R3_ITEM!='undefined'){if(h){R3_COMMON.addPlacementType('item_page')}g=rr_createItemScript(R3_ITEM,g)}if(typeof R3_CATEGORY!='undefined'){if(h){R3_COMMON.addPlacementType('category_page')}g=rr_createCategoryScript(R3_CATEGORY,g)}if(typeof R3_CART!='undefined'){if(h){R3_COMMON.addPlacementType('cart_page')}g=rr_createCartScript(R3_CART,g)}if(typeof R3_ADDTOCART!='undefined'){if(h){R3_COMMON.addPlacementType('add_to_cart_page')}g=rr_createAddToCartScript(R3_ADDTOCART,g)}if(typeof R3_PURCHASED!='undefined'){if(h){R3_COMMON.addPlacementType('purchase_complete_page')}g=rr_createPurchasedScript(R3_PURCHASED,g)}if(typeof R3_SEARCH!='undefined'){if(h){R3_COMMON.addPlacementType('search_page')}g=rr_createSearchScript(R3_SEARCH,g)}if(typeof R3_HOME!='undefined'){if(h){R3_COMMON.addPlacementType('home_page')}g=rr_createHomeScript(R3_HOME,g)}if(typeof R3_ERROR!='undefined'){if(h){R3_COMMON.addPlacementType('error_page')}g=rr_createErrorScript(R3_ERROR,g)}if(typeof R3_MYRECS!='undefined'){if(h){R3_COMMON.addPlacementType('my_recs_page')}g=rr_createMyRecsScript(R3_MYRECS,g)}g=rr_createCommonScript(R3_COMMON,g);var i='';if(document.referrer!==''&&typeof document.referrer!='undefined'){i=document.referrer}if(i===''&&document.referer!==''&&typeof document.referer!='undefined'){i=document.referer}if(i!==''){g+='&pref='+encodeURIComponent(i)}g+='&l=1';p13nGeneratedScriptSrc=g;setTimeout('rr_create_script(p13nGeneratedScriptSrc)',10)}}else{if(c){alert("R3_COMMON has not been defined")}}}function rr_checkAndLoadJavascriptSrc(){var a=rr_parseQueryValue('r3_env');var b=rr_parseQueryValue('r3_version');if(a!==''||b!==''){if(a===''){a='recs.richrelevance.com'}if(b===''){b='0.3'}var c='';if(location.href.indexOf('https://')!=-1){c='https://'}else{c='http://'}setTimeout('rr_create_script(protocolString + envString + \'/rrserver/js/\'+versionName+\'/p13n.js\')',10)}}rr_checkAndLoadJavascriptSrc();