

function getQV(b,a){var f=a.replace("?","&");query=f.substring(1);var d=query.split("&");for(var c=0;c<d.length;c++){var e=d[c].split("=");if(e[0]==b){return e[1];}}}function switchKiosk(a){var c=a+"_reg";var b=a+"_kiosk";if(isKiosk){document.getElementById(c).style.display="none";document.getElementById(b).style.display="block";}}
function readCookie(b){var f=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var e=a[d];while(e.charAt(0)==" "){e=e.substring(1,e.length);}if(e.indexOf(f)==0){return e.substring(f.length,e.length);}}return null;}

function setCookie(b,c,a){var d=new Date();d.setDate(d.getDate()+a);document.cookie=b+"="+escape(c)+";domain=.bestbuy.com;"+((a==null)?"":";expires="+d.toGMTString());}GetCookie=readCookie;
function addOnloadEvent(b){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",b,false);}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",b);}else{if(window.onload!=null){var a=window.onload;window.onload=function(c){a(c);window[b]();};}else{window.onload=b;}}}}function getProtocol(){return secChannel;}function getPosiLeft(c){var b=c;var a=0;while(b){a+=b.offsetLeft;b=b.offsetParent;}return a;}function getPosiTop(c){var a=c;var b=0;while(a){b+=a.offsetTop;a=a.offsetParent;}return b;}function pbpop(c,d){var a=getPosiLeft(d);var b=(-300+a)>0?(-300+a):(150+a);c.style.left=b+"px";c.style.top=-100+getPosiTop(d)+"px";c.style.display="block";}function addCommas(b){x=b.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var a=/(\d+)(\d{3})/;while(a.test(x1)){x1=x1.replace(a,"$1"+","+"$2");}return x1+x2;}function calcSavings(a,c){var b=a-parseFloat(c.replace(/,/g,""));return b.toFixed(2);}function $$(a){return document.getElementById(a);}Function.prototype.bind=function(b){var c=this,a=function(){return c.apply(b,arguments);};return a;};BBY={};BBY.util={};BBY.util.prototype={setDisplay:function(b,a){b.style.display=a;},setStyleAtts:function(c,a,b){c.style[a]=b+"px";},getStyleAtts:function(b,a){return b.style[a];},changeOpacity:function(b,a){var c=b.style;c.opacity=(a/100);c.MozOpacity=(a/100);c.KhtmlOpacity=(a/100);c.filter="alpha(opacity="+a+")";},findPosition:function(a){var b=curtop=0;if(a.offsetParent){b=a.offsetLeft;curtop=a.offsetTop;firstparent=true;while(a=a.offsetParent){if(firstparent){b+=a.offsetLeft;firstparent=false;}curtop+=a.offsetTop;}}return[b,curtop];},findHeightWidth:function(c){var a=c.offsetHeight;var b=c.offsetWidth;return[a,b];}};BBY.util.Event={};BBY.util.Event.prototype={addListener:function(c,a,b){if(c.attachEvent){c.attachEvent("on"+a,b);}else{if(c.addEventListener){c.addEventListener(a,b,false);}else{return false;}}return true;},removeListener:function(c,a,b){if(c.detachEvent){c.detachEvent("on"+a,b);}else{if(c.removeEventListener){c.removeEventListener(a,b,false);}else{return false;}}return true;}};BBY.dhtml={};BBY.dhtml.Tween={};BBY.dhtml.Tween.prototype={easing:function(g,a,e,d,c){var f=a-g;var b=g+(Math.pow(((1/e)*d),c)*f);return Math.ceil(b);},bounce:function(e,a,c,b){var d=a-e;if((b/=c)<(1/2.75)){return d*(7.5625*b*b)+e;}else{if(b<(2/2.75)){return d*(7.5625*(b-=(1.5/2.75))*b+0.75)+e;}else{if(b<(2.5/2.75)){return d*(7.5625*(b-=(2.25/2.75))*b+0.9375)+e;}else{return d*(7.5625*(b-=(2.625/2.75))*b+0.984375)+e;}}}},back:function(f,a,d,b,c){var e=a-f;if(typeof c=="undefined"){c=1.70158;}return e*((b=b/d-1)*b*((c+1)*b+c)+1)+f;}};BBY.dhtml.Animation=function(a){this.init(a);};BBY.dhtml.Animation.prototype={init:function(a){this.now=new Date().getTime();this.framerate=a.framerate;this.seconds=a.seconds;this.end=this.now+this.seconds;this.domelement=a.domelement;this.duration=Math.round(this.end-this.now);this.totalframes=Math.round(this.duration/this.framerate);this.startpoint=a.from;this.endpoint=a.to;this.method=a.method;this.animation;this.currentframe=0;},animate:function(a){this.action=a;this.animation=setInterval(this[this.action].bind(this),this.framerate);},play:function(){this.currentframe++;this.towidth=BBY.dhtml.Tween.prototype[this.method](this.startpoint,this.endpoint,this.totalframes,this.currentframe,3);BBY.util.prototype.setStyleAtts(this.domelement,"height",this.towidth);if(this.currentframe>=this.totalframes){this.stop();}},rewind:function(){this.currentframe++;this.fromwidth=BBY.dhtml.Tween.prototype[this.method](this.endpoint,this.startpoint,this.totalframes,this.currentframe,1);BBY.util.prototype.setStyleAtts(this.domelement,"height",this.fromwidth);if(this.currentframe>=this.totalframes){this.stop();}},stop:function(){clearInterval(this.animation);this.currentframe=0;}};BBY.dhtml.PDPSlider=function(a){this.trigger=$$(""+a.triggerelement+"");this.animated=$$(""+a.animated+"");this.contentheight=parseInt($$(""+a.content+"").offsetHeight);this.method=a.method;this.isOpen=false;this.openslider=new BBY.dhtml.Animation({domelement:this.animated,framerate:50,seconds:300,to:this.contentheight,from:1,method:this.method});this.closeslider=new BBY.dhtml.Animation({domelement:this.animated,framerate:50,seconds:300,to:this.contentheight,from:1,method:this.method});BBY.util.Event.prototype.addListener(this.trigger,"click",this.animate.bind(this));};BBY.dhtml.PDPSlider.prototype={animate:function(){if(this.isOpen){this.closeslider.animate("rewind");this.isOpen=false;return false;}else{this.openslider.animate("play");this.isOpen=true;return false;}}};
BBY.dhtml.Carousel=function(a){this.visibleElements=a.visible;this.incrementNum=a.increment;this.contentFrame=$$(""+a.contentframe+"");this.prevButton=$$(""+a.backbutton+"");this.nextButton=$$(""+a.forwardbutton+"");this.carouselContent=a.content;this.isRunning=false;this.init();};BBY.dhtml.Carousel.prototype={init:function(){this.currentIndex=0;this.scrollIncrement=0;this.incrementValue=0;this.cols=$$(""+this.carouselContent+"").getElementsByTagName("li");this.checkDisable();BBY.util.Event.prototype.addListener(this.prevButton,"click",this.getPrev.bind(this));BBY.util.Event.prototype.addListener(this.nextButton,"click",this.getNext.bind(this));},getPrev:function(){this.width=this.cols[0].offsetWidth;if((this.currentIndex-this.incrementNum)<=0){this.currentIndex=0;}else{this.currentIndex=parseInt(this.currentIndex-(this.currentIndex-this.incrementNum));}this.scrollIncrement=parseInt(this.currentIndex*this.width);if(this.isRunning==true){return;}this.inter=setInterval(this.scrollPrev.bind(this),10);this.isRunning=true;},getNext:function(){this.width=this.cols[0].offsetWidth;this.currentIndex=parseInt((this.currentIndex+this.incrementNum));if((this.currentIndex+this.visibleElements)>=this.cols.length){this.currentIndex=this.currentIndex-((this.currentIndex+this.visibleElements)-this.cols.length);}this.scrollIncrement=parseInt(this.currentIndex*this.width);if(this.isRunning==true){return;}this.inter=setInterval(this.scrollNext.bind(this),10);this.isRunning=true;},scrollNext:function(){if(this.incrementValue>-(this.scrollIncrement)){this.incrementValue=this.incrementValue-15;this.contentFrame.style.left=this.incrementValue+"px";}else{clearInterval(this.inter);this.checkDisable();this.isRunning=false;}},scrollPrev:function(){if(this.incrementValue<-(this.scrollIncrement)){this.incrementValue=this.incrementValue+15;this.contentFrame.style.left=this.incrementValue+"px";}else{clearInterval(this.inter);this.checkDisable();this.isRunning=false;}},checkDisable:function(){var a=((this.currentIndex==0))?BBY.util.prototype.changeOpacity(this.prevButton,40):BBY.util.prototype.changeOpacity(this.prevButton,100);var b=((this.currentIndex+this.visibleElements)>=this.cols.length)?BBY.util.prototype.changeOpacity(this.nextButton,40):BBY.util.prototype.changeOpacity(this.nextButton,100);}};function abnchangeTab(b,f){var d=1;var g="";var a="";for(var d=1;d<=f;d++){g="abntab"+d;a="abntabcontent"+d;document.getElementById(g).className="";document.getElementById(a).style.display="none";}var c="abntab"+b;document.getElementById(c).className="active";var e="abntabcontent"+b;document.getElementById(e).style.display="block";}var currentObj;var popOverStyle;function initTooltipRollovers(){for(var a=0;a<arguments.length;a++){document.getElementById(""+arguments[a]+"").description=document.getElementById(""+arguments[a]+"_text");document.getElementById(""+arguments[a]+"").onmouseover=displayData;}}function setTooltipStyle(a){this.popOverStyle=a;}function displayData(a){if(currentObj==null){setOffset(a,this,this.description);setDisplay(this.description,"block");currentObj=this.description;this.description.onmouseout=hideDisplay;this.onmouseout=hidePopOver;}else{setDisplay(currentObj,"none");setOffset(a,this,this.description);setDisplay(this.description,"block");currentObj=this.description;this.description.onmouseout=hideDisplay;this.onmouseout=hidePopOver;}}function setOffset(d,b,c){var f=BBY.util.prototype.findPosition(b);var a=BBY.util.prototype.findHeightWidth(b);c.style.left=((f[0])+(a[1]*0.5))+"px";c.style.top=((f[1])+(a[0]*0.5))+"px";c.className=popOverStyle;}function hideDisplay(d){if(!d){var d=window.event;}var b=(window.event)?d.srcElement:d.target;var c=(window.event)?"className":"class";if(b.getAttribute(c)!="broadgroupcontentbox"){return;}var a=(d.relatedTarget)?d.relatedTarget:d.toElement;while(a.getAttribute(c)!=b.getAttribute(c)&&a.nodeName!="BODY"){a=a.parentNode;}if(a==b){return;}this.style.display="none";}function hidePopOver(b){if(!b){var b=window.event;}var a=(b.relatedTarget)?b.relatedTarget:b.toElement;var c=(b.relatedTarget)?b.relatedTarget:b.fromElement;if((a.nodeName=="TD")||(a.nodeName=="IMG")){this.description.style.display="none";}}function setDisplay(b,a){b.style.display=a;}