﻿function ServiceCompleteCallback(ResponseObject, ResponseAsXml, ResponseAsText)
			{
				var divLabel = document.getElementById("minibasketcontent");
				var CountText = document.getElementById(countTxt);
				var ValueText = document.getElementById(valTxt);
				var hasError = ResponseObject[0];
				if (hasError!="True"){
				    if (CountText!= null){
    				    CountText.innerHTML = ResponseObject[1];
				    }
				    if (ValueText!= null){
    				    ValueText.innerHTML = ResponseObject[4];
				    }
				}else{
				    if (divLabel != null) {
				        divLabel.innerHTML=ResponseObject[2];
				    }
				}
			}
function ServiceErrorCallback(args)
{
    alert('Error occurred: ' + args.ErrorText + '<br/>' + 'Details: ' + args.Text);
	//divLabel.innerHTML='<br>Basket unavailable<br />Amazon failed to respond to request (2).<br /><br /><div onclick="javascript:window.location.reload();" style="cursor: pointer; font-size: 12px;"><img src="/Sites/Common/Images/Error_Refresh.png" alt="" style="vertical-align: middle;" />&nbsp;Refresh</div><br /><!-- Error occurred: ' + args.ErrorText + '<br/>' + 'Details: ' + args.Text + ' //-->';
}


var limg='/StoreBtn3.png';
var mimg='/StoreBtn4_5.png';
var simg='/StoreBtn6_8.png';
lbooks=new Image(137,114);
mbooks=new Image(101,114);
sbooks=new Image(64,99);
lmus=new Image(137,114);
mmus=new Image(101,114);
smus=new Image(64,99);
lmov=new Image(137,114);
mmov=new Image(101,114);
smov=new Image(64,99);
lav= new Image(137,114);
mav= new Image(101,114);
sav= new Image(64,99);
lvg= new Image(137,114);
mvg= new Image(101,114);
svg= new Image(64,99);
lty= new Image(137,114);
mty= new Image(101,114);
sty= new Image(64,99);
lhg= new Image(137,114);
mhg= new Image(101,114);
shg= new Image(64,99);
lsw= new Image(137,114);
msw= new Image(101,114);
ssw = new Image(64, 99);
lamz = new Image(137, 114);
mamz = new Image(101, 114);
samz = new Image(64, 99);
var working_width;
var simgw=64;
var mimgw=101;
var limgw=137;
var minpad=2;

function initNav() {
    lbooks.src=rootpath+bks+limg;mbooks.src=rootpath+bks+mimg;sbooks.src=rootpath+bks+simg;
    lmus.src=rootpath+mus+limg;mmus.src=rootpath+mus+mimg;smus.src=rootpath+mus+simg;
    lmov.src=rootpath+mov+limg;mmov.src=rootpath+mov+mimg;smov.src=rootpath+mov+simg;
    lav.src=rootpath+av+limg;mav.src=rootpath+av+mimg;sav.src=rootpath+av+simg;
    lvg.src=rootpath+vg+limg;mvg.src=rootpath+vg+mimg;svg.src=rootpath+vg+simg;
    lty.src=rootpath+ty+limg;mty.src=rootpath+ty+mimg;sty.src=rootpath+ty+simg;
    lhg.src=rootpath+hg+limg;mhg.src=rootpath+hg+mimg;shg.src=rootpath+hg+simg;
    lsw.src=rootpath+sw+limg;msw.src=rootpath+sw+mimg;ssw.src=rootpath+sw+simg;
    lamz.src=rootpath+amz+limg;mamz.src=rootpath+amz+mimg;samz.src=rootpath+amz+simg;
}
function Is() {
agent = navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.ns = ((agent.indexOf('mozilla') != -1) && ((agent.indexOf('spoofer')
== -1)
     && (agent.indexOf('compatible') ==  -1)));
this.ns2 = (this.ns && (this.major == 3));
this.ns3 = (this.ns && (this.major == 3));
this.ns4b = (this.ns && (this.major == 4) && (this.minor <= 4.03));
this.ns4 = (this.ns && (this.major == 4));
this.ns6 = (this.ns && (this.major >= 5));
this.ie = (agent.indexOf("msie") != -1);
this.ie3 = (this.ie && (this.major < 4));
this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0")
 == -1));
this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0")
 != -1));
this.ie55 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.5")
 != -1));
this.ie6 = (this.ie && (agent.indexOf("msie 6.0")!=-1) );
this.aol = (agent.indexOf("aol") != -1);
this.aol3 = (this.aol && this.ie3);
this.aol4 = (this.aol && this.ie4);
this.aol5 = (this.aol && this.ie5);
}

function checksize(){var is = new Is();if(is.ns4 || is.ns6) {aw = innerWidth;}else if(is.ie4 || is.ie5 || is.ie55 || is.ie6) {aw=document.body.clientWidth;};ww=aw-270;if ((limgw*numbtn)+(minpad*(numbtn-1)) < ww) {setimg(0);} else {if ((mimgw*numbtn)+(minpad*(numbtn-1)) < ww) {setimg(1);}else{setimg(2);}}};


//Drop shadow support
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 m(a){3(!2.5){1 b=6(){3(n.o.p)q;n.o.p=C;3(2.7){D(2.7);2.7=8};h(1 i=0;i<2.5.k;i++){2.5[i]()};2.5=8};3(4.r){4.r("E",b,F)}3(/G/i.l(H.I)){2.7=J(6(){3(/K|L/.l(4.M)){b()}},N)}2.O=b;2.5=[]}2.5.P(a)}6 t(a,b,c){1 d=u Q();3(b==8)b=4;3(c==8)c=\'*\';1 e=b.R(c);1 f=e.k;1 g=u S(\'(^|\\\\s)\'+a+\'(\\\\s|$)\');h(i=0,j=0;i<f;i++){3(g.l(e[i].v)){d[j]=e[i];j++}};q d};w=6(){1 a=t(\'T\');h(i=0;i<a.k;i++){1 b=a[i];1 c=b.x.y;1 d=4.z(\'A\');1 e=4.B(c);d.9(e);1 f=4.z(\'A\');1 g=4.B(c);f.9(g);f.v="U";b.x.y=\'\';b.9(f);b.9(d)}};m(w);',57,57,'|var|window|if|document|__load_events|function|__load_timer|null|appendChild||||||||for|||length|test|addDOMLoadEvent|arguments|callee|done|return|addEventListener||getElementsByClass|new|className|createDropShadows|firstChild|data|createElement|span|createTextNode|true|clearInterval|DOMContentLoaded|false|WebKit|navigator|userAgent|setInterval|loaded|complete|readyState|10|onload|push|Array|getElementsByTagName|RegExp|highContrast|shadow'.split('|'),0,{}))
