var popupWin=null;var strSealURL="weblogos.dnb.com";var sealID="42B6CC1B-9E18-459C-B173-9C61662B9E9F";var strDuns="024357563";var strRWSPath="express.dnbsearch.com";var strCountry="US";var increment="true";var RootLink="../";var RootLinkS="../";var timerlen=5;var slideAniLen=650;var timerID=new Array();var startTime=new Array();var obj=new Array();var endHeight=new Array();var moving=new Array();var dir=new Array();var flowAPI;var imageRowIndex=0;function ClearHtmlTags(){for(var a=0;a<document.forms[0].elements.length;a++){if(document.forms[0].elements[a].type=="text"||document.forms[0].elements[a].type=="textarea"){if(document.forms[0].elements[a].value.indexOf("<")>=0){do{document.forms[0][a].value=document.forms[0].elements[a].value.replace("<","&lt;")}while(document.forms[0].elements[a].value.indexOf("<")>=0)}if(document.forms[0].elements[a].value.indexOf(">")>=0){do{document.forms[0][a].value=document.forms[0].elements[a].value.replace(">","&gt;")}while(document.forms[0].elements[a].value.indexOf(">")>=0)}}}}function SubmitReview(){if(document.fCont.tName.value==""){alert("Enter a valid name");return}if(document.fCont.email.value==""){alert("Enter valid email address prior to submitting a review about the product.");document.fCont.email.focus;return}if(document.fCont.email.value.length<7){alert("Enter valid email address prior to submitting a review about the product.");document.fCont.email.focus;return}var a=document.fCont.email.value;if(a.indexOf("@")<1){alert("Enter valid email address prior to submitting a review about the product.");document.fCont.email.focus;return}if(a.indexOf(".")<3){alert("Enter valid email address prior to submitting a review about the product.");document.fCont.email.focus;return}if(document.fCont.Title.value==""){alert("Enter a valid title  about the product.");document.fCont.Title.focus;return}if(document.fCont.Review.value==""){alert("Enter a valid review  about the product.");document.fCont.Review.focus;return}document.fCont.submit()}function slidedown(a){if(moving[a]){return}if(document.getElementById(a).style.display=="block"){return}moving[a]=true;dir[a]="down";startslide(a)}function slideup(a){if(moving[a]){return}if(document.getElementById(a).style.display!="block"){return}moving[a]=true;dir[a]="up";startslide(a)}function startslide(a){obj[a]=document.getElementById(a);endHeight[a]=parseInt(obj[a].style.height);startTime[a]=(new Date()).getTime();if(dir[a]=="down"){obj[a].style.height="1px"}obj[a].style.display="block";timerID[a]=setInterval("slidetick('"+a+"');",timerlen)}function slidetick(a){var c=(new Date()).getTime()-startTime[a];if(c>slideAniLen){endSlide(a)}else{var b=Math.round(c/slideAniLen*endHeight[a]);if(dir[a]=="up"){b=endHeight[a]-b}obj[a].style.height=b+"px"}return}function endSlide(a){clearInterval(timerID[a]);if(dir[a]=="up"){obj[a].style.display="none"}obj[a].style.height=endHeight[a]+"px";delete (moving[a]);delete (timerID[a]);delete (startTime[a]);delete (endHeight[a]);delete (obj[a]);delete (dir[a]);return}function initializeSearchAjax(){var b={script:"searchAjax.aspx?",varname:"val",json:true,maxresults:35};var a=new bsn.AutoSuggest("tSearch",b)}function loadWishList(c,a,b){location.href="/wishlist-main.aspx?dept="+c+"&cat="+a+"&prod="+b+"&options="+getOptions(b)+"&personalize="+getPersonalize(b)}function resetLeftCountry(a){document.fLang.submit()}function resetCountry(a){location.href="orderform.asp?code="+a}function orderNow(d,b,c){var a="/preorderform.asp?dept="+d+"&cat="+b+"&prod="+c+"&options="+getOptions(c)+"&qty="+getQuantity(c)+"&personalize="+getPersonalize(c);location.href=a}function getPersonalize(a){var b="";for(var c=0;c<document.form2.elements.length;c++){if(document.form2.elements[c].name=="personalize_"+a){if(document.form2.elements[c].checked==true){return("yes")}}}return("no")}function openBig(b,c,a){if(popupWin!=null){popupWin.close();popupWin=null}popupWin=window.open(b,null,"left=0,top=0,width="+c+",height="+a+",toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes")}function openBig2(b,c,a){if(popupWin!=null){if(navigator.appName=="Netscape"){popupWin=null;popupWin=b;popupWin=window.open(b,null,"width="+c+",height="+a+",left="+screen.avalWidth-(c/2)+"screeny=0,top=0,screenx="+screen.avalWidth-(c/2)+",toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");popupWin.focus();popupWin=null;popupWin.close()}else{popupWin.close()}}popupWin=b;popupWin=window.open(b,null,"width="+c+",height="+a+",toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=520");if((navigator.appName!="Microsoft Internet Explorer")&&(navigator.appVersion.substring(0,1)=="3")){popupWin.focus()}}function SubmitMe(a){location.href=a}function mouseovertd(a){a.style.backgroundColor="#5f8cc7";a.style.cursor="hand";a.style.borderStyle="solid";a.style.borderColor="#003366";a.style.color="#ffffff"}function mouseouttd(a){a.style.backgroundColor="#ededed";a.style.color="#003366";a.style.borderColor="#e2e2e2"}function newscreen4(){window.open("","talk","width=300,height=204,resizable=no,scrollbars=auto")}function turnOn(imageName){if(document.images){document[imageName].src=eval(imageName+"on.src")}}function turnOff(imageName){if(document.images){document[imageName].src=eval(imageName+"off.src")}}function Rcertify(){popupWin=window.open("http://www.bbbonline.org/cks.asp?id=103082714133734521","Participant","location=yes,scrollbars=yes,width=450,height=300");window.name="opener"}function expBrand(b,c){var a=document.getElementById(c);if(a.style.display!="block"){slidedown(c)}else{slideup(c)}}function exp(c,d){var b=document.getElementsByTagName(c);var a=window.event;for(var e=0;e<a.children.length;e++){a.children[e].innerText=="4"?a.children[e].innerText="5":a.children[e].innerText="4"}for(var e=0;e<b.length;e++){if(b[e].getAttribute(d)=="yes"){b[e].style.display=="none"?b[e].style.display="block":b[e].style.display="none"}}}var expdate=new Date();expdate.setTime(expdate.getTime()+(24*60*60*1000*365));function setCookie(a,g,f,d,c,b){var e=a+"="+escape(g)+((f)?"; expires="+f.toGMTString():"")+((d)?"; path="+d:"")+((c)?"; domain="+c:"")+((b)?"; secure":"");document.cookie=e}function opacity(f,e,a,b){var c=Math.round(b/100);var d=0;if(e>a){for(i=e;i>=a;i--){setTimeout("changeOpac("+i+",'"+f+"')",(d*c));d++}}else{if(e<a){for(i=e;i<=a;i++){setTimeout("changeOpac("+i+",'"+f+"')",(d*c));d++}}}}function changeOpac(a,c){var b=document.getElementById(c).style;b.opacity=(a/100);b.MozOpacity=(a/100);b.KhtmlOpacity=(a/100);b.filter="alpha(opacity="+a+")"}function shiftOpacity(c,a,b){if(b==0){opacity(c,0,100,a)}else{opacity(c,100,0,a)}}function hideIt(e,c,l,d,f,m,a,j){var g=document.getElementById(e);if(c==1){shiftOpacity(e,1000,1)}else{g.style.opacity=0;g.style.display="block";var h=document.getElementById(j);var b=h.offsetTop;var k=h.offsetLeft;g.style.top=b+m+"px";g.style.left=getElementPosition("SwatchBox")+a+"px";g.style.zIndex=999;g.innerHTML="<table bgcolor='#ffffff' style='border-style:solid;border-width:1px;border-color:Black' cellpadding=2 cellspacing=0><tr><td align=center><img class='searchImage' src='"+f+"itemImages/"+l+"'/><span style='background-color:Black'><img src="+f+"images/1x1.gif style=' width:100%;height:1px' /></span></td></tr><tr><td align=center>"+d+"</td></tr></table>";shiftOpacity(e,1000,0)}}function getElementPosition(c){var a=document.getElementById(c);var b=0;var d=0;while(a){b+=a.offsetLeft;d+=a.offsetTop;a=a.offsetParent}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"){b+=document.body.leftMargin;d+=document.body.topMargin}return b}function orderMultiple(b){var a="";if(location.href.indexOf("?")<0){document.form2.action=location.href+"?add=1"+a}else{document.form2.action=location.href+a}document.form2.submit()}function cboLanguage_onchange(){document.fLang.txtLanguage.value=document.fLang.cboLanguage.value;document.fLang.submit();return true}function change_OptionValues(prod){for(var i=0;i<document.form2.elements.length;i++){if(document.form2.elements[i].name=="options_"+prod){var lblSKU=document.form2.elements[i][document.form2.elements[i].selectedIndex].value;lblSKU=lblSKU.toString().substring(lblSKU.toString().indexOf(";")+1);eval("document.getElementById('lblSKU_"+prod+"').innerHTML = lblSKU");var hiddenCosts=eval("document.form2.hidden_"+prod+".value");var myElement=document.form2.elements[i].selectedIndex;var myCost=hiddenCosts.split(";");eval("document.getElementById('lblSale_"+prod+"').innerHTML = '$' + CurrencyFormatted(myCost[myElement])");break}}}function CurrencyFormatted(c){var b=parseFloat(c);if(isNaN(b)){b=0}var a="";if(b<0){a="-"}b=Math.abs(b);b=parseInt((b+0.005)*100);b=b/100;s=new String(b);if(s.indexOf(".")<0){s+=".00"}if(s.indexOf(".")==(s.length-2)){s+="0"}s=a+s;return s}function change_OptionValuesProduct(prod){for(var i=0;i<document.form2.elements.length;i++){if(document.form2.elements[i].name=="options_"+prod){var lblSale=document.form2.elements[i][document.form2.elements[i].selectedIndex].text;var lblValue=document.form2.elements[i][document.form2.elements[i].selectedIndex].value;var hiddenCosts=eval("document.form2.hidden_"+prod+".value");var myElement=document.form2.elements[i].selectedIndex;var myCost=hiddenCosts.split(";");var mySKU=lblValue.split(";");eval("document.getElementById('lblSale_"+prod+"').innerHTML = '$' + CurrencyFormatted(myCost[myElement])");try{eval("document.all.lblSKU_"+prod+".innerHTML = mySKU[1]")}catch(exception){}break}}}function getOptions(a){var b="";for(var c=0;c<document.form2.elements.length;c++){if(document.form2.elements[c].name=="options_"+a){b=b+","+document.form2.elements[c][document.form2.elements[c].selectedIndex].value}}if(b.toString().substring(0,1)==","){b=b.substring(1)}return(b)}function getQuantity(a){var b="";for(var c=0;c<document.form2.elements.length;c++){if(document.form2.elements[c].name=="qty_"+a){b=document.form2.elements[c].value}}if(b==""){b=1}return(b)}function expHome(b,c){var a=document.getElementById(b);if(a.getAttribute(c)=="yes"){a.style.display=="none"?a.style.display="block":a.style.display="none"}}function expHomeImg(c,d){var b=document.getElementById(c);var a=document.getElementById("img"+c);if(b.style.display!="block"){if(a!=null){a.src="/images/red-x.gif"}}else{if(a!=null){a.src="/images/arrow-blue.gif"}}if(b.style.display!="block"){slidedown(c)}else{slideup(c)}}function OpenModalWindow(d,b,a){var c="";if(!c.closed&&c.location){c.location.href=d}else{c=window.open(d,"name","height="+a+",width="+b+",toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no");if(!c.opener){c.opener=self}}if(window.focus){c.focus()}return false}function ClosePopUp(a){opener.document.getElementById(a).value=document.getElementById("txtCatg").value;window.close();return true}function ClosePopUp2(a,b){opener.document.getElementById(a).value=document.getElementById("txtCatg").value;opener.raiseAsyncPostback();window.close();return true}var http=createRequestObject();function createRequestObject(){var b;try{b=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){b=null}}if(!b&&typeof XMLHttpRequest!="undefined"){b=new XMLHttpRequest()}return b}function sndRating(b,c){var d=document.getElementById("dvPage");d.innerHTML="<img src='images/progressimgred.gif'>";try{http.open("GET","ratingprocess.asp?id="+b+"&rateval="+c);http.onreadystatechange=handleResponseText;http.send(null)}catch(a){}finally{}}function handleResponseText(){if((http.readyState==4)&&(http.status==200)){var a=http.responseText;var b=new Array();if(a.indexOf("|")!=-1){b=a.split("|");var d=document.getElementById("dvPage");var f=document.getElementById("votDiv");var e=document.getElementById("bottomDiv");var c=document.getElementById("star"+b[0]);d.style.display="none";f.innerHTML=b[2];e.innerHTML=b[3];c.innerHTML=b[4].toString()}}}function showProductVideo(c){var b=document.getElementById("imageArea");b.style.display="none";var a=document.getElementById("videoArea");a.style.display="block";if(c!=""){flowAPI=flashembed("videoArea",{src:"/FlowPlayerLP.swf",width:400,height:300},{config:{videoFile:c}})}}function showProductImage(){var a=document.getElementById("imageArea");a.style.display="block";var b=document.getElementById("videoArea");b.style.display="none";if(flowAPI!=null){flashembed("videoArea",{src:"/FlowPlayerLP.swf",width:400,height:300},{config:{videoFile:null}})}}function swapImage(c,a,d){showProductImage();var b=document.getElementById("imageArea");b.innerHTML="<img alt='"+d+"' src='/sendbinary.asp?width="+a+"&path="+c+"' >"}function slideImagesLeft(){if(imageRowIndex<=0){return}document.getElementById("imageRow"+imageRowIndex.toString()).style.display="none";imageRowIndex--;document.getElementById("imageRow"+imageRowIndex.toString()).style.display="block"}function slideImagesRight(){var a=imageRowIndex+1;if(document.getElementById("imageRow"+a.toString())==null){return}document.getElementById("imageRow"+imageRowIndex.toString()).style.display="none";imageRowIndex++;document.getElementById("imageRow"+imageRowIndex.toString()).style.display="block"}function enterSearchText(a){var b=document.fSearch.tSearch;if(b.value==a){b.value=""}}function exitSearchText(a){var b=document.fSearch.tSearch;if(b.value==""){b.value=a}}function enterFieldText(b,a){var c=document.getElementById(a);if(c.value==b){c.value=""}}function exitFieldText(b,a){var c=document.getElementById(a);if(c.value==""){c.value=b}}function setCheckoutShipCostRadio(){if(document.getElementById("ctl00_content_lblFooterOrderTotal")){var e=0;var p=0;var c=0;var f=0;var k=0;var t=1;if(document.aspnetForm==null){return}if(document.aspnetForm=="undefined"){return}if(typeof(document.getElementById("ctl00_content_chargeTax"))!="undefined"){t=document.getElementById("ctl00_content_chargeTax").value}else{return}if(typeof(myState)=="undefined"){return}var j=0;if(document.getElementById("ctl00_content_coupon").value!=null){if(document.getElementById("ctl00_content_coupon").value!=""){j=parseFloat(document.getElementById("ctl00_content_coupon").value.replace("$","").replace(",",""))}}var o=setShipInsurance();var r=1;if(document.getElementById("ctl00_content_rateMultiplier").innerHTML!=null){if(document.getElementById("ctl00_content_rateMultiplier").innerHTML!=""){r=parseFloat(document.getElementById("ctl00_content_rateMultiplier").innerHTML.replace("$","").replace(",",""))}}var d=document.getElementsByName("optShip");if(d!="undefined"){for(c=0;c<d.length;c++){if(d[c].checked){var m=d[c].value;var g=m.split("|");e=parseFloat(g[1].replace("$","").replace(",","")*r)}f=1}jQuery("#ctl00_content_pnlExtraShippingMessages").show();jQuery("#ctl00_content_litShippingAdditionalMessageOnlyFreight").hide();jQuery("#ctl00_content_litShippingAdditionalMessageExpress").show()}var h=document.getElementsByName("optShipFreight");if(h!="undefined"){var l=false;for(c=0;c<h.length;c++){if(h[c].checked){l=true;var q=h[c].value;var b=q.split("|");e=e+parseFloat(b[1].replace("$","").replace(",","")*r)}}if(l==true){k=setShipWhiteGlove();e=e+k}if(f==0){jQuery("#ctl00_content_pnlExtraShippingMessages").show();jQuery("#ctl00_content_litShippingAdditionalMessageOnlyFreight").show();jQuery("#ctl00_content_litShippingAdditionalMessageExpress").hide()}}document.getElementById("ctl00_content_lblFooterOrderShipping").innerHTML="$"+CurrencyFormatted(parseFloat(e*r));var a=myShipURL.value;if(a==undefined){if(document.getElementById("ctl00_content_hdnSecureURL")!=undefined){a=document.getElementById("ctl00_content_hdnSecureURL").value}else{a=document.getElementById("hdnSecureURL").value}}p=(parseFloat(document.getElementById("ctl00_content_lblFooterItemTotal").innerHTML.replace("$","").replace(",",""))*r)-(parseFloat(j)*r);p=p+(o*r);p=p+(e*r);p=p+(k*r);if(myState.selectedIndex==0){if(t!="1"){if(document.getElementById("ctl00_content_originalTax")!=null){document.getElementById("ctl00_content_lblFooterOrderTax").innerHTML=document.getElementById("ctl00_content_originalTax").value}else{document.getElementById("ctl00_content_lblFooterOrderTax").innerHTML="$"+CurrencyFormatted(0)}}else{document.getElementById("ctl00_content_lblFooterOrderTax").innerHTML="$"+CurrencyFormatted(0)}}else{if(t=="1"){document.getElementById("ctl00_content_lblFooterOrderTax").innerHTML="$"+CurrencyFormatted(0)}else{loadTaxXMLDoc(a+"backadmin/netFunctions.asmx/calculateCityStateCountryAndTax?SessionID="+mySID.value+"&ShippingAmount="+e+"&CouponAmount="+j+"&ShippingInsurance="+o+"&RateMultiplier="+r+"&SalesTaxField=TOTAL&zipCode="+myZip.value)}}var n=document.getElementById("ctl00_content_txtGiftCardAmt");if(n!=null&&n.value!=null){if(n.value==""){n.value=0}p=p-parseFloat(n.value);if(p<0){p=0}}document.getElementById("ctl00_content_lblFooterOrderTotal").innerHTML="$"+CurrencyFormatted(p)}else{var d=document.getElementsByName("optShip");var e=0;var p=0;var k=0;p=parseFloat(document.getElementById("subTotal").value.replace("$",""));if(d!="undefined"){for(var c=0;c<d.length;c++){if(d[c].checked){var m=d[c].value;var g=m.split("|");e=parseFloat(g[1].replace("$","").replace(",",""));p=p+e}}}var h=document.getElementsByName("optShipFreight");if(h!="undefined"){var l=false;for(var c=0;c<h.length;c++){if(h[c].checked){l=true;var m=h[c].value;var g=m.split("|");e=parseFloat(g[1].replace("$","").replace(",",""));p=p+e}}if(l==true){k=setShipWhiteGlove();p=p+k}}document.getElementById("total").innerHTML="USD   $"+p.toFixed(2).toString()}}function setShipWhiteGlove(){var a=document.getElementById("chkWhiteGlove");var b=document.getElementById("txtWhiteGlove");var c=0;if(a!="undefined"){if(a.checked==false){c=0}else{c=parseFloat(b.value)}}return c}function CheckEmail(d){email=document.getElementById("txtemail");if(email==null){email=document.getElementById("NewsletterInput")}var b=email.value;var a=d+"Emailfunction.asp?Email="+b;var c=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(c.test(b)){loadEmail(a);return false}else{document.getElementById("emailresults").innerHTML="Please Enter a valid email address"}}function loadEmail(a){if(window.ActiveXObject){isIE=true;reqEmail=new ActiveXObject("Microsoft.XMLHTTP");if(reqEmail){reqEmail.onreadystatechange=processEmail;reqEmail.open("GET",a,true);reqEmail.send()}}else{if(window.XMLHttpRequest){reqEmail=new XMLHttpRequest();reqEmail.onreadystatechange=processEmail;reqEmail.open("GET",a,true);reqEmail.send(null)}}}function processEmail(){if(reqEmail.readyState==4){if(reqEmail.status==200){document.getElementById("emailresults").innerHTML=reqEmail.responseText}}}function replaceImage(a,b,c){document.getElementById(a).src="/getdynamicimage.aspx?path="+escape(c)+"&width="+b+"&height="+b}function replaceImageD(a,b,c){document.getElementById(a).src="/getdynamicimage.aspx?path="+escape(c)+"&dimensions="+b}function swapOptionImage(c,a,d,b){if(c!=""){document.getElementById(a).src="/getdynamicimage.aspx?path="+d+"&width="+c+"&height="+c}else{document.getElementById(a).src="/itemImages/"+d}document.form2.options_1.value=b}function swapOptionImageByGroup(imageSize,htmlID,imageName,ddlValue,GroupName){if(imageSize!=""){document.getElementById(htmlID).src="/getdynamicimage.aspx?path="+imageName+"&width="+imageSize+"&height="+imageSize}else{document.getElementById(htmlID).src="/itemImages/"+imageName}eval("document.getElementById('"+GroupName+"').value = '"+ddlValue+"'")}function swapOptions(c,a,b){var f=document.getElementById("hdn_"+b.value.replace(";",""));if(f==null||f.value==""){return}if(c!=""){try{document.getElementById(a).src="/getdynamicimage.aspx?path="+f.value+"&width="+c+"&height="+c}catch(d){}}else{document.getElementById(a).src="/itemImages/"+f.value}}function submitCartWithOptions(){var msg="Please select a valid color before adding this item to your cart.";if(typeof document.form2.options_1!="undefined"){if(document.form2.options_1.value==""){alert(msg);document.form2.options_1.focus();return}}if(typeof document.form2.checkacc!="undefined"){if(document.form2.checkacc.checked==true){var field="document.form2.options_"+document.form2.checkacc.value;if(eval(field).value==""){alert(msg);eval(field).focus();return}}}document.form2.submit()}function updateAmazonCart(a){var b="AmazonCartUpdate.aspx?sessionID="+a;if(window.ActiveXObject){isIE=true;try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){req=new ActiveXObject("Msxml2.XMLHTTP")}if(req){req.onreadystatechange=processReqChangeAmazon;req.open("GET",b,true);req.send()}}else{if(window.XMLHttpRequest){req=new XMLHttpRequest();req.onreadystatechange=processReqChangeAmazon;req.open("GET",b,true);req.send(null)}}return(true)}function processReqChangeAmazon(){return}jQuery.noConflict();jQuery(document).ready(function(){jQuery("#tSearch").keyup(function(){if(jQuery(this).val()!=""){jQuery("#tSearchUpdate").load("/User-Search-Parameters.aspx?tSearch="+jQuery(this).val(),function(){jQuery("#lstMatches li").click(function(){jQuery(this).children("span").remove();jQuery("#tSearch").val(jQuery(this).text());jQuery("#tSearchUpdate").hide().empty()})}).css("position","absolute").show()}else{jQuery("#tSearchUpdate").hide()}});jQuery(document).click(function(){jQuery("#tSearchUpdate").hide()})});(function($){$.fn.jqzoom=function(options){var settings={zoomType:"standard",zoomWidth:200,zoomHeight:200,xOffset:10,yOffset:0,position:"right",lens:true,lensReset:false,imageOpacity:0.2,title:true,alwaysOn:false,showEffect:"show",hideEffect:"hide",fadeinSpeed:"fast",fadeoutSpeed:"slow",preloadImages:true,showPreload:true,preloadText:"Loading zoom",preloadPosition:"center"};options=options||{};$.extend(settings,options);return this.each(function(){var a=$(this);var aTitle=a.attr("title");$(a).removeAttr("title");$(a).css("outline-style","none");var img=$("img",this);var imageTitle=img.attr("title");img.removeAttr("title");var smallimage=new Smallimage(img);var smallimagedata={};var btop=0;var bleft=0;var loader=null;loader=new Loader();var ZoomTitle=(trim(aTitle).length>0)?aTitle:(trim(imageTitle).length>0)?imageTitle:null;var ZoomTitleObj=new zoomTitle();var largeimage=new Largeimage(a[0].href);var lens=new Lens();var lensdata={};var largeimageloaded=false;var scale={};var stage=null;var running=false;var mousepos={};var firstime=0;var preloadshow=false;var isMouseDown=false;var dragstatus=false;smallimage.loadimage();$(this).click(function(){return false});$(this).hover(function(e){mousepos.x=e.pageX;mousepos.y=e.pageY;activate()},function(){deactivate()});if(settings.alwaysOn){setTimeout(function(){activate()},150)}function activate(){if(!running){smallimage.findborder();running=true;imageTitle=img.attr("title");img.removeAttr("title");aTitle=a.attr("title");$(a).removeAttr("title");if(!largeimage||$.browser.safari){largeimage=new Largeimage(a[0].href)}if(!largeimageloaded||$.browser.safari){largeimage.loadimage()}else{if(settings.zoomType!="innerzoom"){stage=new Stage();stage.activate()}lens=new Lens;lens.activate()}a[0].blur();return false}}function deactivate(){if(settings.zoomType=="reverse"&&!settings.alwaysOn){img.css({opacity:1})}if(!settings.alwaysOn){running=false;largeimageloaded=false;$(lens.node).unbind("mousemove");lens.remove();if($("div.jqZoomWindow").length>0){stage.remove()}if($("div.jqZoomTitle").length>0){ZoomTitleObj.remove()}img.attr("title",imageTitle);a.attr("title",aTitle);$().unbind();a.unbind("mousemove");firstime=0;if(jQuery(".zoom_ieframe").length>0){jQuery(".zoom_ieframe").remove()}}else{if(settings.lensReset){switch(settings.zoomType){case"innerzoom":largeimage.setcenter();break;default:lens.center();break}}}if(settings.alwaysOn){activate()}}function Smallimage(image){this.node=image[0];this.loadimage=function(){this.node.src=image[0].src};this.findborder=function(){var bordertop="";bordertop=$(img).css("border-top-width");btop="";var borderleft="";borderleft=$(img).css("border-left-width");bleft="";if(bordertop){for(i=0;i<3;i++){var x=[];x=bordertop.substr(i,1);if(isNaN(x)==false){btop=btop+""+bordertop.substr(i,1)}else{break}}}if(borderleft){for(i=0;i<3;i++){if(!isNaN(borderleft.substr(i,1))){bleft=bleft+borderleft.substr(i,1)}else{break}}}btop=(btop.length>0)?eval(btop):0;bleft=(bleft.length>0)?eval(bleft):0};this.node.onload=function(){a.css({cursor:"crosshair",display:"block"});if(a.css("position")!="absolute"&&a.parent().css("position")){a.css({cursor:"crosshair",position:"relative",display:"block"})}if(a.parent().css("position")!="absolute"){a.parent().css("position","relative")}else{}if($.browser.safari||$.browser.opera){$(img).css({position:"absolute",top:"0px",left:"0px"})}smallimagedata.w=$(this).width();smallimagedata.h=$(this).height();smallimagedata.h=$(this).height();smallimagedata.pos=$(this).offset();smallimagedata.pos.l=$(this).offset().left;smallimagedata.pos.t=$(this).offset().top;smallimagedata.pos.r=smallimagedata.w+smallimagedata.pos.l;smallimagedata.pos.b=smallimagedata.h+smallimagedata.pos.t;a.height(smallimagedata.h);a.width(smallimagedata.w);if(settings.preloadImages){largeimage.loadimage()}};return this}function Lens(){this.node=document.createElement("div");$(this.node).addClass("jqZoomPup");this.node.onerror=function(){$(lens.node).remove();lens=new Lens();lens.activate()};this.loadlens=function(){switch(settings.zoomType){case"reverse":this.image=new Image();this.image.src=smallimage.node.src;this.node.appendChild(this.image);$(this.node).css({opacity:1});break;case"innerzoom":this.image=new Image();this.image.src=largeimage.node.src;this.node.appendChild(this.image);$(this.node).css({opacity:1});break;default:break}switch(settings.zoomType){case"innerzoom":lensdata.w=smallimagedata.w;lensdata.h=smallimagedata.h;break;default:lensdata.w=(settings.zoomWidth)/scale.x;lensdata.h=(settings.zoomHeight)/scale.y;break}$(this.node).css({width:lensdata.w+"px",height:lensdata.h+"px",position:"absolute",display:"none",borderWidth:1+"px"});a.append(this.node)};return this}Lens.prototype.activate=function(){this.loadlens();switch(settings.zoomType){case"reverse":img.css({opacity:settings.imageOpacity});(settings.alwaysOn)?lens.center():lens.setposition(null);a.bind("mousemove",function(e){mousepos.x=e.pageX;mousepos.y=e.pageY;lens.setposition(e)});break;case"innerzoom":$(this.node).css({top:0,left:0});if(settings.title){ZoomTitleObj.loadtitle()}largeimage.setcenter();a.bind("mousemove",function(e){mousepos.x=e.pageX;mousepos.y=e.pageY;largeimage.setinner(e)});break;default:(settings.alwaysOn)?lens.center():lens.setposition(null);$(a).bind("mousemove",function(e){mousepos.x=e.pageX;mousepos.y=e.pageY;lens.setposition(e)});break}return this};Lens.prototype.setposition=function(e){if(e){mousepos.x=e.pageX;mousepos.y=e.pageY}if(firstime==0){var lensleft=(smallimagedata.w)/2-(lensdata.w)/2;var lenstop=(smallimagedata.h)/2-(lensdata.h)/2;$("div.jqZoomPup").show();if(settings.lens){this.node.style.visibility="visible"}else{this.node.style.visibility="hidden";$("div.jqZoomPup").hide()}firstime=1}else{var lensleft=mousepos.x-smallimagedata.pos.l-(lensdata.w)/2;var lenstop=mousepos.y-smallimagedata.pos.t-(lensdata.h)/2}if(overleft()){lensleft=0+bleft}else{if(overright()){if($.browser.msie){lensleft=smallimagedata.w-lensdata.w+bleft+1}else{lensleft=smallimagedata.w-lensdata.w+bleft-1}}}if(overtop()){lenstop=0+btop}else{if(overbottom()){if($.browser.msie){lenstop=smallimagedata.h-lensdata.h+btop+1}else{lenstop=smallimagedata.h-lensdata.h-1+btop}}}lensleft=parseInt(lensleft);lenstop=parseInt(lenstop);$("div.jqZoomPup",a).css({top:lenstop,left:lensleft});if(settings.zoomType=="reverse"){$("div.jqZoomPup img",a).css({position:"absolute",top:-(lenstop-btop+1),left:-(lensleft-bleft+1)})}this.node.style.left=lensleft+"px";this.node.style.top=lenstop+"px";largeimage.setposition();function overleft(){return mousepos.x-(lensdata.w+2*1)/2-bleft<smallimagedata.pos.l}function overright(){return mousepos.x+(lensdata.w+2*1)/2>smallimagedata.pos.r+bleft}function overtop(){return mousepos.y-(lensdata.h+2*1)/2-btop<smallimagedata.pos.t}function overbottom(){return mousepos.y+(lensdata.h+2*1)/2>smallimagedata.pos.b+btop}return this};Lens.prototype.center=function(){$("div.jqZoomPup",a).css("display","none");var lensleft=(smallimagedata.w)/2-(lensdata.w)/2;var lenstop=(smallimagedata.h)/2-(lensdata.h)/2;this.node.style.left=lensleft+"px";this.node.style.top=lenstop+"px";$("div.jqZoomPup",a).css({top:lenstop,left:lensleft});if(settings.zoomType=="reverse"){$("div.jqZoomPup img",a).css({position:"absolute",top:-(lenstop-btop+1),left:-(lensleft-bleft+1)})}largeimage.setposition();if($.browser.msie){$("div.jqZoomPup",a).show()}else{setTimeout(function(){$("div.jqZoomPup").fadeIn("fast")},10)}};Lens.prototype.getoffset=function(){var o={};o.left=parseInt(this.node.style.left);o.top=parseInt(this.node.style.top);return o};Lens.prototype.remove=function(){if(settings.zoomType=="innerzoom"){$("div.jqZoomPup",a).fadeOut("fast",function(){$(this).remove()})}else{$("div.jqZoomPup",a).remove()}};Lens.prototype.findborder=function(){var bordertop="";bordertop=$("div.jqZoomPup").css("borderTop");lensbtop="";var borderleft="";borderleft=$("div.jqZoomPup").css("borderLeft");lensbleft="";if($.browser.msie){var temp=bordertop.split(" ");bordertop=temp[1];var temp=borderleft.split(" ");borderleft=temp[1]}if(bordertop){for(i=0;i<3;i++){var x=[];x=bordertop.substr(i,1);if(isNaN(x)==false){lensbtop=lensbtop+""+bordertop.substr(i,1)}else{break}}}if(borderleft){for(i=0;i<3;i++){if(!isNaN(borderleft.substr(i,1))){lensbleft=lensbleft+borderleft.substr(i,1)}else{break}}}lensbtop=(lensbtop.length>0)?eval(lensbtop):0;lensbleft=(lensbleft.length>0)?eval(lensbleft):0};function Largeimage(url){this.url=url;this.node=new Image();this.loadimage=function(){if(!this.node){this.node=new Image()}this.node.style.position="absolute";this.node.style.display="none";this.node.style.left="-5000px";this.node.style.top="10px";loader=new Loader();if(settings.showPreload&&!preloadshow){loader.show();preloadshow=true}document.body.appendChild(this.node);this.node.src=this.url};this.node.onload=function(){this.style.display="block";var w=Math.round($(this).width());var h=Math.round($(this).height());this.style.display="none";scale.x=(w/smallimagedata.w);scale.y=(h/smallimagedata.h);if($("div.preload").length>0){$("div.preload").remove()}largeimageloaded=true;if(settings.zoomType!="innerzoom"&&running){stage=new Stage();stage.activate()}if(running){lens=new Lens();lens.activate()}if($("div.preload").length>0){$("div.preload").remove()}};return this}Largeimage.prototype.setposition=function(){this.node.style.left=Math.ceil(-scale.x*parseInt(lens.getoffset().left)+bleft)+"px";this.node.style.top=Math.ceil(-scale.y*parseInt(lens.getoffset().top)+btop)+"px"};Largeimage.prototype.setinner=function(e){this.node.style.left=Math.ceil(-scale.x*Math.abs(e.pageX-smallimagedata.pos.l))+"px";this.node.style.top=Math.ceil(-scale.y*Math.abs(e.pageY-smallimagedata.pos.t))+"px";$("div.jqZoomPup img",a).css({position:"absolute",top:this.node.style.top,left:this.node.style.left})};Largeimage.prototype.setcenter=function(){this.node.style.left=Math.ceil(-scale.x*Math.abs((smallimagedata.w)/2))+"px";this.node.style.top=Math.ceil(-scale.y*Math.abs((smallimagedata.h)/2))+"px";$("div.jqZoomPup img",a).css({position:"absolute",top:this.node.style.top,left:this.node.style.left})};function Stage(){var leftpos=smallimagedata.pos.l;var toppos=smallimagedata.pos.t;this.node=document.createElement("div");$(this.node).addClass("jqZoomWindow");$(this.node).css({position:"absolute",width:Math.round(settings.zoomWidth)+"px",height:Math.round(settings.zoomHeight)+"px",display:"none",zIndex:10000,overflow:"hidden"});switch(settings.position){case"right":leftpos=(smallimagedata.pos.r+Math.abs(settings.xOffset)+settings.zoomWidth<screen.width)?(smallimagedata.pos.l+smallimagedata.w+Math.abs(settings.xOffset)):(smallimagedata.pos.l-settings.zoomWidth-Math.abs(settings.xOffset));topwindow=smallimagedata.pos.t+settings.yOffset+settings.zoomHeight;toppos=(topwindow<screen.height&&topwindow>0)?smallimagedata.pos.t+settings.yOffset:smallimagedata.pos.t;break;case"left":leftpos=(smallimagedata.pos.l-Math.abs(settings.xOffset)-settings.zoomWidth>0)?(smallimagedata.pos.l-Math.abs(settings.xOffset)-settings.zoomWidth):(smallimagedata.pos.l+smallimagedata.w+Math.abs(settings.xOffset));topwindow=smallimagedata.pos.t+settings.yOffset+settings.zoomHeight;toppos=(topwindow<screen.height&&topwindow>0)?smallimagedata.pos.t+settings.yOffset:smallimagedata.pos.t;break;case"top":toppos=(smallimagedata.pos.t-Math.abs(settings.yOffset)-settings.zoomHeight>0)?(smallimagedata.pos.t-Math.abs(settings.yOffset)-settings.zoomHeight):(smallimagedata.pos.t+smallimagedata.h+Math.abs(settings.yOffset));leftwindow=smallimagedata.pos.l+settings.xOffset+settings.zoomWidth;leftpos=(leftwindow<screen.width&&leftwindow>0)?smallimagedata.pos.l+settings.xOffset:smallimagedata.pos.l;break;case"bottom":toppos=(smallimagedata.pos.b+Math.abs(settings.yOffset)+settings.zoomHeight<$("body").height())?(smallimagedata.pos.b+Math.abs(settings.yOffset)):(smallimagedata.pos.t-settings.zoomHeight-Math.abs(settings.yOffset));leftwindow=smallimagedata.pos.l+settings.xOffset+settings.zoomWidth;leftpos=(leftwindow<screen.width&&leftwindow>0)?smallimagedata.pos.l+settings.xOffset:smallimagedata.pos.l;break;default:leftpos=(smallimagedata.pos.l+smallimagedata.w+settings.xOffset+settings.zoomWidth<screen.width)?(smallimagedata.pos.l+smallimagedata.w+Math.abs(settings.xOffset)):(smallimagedata.pos.l-settings.zoomWidth-Math.abs(settings.xOffset));toppos=(smallimagedata.pos.b+Math.abs(settings.yOffset)+settings.zoomHeight<screen.height)?(smallimagedata.pos.b+Math.abs(settings.yOffset)):(smallimagedata.pos.t-settings.zoomHeight-Math.abs(settings.yOffset));break}this.node.style.left=leftpos+"px";this.node.style.top=toppos+"px";return this}Stage.prototype.activate=function(){if(!this.node.firstChild){this.node.appendChild(largeimage.node)}if(settings.title){ZoomTitleObj.loadtitle()}document.body.appendChild(this.node);switch(settings.showEffect){case"show":$(this.node).show();break;case"fadein":$(this.node).fadeIn(settings.fadeinSpeed);break;default:$(this.node).show();break}$(this.node).show();if($.browser.msie&&$.browser.version<7){this.ieframe=$('<iframe class="zoom_ieframe" frameborder="0" src="#"></iframe>').css({position:"absolute",left:this.node.style.left,top:this.node.style.top,zIndex:99,width:settings.zoomWidth,height:settings.zoomHeight}).insertBefore(this.node)}largeimage.node.style.display="block"};Stage.prototype.remove=function(){switch(settings.hideEffect){case"hide":$(".jqZoomWindow").remove();break;case"fadeout":$(".jqZoomWindow").fadeOut(settings.fadeoutSpeed);break;default:$(".jqZoomWindow").remove();break}};function zoomTitle(){this.node=jQuery("<div />").addClass("jqZoomTitle").html(""+ZoomTitle+"");this.loadtitle=function(){if(settings.zoomType=="innerzoom"){$(this.node).css({position:"absolute",top:smallimagedata.pos.b+3,left:(smallimagedata.pos.l+1),width:smallimagedata.w}).appendTo("body")}else{$(this.node).appendTo(stage.node)}}}zoomTitle.prototype.remove=function(){$(".jqZoomTitle").remove()};function Loader(){this.node=document.createElement("div");$(this.node).addClass("preload");$(this.node).html(settings.preloadText);$(this.node).appendTo("body").css("visibility","hidden");this.show=function(){switch(settings.preloadPosition){case"center":loadertop=smallimagedata.pos.t+(smallimagedata.h-$(this.node).height())/2;loaderleft=smallimagedata.pos.l+(smallimagedata.w-$(this.node).width())/2;break;default:var loaderoffset=this.getoffset();loadertop=!isNaN(loaderoffset.top)?smallimagedata.pos.t+loaderoffset.top:smallimagedata.pos.t+0;loaderleft=!isNaN(loaderoffset.left)?smallimagedata.pos.l+loaderoffset.left:smallimagedata.pos.l+0;break}$(this.node).css({top:loadertop,left:loaderleft,position:"absolute",visibility:"visible"})};return this}Loader.prototype.getoffset=function(){var o=null;o=$("div.preload").offset();return o}})}})(jQuery);function trim(a){while(a.substring(0,1)==" "){a=a.substring(1,a.length)}while(a.substring(a.length-1,a.length)==" "){a=a.substring(0,a.length-1)}return a}function verifyOption(){if(jQuery("#selectOption")){if(jQuery("#selectOption").val()=="0"){alert("Please make a selection");return false}}return true}function replaceImageAndZoom(a){jQuery("#imgMain").attr("src","../getdynamicimage.aspx?path="+a+"&width=350&height=250");jQuery("#imgZoom").attr("href","/itemimages/"+a)}function formatCurrency(c){var b=parseFloat(c);if(isNaN(b)){b=0}var a="";if(b<0){a="-"}b=Math.abs(b);b=parseInt((b+0.005)*100);b=b/100;s=new String(b);if(s.indexOf(".")<0){s+=".00"}if(s.indexOf(".")==(s.length-2)){s+="0"}s=a+s;return s}function toggleProductTab(a,b){if(jQuery("#"+a).hasClass("Description")){jQuery("#"+a).hide().removeClass("Description")}jQuery(".mainTab").each(function(d,c){if(jQuery(c).is("#"+a)){jQuery(c).show()}else{jQuery(c).hide()}})}function setOption(a){jQuery("#options").val(jQuery("#option_"+a).val());newStockStatus=jQuery("#option_"+a+"_stock").val();jQuery("#stockStatus").html("&nbsp;"+newStockStatus);if(jQuery("#option_"+a+"_extra")){var g=jQuery("#option_"+a+"_extra").val();var h=g.split(";")[0];var b=g.split(";")[1];var f=g.split(";")[2];if(f!=""){jQuery("#imgMain").attr("src","../getdynamicimage.aspx?path="+f+"&width=350&height=250")}else{jQuery("#imgMain").attr("src","../getdynamicimage.aspx?path="+jQuery("#defaultImage").val()+"&width=350&height=250")}if(jQuery("#useOffset").val()=="yes"){if(parseFloat(h)>=0){var d=parseFloat(jQuery("#baseList").val())+parseFloat(h);var e=parseFloat(jQuery("#basePrice").val())+parseFloat(h);if(jQuery("#ListPrice")){jQuery("#ListPrice").html("List Price: $"+formatCurrency(d))}jQuery("#Price").html("Our Price: $"+formatCurrency(e))}}else{var d=parseFloat(b);var e=parseFloat(jQuery("#basePrice").val())+parseFloat(h);var c=d-e;if(jQuery("#ListPrice")){jQuery("#ListPrice").html("List Price: $"+formatCurrency(d))}jQuery("#Price").html("Our Price: $"+formatCurrency(e));jQuery("#YouSave").html("You Save: $"+formatCurrency(c))}}}function toggleAcc(a){if(jQuery("#check_"+a).attr("checked")){jQuery("#accOptions_"+a).show();if(jQuery("#selectOption_"+a)){setAccOption(jQuery("#selectOption_"+a).val(),a)}}else{jQuery("#accOptions_"+a).hide();if(jQuery("#selectOption_"+a)){setAccOption(-1,a)}}}function setAccOption(c,a){if(c>-1){jQuery("#options_"+a).val(jQuery("#accOption_"+c).val());if(jQuery("#accOption_"+c+"_extra")){var b=jQuery("#accOption_"+c+"_extra").val();if(parseFloat(b)>=0){jQuery("#sale_"+a).html("$"+formatCurrency(parseFloat(jQuery("#baseSale_"+a).val())+parseFloat(b)))}}}else{jQuery("#options_"+a).val("");jQuery("#sale_"+a).html("from $"+formatCurrency(jQuery("#baseSale_"+a).val()))}buildAccList()}function buildAccList(){var c="";var d="";if(jQuery("#verifyAcc").val()!=""){var b=jQuery("#verifyAcc").val().split(",");for(index in b){var a=b[index];if(jQuery("#check_"+a).attr("checked")){if(c!=""){c+="::";d+=";"}c+=a+"**";if(jQuery("#options_"+a)){c+=jQuery("#options_"+a).val()}d+="1"}}jQuery("#accList").val(c);jQuery("#accQty").val(d)}}jQuery(document).ready(function(){var a=false;var c='<span class="emptyOptionText"><img src="/images/design/button_add-to-cart.gif" /></span>';var b='<div class="alertBox"><span class="closeBtn">close</span><span class="alertText">Please choose your option(s) before adding to cart.</span></div>';jQuery('#selectOption option[value=""]').attr("selected","selected");if(jQuery("#selectOption").length>0){jQuery("#AddToCart input").hide();jQuery("#AddToCart").append(c);jQuery("#selectOption").change(function(){if(jQuery("#selectOption").attr("value")!=""){jQuery(".emptyOptionText").hide();jQuery("#AddToCart input").show();jQuery("#OptionsBox label").css("color","#000")}else{jQuery(".emptyOptionText").show();jQuery("#AddToCart input").hide();jQuery("#OptionsBox label").css("color","#f00")}})}jQuery(".emptyOptionText img").live("click",function(){if(a==false){jQuery(this).parent().append(b);a=true}});jQuery(".alertBox .closeBtn").live("click",function(){jQuery(".alertBox").remove();a=false})});jQuery(document).ready(function(){jQuery(".SubGridOrderItems").first().css("display","block")});function maToggleOrder(a){jQuery("#SubGridOrderItems_"+a).children(".SubGridOrderItems").toggle("blind",500);if(jQuery("#SubGridOrderImage_"+a).css("display")=="none"){jQuery("#SubGridOrderImage_"+a).src="/images/subscriptions/toggle_plus.png"}else{jQuery("#SubGridOrderImage_"+a).src="/images/subscriptions/toggle_minus.png"}}function maReorder(a,b){if(a.length==0){alert("There was an error processing your reorder.  Please check with the system administrator.")}else{jQuery.ajax({url:"/Member/Reorder.aspx?c="+a,error:function(c){alert("There was an error processing your reorder.  Please check with the system administrator.")},success:function(c){document.location="/preorderform.asp"}})}};
