
amzn_wdgt.ID = "V20070822/US/absolutepunk-20/8002/56125794-1973-4965-8f95-9663b2ab9708";

var _amzn_utils={insertStyleSheet:function(_1,_2,_3){
if(!document.getElementById(_1)){
var _4=document.getElementsByTagName("head");
if(_4[0]){
var _5;
if(document.createElementNS&&_4[0].tagName=="head"){
_5=document.createElementNS("http://www.w3.org/1999/xhtml","link");
}else{
_5=document.createElement("link");
}
_5.id=_1;
_5.rel="stylesheet";
_5.href=this.amznMediaserverURL(_3)+_2;
_5.type="text/css";
_4[0].appendChild(_5);
}
}
},objHasOwnProperty:function(_6,_7){
return Object.prototype.hasOwnProperty?_6.hasOwnProperty(_7):typeof _6[_7]!="function";
},insertAfter:function(_8,_9,_a){
var pn=_9.parentNode;
if(_9==pn.lastChild){
if((!_a)&&(_8===_9)){
return false;
}
pn.appendChild(_8);
}else{
return this.insertBefore(_8,_9.nextSibling,_a);
}
return true;
},insertBefore:function(_c,_d,_e){
if(!_e&&(_c===_d||_c.nextSibling===_d)){
return false;
}
var _f=_d.parentNode;
_f.insertBefore(_c,_d);
return true;
},getById:function(id,_11){
if(this.isAppleWebKit()){
var _12=null;
var _13=_11.childNodes;
for(var i=0;i<_13.length;i++){
if(_12!=null){
return _12;
}
var _15=_13[i];
if(_15&&_15.childNodes&&_15.childNodes.length>0){
var _16=this.getById(id,_15);
if(_16!=null){
_12=_16;
}
}
if(_15&&_15.id==id){
_12=_15;
}
}
return _12;
}else{
var _12=null;
var _13=_11.childNodes;
for(var i in _13){
if(_12!=null){
return _12;
}
var _15=_13[i];
if(_15&&_15.childNodes&&_15.childNodes.length>0){
var _16=this.getById(id,_15);
if(_16!=null){
_12=_16;
}
}
if(_15&&_15.id==id){
_12=_15;
}
}
return _12;
}
},byId:function(id,doc){
if((id)&&((typeof id=="string")||(id instanceof String))){
doc=document;
var ele=doc.getElementById(id);
if(ele&&(ele.id!=id)&&doc.all){
ele=null;
var _1a=doc.all[id];
if(_1a){
if(_1a.length){
for(var i=0;i<_1a.length;i++){
if(_1a[i].id==id){
ele=_1a[i];
break;
}
}
}else{
ele=_1a;
}
}
}
return ele;
}
return id;
},replaceAll:function(str,_1d,_1e){
if(str==null){
return str;
}
var idx=str.indexOf(_1d);
while(idx>-1){
str=str.replace(_1d,_1e);
idx=str.indexOf(_1d);
}
return str;
},msie:"",amzn_isMSIE:function(){
if(this.msie==""){
this.msie=navigator.userAgent.toLowerCase().indexOf("msie")>0;
}
return this.msie;
},msie_6:"",amzn_isMSIE_6:function(){
if(this.msie_6==""){
this.msie_6=/MSIE (5\.5|6\.)/.test(navigator.userAgent);
}
return this.msie_6;
},firefox_1_5:"",isFirefox_1_5:function(){
if(this.firefox_1_5==""){
this.firefox_1_5=navigator.userAgent.toLowerCase().indexOf("firefox/1.5")>0;
}
return this.firefox_1_5;
},safari:"",isAppleWebKit:function(){
if(this.safari==""){
this.safari=navigator.userAgent.toLowerCase().indexOf("applewebkit")>0;
}
return this.safari;
},$:function(id){
return this.byId(id,document);
},validateParams:function(_21){
var _22=true;
for(var _23 in _21){
if(_amzn_utils.objHasOwnProperty(_21,_23)){
if(typeof _21[_23]=="undefined"){
_22=false;
return;
}
}
}
return _22;
},clone:function(_24){
if(_24==null){
return _24;
}
var _25=new _24.constructor();
for(var _26 in _24){
if(_amzn_utils.objHasOwnProperty(_24,_26)){
if(typeof _24[_26]=="object"){
_25[_26]=this.clone(_24[_26]);
}else{
_25[_26]=_24[_26];
}
}
}
return _25;
},runPNGTransparencyHackForBkgdImage:function(_27){
if(/MSIE (5\.5|6\.)/.test(navigator.userAgent)&&_27){
var _28=_27.currentStyle.backgroundImage||_27.style.backgroundImage;
if(_28){
var _29=false;
if(_28.match(/^url[("']+(.*\.png)[)"']+$/i)){
var _2a=RegExp.$1;
if(_2a&&_2a.indexOf("_tpng.png")>0){
if(_27.currentStyle.width=="auto"&&_27.currentStyle.height=="auto"){
_27.style.width=_27.offsetWidth+"px";
}
_27.style.backgroundImage="none";
_27.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src='"+_2a+"',sizingMethod='scale')";
}
_29=true;
}else{
if(_28=="none"){
_29=true;
}
}
if(_29){
for(var n=0;n<_27.childNodes.length;n++){
if(_27.childNodes[n].style){
_27.childNodes[n].style.position="relative";
}
}
}
}
}
},runPNGTransparencyHack:function(_2c,_2d){
if(typeof _2d=="undefined"){
_2d="US";
}
if(/MSIE (5\.5|6\.)/.test(navigator.userAgent)&&_2c){
if(window.ActiveXObject){
var _2e=_2c.getElementsByTagName("input");
for(var i=0;i<_2e.length;++i){
if(_2e[i].src.indexOf("_tpng.png")>0){
var src=_2e[i].src;
_2e[i].src=this.imageDirectory(_2d)+"/transparent-pixel.gif";
_2e[i].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='scale')";
}
}
var _31=_2c.getElementsByTagName("img");
for(var i=0;i<_31.length;++i){
if(_31[i].src.indexOf("_tpng.png")>0){
var src=_31[i].src;
_31[i].src=this.imageDirectory(_2d)+"/transparent-pixel.gif";
_31[i].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='scale')";
}
}
}
}
},stripTags:function(str){
if(str==null){
return null;
}
return str.replace(/<\/?[^>]+>/gi,"");
},unescapeHTML:function(_33){
var div=document.createElement("div");
div.innerHTML=this.stripTags(_33);
return div.childNodes[0]?div.childNodes[0].nodeValue:"";
},escapeHTML:function(_35){
if(typeof _35=="string"){
var div=document.createElement("div");
var _37=document.createTextNode(_35);
div.appendChild(_37);
return div.innerHTML;
}else{
if(typeof _35=="array"){
for(var i=0;i<_35.length;i++){
_35[i]=this.escapeHTML(_35[i]);
}
}else{
if(typeof _35=="object"){
for(var i in _35){
if(_amzn_utils.objHasOwnProperty(_35,i)){
_35[i]=this.escapeHTML(_35[i]);
}
}
}
}
}
return _35;
},getRatingImage:function(_39,_3a){
if(!_39){
return "";
}
var _3b;
var _3c=_39.split(".");
if(_3c&&_3c.length==2){
var _3d=_3c[0]+_3c[1];
_3b="<img style='height:11px; width:56px;border: none;margin:0;' src='"+_amzn_utils.imageDirectory(_3a)+"/star"+_3d+"_tpng.png'>";
}
return _3b;
},numberOfOccurencesOfSubstr:function(str,_3f){
var _40=0;
var pos=str.indexOf(_3f);
while(pos!=-1){
_40++;
pos=str.indexOf(str,pos+_3f.length);
}
return _40;
},_amzn_popup_onshow_callback:function(){
_amzn_utils.runPNGTransparencyHack(_amzn_utils.$("amzn_popup_div"));
},_amzn_popup_callback_helper:function(){
_amzn_popup.onshow_callback=_amzn_utils._amzn_popup_onshow_callback;
_amzn_popup.onhide_callback=_amzn_utils._amzn_popup_onhide_callback;
},_amzn_popup_onhide_callback:function(){
_amzn_popup.onhide_callback=null;
},getTile:function(_42,_43,_44){
var _45=Math.floor((_43.innerWidth-2*_43.cols)/_43.cols);
var res="<div class='wdgt_tl_pad'>"+"<div class='' style='border-bottom:1px solid #CCCCCC;height:53px;width:"+_45+"px'>";
if(typeof _42=="string"&&_42=="INVALID"){
res+="<a target='_blank' href='"+_amzn_utils.getString(_amzn_utils.AmazonCom,_43.marketPlace)+"'><img style='width:40px;height:57px;border:1px solid #afafaf; background-color:#FFFFFF; padding:3px;' src='"+_amzn_utils.imageDirectory(_43.marketPlace)+"/itemNoLongerAvailable-40px.gif'></a>";
res+="</div>";
res+="</div>";
return res;
}
var _47=escape(_43.createPopupTile(_42));
var _48="";
var _49="";
var _4a="";
var _4b="";
var _4c="";
var _4d="";
var _4e=_43.getURL(_42["DetailPageURL"]);
var _4f=_45-15;
var _50=_45;
var _51=0;
var _52="";
if(_43.show_image){
var _53=_42["ThumbImageUrl"];
var _54=_42["ThumbImageWidth"];
_51=_42["ThumbImageHeight"];
if(!_53||_53==""){
_53=_amzn_utils.imageDirectory(_43.marketPlace)+"/noImageAvailable-40px.gif";
}
if(!_54||_54==""){
_54=40;
}
if(!_51||_51==""){
_51=44;
}
if(_54>40){
_54=40;
_51=Math.floor(40*_42["ThumbImageHeight"]/_42["ThumbImageWidth"]);
}
if(_51>60){
_51=60;
_54=Math.floor(60*_42["ThumbImageWidth"]/_42["ThumbImageHeight"]);
}
_52="<div class='asin_img' ";
_48="><a style='float:left;"+_43.style_tile_asin_a()+"' target='_blank' href='"+_4e+"'>"+"<img src='"+_53+"' width='40' height='40' style='border:1px solid #afafaf; background-color:#FFFFFF; padding:3px;"+_43.style_tile_asin_img()+"' /></a></div>";
if(_45>150){
_4f=_45-_54-6-10;
}
_50=_45-_54-6-10;
}else{
_4f=_45-6-15;
_50=_45-6;
}
_49="<div style='padding-top:10px;'><a target='_blank' onMouseOver=\"this.style.color='#990000'\" onMouseOut=\"this.style.color='#333333'\" style='padding-left: 5px;color: #333333;font: 11px tahoma, lucida grande, arial, verdana, sans-serif;' href='"+_4e+"'>"+_43.trimCharsByWidth(this.escapeHTML(_42["Title"]),"11",_4f)+"</a></div>";
_4a="<div style='"+_43.style_tile_h2()+";' class='asin_h1'><a target='_blank' style='padding-left: 5px; text-decoration:none; color: #707070;font: 11px tahoma, lucida grande, arial, verdana, sans-serif;'  href='"+_4e+"'>"+_43.trimCharsByWidth(this.escapeHTML(_42["Subtitle"]),"11",_50)+"</a></div>";
var _55=_43.show_price&&_42["Price"];
if(_55){
_4b="<div  style='"+_43.style_tile_price()+"' class='asin_price'>"+_42["Price"]+"</div>";
}
var _56=_43.show_review&&_42["Rating"];
if(_56){
_4c="<div style='"+_43.style_tile_review()+"' class='asin_review'>"+_43.getReviewImage(_42["Rating"])+"</div>";
}
if(_44){
var _57=2;
if(_43.show_image){
var _58=15;
if(_45>=150){
_58+=15;
}
if(_56){
_58+=15;
}
if(_55){
_58+=15;
}
_58=Math.max(_51,_58);
_57+=Math.floor((60-_58)/12);
_52+="style='height:"+_58+"px;'";
}
_4d="<div onmouseover='_amzn_utils._amzn_popup_callback_helper();_a=this; _amzn_popup.showpreview(\""+_47+"\", _a, event, 500,\""+_43.tag+"\",\""+_43.linkCode+"\",\""+_43.creativeId()+"\",\""+_43.marketPlace+"\")' onmouseout='_amzn_popup.hide()' class='asin_cmnt' style='cursor:pointer;width:"+_45+"px;"+_43.style_tile_comment()+"'>"+_43.trimMultiLineComments(_44,"10",_45-6,_57)+"</div>";
}
_48=_52+_48;
if(_45<150){
res+=_49;
res+=_48;
}else{
res+=_48;
res+=_49;
}
res+=_4a;
res+=_4b;
res+=_4c;
if(_44){
res+=_4d;
}
res+="</div>";
res+="</div>";
return res;
},pageNumberDiv:function(_59,_5a,_5b,_5c){
if(typeof _5c=="undefined"){
_5c=_59;
}
if(_5a){
return "<strong style='"+_5b.style_pgn_strong()+"'>"+_5c+"</strong>";
}else{
if(!window.nextCallBack){
window.nextCallBack=new Object();
}
if(!window.nextCallBack[_5b.marketPlace]){
window.nextCallBack[_5b.marketPlace]=new Object();
}
if(!window.nextCallBack[_5b.marketPlace][_5b.templateId]){
window.nextCallBack[_5b.marketPlace][_5b.templateId]=new Object();
}
if(!window.nextCallBack[_5b.marketPlace][_5b.templateId][_5b.instanceId]){
window.nextCallBack[_5b.marketPlace][_5b.templateId][_5b.instanceId]=new Object();
}
window.nextCallBack[_5b.marketPlace][_5b.templateId][_5b.instanceId]["showpage"]=_5b.showpage;
return "<a style='cursor:pointer;"+_5b.style_pgn_a()+"' onclick='javascript:window.nextCallBack[\""+_5b.marketPlace+"\"]["+_5b.templateId+"]["+_5b.instanceId+"].showpage("+_59+","+_5b.instanceId+","+_5b.templateId+",\""+_5b.marketPlace+"\");'>"+_5c+"</a>";
}
},calcContrastColor:function(_5d){
function f(c,n){
return parseInt(c.substr(n,2),16);
}
var av=(f(_5d,1)+f(_5d,3)+f(_5d,5))/3;
av+=(av>=100)?-100:100;
return "rgb("+av+","+av+","+av+")";
},createPopupTile:function(_61,_62,_63){
var _64=300;
var _65=_61["ThumbImageUrl"];
var _66=_61["ThumbImageWidth"];
var _67=_61["ThumbImageHeight"];
if(!_65||_65==""){
_65=_amzn_utils.imageDirectory(_62.marketPlace)+"/noImageAvailable-90px.gif";
}
if(!_66||_66==""){
_66=90;
}
if(!_67||_67==""){
_67=90;
}
if(_66>100){
_66=100;
_67=100*_61["ThumbImageHeight"]/_61["ThumbImageWidth"];
}
if(_67>100){
_67=100;
_66=100*_61["ThumbImageWidth"]/_61["ThumbImageHeight"];
}
var _68="";
if(_61["Rating"]){
_68="<div style='"+_62.style_tile_review()+"' class='asin_review'>"+_62.getReviewImage(_61["Rating"])+" ("+_61["TotalReviews"]+this.getString(this.CustomerReviews,_62.marketPlace)+")"+"</div>";
}
var _69="";
if(_61["Price"]){
_69="<div style='"+_62.style_tile_price()+"' class='asin_price'>"+this.getString(this.Price,_62.marketPlace)+":&nbsp;"+_61["Price"]+"</div>";
}
var _6a="";
if(_63){
_6a="<div style='"+_62.style_tile_comment()+"' class='asin_cmnt'>"+_63+"</div>";
}
return "<div id='wdgt_pop_tl' class='wdgt_pop_tl' style='"+_62.style_wdgt_pop_tl(_64)+"'>"+"<img onclick='_amzn_popup.hideNow()' style='border: none;margin:0;width:19px;height:19px;float:right;padding:0 3px 0 6px;cursor:pointer;' src='"+_amzn_utils.imageDirectory(_62.marketPlace)+"/close_down.gif"+"'>"+"<table><tr><td>"+"<a style='"+_62.style_tile_asin_a()+"' target='_blank' href='"+_62.getURL(_61["DetailPageURL"])+"'>"+"<img src='"+_65+"' width='"+_66+"' height='"+_67+"'  style='border: none;margin:0;padding:6px 6px 6px 6px;"+_62.style_tile_asin_img()+"' class='asin_img'/>"+"</a>"+"</td><td>"+"<div style='"+_62.style_tile_h1()+"' class='asin_h1'><a style='"+_62.style_tile_a()+_62.style_tile_h1_a()+"' target='_blank' href='"+_62.getURL(_61["DetailPageURL"])+"'>"+_61["Title"]+"</a></div>"+"<div style='"+_62.style_tile_h2()+"' class='asin_h2'><a target='_blank'  style='"+_62.style_tile_a()+"' href='"+_62.getURL(_61["DetailPageURL"])+"'>"+_61["Subtitle"]+"</a></div>"+_69+_68+"</td></tr></table>"+_6a+"<div style='clear:left'></div>"+"</div>";
},recordImpression:function(tag,_6c,_6d,_6e){
var img=document.createElement("IMG");
img.style.width="1px";
img.style.height="1px";
img.style.border="none";
var _70=1;
switch(_6e){
case "US":
_70=1;
break;
case "GB":
_70=2;
break;
case "DE":
_70=3;
break;
case "FR":
_70=8;
break;
case "JP":
_70=9;
break;
case "CA":
_70=15;
break;
}
img.src="http://"+this.getString(this.AssocImpVIP,_6e)+"/e/ir?"+"o="+_70+"&t="+tag+"&l="+_6c+"&camp="+this.getString(this.CampaignID,_6e)+"&creative="+_6d;
document.body.appendChild(img);
},recordPopover:function(tag,_72,_73,_74){
var img=document.createElement("IMG");
img.style.width="1px";
img.style.height="1px";
img.style.border="none";
var _76=1;
switch(_74){
case "US":
_76=1;
break;
case "GB":
_76=2;
break;
case "DE":
_76=3;
break;
case "FR":
_76=8;
break;
case "JP":
_76=9;
break;
case "CA":
_76=15;
break;
}
img.src="http://"+this.getString(this.AssocImpVIP,_74)+"/s/pp?"+"o="+_76+"&t="+tag+"&l="+_72+"&camp="+this.getString(this.CampaignID,_74)+"&asin=INVALDASIN"+"&creative="+_73;
document.body.appendChild(img);
},getAmazonLogoDimensions:function(_77){
var _78=new Object();
switch(_77){
case "CA":
_78.height=27;
_78.width=89;
break;
case "DE":
_78.height=26;
_78.width=88;
break;
case "FR":
_78.height=28;
_78.width=89;
break;
case "GB":
_78.height=22;
_78.width=84;
break;
case "JP":
_78.height=23;
_78.width=87;
break;
default:
_78.height=22;
_78.width=86;
break;
}
return _78;
},getGetWidgetButtonDimensions:function(_79){
var _7a=new Object();
switch(_79){
case "DE":
_7a.height=18;
_7a.width=95;
break;
case "FR":
_7a.height=18;
_7a.width=79;
break;
case "JP":
_7a.height=18;
_7a.width=94;
break;
default:
_7a.height=18;
_7a.width=82;
break;
}
return _7a;
},getRevampGetWidgetButtonDimensions:function(_7b){
var _7c=new Object();
switch(_7b){
case "DE":
_7c.height=17;
_7c.width=89;
break;
case "FR":
_7c.height=17;
_7c.width=78;
break;
case "JP":
_7c.height=17;
_7c.width=87;
break;
default:
_7c.height=17;
_7c.width=70;
break;
}
return _7c;
},drawFooter:function(_7d){
var _7e;
var _7f;
var _80=new Color(_7d.getBackgroundColor().substring(1));
if(_80.isDark()){
_7e="amazon-logo-w_tpng.png";
_7f="#FFFFFF";
}else{
_7e="amazon-logo-b_tpng.png";
_7f="#000000";
}
var _81=32;
var _82=_7d.getWidth();
var _83="left";
var _84="";
var _85=230;
if(_82<132){
_81=60;
}else{
if(_82<230){
_81=50;
}
}
switch(_7d.marketPlace){
case "CA":
_81=32;
_85=240;
if(_82<130){
_81=65;
}else{
if(_82<_85){
_81=54;
}
}
break;
case "DE":
_85=260;
_81=31;
if(_82<175){
_81=71;
}else{
if(_82<_85){
_81=53;
}
}
break;
case "FR":
_85=250;
_81=33;
if(_82<150){
_81=65;
}else{
if(_82<_85){
_81=55;
}
}
break;
case "GB":
break;
case "JP":
_85=270;
if(_82<190){
_81=68;
}else{
if(_82<_85){
_81=50;
}
}
break;
default:
break;
}
if(_82<_85){
_83="right";
_84="clear: left; ";
}
var _86;
if(_7d.showAmazonLogoAsText){
_86=_amzn_utils.getString(_amzn_utils.AmazonCom,_7d.marketPlace);
}else{
_86="<img height=\""+this.getAmazonLogoDimensions(_7d.marketPlace).height+"\" width=\""+this.getAmazonLogoDimensions(_7d.marketPlace).width+"\" border=\"0\" alt=\""+_amzn_utils.getString(_amzn_utils.AmazonCom,_7d.marketPlace)+"\" src=\""+_amzn_utils.imageDirectory(_7d.marketPlace)+"/"+_7e+"\"/>";
}
var res="<div class='wdgt_ft' style='height: "+_81+"px; padding:0px; "+_7d.style_wdgt_ft()+"; display:none;'><div class='ft_cnt'>";
var _88="<img "+_amzn_utils.getGetWidgetOnclickStr(_7d)+" style=\"float: left; cursor: pointer; "+_84+" \" width=\""+this.getGetWidgetButtonDimensions(_7d.marketPlace).width+"\" height=\""+this.getGetWidgetButtonDimensions(_7d.marketPlace).height+"\" border=\"0\" alt=\"Get Widget\""+"border=\"0\" src=\""+_amzn_utils.imageDirectory(_7d.marketPlace)+"/btn-get-widget_tpng.png\"/>";
_88+="<a target=\"_blank\" style=\"padding: 2px 0 0 3px; text-decoration: none; float: "+_83+"; font-size: 11px; color: #"+_80.getBlendingColor().getHex()+" !important;\" "+"href=\""+_7d.getURL(_amzn_utils.getString(_amzn_utils.PrivacyPolicyLink,_7d.marketPlace))+"\">"+_amzn_utils.getString(_amzn_utils.PrivacyPolicy,_7d.marketPlace)+"</a>";
if(_82<_85){
res=res+"<a target=\"_blank\" style=\"text-decoration: none; float: left; font-size:12px; color: "+_7f+" !important; \" href=\""+_7d.getURL(_amzn_utils.getString(_amzn_utils.AmazonComLink,_7d.marketPlace))+"\">"+_86+"</a><br/>"+_88;
}else{
res=res+_88+"<a target=\"_blank\" style=\"text-decoration: none; float: right; right: 5px; font-size:12px; color: "+_7f+" !important; \" href=\""+_7d.getURL(_amzn_utils.getString(_amzn_utils.AmazonComLink,_7d.marketPlace))+"\">"+_86+"</a>";
}
res+="</div></div>";
return res;
},drawRevampFooter:function(_89,_8a){
var _8b;
var _8c;
var _8d;
if(_8a){
_8c="#FFFFFF";
_8d="amazon-logo-w_tpng.png";
}else{
_8c="#000000";
_8d="amazon-logo-b_tpng.png";
}
if(_89.showAmazonLogoAsText){
_8b=_amzn_utils.getString(_amzn_utils.AmazonCom,_89.marketPlace);
}else{
_8b="<img height=\""+this.getAmazonLogoDimensions(_89.marketPlace).height+"\" style='top: 5px;' width=\""+this.getAmazonLogoDimensions(_89.marketPlace).width+"\" border=\"0\" alt=\""+_amzn_utils.getString(_amzn_utils.AmazonCom,_89.marketPlace)+"\" src=\""+_amzn_utils.imageDirectory(_89.marketPlace)+"/"+_8d+"\"/>";
}
var res="<div style='padding:0px; width:100%;"+_89.style_wdgt_ft()+";'>"+"<div>"+"<a target='_blank' style='color: "+_8c+" !important; width:90px;text-align:left; float: left;' href='"+_89.getURL(_amzn_utils.getString(_amzn_utils.AmazonComLink,_89.marketPlace))+"'>"+_8b+"</a> ";
res+="<a target='_blank' onmouseover='' style='float:right; text-align:right;"+_89.style_wdgt_ft()+";' href='"+_89.getURL(_amzn_utils.getString(_amzn_utils.PrivacyPolicyLink,_89.marketPlace))+"'>"+_amzn_utils.getString(_amzn_utils.PrivacyPolicy,_89.marketPlace)+"</a>";
res+="</div></div>";
return res;
},drawRevampGetWidgetAndEdit:function(_8f,_90){
var res="";
var _92=_amzn_utils.getRevampGetWidgetButtonDimensions(_8f.marketPlace);
res+="<table width=\"100%\">"+"<tr style='vertical-align:middle;'>"+"<td align=\"left\">"+"<img "+_amzn_utils.getGetWidgetOnclickStr(_8f)+" style=\"cursor: pointer;\" width=\""+_92.width+"\" height=\""+_92.height+"\" border=\"0\" align=\"absmiddle\" alt=\""+_amzn_utils.getString(_amzn_utils.GetEditWidgetShort,_8f.marketPlace)+"\""+"src=\""+_amzn_utils.imageDirectory(_8f.marketPlace)+"/"+_90+"\"/>"+"</td>";
res+="</tr></table>";
return res;
},widgetServerURL:function(_93){
return this.getString(this.WSUrl,_93);
},amznMediaserverURL:function(_94){
return this.getString(this.WMSUrl,_94);
},imageDirectory:function(_95){
return this.amznMediaserverURL(_95)+"/img";
},getEditWidgetMessageHTML:function(_96){
var url="#";
var _98="";
if(typeof amzn_widget_central_preview=="undefined"){
if(_96.origParams.tag!=_amzn_utils.getString(_amzn_utils.DefaultTag,_96.marketPlace)&&typeof _96.origParams.ID!="undefined"&&_96.origParams.ID!=null){
url=_amzn_utils.getString(_amzn_utils.WebsiteUrl,_96.marketPlace)+"/"+_96.getEditWidgetTarget+"?widget_id="+_96.origParams.ID+"&"+this.WebsiteRefParam+"="+this.getString(this.WebsiteRefTag,_96.marketPlace)+"&refURL="+_96.origParams.refURL;
_98=" target=\"_blank\" ";
}else{
return "";
}
}
_98+=" href=\""+url+"\" onclick=\"_amzn_popup.hideNow();\" "+"style=\"text-decoration: none; color: #0000FF; border: none; font: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12px; text-align: left;\" ";
var res="<div style='clear: left; font: tahoma, geneva, verdana, arial, sans-serif; font-weight: bold; font-size: 12px; text-align: left; color: #000000;margin:10px 0;padding: 0px;'>";
switch(_96.marketPlace){
case "DE":
res+="Ist das Ihr Widget?<br/>Zum Bearbeiten <a "+_98+">hier klicken</a><br/>";
break;
case "FR":
res+="Est-ce votre Widget?<br/><a "+_98+">Cliquez ici</a> pour modifier<br/>";
break;
case "JP":
res+="\u4f5c\u6210\u6e08\u307f\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u7de8\u96c6\u3057\u307e\u3059\u304b\uff1f\u7de8\u96c6\u3059\u308b\u306b\u306f<a "+_98+">\u3053\u3053</a>\u3092<br/>\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044<br/>";
break;
default:
res+="Is this your widget?<br/><a "+_98+">Click here</a> to edit it.";
}
res+="</div>";
return res;
},ErrorMessage:"ErrorMessage",Price:"Price",Loading:"Loading",Searching:"Searching",PrivacyPolicy:"PrivacyPolicy",NoResultsFor:"NoResultsFor",CustomerReviews:"CustomerReviews",Search:"Search_On_",Showing:"Showing",CampaignID:"CampaignID",AssocImpVIP:"AssocImpVIP",AmazonCom:"AmazonCom",AmazonComLink:"AmazonComLink",PrivacyPolicyLink:"PrivacyPolicyLink",WSUrl:"WidgetServerURL",WMSUrl:"MediaServerURL",WebsiteUrl:"WebsiteUrlURL",GetEditWidgetShort:"GetEditWidgetShort",GetEditWidgetLong:"GetEditWidgetLong",selectStore:"SelectStore",closeString:"CloseWindow",SortBy:"SortBy",NoItemsWishlist:"NoItemsWishlist",DefaultTag:"DefaultTag",WebsiteRefTag:"WebsiteRefTag",WebsiteRefParam:"ref",getStringForCA:function(key){
switch(key){
case this.ErrorMessage:
return "Could not connect to server. Please try later.";
case this.Price:
return "Price";
case this.Loading:
return "Loading";
case this.Searching:
return "Searching";
case this.PrivacyPolicy:
return "Privacy";
case this.NoResultsFor:
return "No albums found for ";
case this.CustomerReviews:
return " Customer Reviews";
case this.Search:
return "Search";
case this.CampaignID:
return "212529";
case this.AssocImpVIP:
return "www.assoc-amazon.ca";
case this.AmazonCom:
return "Amazon.ca";
case this.AmazonComLink:
return "http://www.amazon.ca/?";
case this.PrivacyPolicyLink:
return "http://rcm-ca.amazon.ca/e/cm/privacy-policy.html?o=15";
case this.GetEditWidgetLong:
return "Get/Edit this widget";
case this.GetEditWidgetShort:
return "Get/Edit widget";
case this.selectStore:
return "Select an Amazon store";
case this.closeString:
return "Close window";
case this.SortBy:
return "Sort by";
case this.NoItemsWishlist:
return "No items in the Wish List";
case this.DefaultTag:
return "amawid-20";
case this.WebsiteRefTag:
return "assoc_wdgt_ca";
case this.WSUrl:
return "http://ws.amazon.ca/widgets";
case this.WMSUrl:
return "http://wms.assoc-amazon.ca/CA";
case this.WebsiteUrl:
return "http://widgets.amazon.ca/";
default:
return "Unknown string";
}
},getStringForDE:function(key){
switch(key){
case this.ErrorMessage:
return "Es konnte keine Verbindung zum Server hergestellt werden. Bitte versuchen Sie es erneut.";
case this.Price:
return "Preis";
case this.Loading:
return "Laden";
case this.Searching:
return "Suchen";
case this.PrivacyPolicy:
return "Information";
case this.NoResultsFor:
return "Keine Suchergebnisse f\xfcr ";
case this.CustomerReviews:
return " Kundenrezensionen";
case this.Search:
return "Suche in";
case this.CampaignID:
return "2474";
case this.AssocImpVIP:
return "www.assoc-amazon.de";
case this.AmazonCom:
return "Amazon.de";
case this.AmazonComLink:
return "http://www.amazon.de/?";
case this.PrivacyPolicyLink:
return "http://rcm-de.amazon.de/e/cm/privacy-policy.html?o=3";
case this.GetEditWidgetLong:
return "Erhalten/\xc4ndern";
case this.GetEditWidgetShort:
return "Erhalten/\xc4ndern";
case this.selectStore:
return "Amazon Zielseite ausw\xe4hlen";
case this.closeString:
return "schlie\xdfen";
case this.SortBy:
return "Sortieren nach";
case this.NoItemsWishlist:
return "Kein Element in der Wunschliste";
case this.DefaultTag:
return "amawid0f-21";
case this.WebsiteRefTag:
return "assoc_wdgt_de";
case this.WSUrl:
return "http://ws.amazon.de/widgets";
case this.WMSUrl:
return "http://wms.assoc-amazon.de/DE";
case this.WebsiteUrl:
return "http://widgets.amazon.de/";
default:
return "Unknown string";
}
},getStringForFR:function(key){
switch(key){
case this.ErrorMessage:
return "Connexion au serveur impossible. Veuillez r\xe9essayer plus tard.";
case this.Price:
return "Prix";
case this.Loading:
return "Charger";
case this.Searching:
return "Rechercher";
case this.PrivacyPolicy:
return "Plus d'info";
case this.NoResultsFor:
return "Aucun r\xe9sultat ne correspond \xe0 votre recherche de ";
case this.CustomerReviews:
return " commentaires client";
case this.Search:
return "Rechercher";
case this.CampaignID:
return "2498";
case this.AssocImpVIP:
return "www.assoc-amazon.fr";
case this.AmazonCom:
return "Amazon.fr";
case this.AmazonComLink:
return "http://www.amazon.fr/?";
case this.PrivacyPolicyLink:
return "http://rcm-fr.amazon.fr/e/cm/privacy-policy.html?o=8";
case this.GetEditWidgetLong:
return "Copier/Editer";
case this.GetEditWidgetShort:
return "Copier/Editer";
case this.selectStore:
return "S\xe9lectionner un site Amazon";
case this.closeString:
return "Fermer";
case this.SortBy:
return "Trier par";
case this.NoItemsWishlist:
return "Nombre de produits dans la liste Envies Cadeaux";
case this.DefaultTag:
return "amawid0b-21";
case this.WebsiteRefTag:
return "assoc_wdgt_fr";
case this.WSUrl:
return "http://ws.amazon.fr/widgets";
case this.WMSUrl:
return "http://wms.assoc-amazon.fr/FR";
case this.WebsiteUrl:
return "http://widgets.amazon.fr/";
default:
return "Unknown string";
}
},getStringForGB:function(key){
switch(key){
case this.ErrorMessage:
return "Could not connect to server. Please try later.";
case this.Price:
return "Price";
case this.Loading:
return "Loading";
case this.Searching:
return "Searching";
case this.PrivacyPolicy:
return "Privacy";
case this.NoResultsFor:
return "No results for ";
case this.CustomerReviews:
return "Customer Reviews";
case this.Search:
return "Search";
case this.CampaignID:
return "2486";
case this.AssocImpVIP:
return "www.assoc-amazon.co.uk";
case this.AmazonCom:
return "Amazon.co.uk";
case this.AmazonComLink:
return "http://www.amazon.co.uk/?";
case this.PrivacyPolicyLink:
return "http://rcm-uk.amazon.co.uk/e/cm/privacy-policy.html?o=2";
case this.GetEditWidgetLong:
return "Get/Edit this widget";
case this.GetEditWidgetShort:
return "Get/Edit widget";
case this.selectStore:
return "Select an Amazon store";
case this.closeString:
return "Close window";
case this.SortBy:
return "Sort by";
case this.NoItemsWishlist:
return "No items in the Wish List";
case this.DefaultTag:
return "amawid-21";
case this.WebsiteRefTag:
return "assoc_wdgt_gb";
case this.WSUrl:
return "http://ws.amazon.co.uk/widgets";
case this.WMSUrl:
return "http://wms.assoc-amazon.co.uk/GB";
case this.WebsiteUrl:
return "http://widgets.amazon.co.uk/";
default:
return "Unknown string";
}
},getStringForJP:function(key){
switch(key){
case this.ErrorMessage:
return "\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3002\u3000\u6642\u9593\u3092\u7f6e\u3044\u3066\u518d\u5ea6\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\u3002";
case this.Price:
return "\u4fa1\u683c";
case this.Loading:
return "\u8aad\u307f\u8fbc\u307f\u4e2d";
case this.Searching:
return "\u691c\u7d22\u4e2d";
case this.PrivacyPolicy:
return "\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u898f\u7d04";
case this.NoResultsFor:
return " \u306b\u8a72\u5f53\u3059\u308b\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002";
case this.CustomerReviews:
return " \u30ab\u30b9\u30bf\u30de\u30fc\u30fb\u30ec\u30d3\u30e5\u30fc";
case this.Search:
return "\u30b5\u30fc\u30c1";
case this.CampaignID:
return "759";
case this.AssocImpVIP:
return "www.assoc-amazon.jp";
case this.AmazonCom:
return "Amazon.co.jp";
case this.AmazonComLink:
return "http://www.amazon.jp/?";
case this.PrivacyPolicyLink:
return "http://rcm-jp.amazon.co.jp/e/cm/privacy-policy.html?o=9";
case this.GetEditWidgetLong:
return "\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u53d6\u5f97/\u7de8\u96c6";
case this.GetEditWidgetShort:
return "\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u53d6\u5f97/\u7de8\u96c6";
case this.selectStore:
return "\u3069\u306e\u30b9\u30c8\u30a2\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092<br/>\u4f5c\u308a\u307e\u3059\u304b\uff1f";
case this.closeString:
return "\u9589\u3058\u308b";
case this.SortBy:
return "\u4e26\u3073\u66ff\u3048";
case this.NoItemsWishlist:
return "\u30a6\u30a3\u30c3\u30b7\u30e5\u30ea\u30b9\u30c8\u306b\u5546\u54c1\u304c\u3042\u308a\u307e\u305b\u3093";
case this.DefaultTag:
return "widgetsamazon-22";
case this.WebsiteRefTag:
return "assoc_wdgt_jp";
case this.WSUrl:
return "http://ws.amazon.co.jp/widgets";
case this.WMSUrl:
return "http://wms.assoc-amazon.jp/JP";
case this.WebsiteUrl:
return "http://widgets.amazon.co.jp/";
default:
return "Unknown string";
}
},getStringForUS:function(key){
switch(key){
case this.ErrorMessage:
return "Could not connect to server. Please try later.";
case this.Price:
return "Price";
case this.Loading:
return "Loading";
case this.Searching:
return "Searching";
case this.PrivacyPolicy:
return "Privacy";
case this.NoResultsFor:
return "No albums found for ";
case this.CustomerReviews:
return " Customer Reviews";
case this.Search:
return "Search";
case this.CampaignID:
return "212361";
case this.AssocImpVIP:
return "www.assoc-amazon.com";
case this.AmazonCom:
return "Amazon.com";
case this.AmazonComLink:
return "http://www.amazon.com/?";
case this.PrivacyPolicyLink:
return "http://rcm.amazon.com/e/cm/privacy-policy.html?o=1";
case this.GetEditWidgetLong:
return "Get/Edit this widget";
case this.GetEditWidgetShort:
return "Get/Edit widget";
case this.selectStore:
return "Select an Amazon store";
case this.closeString:
return "Close window";
case this.SortBy:
return "Sort by";
case this.NoItemsWishlist:
return "No items in the Wish List";
case this.DefaultTag:
return "widgetsamazon-20";
case this.WebsiteRefTag:
return "assoc_wdgt_us";
case this.WSUrl:
return "http://ws.amazon.com/widgets";
case this.WMSUrl:
return "http://wms.assoc-amazon.com/US";
case this.WebsiteUrl:
return "http://widgets.amazon.com/";
default:
return "Unknown string";
}
},getString:function(key,_a1){
switch(_a1){
case "CA":
return this.getStringForCA(key);
case "DE":
return this.getStringForDE(key);
case "FR":
return this.getStringForFR(key);
case "JP":
return this.getStringForJP(key);
case "GB":
return this.getStringForGB(key);
default:
return this.getStringForUS(key);
}
},trimMultiLineComments:function(_a2,_a3,_a4,_a5,_a6){
if(typeof _a2=="string"){
_a2=[_a2];
}
if(_a2.length<1){
return _a2;
}
if(!_a5){
_a5=1;
}
var _a7=_a2[0];
for(var i=1;i<_a2.length;i++){
_a7+="<br/>"+_a2[i];
}
_a7=_a7.replace(/&nbsp;/gi,"&nbsp;<wbr/>");
var _a9;
if(_a5==-1){
_a9=_amzn_utils.splitTextBlock(_a7,_a3,_a4,false,_a6);
}else{
_a9=_amzn_utils.trimTextBlock(_a7,_a3,_a4,_a5,false,_a6);
}
return _a9;
},trimCharsByWidth:function(_aa,_ab,_ac,_ad,_ae){
if(typeof _aa=="string"){
_aa=[_aa];
}
if(_aa.length<1){
return _aa;
}
if(!_ad){
_ad=1;
}
var _af=_aa[0];
for(var i=1;i<_aa.length;i++){
if(i%2==0){
_af+=" "+_aa[i];
}else{
_af+="<b> "+_aa[i]+" </b>";
}
}
_af=_af.replace(/&nbsp;/gi,"&nbsp;<wbr/>");
var _b1=_aa.length>1;
var _b2;
if(_ad==-1){
_b2=_amzn_utils.splitTextBlock(_af,_ab,_ac,_b1,_ae);
}else{
_b2=_amzn_utils.trimTextBlock(_af,_ab,_ac,_ad,_b1,_ae);
}
return _b2;
},getValidTextBoundary:function(txt,_b4){
if(_b4>=txt.length){
return txt.length;
}
var _b5=txt.substring(0,_b4);
var _b6=_b4;
var _b7=_b5.lastIndexOf("<");
if(_b7!=-1){
var _b8=_b5.lastIndexOf("<br/>");
var _b9=_b5.lastIndexOf("<wbr/>");
var _ba=_b5.lastIndexOf("<b>");
var _bb=_b5.lastIndexOf("</b>");
if(_b7>_b8&&_b7>_b9&&_b7>_ba&&_b7>_bb){
_b6=_b7;
_b5=txt.substring(0,_b6);
}
}
var _bc=_b5.lastIndexOf("&");
if(_bc!=-1){
var _bd=_b5.lastIndexOf(";");
if(_bc>_bd){
_b6=_bc;
}
}
return _b6;
},getClosingTags:function(txt,_bf){
if(!_bf){
return "";
}
var _c0=txt.lastIndexOf("<b>");
var _c1=txt.lastIndexOf("</b>");
var _c2="";
if(_c1<_c0){
_c2="</b>";
}
return _c2;
},limitedIndexOf:function(txt,_c4){
var _c5=15;
var _c6=0;
var _c7=false;
while(_c6<txt.length&&_c6<_c5){
if(txt.charAt(_c6)==_c4){
_c7=true;
break;
}
_c6++;
}
if(!_c7){
_c6=-1;
}
return _c6;
},htmlCharAt:function(txt,_c9){
var _ca="";
var _cb=txt.charAt(_c9);
switch(_cb){
case "<":
_ca=">";
break;
case "&":
_ca=";";
break;
}
if(_ca!=""){
var _cc=txt.substring(_c9);
var _cd=_amzn_utils.limitedIndexOf(_cc,_ca);
if(_cd!=-1){
_cb=_cc.substring(0,_cd+1);
}
}
return _cb;
},calculateBlockHeight:function(_ce,_cf,_d0,_d1,_d2){
var _d3=_amzn_utils.getDivId("amzn_wdgts_calculateBlockHeight",_d2);
var _d4=_amzn_utils.getProcessingDiv(_d3,_cf);
_d4.innerHTML="";
var _d5=_d4.offsetHeight;
var _d6=_ce;
if(_d1){
_d6=_amzn_utils.replaceAll(_d6,"<b>","");
_d6=_amzn_utils.replaceAll(_d6,"</b>","");
}
_d6=_amzn_utils.replaceAll(_d6,"<br/>","");
_d6=_amzn_utils.replaceAll(_d6,"<wbr/>","");
var _d7=0;
var _d8=20;
while(_d6.length>0){
var _d9=_d8<_d6.length?_d8:_d6.length;
_d9=_amzn_utils.getValidTextBoundary(_d6,_d9);
var _da=_d6.substring(0,_d9);
if(_d1){
_d4.innerHTML="<b>"+_da+"</b>";
}else{
_d4.innerHTML=_da;
}
if(_d4.offsetHeight>_d7){
_d7=_d4.offsetHeight;
}
_d6=_d6.substring(_d9);
}
var _db=0;
if(_d7>_d5){
_d7=_d7-_d5;
_db=_d7*_d0-_d5;
}else{
_db=_d7*_d0;
}
return _db;
},trimTextBlock:function(_dc,_dd,_de,_df,_e0,_e1){
if(!_dc||_dc==""){
return _dc;
}
var _e2=_amzn_utils.getDivId("amzn_wdgts_trimTextBlock",_e1);
var _e3=_amzn_utils.getProcessingDiv(_e2,_dd);
_e3.style.width=_de+"px";
_e3.innerHTML="X";
var _e4=_e3.scrollWidth;
var _e5=_amzn_utils.calculateBlockHeight(_dc,_dd,_df,false,_e1);
if(_e0){
var _e6=_amzn_utils.calculateBlockHeight(_dc,_dd,_df,true,_e1);
if(_e6>_e5){
_e5=_e6;
}
}
if(_e5<=0){
return "";
}
var _e7=_dc;
_e3.innerHTML=_e7;
var _e8=_e7.length;
while(_e3.offsetHeight>_e5){
var _e9=_e3.offsetHeight/_e5;
var _ea=Math.round((_e7.length)/_e9);
_ea=_amzn_utils.getValidTextBoundary(_e7,_ea);
if(_ea==_e8){
break;
}
_e8=_ea;
_e7=_e7.substring(0,_ea);
_e3.innerHTML=_e7+_amzn_utils.getClosingTags(_e7,_e0);
}
for(var i=_e7.length;i<_dc.length;i++){
var _ec=_amzn_utils.htmlCharAt(_dc,i);
i+=_ec.length-1;
_e3.innerHTML=_e7+_ec+_amzn_utils.getClosingTags(_e7+_ec,_e0)+"&hellip;";
if(_e3.scrollWidth>_e4){
_ec=" "+_ec;
_e3.innerHTML=_e7+_ec+_amzn_utils.getClosingTags(_e7+_ec,_e0)+"&hellip;";
}
if(_e3.offsetHeight>_e5){
_e7=_e7+_amzn_utils.getClosingTags(_e7,_e0)+"&hellip;";
break;
}
_e7+=_ec;
}
_e7=_e7+_amzn_utils.getClosingTags(_e7,_e0);
_e7=_amzn_utils.splitTextBlock(_e7,_dd,_de,_e0,_e1);
_e3.innerHTML=_e7;
if(_e3.offsetHeight>_e5){
_e3.innerHTML=_e7+"&hellip;";
var _ea=_e7.length;
while(_ea>0&&(_e3.offsetHeight>_e5||_e3.scrollWidth>_e4)){
_ea--;
_ea=_amzn_utils.getValidTextBoundary(_e7,_ea);
_e7=_e7.substring(0,_ea);
_e3.innerHTML=_e7+_amzn_utils.getClosingTags(_e7,_e0)+"&hellip;";
}
_e7=_e7+_amzn_utils.getClosingTags(_e7,_e0)+"&hellip;";
}
return _e7;
},setDivText:function(_ed,_ee,_ef){
var _f0=_amzn_utils.getClosingTags(_ee,_ef);
_ed.innerHTML=_ee+_f0;
return _f0!="";
},splitTextBlock:function(_f1,_f2,_f3,_f4,_f5){
if(!_f1||_f1==""){
return _f1;
}
var _f6=_amzn_utils.getDivId("amzn_wdgts_splitTextBlock",_f5);
var _f7=_amzn_utils.getProcessingDiv(_f6,_f2);
_f7.style.width=_f3+"px";
_f7.innerHTML="";
var _f8=_f7.offsetHeight;
_f7.innerHTML="X";
var _f9=_f7.offsetHeight;
var _fa=_f7.scrollWidth;
_f7.innerHTML=_f1;
if(_f7.scrollWidth<=_fa){
return _f1;
}
var _fb=Math.floor(_f3/20);
_f7.innerHTML="";
var _fc="";
var _fd=false;
var _fe=_amzn_utils.getLineEndIndex(_f1,0,_fb,_f2,_f3,_f4,_fd,_f5);
_fc=_f1.substring(0,_fe);
_fd=_amzn_utils.setDivText(_f7,_fc,_f4);
var _ff=_amzn_utils.getLineEndIndex(_f1,_fe,_fb,_f2,_f3,_f4,_fd,_f5);
while(_ff>0&&_ff>_fe){
var temp=_f1.substring(_fe,_ff);
_fd=_amzn_utils.setDivText(_f7,_fc+temp,_f4);
if(_f7.scrollWidth>_fa){
temp=" "+temp;
_amzn_utils.setDivText(_f7,_fc+temp,_f4);
}
_fb=_ff-_fe;
_fe=_ff;
_fc=_fc+temp;
_ff=_amzn_utils.getLineEndIndex(_f1,_fe,_fb,_f2,_f3,_f4,_fd,_f5);
}
return _fc+_amzn_utils.getClosingTags(_fc,_f4);
},getLineEndIndex:function(txt,_102,_103,_104,_105,_106,_107,self){
var _109=_amzn_utils.getDivId("amzn_wdgts_getLineText",self);
var _10a=_amzn_utils.getProcessingDiv(_109,_104);
var _10b=_102+_103+1;
var bold="";
if(_107){
bold="<b>";
}
if(txt.length<_10b){
_amzn_utils.setDivText(_10a,bold+txt.substring(_102),_106);
_10b=txt.length;
}else{
_amzn_utils.setDivText(_10a,bold+txt.substring(_102,_10b),_106);
}
var _10d=_10a.offsetHeight;
for(;_10b<txt.length&&_10a.offsetWidth<_105&&_10a.offsetHeight<=_10d;_10b++){
var temp=_amzn_utils.htmlCharAt(txt,_10b);
_10b+=temp.length-1;
_amzn_utils.setDivText(_10a,bold+_10a.innerHTML+temp,_106);
}
_10b=(_10b<txt.length)?_10b:txt.length;
_10b=_amzn_utils.getValidTextBoundary(txt.substring(_102),_10b-_102)+_102;
while(_10a.offsetWidth>_105&&_10b>0){
_10b--;
_10b=_amzn_utils.getValidTextBoundary(txt.substring(_102),_10b-_102)+_102;
_amzn_utils.setDivText(_10a,bold+txt.substring(_102,_10b),_106);
}
return _10b;
},getProcessingDiv:function(id,_110){
var pDiv=document.getElementById(id);
var _112=true;
if(!pDiv){
_112=false;
pDiv=document.createElement("div");
pDiv.id=id;
}
pDiv.style.padding="0px";
pDiv.style.visibility="hidden";
pDiv.style.clear="both";
pDiv.style.position="absolute";
pDiv.style.left="0px";
pDiv.style.top="0px";
pDiv.style.overflow="auto";
pDiv.style.font="100% tahoma, geneva, verdana, arial, sans-serif;";
pDiv.style.lineHeight="normal";
pDiv.style.fontSize=parseInt(_110)+"px";
pDiv.style.height=null;
pDiv.style.width=null;
if(/bold/.test(_110)){
pDiv.style.fontWeight="bold";
}
if(!_112){
document.body.appendChild(pDiv);
}
return pDiv;
},getDivId:function(_113,self){
return _113+self.marketPlace+self.templateId+self.instanceId;
},addHiddenInputField:function(_115,_116,_117){
var _118=document.createElement("input");
_118.setAttributeNode(this.createHtmlAttribute("type","hidden"));
_118.setAttributeNode(this.createHtmlAttribute("name",_116));
_118.setAttributeNode(this.createHtmlAttribute("value",_117));
_115.appendChild(_118);
},createHtmlAttribute:function(name,_11a){
var _11b=document.createAttribute(name);
_11b.nodeValue=_11a;
return _11b;
},addHtmlForm:function(_11c){
var _11d=document.createElement("form");
_11d.method="POST";
_11d.action=_11c;
var body=document.getElementsByTagName("body")[0];
body.appendChild(_11d);
return _11d;
},createLocaleDropDown:function(self){
if(!window.nextCallBack){
window.nextCallBack=new Object();
}
if(!window.nextCallBack[self.marketPlace]){
window.nextCallBack[self.marketPlace]=new Object();
}
if(!window.nextCallBack[self.marketPlace][self.templateId]){
window.nextCallBack[self.marketPlace][self.templateId]=new Object();
}
if(!window.nextCallBack[self.marketPlace][self.templateId][self.instanceId]){
window.nextCallBack[self.marketPlace][self.templateId][self.instanceId]=new Object();
}
window.nextCallBack[self.marketPlace][self.templateId][self.instanceId].selectLocaleFromDropdown=_amzn_utils.selectLocaleFromDropdown;
var _120=escape("<div style='background-color:#FFFFFF;border: #666666 1px solid;width:200px;overflow:none;'>"+_amzn_utils.createAllLocaleDivs(self)+"</div>");
var _121=self.innerWidth<180?"style='text-align:center;":"style='text-align:left; left: 4px;";
var _122=self.innerWidth>180?_amzn_utils.getString(_amzn_utils.GetEditWidgetLong,self.marketPlace):_amzn_utils.getString(_amzn_utils.GetEditWidgetShort,self.marketPlace);
return "<div onclick='_a=this; _amzn_popup.showpreview(\""+_120+"\", _a, event,50);' "+_121+self.style_get_edit_wdgt()+";float: left;font-size: 11px;font-weight: bold;cursor:pointer;white-space:nowrap;position:relative;bottom: 0px;'>"+_122+"</div>";
},getGetWidgetOnclickStr:function(self){
this.setGetEditCallbacks(self);
var _124=escape("<div style='background-color:#FFFFFF;border: #666666 1px solid;width:200px;overflow:none;'>"+_amzn_utils.createAllLocaleDivs(self)+"</div>");
return "onclick='_a=this; _amzn_popup.showpreview(\""+_124+"\", _a, event,50);'";
},getEditWidgetOnclickStr:function(self){
this.setGetEditCallbacks(self);
return "onclick='window.nextCallBack[\""+self.marketPlace+"\"]["+self.templateId+"]["+self.instanceId+"].editThisWidgetClicked(\""+self.marketPlace+"\","+self.templateId+","+self.instanceId+",\""+self.marketPlace+"\");' ";
},setGetEditCallbacks:function(self){
if(!window.nextCallBack){
window.nextCallBack=new Object();
}
if(!window.nextCallBack[self.marketPlace]){
window.nextCallBack[self.marketPlace]=new Object();
}
if(!window.nextCallBack[self.marketPlace][self.templateId]){
window.nextCallBack[self.marketPlace][self.templateId]=new Object();
}
if(!window.nextCallBack[self.marketPlace][self.templateId][self.instanceId]){
window.nextCallBack[self.marketPlace][self.templateId][self.instanceId]=new Object();
}
window.nextCallBack[self.marketPlace][self.templateId][self.instanceId].selectLocaleFromDropdown=_amzn_utils.selectLocaleFromDropdown;
window.nextCallBack[self.marketPlace][self.templateId][self.instanceId].editThisWidgetClicked=_amzn_utils.editThisWidgetClicked;
},createLocaleDiv:function(_127,self){
var _129=_amzn_utils.getString(_amzn_utils.AmazonCom,_127);
var url=_amzn_utils.getString(_amzn_utils.WebsiteUrl,_127);
url=url+"/"+self.getEditWidgetTarget+"?"+this.WebsiteRefParam+"="+this.getString(this.WebsiteRefTag,self.marketPlace)+"&refURL="+self.origParams.refURL;
if(typeof amzn_widget_central_preview=="undefined"&&self.origParams.ID){
url+="&id="+self.origParams.ID;
}
return "<div style='width:200px;height:34px;'><a target=\"_blank\" href=\""+url+"\"><div style='clear:left; padding: 2px 2px 2px 4px; cursor:pointer;text-decoration: none; font: 100% tahoma, geneva, verdana, arial, sans-serif;font-size: 19px;text-align: left;' "+"onmouseover='this.style.backgroundColor=\"#E3E3E3\";' onmouseout='this.style.backgroundColor=\"#FFFFFF\";'>"+"<img style='border:none;padding: 4px;' src='"+_amzn_utils.imageDirectory(self.marketPlace)+"/"+_127+"-flag.gif'/>"+"<span style='white-space:nowrap;position:relative; bottom: 12px;font: 100% Arial, Helvetica, sans-serif;font-size: 11px; text-align: left; color:#003399;text-decoration:underline;'>"+_129+"</span>"+"</div></a></div>";
},createAllLocaleDivs:function(self){
var _12c=_amzn_utils.getString(_amzn_utils.selectStore,self.marketPlace);
var _12d=_amzn_utils.getString(_amzn_utils.closeString,self.marketPlace);
var _12e=self.marketPlace=="JP"?25:14;
var res="<div style='font: 100% Arial, Helvetica, sans-serif; height: "+_12e+"px;font-weight: bold; font-size: 11px; text-align: left; color: #CC6600;padding:0px;'>"+_12c+"</div>";
res+=_amzn_utils.createLocaleDiv("US",self);
res+=_amzn_utils.createLocaleDiv("DE",self);
res+=_amzn_utils.createLocaleDiv("JP",self);
res+=_amzn_utils.createLocaleDiv("FR",self);
res+=_amzn_utils.createLocaleDiv("GB",self);
res+=_amzn_utils.createLocaleDiv("CA",self);
res+=this.getEditWidgetMessageHTML(self);
res+="<div style='white-space:nowrap;cursor:pointer;font: 100% Arial, Helvetica, sans-serif;font-size: 11px; text-align: left; color: #0000FF;text-decoration:underline;margin:10px 0;padding: 0px 4px 0px 4px; height: 12px;' onclick='_amzn_popup.hideNow()'>"+_12d+"</div>";
return res;
},selectLocaleFromDropdown:function(_130,_131,_132,_133){
var self=all_amzn_wdgts[_133][_131][_132];
var _135=_amzn_utils.addHtmlForm(_amzn_utils.getString(_amzn_utils.WebsiteUrl,_130)+"/"+self.getEditWidgetTarget);
if(_131!="8006"){
_amzn_utils.addHiddenInputField(_135,"amzn_wdgt",_amzn_utils.encodetoJSON(self.origParams));
}
_135.submit();
},editThisWidgetClicked:function(_136,_137,_138,_139){
var self=all_amzn_wdgts[_139][_137][_138];
var _13b=_amzn_utils.addHtmlForm(_amzn_utils.getString(_amzn_utils.WebsiteUrl,_136)+"/"+self.getEditWidgetTarget);
_amzn_utils.addHiddenInputField(_13b,"amzn_wdgt",_amzn_utils.encodetoJSON(self.origParams));
_13b.submit();
},getValidParam:function(_13c,_13d){
if(typeof _13c=="undefined"||_13c==null){
return _13d;
}
return _13c;
},encodetoJSON:function(obj){
var pad=function(n){
return n<10?"0"+n:n;
};
var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"};
var _142=function(s){
if(/["\\\x00-\x1f]/.test(s)){
return "\""+s.replace(/([\x00-\x1f\\"])/g,function(a,b){
var c=m[b];
if(c){
return c;
}
c=b.charCodeAt();
return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);
})+"\"";
}
return "\""+s+"\"";
};
var _147=function(o){
var a=["["],b,i,l=o.length,v;
for(i=0;i<l;i+=1){
v=o[i];
switch(typeof v){
case "undefined":
case "function":
case "unknown":
break;
default:
if(b){
a.push(",");
}
a.push(v===null?"null":_amzn_utils.encodetoJSON(v));
b=true;
}
}
a.push("]");
return a.join("");
};
var _14e=function(o){
return "\""+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+"\"";
};
if(typeof obj=="undefined"||obj===null){
return "null";
}else{
if(obj instanceof Array){
return _147(obj);
}else{
if(obj instanceof Date){
return _14e(obj);
}else{
if(typeof obj=="string"){
return _142(obj);
}else{
if(typeof obj=="number"){
return isFinite(obj)?String(obj):"null";
}else{
if(typeof obj=="boolean"){
return String(obj);
}else{
var a=["{"],b,v;
for(var i in obj){
if(_amzn_utils.objHasOwnProperty(obj,i)){
v=obj[i];
switch(typeof v){
case "undefined":
case "function":
case "unknown":
break;
default:
if(b){
a.push(",");
}
a.push(_amzn_utils.encodetoJSON(i),":",v===null?"null":_amzn_utils.encodetoJSON(v));
b=true;
}
}
}
a.push("}");
return a.join("");
}
}
}
}
}
}
}};
function initOnloadFunctions(){
if(typeof (window.addEventListener)!="undefined"){
window.addEventListener("load",main,false);
}else{
var _154=window.onload;
var _155=main;
window.onload=function(){
if(typeof _154=="function"){
_154();
}
_155();
};
}
}
if(typeof amzn_wdgts_vars=="undefined"){
amzn_wdgts_vars=new Array();
}
if(typeof amzn_wdgt=="undefined"){
amzn_wdgt={};
}
if(typeof amzn_wdgt.templateId=="undefined"){
amzn_wdgt.templateId=null;
}
if(typeof amzn_wdgt.marketPlace=="undefined"){
amzn_wdgt.marketPlace="US";
}
if(typeof amzn_wdgts_vars[amzn_wdgt.marketPlace]=="undefined"){
amzn_wdgts_vars[amzn_wdgt.marketPlace]=new Array();
}
if(typeof amzn_wdgts_vars[amzn_wdgt.marketPlace][amzn_wdgt.templateId]=="undefined"){
amzn_wdgts_vars[amzn_wdgt.marketPlace][amzn_wdgt.templateId]=new Array();
}
if(typeof amzn_wdgt.displayTemplate=="undefined"){
amzn_wdgt.displayTemplate="1";
}
var instanceId=amzn_wdgts_vars[amzn_wdgt.marketPlace][amzn_wdgt.templateId].length;
var divId="amazon_widget_"+amzn_wdgt.marketPlace+"_"+amzn_wdgt.templateId+"_"+instanceId;
if(typeof amzn_wdgt.width=="undefined"){
amzn_wdgt.width=0;
}
if(typeof amzn_wdgt.tag=="undefined"){
amzn_wdgt.tag=_amzn_utils.getString(_amzn_utils.DefaultTag,amzn_wdgt.marketPlace);
}
amzn_wdgt.refURL=escape(document.location).replace(/[+]/g,"%2B");
document.write("<div class='"+divId+"' id='"+divId+"'></div>");
amzn_wdgt.instanceId=instanceId;
amzn_wdgt.isTaken=false;
amzn_wdgts_vars[amzn_wdgt.marketPlace][amzn_wdgt.templateId].push(_amzn_utils.clone(amzn_wdgt));
if(typeof _amzn_popup=="undefined"){
document.writeln("<script src=\""+_amzn_utils.amznMediaserverURL(amzn_wdgt.marketPlace)+"/js/popup.js\" > </script>");
}
if(!(typeof Nifty=="function"&&typeof NiftyCheck=="function")){
document.writeln("<script src=\""+_amzn_utils.amznMediaserverURL(amzn_wdgt.marketPlace)+"/js/nifty.js\" > </script>");
}
if(!(typeof Color=="function"&&typeof RGB=="function")){
document.writeln("<script src=\""+_amzn_utils.amznMediaserverURL(amzn_wdgt.marketPlace)+"/js/colors.js\" > </script>");
}
function main(){
var wdgt={validateRowsAndColumns:function(){
if(this.cols*120>this.width){
this.cols=Math.floor(this.width/120);
}
},createOptionTag:function(_157,name,_159){
return _159?"<option value='"+_157+"' selected>"+name+"</option>":"<option value='"+_157+"'>"+name+"</option>";
},getReviewImage:function(_15a){
return _amzn_utils.getRatingImage(_15a,this.marketPlace);
},trimCharsByWidth:function(text,_15c,_15d,_15e){
return _amzn_utils.trimCharsByWidth(text,_15c,_15d,_15e,this);
},getURL:function(url){
if(url.indexOf("?")==-1){
url+="?";
}
return url+"&camp="+_amzn_utils.getString(_amzn_utils.CampaignID,this.marketPlace)+"&creative="+this.creativeId()+"&linkCode="+this.linkCode+"&tag="+this.tag;
},pageNumberDiv:function(_160,_161,_162){
return _amzn_utils.pageNumberDiv(_160,_161,this,_162);
},getEndPage:function(){
var _163=this.getNumPages();
var res=this.navBarBeginPage+this.resultWindowSize-1;
if(res>_163){
res=_163;
}
return res;
},getItem:function(_165){
var item=null;
var _167=Math.ceil((_165+1)/this.requestSize);
if(_165+1>this.totalNumOfResults){
return null;
}
var _168=this.resultData[_167];
if(_168==null){
item=false;
this.goOnClick(this.marketPlace,this.instanceId,false);
}else{
item=_168[_165%this.requestSize];
}
return item;
},getItemsForPage:function(){
var _169=new Array();
var _16a=(this.currentPage-1)*this.totalItemsPerPage;
var _16b=(this.currentPage)*this.totalItemsPerPage;
if(_16b>=this.totalNumOfResults){
_16b=this.totalNumOfResults;
}
for(var i=_16a;i<_16b;i++){
var item=this.getItem(i);
if(item!=null){
_169.push(item);
}else{
if(item==null){
return _169;
}else{
if(!item){
return null;
}
}
}
}
return _169;
},amazon_generate_widgets_url:function(_16e,_16f,_170){
if(_16e=="GetTopSellers"){
var url=_amzn_utils.widgetServerURL(this.marketPlace)+"/q?"+"Operation="+_16e+"&URL="+this.refURL+"&InstanceId="+this.instanceId+"&ResponseCount="+this.totalItemsPerPage+"&TemplateId="+this.templateId+"&ServiceVersion="+this.serviceVersion+"&MarketPlace="+this.marketPlace;
if(this.category&&this.category!="All"){
url+="&CategoryRestriction="+this.category;
}
return url;
}else{
var _172=(this.currentPage-1)*this.totalItemsPerPage;
var _173=(this.currentPage)*this.totalItemsPerPage-1;
if(this.totalNumOfResults!=null&&_173>=this.totalNumOfResults){
_173=this.totalNumOfResults;
}
function temp_getItem(_174,self){
var _176=null;
var data=self.resultData;
if(data&&data[Math.ceil((_174+1)/self.requestSize)]){
_176=data[Math.ceil((_174+1)/self.requestSize)][_174%self.requestSize];
}
return _176;
}
var _178=temp_getItem(_172,this);
var _179=temp_getItem(_173,this);
if(_178==null){
this.currentSearchPage=Math.floor(_172/this.requestSize)+1;
}else{
if(_179==null){
this.currentSearchPage=Math.floor(_173/this.requestSize)+1;
}
}
var _17a=(this.currentSearchPage-1)*this.requestSize;
var _17b=this.requestSize;
if(this.totalNumOfResults!=null&&_17a+_17b>this.totalNumOfResults){
_17b=this.totalNumOfResults-_17a;
}
if(_17b<0){
_17b=0;
}
return _amzn_utils.widgetServerURL(this.marketPlace)+"/q?"+"Operation="+_16e+"&Keywords="+encodeURIComponent(_170)+"&SearchIndex="+encodeURIComponent(_16f)+"&multipageStart="+_17a+"&InstanceId="+this.instanceId+"&multipageCount="+_17b+"&TemplateId="+this.templateId+"&ServiceVersion="+this.serviceVersion+"&MarketPlace="+this.marketPlace;
}
},getBlankLayout:function(){
var res="";
for(var i=0;i<this.rows;i++){
for(var j=0;j<this.cols;j++){
res+=this.getBlankTile();
}
}
return res;
},getSearchingLayout:function(){
var _17f=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var _180=_amzn_utils.getById("wdgt_brdr",_17f);
var ht=_180.clientHeight-8.5;
var _182=(Math.floor((ht-58)/2))+"px";
var text=this.currentPage==1?_amzn_utils.Searching:_amzn_utils.Loading;
text=_amzn_utils.getString(text,this.marketPlace);
return "<div align='center' style='width:"+this.innerWidth+"px;height:"+ht+"px;'>"+"<div class='message' id='searching' style='height: 59px;width: 100px;font:11px Arial;'>"+"<div class='messagetext' align='center' style='position: relative;'><img src='http://www.absolutepunk.net/clientscript/loading.gif'/></div>"+"</div>"+"</div>";
},getShowString:function(_184,_185,_186,_187,_188,_189){
if(_189<=150){
var _18a;
switch(this.marketPlace){
case "DE":
_18a="von";
break;
case "FR":
_18a="de";
break;
case "JP":
_18a="\u306e";
break;
default:
_18a="of";
break;
}
var _18b=[];
_18b.push(" ");
_18b.push(_184+" - "+_185+" ");
_18b.push(" "+_18a+" ");
_18b.push(_186);
return _18b;
}else{
var _18b=[];
switch(this.marketPlace){
case "DE":
_18b.push("Anzeige ");
_18b.push(_184+" - "+_185+" ");
_18b.push(" von ");
_18b.push(_186+" ");
_18b.push(" Suchergebnissen f\xfcr ");
_18b.push(_amzn_utils.escapeHTML(_187)+" ");
_18b.push(" in ");
_18b.push(_amzn_utils.escapeHTML(this.valueToLabel[_188]));
break;
case "FR":
_18b.push("Affichage des r\xe9sultats ");
_18b.push(_184+" - "+_185+" ");
_18b.push(" sur un total de ");
_18b.push(_186+" ");
_18b.push(" pour ");
_18b.push(_amzn_utils.escapeHTML(_187)+" ");
_18b.push(" dans la cat\xe9gorie ");
_18b.push(_amzn_utils.escapeHTML(this.valueToLabel[_188]));
break;
case "JP":
_18b.push(" ");
_18b.push(_amzn_utils.escapeHTML(this.valueToLabel[_188]));
_18b.push(" \u5185\u3067\u306e ");
_18b.push(_amzn_utils.escapeHTML(_187)+" ");
_18b.push(" \u306e\u691c\u7d22\u7d50\u679c");
_18b.push(_186);
_18b.push("\u4ef6\u4e2d");
_18b.push(_184+" - "+_185+" ");
_18b.push("\u4ef6\u3092\u8868\u793a");
break;
default:
//_18b.push("Showing ");
//_18b.push(_184+" - "+_185+" ");
//_18b.push(" of ");
//_18b.push(_186+" ");
//_18b.push(" results for ");
//_18b.push(_amzn_utils.escapeHTML(_187)+" ");
//_18b.push(" in ");
//_18b.push(_amzn_utils.escapeHTML(this.valueToLabel[_188]));
break;
}
return _18b;
}
},addResult:function(){
var _18c=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var _18d=_amzn_utils.getById("wdgt_brdr",_18c);
var _18e=this.getItemsForPage();
if(_18e==null||this.searchInProgress){
return;
}
var _18f=(this.currentPage-1)*this.totalItemsPerPage+1;
var _190=_18f+_18e.length-1;
var _191="";
var _192=this.searchTerms;
if(this.correctedQuery&&this.correctedQuery.length>0){
if(this.marketPlace=="JP"){
_191=this.getSplitTitle([" ",_amzn_utils.escapeHTML(this.searchTerms),_amzn_utils.escapeHTML(_amzn_utils.getString(_amzn_utils.NoResultsFor,this.marketPlace))]);
}else{
_191=this.getSplitTitle([_amzn_utils.escapeHTML(_amzn_utils.getString(_amzn_utils.NoResultsFor,this.marketPlace)),_amzn_utils.escapeHTML(this.searchTerms)]);
}
_192=this.correctedQuery;
}
var res="<div style='width:"+(this.innerWidth-30)+"px;text-align:left;font-family: tahoma, geneva, verdana, arial, sans-serif; font-size: 11px;'>";
var _194=this.getShowString(_18f,_190,this.totalNumOfResults,_192,this.searchCategory,this.width);
res+=this.getSplitTitle(_194);
res+="</div>";
var _195=0;
for(var i in _18e){
if(_amzn_utils.objHasOwnProperty(_18e,i)){
res+=this.getTile(_18e[i]);
_195++;
}
}
for(var i=0;i<(this.cols*this.rows)-_195;i++){
res+=this.getBlankTile();
}
_18d.innerHTML=res;
_amzn_utils.runPNGTransparencyHack(_18c,this.marketPlace);
_amzn_utils.runPNGTransparencyHackForBkgdImage(_amzn_utils.getById("wdgt_brdr",_18c));
var _197=_amzn_utils.getById("nav",_18c);
_197.innerHTML=this.drawNavBar();
},clearNavBar:function(){
var _198=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var _199=_amzn_utils.getById("nav",_198);
_199.innerHTML=" ";
},selectCategoryFromDropdown:function(_19a,_19b,_19c,_19d){
var self=all_amzn_wdgts[_19d]["8002"][_19b];
self.selectCategory(_19a);
_amzn_popup.hideNow();
},createAllDivs:function(){
var res="";
for(var _1a0 in this.valueToLabel){
if(_amzn_utils.objHasOwnProperty(this.valueToLabel,_1a0)){
var lbel=this.valueToLabel[_1a0];
res+=this.createDiv(lbel,_1a0);
}
}
return res;
},createDiv:function(lbel,_1a3){
return "<div style='cursor:pointer;text-decoration: none;padding:2px;font: 100% tahoma, geneva, verdana, arial, sans-serif;"+"font-size: 9px;text-align: left;' "+"id = \"selectedCategoryDiv_value_"+_1a3+"\" "+"onclick='javascript:window.nextCallBack[\""+this.marketPlace+"\"]["+this.templateId+"]["+this.instanceId+"]."+"selectCategoryFromDropdown(\""+_1a3+"\","+this.instanceId+","+this.templateId+",\""+this.marketPlace+"\");' "+"onmouseover='if(!window.nextCallBack[\""+this.marketPlace+"\"]["+this.templateId+"]["+this.instanceId+"].isCategorySelected(\""+_1a3+"\",\""+this.templateId+"\",\""+this.instanceId+"\",\""+this.marketPlace+"\"))this.style.backgroundColor=\"#e3e3e3\";' "+"onmouseout='if(!window.nextCallBack[\""+this.marketPlace+"\"]["+this.templateId+"]["+this.instanceId+"].isCategorySelected(\""+_1a3+"\",\""+this.templateId+"\",\""+this.instanceId+"\",\""+this.marketPlace+"\"))this.style.backgroundColor=\"#ffffff\";' >"+lbel+"</div>";
},highlightSelectedCategory:function(_1a4,_1a5,_1a6){
var self=all_amzn_wdgts[_1a4][_1a5][_1a6];
var _1a8=_amzn_utils.$("amazon_widget_"+self.marketPlace+"_"+self.templateId+"_"+self.instanceId);
var _1a9=_amzn_utils.getById("selectedCategoryDiv",_1a8);
var lbel=_1a9.textContent;
if(typeof lbel=="undefined"||lbel==null){
lbel=_1a9.childNodes[0].nodeValue;
}
var _1ab=self.categoryValueFromLabel(lbel);
for(var v in self.valueToLabel){
if(_amzn_utils.objHasOwnProperty(self.valueToLabel,v)){
var _1ad=_amzn_utils.byId("selectedCategoryDiv_value_"+v,document);
if(v==_1ab){
_1ad.style.backgroundColor="#666666";
_1ad.style.color="#ffffff";
}else{
_1ad.style.backgroundColor="#ffffff";
_1ad.style.color="#000000";
}
}
}
},isCategorySelected:function(_1ae,_1af,_1b0,_1b1){
var self=all_amzn_wdgts[_1b1][_1af][_1b0];
var _1b3=_amzn_utils.$("amazon_widget_"+self.marketPlace+"_"+self.templateId+"_"+self.instanceId);
var _1b4=_amzn_utils.getById("selectedCategoryDiv",_1b3);
var lbel=_1b4.textContent;
if(typeof lbel=="undefined"||lbel==null){
lbel=_1b4.childNodes[0].nodeValue;
}
var _1b6=self.categoryValueFromLabel(lbel);
return (_1b6==_1ae);
},createSearchSelectbox:function(){
if(!window.nextCallBack){
window.nextCallBack=new Object();
}
if(!window.nextCallBack[this.marketPlace]){
window.nextCallBack[this.marketPlace]=new Object();
}
if(!window.nextCallBack[this.marketPlace][this.templateId]){
window.nextCallBack[this.marketPlace][this.templateId]=new Object();
}
if(!window.nextCallBack[this.marketPlace][this.templateId][this.instanceId]){
window.nextCallBack[this.marketPlace][this.templateId][this.instanceId]=new Object();
}
window.nextCallBack[this.marketPlace][this.templateId][this.instanceId].selectCategoryFromDropdown=this.selectCategoryFromDropdown;
var ht=250;
switch(this.marketPlace){
case "CA":
ht=100;
break;
case "DE":
ht=150;
break;
case "FR":
ht=150;
break;
case "GB":
ht=200;
break;
case "JP":
ht=200;
break;
case "US":
ht=250;
break;
}
var _1b8=escape("<div style='background-color:#FFFFFF;border: 1px solid #000000;width:140px;height:"+ht+"px;overflow:auto;'>"+this.createAllDivs()+"</div>");
window.nextCallBack[this.marketPlace][this.templateId][this.instanceId].isCategorySelected=this.isCategorySelected;
window.nextCallBack[this.marketPlace][this.templateId][this.instanceId].highlightSelectedCategory=this.highlightSelectedCategory;
return "<span style='white-space:nowrap;border: 1px solid;cursor:pointer;'"+" onmouseover='_a=this; _amzn_popup.showpreview(\""+_1b8+"\", _a, event,50);"+"window.nextCallBack[\""+this.marketPlace+"\"]["+this.templateId+"]["+this.instanceId+"].highlightSelectedCategory(\""+this.marketPlace+"\",\""+this.templateId+"\",\""+this.instanceId+"\");' "+"onmouseout='_amzn_popup.hide()'"+"><span id='selectedCategoryDiv'>"+this.getTrimmedCategory(this.valueToLabel[this.defaultSearchCategoryValue])+"</span>"+"<img id='selectCategoryImg' style='vertical-align:middle;padding:0 0 0 1px;border:none;margin:0;' src='"+_amzn_utils.imageDirectory(this.marketPlace)+"/ddwn_tpng.png' width='11' height='11' "+"/></span>";
},resetAllVariables:function(){
this.resultData=new Array();
this.totalNumOfResults=null;
this.resultWindowSize=5;
this.totalItemsPerPage=this.getTotalItemsPerPage();
this.currentPage=1;
this.currentSearchPage=1;
this.navBarBeginPage=1;
this.navBarEndPage=this.navBarBeginPage+this.resultWindowSize-1;
this.requestSize=this.totalItemsPerPage>10?this.totalItemsPerPage:10;
},MAX_CHARS:7,getTrimmedCategory:function(str){
if(str&&str.length>this.MAX_CHARS){
return str.substr(0,this.MAX_CHARS)+"&hellip;";
}
return str;
},selectCategory:function(_1ba){
if(!this.categoryFixed){
var _1bb=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var cat=_amzn_utils.getById("selectedCategoryDiv",_1bb);
var _1bd=this.valueToLabel[_1ba];
if(_1bd&&_1bd.length>this.MAX_CHARS){
_1bd=_1bd.substr(0,this.MAX_CHARS)+"&hellip;";
}
cat.innerHTML=_1bd;
}
},categoryValueFromLabel:function(lbel){
for(var _1bf in this.valueToLabel){
if(_amzn_utils.objHasOwnProperty(this.valueToLabel,_1bf)){
var _1c0=this.valueToLabel[_1bf];
if((_1c0==lbel)||(_1c0.length>this.MAX_CHARS&&lbel.length>this.MAX_CHARS&&_1c0.substr(0,this.MAX_CHARS)==lbel.substr(0,this.MAX_CHARS))){
return _1bf;
}
}
}
return "All";
},goOnClick:function(_1c1,_1c2,_1c3){
var self=all_amzn_wdgts[_1c1]["8002"][_1c2];
if(self.searchInProgress){
return;
}
var _1c5=_amzn_utils.$("amazon_widget_"+self.marketPlace+"_"+self.templateId+"_"+self.instanceId);
var _1c6=_amzn_utils.getById("amzn_search_textfield",_1c5);
if(!_1c6.value&&(typeof _1c3=="undefined"||_1c3)){
return;
}
var _1c7=_amzn_utils.getById("selectedCategoryDiv",_1c5);
var lbel=_1c7.textContent;
if(typeof lbel=="undefined"||lbel==null){
lbel=_1c7.childNodes[0].nodeValue;
}
var _1c9=self.categoryValueFromLabel(lbel);
if(typeof _1c3=="undefined"||_1c3){
self.searchTerms=_1c6.value;
self.searchCategory=_1c9;
}else{
_1c6.value=self.searchTerms;
self.selectCategory(self.searchCategory);
_1c9=self.searchCategory;
}
self.disableSearchFields(true);
self.searchInProgressID=setTimeout(function(){
if(self.searchInProgress){
var _1ca=_amzn_utils.getById("wdgt_brdr",_1c5);
_1ca.innerHTML="<div style='width:"+(self.innerWidth)+"px;padding:3px;font-family: tahoma, geneva, verdana, arial, sans-serif; font-size: 11px;"+self.style_tile_h1()+"'>"+_amzn_utils.getString(_amzn_utils.ErrorMessage,self.marketPlace)+"</div>"+self.getBlankLayout();
self.disableSearchFields(false);
}
},30000);
if(typeof _1c3=="undefined"||_1c3){
self.resetAllVariables();
self.clearNavBar();
}
self.search(_1c6.value,_1c9);
},topseller_display_callback:function(_1cb){
this.topsellers=_1cb;
var res="";
this.mergeTemplate();
var _1cd=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var _1ce=_amzn_utils.getById("wdgt_brdr",_1cd);
var _1cf=0;
for(var i=0;i<_1cb.length&&i<this.totalItemsPerPage;i++,_1cf++){
res+=this.getTile(_1cb[i]);
}
for(var i=0;i<(this.cols*this.rows)-_1cf;i++){
res+=this.getBlankTile();
}
_1ce.innerHTML=res;
_amzn_utils.runPNGTransparencyHack(_1cd,this.marketPlace);
_amzn_utils.runPNGTransparencyHackForBkgdImage(_amzn_utils.getById("wdgt_brdr",_1cd));
if(typeof loadComplete=="function"){
loadComplete("topseller");
}
},curveCorners:function(){
Nifty("div#amzn_wdgt_t_8002_"+this.instanceId,"transparent"+this.curveTheseCorners);
},callDefaultSearchWebService:function(){
this.topseller_display_callback(new Array());
var _1d1=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
_amzn_utils.getById("amzn_search_textfield",_1d1).value=this.defaultSearchTerm;
this.goOnClick(this.marketPlace,this.instanceId,true);
},handleDefaultSearchTerm:function(_1d2){
setTimeout(function(){
if(typeof _amzn_popup=="object"&&typeof Nifty=="function"){
all_amzn_wdgts[_1d2.MarketPlace]["8002"][_1d2.InstanceId].callDefaultSearchWebService();
}else{
all_amzn_wdgts[_1d2.MarketPlace]["8002"][_1d2.InstanceId].handleDefaultSearchTerm(_1d2);
}
},50);
},callWebService:function(){
if(this.useDefaultSearchTerm&&this.defaultSearchTerm&&this.defaultSearchTerm!=""){
var _1d3={};
_1d3.results=[];
_1d3.MarketPlace=this.marketPlace,_1d3.InstanceId=this.instanceId;
this.handleDefaultSearchTerm(_1d3);
}else{
var res=document.createElement("script");
res.charset="utf-8";
res.src=this.amazon_generate_widgets_url("GetTopSellers");
document.body.appendChild(res);
}
},search:function(_1d5,_1d6){
var res=document.createElement("script");
res.charset="utf-8";
res.src=this.amazon_generate_widgets_url("GetResults",_1d6,_1d5);
document.body.appendChild(res);
this.addWait("wait");
},oldOnClick:null,disableSearchFields:function(_1d8){
var _1d9=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var _1da=_amzn_utils.getById("amzn_search_textfield",_1d9);
_1da.disabled=_1d8;
if(!this.categoryFixed){
var _1db=_amzn_utils.getById("selectCategoryImg",_1d9);
if(this.oldOnClick&&!_1d8){
_1db.parentNode.onmouseover=this.oldOnClick;
this.oldOnClick=null;
}else{
this.oldOnClick=_1db.parentNode.onmouseover;
_1db.parentNode.onmouseover="";
}
}
this.searchInProgress=_1d8;
},getSplitTitle:function(_1dc){
return this.trimCharsByWidth(_1dc,"10",this.innerWidth-16,-1);
},display_callback:function(data,_1de){
if(typeof _1de!="undefined"&&_1de){
data=Object();
data.NumRecords=this.totalNumOfResults;
data.CorrectedQuery=this.correctedQuery;
data.results=this.resultData[this.currentSearchPage];
}
var _1df=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
if(typeof data=="undefined"||typeof data.NumRecords=="undefined"||data.NumRecords==0){
var _1e0=_amzn_utils.getById("wdgt_brdr",_1df);
var _1e1;
if(this.marketPlace=="JP"){
_1e1=[" ",_amzn_utils.escapeHTML(this.searchTerms),_amzn_utils.escapeHTML(_amzn_utils.getString(_amzn_utils.NoResultsFor,this.marketPlace))];
}else{
_1e1=[_amzn_utils.escapeHTML(_amzn_utils.getString(_amzn_utils.NoResultsFor,this.marketPlace)),_amzn_utils.escapeHTML(this.searchTerms)];
}
_1e0.innerHTML="<div align='center'><div style='width:"+(this.innerWidth-30)+"px;font-family: tahoma, geneva, verdana, arial, sans-serif; font-size: 11px;padding:3px;margin:1px;border:1px solid #ffe222; background:#fff8cc; color:#333333;'>No albums found.</div></div>"+this.getBlankLayout();
if(!_1de){
this.disableSearchFields(false);
clearTimeout(this.searchInProgressID);
}
if(typeof loadComplete=="function"){
loadComplete("search");
}
return;
}
this.totalNumOfResults=data.NumRecords;
if(this.searchCategory=="All"&&this.totalNumOfResults>50){
this.totalNumOfResults=50;
}
this.correctedQuery=data.CorrectedQuery;
this.resultData[this.currentSearchPage]=data.results;
var _1e2=0;
var _1e3=10000;
var _1e4=0;
for(var i in this.resultData){
if(_amzn_utils.objHasOwnProperty(this.resultData,i)){
_1e2++;
_1e3=_1e3>i?i:_1e3;
_1e4=_1e4<i?i:_1e4;
}
}
if(_1e2>5){
if(this.currentSearchPage>=_1e4){
this.resultData[_1e3]=null;
}else{
this.resultData[_1e4]=null;
}
}
if(!_1de){
this.disableSearchFields(false);
clearTimeout(this.searchInProgressID);
}
this.addResult();
if(typeof loadComplete=="function"){
loadComplete("search");
}
},addWait:function(_1e6){
var _1e7=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
_amzn_utils.getById("wdgt_brdr",_1e7).innerHTML=this.getSearchingLayout();
},getNumPages:function(){
return (Math.ceil(this.totalNumOfResults/this.totalItemsPerPage));
},resetSearchTermsAndCategory:function(){
var _1e8=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var _1e9=_amzn_utils.getById("amzn_search_textfield",_1e8);
var _1ea=_amzn_utils.getById("selectedCategoryDiv",_1e8);
var lbel=_1ea.textContent;
if(typeof lbel=="undefined"||lbel==null){
lbel=_1ea.childNodes[0].nodeValue;
}
var _1ec=this.categoryValueFromLabel(lbel);
_1e9.value=this.searchTerms;
this.selectCategory(this.searchCategory);
_1ec=this.searchCategory;
},showpage:function(page,self,_1ef,_1f0){
if(typeof self=="undefined"){
self=this;
}else{
self=all_amzn_wdgts[_1f0][_1ef][self];
self.resetSearchTermsAndCategory();
}
self.currentPage=page;
self.addResult();
},computeEndPage:function(){
var res=this.navBarBeginPage+this.resultWindowSize-1;
var _1f2=this.getNumPages();
if(res>_1f2){
res=_1f2;
}
return res;
},resultWindowSize:5,serviceVersion:"",MarketPlace:"",refURL:null,searchTerms:null,searchCategory:null,show_image:true,show_price:true,show_review:true,doCurveCorners:true,showAmazonLogoAsText:false,defaultSearchTerm:"",useDefaultSearchTerm:false,width:120,innerWidth:120,height:75,rows:2,cols:1,title:"Amazon Widget",category:"stripbooks",categoryFixed:true,curveTheseCorners:" tl tr bl br big ",resultData:null,totalNumOfResults:null,totalItemsPerPage:0,currentPage:1,navBarBeginPage:1,navBarEndPage:0,instanceId:0,requestSize:0,templateId:"8002",searchInProgress:false,tag:"",linkCode:"wsw",getTotalItemsPerPage:function(){
var _1f3=this.rows*this.cols;
if(_1f3>20){
_1f3=20;
}
return _1f3;
},mergeTemplate:function(){
_amzn_popup.init();
var _1f4=this.drawHeaderBox();
var _1f5=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
_1f5.innerHTML=_1f4;
_amzn_utils.runPNGTransparencyHack(_1f5,this.marketPlace);
if(typeof this.doCurveCorners=="string"){
this.doCurveCorners=this.doCurveCorners=="true";
}
if(this.doCurveCorners){
this.curveCorners();
}
if(this.category){
var _1f6=_amzn_utils.getById("selectedCategoryDiv",_1f5);
_1f6.innerHTML=this.valueToLabel[this.category];
_1f6.parentNode.onmouseover=null;
_1f6.parentNode.style["border"]="none";
_1f6.parentNode.style["cursor"]="text";
var _1f7=_amzn_utils.getById("selectCategoryImg",_1f5);
_1f7.parentNode.removeChild(_1f7);
}
},getBlankTile:function(){
var diff=_amzn_utils.amzn_isMSIE()?0:6*this.cols;
var _1f9=Math.floor((this.innerWidth-6*this.cols)/this.cols);
return "<div class='wdgt_tl_pad'><div class='wdgt_tl' style='height:"+this.height+"px;width:"+_1f9+"px'></div></div>";
},drawNavBar:function(){
var _1fa=this.getNumPages();
if((this.currentPage==1&&_1fa==0)||_1fa==1){
return "<div class='wdgt_pgn' style='"+this.style_wdgt_pgn()+"' id='nav'><div class='pgn_cnt'></div></div>";
}
if(this.currentPage==this.navBarEndPage&&this.currentPage<_1fa){
this.navBarBeginPage+=Math.floor(this.resultWindowSize/2);
}else{
if(this.currentPage==this.navBarBeginPage&&this.currentPage!=1){
this.navBarBeginPage-=Math.floor(this.resultWindowSize/2);
}
}
this.navBarEndPage=this.computeEndPage();
var prev=(this.currentPage==1)?this.currentPage:this.currentPage-1;
var next=(this.currentPage==_1fa)?this.currentPage:this.currentPage+1;
var res="<div class='wdgt_pgn' style='"+this.style_wdgt_pgn()+";display:none;' id='nav'>";
res+="<div class='pgn_cnt' style='display:none;'>";
if(prev!=this.currentPage){
res+=this.pageNumberDiv(prev,prev==this.currentPage,"&lt;");
}
for(var i=this.navBarBeginPage;i<=this.navBarEndPage;i++){
res+=this.pageNumberDiv(i,i==this.currentPage);
}
if(next!=this.currentPage){
res+=this.pageNumberDiv(next,next==this.currentPage,"&gt;");
}
res+="</div>";
res+="</div>";
return res;
},drawFooter:function(){
return _amzn_utils.drawFooter(this);
},drawHeaderBox:function(){
if(!window.nextCallBack){
window.nextCallBack=new Object();
}
if(!window.nextCallBack[this.marketPlace]){
window.nextCallBack[this.marketPlace]=new Object();
}
if(!window.nextCallBack[this.marketPlace][this.templateId]){
window.nextCallBack[this.marketPlace][this.templateId]=new Object();
}
if(!window.nextCallBack[this.marketPlace][this.templateId][this.instanceId]){
window.nextCallBack[this.marketPlace][this.templateId][this.instanceId]=new Object();
}
window.nextCallBack[this.marketPlace][this.templateId][this.instanceId]["goOnClick"]=this.goOnClick;
var _1ff=this.innerWidth;
var _200=this.innerWidth>140?12:8;
var _201=" ";
if(this.innerWidth<235){
_201="<br/>";
if(this.innerWidth<140){
_200=12;
}else{
if(this.innerWidth<235){
_200=17;
}else{
_200=12;
}
}
}
if(this.innerWidth>=250){
if(this.innerWidth<270){
_200=16;
}else{
_200=20;
}
}
return "<div id='amzn_wdgt_t_8002_"+this.instanceId+"' class='amzn_wdgt' "+"style='"+this.style_amzn_wdgt()+"'>"+"<div>"+"<form "+"onsubmit='window.nextCallBack[\""+this.marketPlace+"\"]["+this.templateId+"]["+this.instanceId+"].goOnClick(\""+this.marketPlace+"\","+this.instanceId+");return false;'/>"+"<div style='display:none;'>"+"<div class='hd_input'>"+_amzn_utils.getString(_amzn_utils.Search,this.marketPlace)+" "+this.createSearchSelectbox()+_201+"<span><input maxlength='10' id='amzn_search_textfield' type='text' style='margin:0px;padding:0px;' size='1'/>"+"</span>"+"</div>"+"</div>"+"</form>"+"<div class='wdgt_brdr' id='wdgt_brdr' style='"+this.style_wdgt_brdr(_1ff)+"'>"+"</div>"+this.drawNavBar()+this.drawFooter()+"</div></div>";
},getEditWidgetTarget:"Amazon-Search-Widget/",getTile:function(_202){
return _amzn_utils.getTile(_202,this);
},createPopupTile:function(_203){
return _amzn_utils.createPopupTile(_203,this);
},add_pad_helper:function(_204){
if(_204){
return _204+"px ";
}else{
return "0 ";
}
},style_wdgt_pad:function(){
var res="padding: ";
res+=this.add_pad_helper(this.wdgt_pad_top);
res+=this.add_pad_helper(this.wdgt_pad_right);
res+=this.add_pad_helper(this.wdgt_pad_bottom);
res+=this.add_pad_helper(this.wdgt_pad_left);
res+=";";
return res;
},setTileHeight:function(){
this.height=this.show_image?(63+10):35;
var _206=Math.floor((this.innerWidth-6*this.cols)/this.cols);
if(_206<150&&this.show_image){
this.height+=20;
}
if(!this.show_image&&this.show_price){
this.height+=16;
}
if(!this.show_image&&this.show_review){
this.height+=25;
}
if(_amzn_utils.isFirefox_1_5&&!this.show_image){
this.height+=10;
}
},repaint:function(_207){
if(typeof _207.tag=="undefined"){
_207.tag=_amzn_utils.getString(_amzn_utils.DefaultTag,this.marketPlace);
}
this.internalRepaint(_207);
if(this.totalNumOfResults!=null){
this.mergeTemplate();
var _208=_amzn_utils.$("amazon_widget_"+this.marketPlace+"_"+this.templateId+"_"+this.instanceId);
var _209=_amzn_utils.getById("amzn_search_textfield",_208);
var _20a=_amzn_utils.getById("selectedCategoryDiv",_208);
_209.value=this.searchTerms;
this.selectCategory(this.searchCategory);
this.display_callback(null,true);
}else{
this.topseller_display_callback(this.topsellers);
}
},internalMain:function(_20b){
if(this.marketPlace=="US"&&_20b.category){
var _20c=new Array();
_20c["apparel"]="Apparel";
_20c["aps"]="All";
_20c["automotive"]="Automotive";
_20c["baby-products"]="Baby";
_20c["beauty"]="Beauty";
_20c["classical"]="Classical";
_20c["computers"]="PCHardware";
_20c["dvd"]="DVD";
_20c["electronics"]="Electronics";
_20c["garden"]="HomeGarden";
_20c["gourmet"]="GourmetFood";
_20c["grocery"]="Grocery";
_20c["hpc"]="HealthPersonalCare";
_20c["jewelry"]="Jewelry";
_20c["kitchen"]="Kitchen";
_20c["magazines"]="Magazines";
_20c["mi"]="MusicalInstruments";
_20c["misc"]="Miscellaneous";
_20c["office-products"]="OfficeProducts";
_20c["outdoor"]="OutdoorLiving";
_20c["photo"]="Photo";
_20c["popular"]="Music";
_20c["software"]="Software";
_20c["sporting"]="SportingGoods";
_20c["stripbooks"]="Books";
_20c["tools"]="Tools";
_20c["toys-and-games"]="Toys";
_20c["vhs"]="VHS";
_20c["videogames"]="VideoGames";
_20c["wireless-accessories"]="WirelessAccessories";
_20c["wireless-phones"]="Wireless";
if(_20c[_20b.category]){
_20b.category=_20c[_20b.category];
}
}
this.populateCategories();
if(_20b.category&&!this.valueToLabel[_20b.category]){
_20b.category=null;
}
this.internalRepaint(_20b);
this.callWebService();
},topsellers:null,wdgt_pad_top:0,wdgt_pad_left:9,wdgt_pad_bottom:0,wdgt_pad_right:9,valueToLabel:new Array(),getWidth:function(){
return this.innerWidth;
},defaultSearchCategoryValue:"All",populateCategories:function(){
this.valueToLabel["All"]="Amazon.com";
this.valueToLabel["Apparel"]="Apparel";
this.valueToLabel["Automotive"]="Automotive";
this.valueToLabel["Baby"]="Baby";
this.valueToLabel["Beauty"]="Beauty";
this.valueToLabel["Books"]="Books";
this.valueToLabel["Photo"]="Camera & Photo";
this.valueToLabel["Wireless"]="Cell Phones";
this.valueToLabel["Classical"]="Classical Music";
this.valueToLabel["PCHardware"]="Computers";
this.valueToLabel["DVD"]="DVD";
this.valueToLabel["Electronics"]="Electronics";
this.valueToLabel["Miscellaneous"]="Everything Else";
this.valueToLabel["GourmetFood"]="Gourmet Food";
this.valueToLabel["Grocery"]="Grocery";
this.valueToLabel["HealthPersonalCare"]="Health/Personal Care";
this.valueToLabel["HomeGarden"]="Home & Garden";
this.valueToLabel["Jewelry"]="Jewelry & Watches";
this.valueToLabel["KindleBooks"]="Kindle Store";
this.valueToLabel["Kitchen"]="Kitchen/Housewares";
this.valueToLabel["Magazines"]="Magazines";
this.valueToLabel["MP3Downloads"]="MP3 Downloads";
this.valueToLabel["Music"]="Music";
this.valueToLabel["MusicalInstruments"]="Musical Instruments";
this.valueToLabel["OfficeProducts"]="Office Products";
this.valueToLabel["OutdoorLiving"]="Outdoor Living";
this.valueToLabel["Software"]="Software";
this.valueToLabel["SportingGoods"]="Sports & Outdoors";
this.valueToLabel["Tools"]="Tools & Hardwares";
this.valueToLabel["Toys"]="Toys & Games";
this.valueToLabel["UnboxVideoDownloads"]="Unbox Video Downloads";
this.valueToLabel["VHS"]="VHS";
this.valueToLabel["VideoGames"]="Video Games";
this.valueToLabel["WirelessAccessories"]="Wireless Accessories";
},marketPlace:"US",internalRepaint:function(_20d){
this.origParams=_amzn_utils.clone(_20d);
_20d=_amzn_utils.escapeHTML(_20d);
this.useDefaultSearchTerm=_20d.use_default_search_term;
this.defaultSearchTerm=_20d.default_search_term;
this.showAmazonLogoAsText=_amzn_utils.getValidParam(_20d.showAmazonLogoAsText,false);
this.show_image=_20d.show_image;
this.show_price=_20d.show_price;
this.show_review=_20d.show_review;
this.width=_20d.width;
this.rows=_20d.rows;
this.cols=_20d.cols;
this.validateRowsAndColumns();
this.serviceVersion=_20d.serviceVersion;
this.MarketPlace=_20d.MarketPlace;
this.refURL=_20d.refURL;
this.tag=_20d.tag;
this.wdgt_pad_top=0;
this.wdgt_pad_left=0;
this.wdgt_pad_bottom=0;
this.wdgt_pad_right=0;
this.doCurveCorners=false;
this.innerWidth=this.width-this.wdgt_pad_right-this.wdgt_pad_left-2;
if(_20d.head_text_color){
this.head_text_color=_20d.head_text_color;
}
if(_20d.text_color){
this.text_color=_20d.text_color;
}
if(_20d.price_color){
this.price_color=_20d.price_color;
}
if(_20d.outer_bkgd_color){
this.outer_bkgd_color=_20d.outer_bkgd_color;
}
if(_20d.inner_bkgd_color){
this.inner_bkgd_color=_20d.inner_bkgd_color;
}
if(_20d.border_color){
this.border_color=_20d.border_color;
}
if(_20d.category){
this.category=_20d.category;
this.categoryFixed=true;
}else{
this.category=null;
this.categoryFixed=false;
}
if(typeof _20d.theme_version=="undefined"){
this.theme_version="0";
}else{
this.theme_version=_20d.theme_version;
}
this.setTileHeight();
this.totalItemsPerPage=this.getTotalItemsPerPage();
this.navBarEndPage=this.computeEndPage();
this.requestSize=this.totalItemsPerPage>10?this.totalItemsPerPage:10;
_amzn_utils.insertStyleSheet("stylesheet.widgets.amazon.com","/css/widgets.css",this.marketPlace);
},creativeId:function(){
switch(this.marketPlace){
case "US":
return "380793";
case "CA":
return "381173";
case "GB":
return "8926";
case "DE":
return "9046";
case "FR":
return "9166";
case "JP":
return "3867";
}
},head_text_color:"#000000",text_color:"#000000",price_color:"#9C0000",outer_bkgd_color:"#DEDEDE",border_color:"#636363",inner_bkgd_color:"#FFFFFF",style_pgn_strong:function(){
return "background-color:"+this.text_color+";color:"+this.inner_bkgd_color+";";
},style_pgn_a:function(){
return "text-decoration:none;color: "+this.text_color+";";
},style_amzn_wdgt:function(){
return "border: 0px;color:"+this.price_color+";background:#e9e9e9;width:"+this.width+"px;";
},style_wdgt_hd:function(){
return "border-bottom: 1px solid "+this.border_color+";text-align: left;font: 11px tahoma, geneva, verdana, arial, sans-serif;color:"+this.head_text_color+";background:"+this.outer_bkgd_color+";";
},style_wdgt_brdr:function(_20e){
return "";
},style_wdgt_ft:function(){
return "border-top: 1px solid "+this.border_color+";color:"+this.head_text_color+" !important;background:"+this.outer_bkgd_color+";";
},style_wdgt_ft_a:function(){
return "color:"+this.head_text_color+" !important;border-bottom: 1px dotted "+this.head_text_color+";";
},style_wdgt_pgn:function(){
return "color:"+this.text_color+";";
},style_wdgt_pop_tl:function(_20f){
return "border: 1px solid #b7b7b7"+";color:"+this.price_color+";background: "+this.inner_bkgd_color+";width:"+_20f+"px;";
},style_tile_a:function(){
return "border-bottom: 0px; overflow-X:hidden;text-decoration:none;color: "+this.text_color+" !important;";
},style_tile_h1:function(){
return "font: 11px tahoma, geneva, verdana, arial, sans-serif; color: "+this.text_color+" !important;";
},style_get_edit_wdgt:function(){
return "color: "+this.text_color+" !important;border-bottom: 1px dotted "+this.text_color+";";
},style_tile_h1_a:function(){
return "text-decoration :underline; ";
},style_tile_h2:function(){
return "color: "+this.text_color+" !important;";
},style_tile_category:function(){
return "color: "+this.text_color+" !important;";
},style_tile_price:function(){
return "color: "+this.price_color+" !important;";
},style_tile_asin_img:function(){
return "text-decoration:none;";
},style_tile_asin_a:function(){
return "border-bottom: none; text-decoration:none;";
},style_tile_review:function(){
return "color: "+this.price_color+" !important;";
},display_template_id:7,style_tile_comment:function(){
return "color: "+this.price_color+" !important;";
},getBackgroundColor:function(){
return this.outer_bkgd_color;
}};
var _210=""+wdgt.display_template_id;
var id=null;
for(var i=0;i<amzn_wdgts_vars[wdgt.marketPlace][wdgt.templateId].length;i++){
var _213=amzn_wdgts_vars[wdgt.marketPlace][wdgt.templateId][i];
if(_213.displayTemplate==_210&&!_213.isTaken){
_213.isTaken=true;
id=_213.instanceId;
break;
}
}
if(id==null){
id=0;
}
wdgt.instanceId=id;
all_amzn_wdgts[wdgt.marketPlace][wdgt.templateId][id]=wdgt;
if(typeof amzn_wdgts_vars[wdgt.marketPlace][wdgt.templateId][id]!="undefined"){
if(typeof amzn_wdgts_vars[wdgt.marketPlace][wdgt.templateId][id].tag=="undefined"){
amzn_wdgts_vars[wdgt.marketPlace][wdgt.templateId][id].tag=_amzn_utils.getString(_amzn_utils.DefaultTag,wdgt.marketPlace);
}
_amzn_utils.recordImpression(amzn_wdgts_vars[wdgt.marketPlace][wdgt.templateId][id].tag,wdgt.linkCode,wdgt.creativeId(),wdgt.marketPlace);
wdgt.internalMain(amzn_wdgts_vars[wdgt.marketPlace][wdgt.templateId][id]);
}
}
if(typeof all_amzn_wdgts=="undefined"){
all_amzn_wdgts=new Array();
}
var curr_mkt_place="US";
if(typeof all_amzn_wdgts[curr_mkt_place]=="undefined"){
all_amzn_wdgts[curr_mkt_place]=new Array();
}
if(typeof all_amzn_wdgts[curr_mkt_place]["8002"]=="undefined"){
all_amzn_wdgts[curr_mkt_place]["8002"]=new Array();
}
var curr_wdgt=all_amzn_wdgts[curr_mkt_place]["8002"];
function clearWidgets(){
amzn_wdgts_vars=new Array();
amzn_wdgts_vars[amzn_wdgt.marketPlace]=new Array();
amzn_wdgts_vars[amzn_wdgt.marketPlace][amzn_wdgt.templateId]=new Array();
all_amzn_wdgts=new Array();
all_amzn_wdgts[amzn_wdgt.marketPlace]=new Array();
all_amzn_wdgts[amzn_wdgt.marketPlace][amzn_wdgt.templateId]=new Array();
amzn_wdgts_vars[amzn_wdgt.marketPlace][amzn_wdgt.templateId].push(_amzn_utils.clone(amzn_wdgt));
}
function search_callback(data){
if(_amzn_utils.amzn_isMSIE()){
setTimeout(new function(){
if(typeof _amzn_popup=="object"){
all_amzn_wdgts[data.MarketPlace]["8002"][data.InstanceId].display_callback(data);
}else{
search_callback(data);
}
},50);
}else{
all_amzn_wdgts[data.MarketPlace]["8002"][data.InstanceId].display_callback(data);
}
}
function topseller_display_callback(data){
if(_amzn_utils.amzn_isMSIE()){
setTimeout(new function(){
if(typeof _amzn_popup=="object"&&typeof Nifty=="function"){
if(typeof data=="undefined"||typeof data.results=="undefined"){
all_amzn_wdgts[data.MarketPlace]["8002"][data.InstanceId].topseller_display_callback(new Array());
}else{
all_amzn_wdgts[data.MarketPlace]["8002"][data.InstanceId].topseller_display_callback(data.results);
}
}else{
topseller_display_callback(data);
}
},50);
}else{
if(typeof data=="undefined"||typeof data.results=="undefined"){
all_amzn_wdgts[data.MarketPlace]["8002"][data.InstanceId].topseller_display_callback(new Array());
}else{
all_amzn_wdgts[data.MarketPlace]["8002"][data.InstanceId].topseller_display_callback(data.results);
}
}
}
initOnloadFunctions();

