var vZoom={images:new Object(),zoomArea:null,mouse:{left:0,top:0},displayImage:null,magnifyingGlass:null,magnifyingGlassImage:null,transparentOverlay:null,loadingArea:null,loadingAreaImage:null,iframe:null,fader:null,identity:-1,dontHide:true,activeProperties:{image:null,zoomImage:null,imagePlacement:null,scaleX:0,scaleY:0,magnifyingGlassBorderWidth:0,imageBorderWidth:0},matchImage:true,fadeSpeed:15,fadeStrength:5,offsetX:0,offsetY:0,init:function(){if(vZoom.magnifyingGlass){return}vZoom.magnifyingGlass=document.createElement("div");vZoom.magnifyingGlass.id="vZoomMagnifier";vZoom.magnifyingGlass.style.position="absolute";vZoom.magnifyingGlassImage=document.createElement("img");vZoom.magnifyingGlassImage.alt="";vZoom.magnifyingGlassImage.id="vZoomMagnifierImage";vZoom.magnifyingGlassImage.style.position="absolute";vZoom.magnifyingGlass.appendChild(vZoom.magnifyingGlassImage);vZoom.zoomArea=document.createElement("div");vZoom.zoomArea.id="vZoomArea";vZoom.zoomArea.style.display="none";vZoom.zoomArea.style.position="absolute";vZoom.zoomArea.style.overflow="hidden";vZoom.zoomArea.style.zIndex=5;vZoom.displayImage=document.createElement("img");vZoom.displayImage.alt="";vZoom.displayImage.style.position="absolute";vZoom.zoomArea.appendChild(vZoom.displayImage);vZoom.transparentOverlay=document.createElement("div");vZoom.transparentOverlay.id="vZoomTransparentOverlay";vZoom.transparentOverlay.style.display="none";vZoom.transparentOverlay.style.position="absolute";vZoom.loadingArea=document.createElement("div");vZoom.loadingArea.id="vZoomLoadingArea";vZoom.loadingArea.style.display="none";vZoom.loadingArea.style.position="absolute";vZoom.loadingArea.style.zIndex="1";vZoom.loadingArea.appendChild(vZoom.loadingAreaImage);vZoom.iframe=document.createElement("iframe");vZoom.iframe.frameBorder=0;vZoom.iframe.style.display="none";vZoom.iframe.style.position="absolute";vZoom.iframe.style.zIndex=4;document.body.appendChild(vZoom.transparentOverlay);document.body.appendChild(vZoom.magnifyingGlass);document.body.appendChild(vZoom.zoomArea);document.body.appendChild(vZoom.loadingArea);document.body.appendChild(vZoom.iframe);vZoom.setDefaults()},setDefaults:function(){if(typeof(vQwfdiUKfgdfP)!="string"){var a=vZoom.zoomArea.style;var c=vZoom.magnifyingGlass.style;var b=vZoom.transparentOverlay.style;a.borderWidth="1px";a.borderColor="#c1c1c1";a.borderStyle="solid";c.borderWidth="1px";c.borderColor="#c1c1c1";c.borderStyle="solid";c.cursor="pointer";c.overflow="hidden";b.opacity="0.50";b.backgroundColor="#cccccc";b.filter="alpha(opacity=50)";b.cursor="pointer";vZoom.matchImage=true;vZoom.fadeSpeed=15;vZoom.fadeStrength=5;vZoom.offsetX=0;vZoom.offsetY=0}},findZoomImage:function(a){a=a.toLowerCase();a=a.replace("t.jpg",".jpg");a=a.replace("-.jpg",".jpg");a=a.replace("t.gif",".gif");a=a.replace("-.gif",".gif");return a},filter:function(a){return a.toLowerCase();return a.toLowerCase().replace(/[\.\-\:\/]/g,"")},add:function(a,b){a=v$(a);a.onmouseover=vZoom.onmouseover;if(!vZoom.loadingAreaImage){vZoom.loadingAreaImage=document.createElement("img");vZoom.loadingAreaImage.src= (window['site_base_url']!=undefined?site_base_url:"")+"images/vzoom.gif"}if(b!=null){vZoom.preloadImage(a.src,b)}else{vZoom.preloadImage(a.src,vZoom.findZoomImage(a.src))}a.onload=null},preloadImage:function(b,c){if(b&&c){var e=new Image();var d=new Image();d.onerror=function(f){d.onerror=null;d.onload=null;d=null};d.onload=function(f){d.onload=null;d.loaded=true;if(vZoom.activeProperties.zoomImage==d){vZoom.loadingArea.style.display="none";vZoom.activeProperties.image.onmouseover(f)}};e.src=b;d.src=c;var a=vZoom.filter(e.src);if(!vZoom.images[a]){vZoom.images[a]=d}}},fadeIn:function(a){if(vZoom.fader){window.clearTimeout(vZoom.fader);vZoom.fader=null}vZoom.zoomArea.style.opacity=a/100;vZoom.zoomArea.style.filter="alpha(opacity="+a+")";vZoom.iframe.style.opacity=a/100;vZoom.iframe.style.filter="alpha(opacity="+a+")";if(a<100){vZoom.fader=window.setTimeout("vZoom.fadeIn("+(a+vZoom.fadeStrength)+");",vZoom.fadeSpeed)}},onmouseover:function(a){if(!document.getElementById('product_image_popup') || document.getElementById('product_image_popup').style.display == "none"){if(document.getElementById('product_image_popup')){if(document.getElementById('aftermarket_popup')) document.getElementById('aftermarket_popup').style.display='none';if(document.getElementById('pageyield_popup')) document.getElementById('pageyield_popup').style.display='none';if(document.getElementById('satisfaction_popup')) document.getElementById('satisfaction_popup').style.display='none';if(document.getElementById('product_image_popup')) document.getElementById('product_image_popup').style.display='none';}vZoom.init();var b=vZoom.filter(this.src);var d=vZoom.images[b];if(d==null){return}vZoom.setDefaults();var k=vPlacement(this);AttachEvent(document,"mousemove",vZoom.onmousemove);vZoom.activeProperties.image=this;vZoom.activeProperties.zoomImage=d;vZoom.activeProperties.imagePlacement=k;if(d.loaded!=true){vZoom.loadingArea.style.display="";vZoom.loadingArea.style.left=k.left+k.width/2-vZoom.loadingAreaImage.offsetWidth/2+"px";vZoom.loadingArea.style.top=k.top+k.height/2-vZoom.loadingAreaImage.offsetHeight/2+"px";return}else{vZoom.loadingArea.style.display="none";if(vZoom.displayImage.src!=d.src){vZoom.displayImage.src=d.src}}if(vZoom.magnifyingGlassImage.src!=this.src){vZoom.magnifyingGlassImage.src=this.src}vZoom.magnifyingGlass.style.display="";vZoom.zoomArea.style.display="";vZoom.transparentOverlay.style.display="";var e=document.documentElement.clientWidth||document.body.clientWidth;var l=document.documentElement.clientHeight||document.body.clientHeight;if(vZoom.matchImage){vZoom.zoomArea.style.width=k.width+"px";vZoom.zoomArea.style.height=k.height+"px";var c={width:vZoom.zoomArea.offsetWidth,height:vZoom.zoomArea.offsetHeight};if(c.width>k.width){vZoom.zoomArea.style.width=parseFloat(vZoom.zoomArea.style.width)-(c.width-k.width)+"px"}if(c.height>k.height){vZoom.zoomArea.style.height=parseFloat(vZoom.zoomArea.style.height)-(c.height-k.height)+"px"}}var c={width:vZoom.zoomArea.offsetWidth,height:vZoom.zoomArea.offsetHeight};var g=k.left+k.width+vZoom.offsetX;var f=k.top+vZoom.offsetY;if(g+c.width>e){g=k.left-c.width-vZoom.offsetX;f=k.top-vZoom.offsetY;if(g<0){g=k.left+vZoom.offsetX;f=k.top+k.height+vZoom.offsetY;if(f+c.height>l){g=k.left-vZoom.offsetX;f=k.top-c.height-vZoom.offsetY;if(f<0){g=k.left+k.width+vZoom.offsetX;f=k.top+vZoom.offsetY}}}}vZoom.zoomArea.style.left=g+"px";vZoom.zoomArea.style.top=f+"px";var j=(vZoom.displayImage.offsetWidth/k.width);var i=(vZoom.displayImage.offsetHeight/k.height);if(i<1.2||j<1.2){vZoom.hide(null,true);return}vZoom.magnifyingGlassImage.onmousedown=vZoom.activeProperties.image.onmousedown;vZoom.magnifyingGlassImage.onmouseup=vZoom.activeProperties.image.onmouseup;vZoom.magnifyingGlassImage.onclick=function(n){var n=window.event||n;if(vZoom.activeProperties.image.onclick){vZoom.activeProperties.image.onclick(n)}if(vZoom.activeProperties.image.parentNode.nodeName.toUpperCase()=="A"){var m=vZoom.activeProperties.image.parentNode;if(m.href){window.location.href=m.href}if(m.onclick){m.onclick(n)}}};if(vZoom.magnifyingGlass.currentStyle){vZoom.activeProperties.magnifyingGlassBorderWidth=parseFloat(vZoom.magnifyingGlass.currentStyle.borderTopWidth)||0;vZoom.activeProperties.imageBorderWidth=parseFloat(this.currentStyle.borderTopWidth)||0}else{if(document.defaultView&&document.defaultView.getComputedStyle){vZoom.activeProperties.magnifyingGlassBorderWidth=parseFloat(document.defaultView.getComputedStyle(vZoom.magnifyingGlass,null).getPropertyValue("border-top-width"))||0;vZoom.activeProperties.imageBorderWidth=parseFloat(document.defaultView.getComputedStyle(this,null).getPropertyValue("border-top-width"))||0}else{vZoom.activeProperties.magnifyingGlassBorderWidth=0;vZoom.activeProperties.imageBorderWidth=0}}vZoom.zoomArea.style.width="300px";vZoom.zoomArea.style.height="300px";var h;if(site_id!=undefined){switch(site_id){case 4:if(window.vzoom_top_offset){h=window.vzoom_top_offset}else{h=140}vZoom.zoomArea.style.left=(parseInt(vZoom.zoomArea.style.left)-135)+"px";vZoom.zoomArea.style.top=(parseInt(vZoom.zoomArea.style.top)+h)+"px";break;case 2:if(window.vzoom_top_offset){h=window.vzoom_top_offset}else{h=140}vZoom.zoomArea.style.left=(parseInt(vZoom.zoomArea.style.left)-120)+"px";vZoom.zoomArea.style.top=(parseInt(vZoom.zoomArea.style.top)+h)+"px";break;case 3:if(window.vzoom_top_offset){h=window.vzoom_top_offset}else{h=140}vZoom.zoomArea.style.left=(parseInt(vZoom.zoomArea.style.left)-120)+"px";vZoom.zoomArea.style.top=(parseInt(vZoom.zoomArea.style.top)+h)+"px";break;case 7:if(window.vzoom_top_offset){h=window.vzoom_top_offset}else{h=239}vzoom_left_offset=window.vzoom_left_offset?window.vzoom_left_offset:239;vZoom.zoomArea.style.left=(parseInt(vZoom.zoomArea.style.left)-vzoom_left_offset)+"px";vZoom.zoomArea.style.top=(parseInt(vZoom.zoomArea.style.top)+h)+"px";break;default:if(window.vzoom_top_offset){h=window.vzoom_top_offset}else{h=130}vZoom.zoomArea.style.left=(parseInt(vZoom.zoomArea.style.left)-120)+"px";vZoom.zoomArea.style.top=(parseInt(vZoom.zoomArea.style.top)+h)+"px";break}}vZoom.magnifyingGlass.style.width=(vZoom.zoomArea.offsetWidth/j)+vZoom.activeProperties.magnifyingGlassBorderWidth+"px";vZoom.magnifyingGlass.style.height=(vZoom.zoomArea.offsetHeight/i)+vZoom.activeProperties.magnifyingGlassBorderWidth+"px";vZoom.activeProperties.scaleX=j;vZoom.activeProperties.scaleY=i;vZoom.transparentOverlay.style.left=k.left+vZoom.activeProperties.imageBorderWidth+"px";vZoom.transparentOverlay.style.top=k.top+vZoom.activeProperties.imageBorderWidth+"px";vZoom.transparentOverlay.style.width=k.width-vZoom.activeProperties.imageBorderWidth*2+"px";vZoom.transparentOverlay.style.height=k.height-vZoom.activeProperties.imageBorderWidth*2+"px";vZoom.iframe.style.left=vZoom.zoomArea.style.left;vZoom.iframe.style.top=vZoom.zoomArea.style.top;vZoom.iframe.style.width=vZoom.zoomArea.offsetWidth;vZoom.iframe.style.height=vZoom.zoomArea.offsetHeight;vZoom.iframe.style.display="block";vZoom.onmousemove(a);if(d.loaded){vZoom.fadeIn(1)}}},hide:function(a,b){var c;if(a&&!b){c=a.srcElement?a.srcElement:a.target}if(b||(c!=vZoom.loadingAreaImage&&c!=null&&c!=document&&c!=vZoom.magnifyingGlass&&c!=vZoom.activeProperties.image&&c!=vZoom.magnifyingGlassImage&&c!=vZoom.transparentOverlay)){if(vZoom.dontHide&&c==vZoom.images[vZoom.filter(vZoom.activeProperties.image.src)]){vZoom.dontHide=false}else{vZoom.dontHide=false;DetachEvent(document,"mousemove",vZoom.onmousemove);vZoom.magnifyingGlass.style.display="none";vZoom.zoomArea.style.display="none";vZoom.transparentOverlay.style.display="none";vZoom.loadingArea.style.display="none";vZoom.iframe.style.display="none";vZoom.mouse.left=0;vZoom.mouse.top=0;vZoom.activeProperties={image:null,zoomImage:null,imagePlacement:null,scaleX:0,scaleY:0,magnifyingGlassBorderWidth:0};return true}}return false},onmousemove:function(a){var a=window.event||a;if(vZoom.hide(a)){return}if(a.clientX){var e=document.documentElement.scrollLeft||document.body.scrollLeft;var d=document.documentElement.scrollTop||document.body.scrollTop;e+=a.clientX;d+=a.clientY}else{var e=vZoom.mouse.left;var d=vZoom.mouse.top}vZoom.mouse.left=e;vZoom.mouse.top=d;var b=vZoom.filter(vZoom.activeProperties.image.src);if(vZoom.images[b].loaded!=true){return}var g=vZoom.magnifyingGlass;var c={width:g.offsetWidth,height:g.offsetHeight};var i=vZoom.activeProperties.imagePlacement;e-=c.width/2;d-=c.height/2;if(e<i.left+vZoom.activeProperties.imageBorderWidth){e=i.left+vZoom.activeProperties.imageBorderWidth}else{if(e>i.left+i.width-c.width-vZoom.activeProperties.imageBorderWidth){e=i.left+i.width-c.width-vZoom.activeProperties.imageBorderWidth}else{}}if(d<i.top+vZoom.activeProperties.imageBorderWidth){d=i.top+vZoom.activeProperties.imageBorderWidth}else{if(d>i.top+i.height-c.height-vZoom.activeProperties.imageBorderWidth){d=i.top+i.height-c.height-vZoom.activeProperties.imageBorderWidth}}g.style.left=e+"px";g.style.top=d+"px";e-=i.left;d-=i.top;if(e<0){e=0}if(d<0){d=0}e+=vZoom.activeProperties.magnifyingGlassBorderWidth;d+=vZoom.activeProperties.magnifyingGlassBorderWidth;var h=vZoom.activeProperties.scaleX;var f=vZoom.activeProperties.scaleY;vZoom.displayImage.style.left=-e*h+"px";vZoom.displayImage.style.top=-d*f+"px";vZoom.magnifyingGlassImage.style.left=parseFloat(i.left)-parseFloat(vZoom.magnifyingGlass.style.left)-vZoom.activeProperties.magnifyingGlassBorderWidth+vZoom.activeProperties.imageBorderWidth+"px";vZoom.magnifyingGlassImage.style.top=parseFloat(i.top)-parseFloat(vZoom.magnifyingGlass.style.top)-vZoom.activeProperties.magnifyingGlassBorderWidth+vZoom.activeProperties.imageBorderWidth+"px"}};function sprops(b){var d;var a="";for(d in b){a+="<br />"+d+":";try{a+=b[d]}catch(c){}}var f=document.createElement("div");f.innerHTML=a;document.body.appendChild(f)}function v$(a){if(typeof(a)=="string"){return document.getElementById(a)}else{return a}}function vPlacement(b){var a=false;if(navigator.vendor){if(navigator.vendor.toLowerCase().indexOf("apple")!=-1){a=true;var f=document.defaultView.getComputedStyle}}var e=b.offsetLeft;var d=b.offsetTop;var c=b.offsetParent;while(c){e+=c.offsetLeft;d+=c.offsetTop;if(document.all){if(c.nodeName.toUpperCase()=="TABLE"){e+=(parseFloat(c.border)||0)?1:0;d+=(parseFloat(c.border)||0)?1:0}}else{if(a){if(c.nodeName.toUpperCase()=="TD"||c.nodeName.toUpperCase()=="TABLE"){e+=parseFloat(f(c,null).getPropertyValue("border-left-width"))||0;d+=parseFloat(f(c,null).getPropertyValue("border-top-width"))||0}}}c=c.offsetParent}delete (c);return{left:e,top:d,width:b.offsetWidth,height:b.offsetHeight}}function AttachEvent(a,c,b){if(a.addEventListener){a.addEventListener(c.toLowerCase(),b,false)}else{a.attachEvent("on"+c.toLowerCase(),b)}}function DetachEvent(a,c,b){if(a.removeEventListener){a.removeEventListener(c.toLowerCase(),b,false)}else{a.detachEvent("on"+c.toLowerCase(),b)}};

