if(typeof root=='undefined'){var root="/";var couponHelpContent="<ul class='spacingSmall'><li class='noBg'><strong>Instant Coupons:</strong></li>";couponHelpContent+="<li>Are not transferable and may not be used on sale items, other discounts, coupons, promotions plus, office machines, computer software and hardware, custom printed products or special order items unless specifically stated on the offer.</li>";couponHelpContent+="<li>Have one-time redemption unless specifically stated on the offer.</li>";couponHelpContent+="<li>Only one type of discount coupon, 'Percentage Off' or 'Dollars Off' coupon per order.</li>";couponHelpContent+="<li>Can not be redeemed after the expiration date.</li>";couponHelpContent+="<li>Must be submitted at time of order and are void where prohibited.</li>";couponHelpContent+="<li>Do not include tax.</li></ul>";couponHelpContent+="<p><strong>"+"$COMPANY_NAME$"+".com reserves the right to reject orders that use an Instant Coupon that was obtained from a bulletin board or other Internet site. ";couponHelpContent+="$COMPANY_NAME$"+".com also reserves the right to reject orders with an Instant coupon that was transferred from a direct mail recipient or is in violation of any coupon restriction listed above. Instant Coupons are not valid on special order items.</strong></p>";var openAccountContent="<ul class='spacingSmall'><li class='noBg'><strong>Select this option for Open Account credit terms</strong></li>";openAccountContent+="<li>"+"$COMPANY_NAME$"+" Open Account credit terms for Businesses only.</li>";openAccountContent+="<li>Subject to credit approval.</li>";openAccountContent+="<li>Once credit is approved, most orders ship same day.</li>";openAccountContent+="<li>Invoice mails separately within two days of shipment.</li>";openAccountContent+="<li>Invoice payment due Net 30 days.</li></ul>";openAccountContent+="<ul class='spacingSmall'><li class='noBg'><strong>Applying for an Open Account credit terms is simple</strong></li>";openAccountContent+="<li>Select the Invoice My Account option and complete your order.</li>";openAccountContent+="<li>We'll automatically begin processing your request.</li>";openAccountContent+="<li>If there are any questions, a friendly "+"$COMPANY_NAME$"+" representative will contact you.</li>";openAccountContent+="<li>Not all businesses will qualify for an Open Account credit terms.</li>";var checkoutNoAjaxHeader="Are you having problems checking out?";var checkoutNoAjax="<p>Some older operating systems or browser versions may not perform as well with the latest Web 2.0 technology on the new "+"$COMPANY_NAME$"+".com.</p> <p class='spacingSmall'>Please click <a class='txtBold underline' href='/Checkout/CheckoutOrder.aspx'>here</a> to access our more simplified version of checkout if you are experiencing any of the following:</p><ul class='marginLeft'><li><strong> Delays with page loading</strong></li><li><strong>Credit card validation</strong></li><li><strong>Updating your information</strong></li></ul><p> If you are still unable to check out, please click the chat icon or contact us at "+"$CONTACT_INFO$"+".</p>";}
var Resource={ajax:{controlCallback:'/ajax/ajaxcontrolcallback.aspx',searchSuggest:'/ajax/searchSuggest.aspx',popUpScripts:'/ajax/PopUpScripts.aspx',postbackError:'/ajax/StorePostbackError.aspx',inkTonerSearchSuggest:'/ajax/inkTonerSearchSuggest.aspx',QView:'/ajax/QViewScripts.aspx',Finder:'/ajax/Finder.aspx',InkAndToner:'/ajax/InkTonerFinder.aspx'},page:{cookiesRequired:'/cookiesrequired.aspx',contentPages:'/content/iw/site/',error404:'/404.aspx',missingInfo:'Please correct the missing or invalid information.',invalidEmailInfo:'Email address and Verify Email address does not match.  Please re-enter.',invalidPassword:'Password and Verify Password does not match.  Please re-enter.',invalidUserName:'The below User Name is already being used. If you have registered previously and want to log in, please click on the Login link above. If you are new to $COMPANY_NAME$.com, please select another User Name.',invalidSourceCode:'The below Source code is invalid.  Please re-enter.'},checkoutErrMsg:{selectAccount:"Please select your payment method.",fillCreditCardInfo:"Please enter your Credit card information."},checkoutTitle:{accountType:"Account Type",accountContactType:"Account Type",sourceCode:"Source Code",checkoutOrder:checkoutNoAjaxHeader,checkoutOrder1:checkoutNoAjaxHeader,checkoutOrder2:checkoutNoAjaxHeader,checkoutOrder3:checkoutNoAjaxHeader,checkoutOrder4:checkoutNoAjaxHeader,specialTruckDelivery:"Standard Tailgate Delivery",customerAssisted:"Driver-Assisted Delivery",whiteGlove:"White-Glove Delivery",securityCode:"Security Code",openAccountLink:"Invoice My Account",couponRestrictions:"Coupon Restrictions",freightSummaryMsg:"Freight (Special Truck Delivery)",ShredderHelpMsg:"Learn More",totalFSMsg:"Total (Special Truck Delivery)",freightAnonMsg:"Freight",taxAnonMsg:"Estimated Tax",totalAnonMsg:"Total",totalCouponMsg:"Total",taxExempt:"Tax Exempt",freightTruckFailure:"Freight",freightQtyFailure:"Freight",savingStoryMsg:"Saving Story",savingStoryMsgPCP:"",couponSummary:"Coupon Summary",multDelEst:"Delivery Estimates",subtituteMsg:"Subtitute Item",cdUpchargeMsg:"Deal Details",RewardsStoryMsg:"Quill Rewards&reg; Points"},checkoutContent:{accountType:"Select 'Business' if you are purchasing for use by your company or home-based business.<br><br>Select 'Personal' if you are purchasing for non-business use.",accountContactType:"Select 'Business' if you are purchasing for use by your company or home-based business.<br><br>Select 'Personal' if you are purchasing for non-business use.",sourceCode:"Please enter a Source Code if indicated on your print media or if you have one provided by a Sales Representative.",checkoutOrder:checkoutNoAjax,checkoutOrder1:checkoutNoAjax,checkoutOrder2:checkoutNoAjax,checkoutOrder3:checkoutNoAjax,checkoutOrder4:checkoutNoAjax,specialTruckDelivery:"Our most economical choice: the driver will bring your furniture to the tailgate of the truck. It is the customer's responsibility to unload and bring it into the building.<br>We recommend this choice if you have a loading dock and the staff available to take the merchandise off of the truck.",customerAssisted:"Only $25!  A step-up in service from our tailgate delivery option: the driver will assist you in carrying the merchandise to the ground floor of your building.<br>We recommend this choice if you do NOT have the staff available to take the merchandise off of the truck and inside your building. Fireproof file cabinets and safes: additional options and charges may apply.  A customer service representative will contact you with options.",whiteGlove:"Our ultimate delivery experience includes the delivery, assembly and installation of your furniture in a single visit. In addition, it is scheduled at your convenience and also includes the removal of all packaging.  Once your order is received, a furniture specialist will contact you to discuss this delivery option and provide you with a quote.",securityCode:"This is the security code on back or your card (waiting for this message)",openAccountLink:openAccountContent,couponRestrictions:couponHelpContent,freightSummaryMsg:"",totalFSMsg:"Your FINAL order total, including any discount coupons that apply, applicable freight and sales tax, will appear on your Order Confirmation email.",freightAnonMsg:"If your merchandise total is over $45 or more and shipping within the contiguous United States, ground freight will be free on most items except furniture. Your freight charge will display once you enter your shipping and account information.",taxAnonMsg:"$COMPANY_NAME$ collects tax unless we have a tax exemption certificate on file, or you are shipping to a state that does not collect state or local sales tax. The exact amount of tax will be included in your Final Order Confirmation.<br><br>Tax Exempt?<br>Simply fax or email your tax exemption certificate to our tax department and, once we receive it, any tax charged to your account will be credited.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email:&nbsp;taxexempt@$DOMAIN$.com<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fax:&nbsp;&nbsp;&nbsp;&nbsp;$CONTACT_INFO$.<br><br>If we already have your tax exemption certificate on file, and this is your first order on $DOMAIN$.com, your Online Order Recap will show sales tax, but your Order Confirmation e-mail will reflect the correct final pricing with no tax.",totalAnonMsg:"Your Final Total will display once you enter your shipping and account information.",totalCouponMsg:"Your FINAL order total, including any discount coupons that apply, applicable freight and sales tax, will appear on your Order Confirmation email.",taxExempt:"Fax your tax exempt letter to 1-800-499-8805. Once we receive your certificate, any tax charged to your account will be credited. If it's your first time to use "+"$COMPANY_NAME$"+".com, your Online Order Recap will show sales tax, but your Order Confirmation e-mail will reflect the correct final pricing with no tax.",freightTruckFailure:"Sorry we are unable to calculate your freight charges at this time.  You will be contacted by a Customer Service Representative to review the options and charges associated with truck freight delivery.",freightQtyFailure:"Sorry we are unable to calculate your freight charges at this time. Your Order Confirmation email will include any applicable freight charges.",savingStoryMsg:"All coupons, sale pricing, and other discounts are reflected in this savings total.",savingStoryMsgPCP:"Your special pricing discount, exclusive coupons, sale pricing, and other discounts are reflected in this savings total.",multDelEst:"",subtituteMsg:"<span>To ensure your order is delivered in the fastest possible time, we occasionally will substitute your request with an item of equal or greater value.<br>You will be charged the same amount as your original request. <br>We apologize for any inconvenience.</span>",cdUpchargeMsg:"",RewardsStoryMsg:"Points are accumulated once your order has been invoiced and may take up to 2 business days to appear in your points balance.<br><br>Want to <a href='/rewards/landing.aspx'>redeem points</a> now?",ShredderHelpMsg:""},checkoutPosition:{accountType:"bottomleft",accountContactType:"bottomleft",sourceCode:"bottomleft",checkoutOrder:"bottomright",checkoutOrder1:"bottomright",checkoutOrder2:"bottomright",checkoutOrder3:"bottomright",checkoutOrder4:"bottomright",specialTruckDelivery:"bottomleft",customerAssisted:"bottomleft",whiteGlove:"bottomleft",securityCode:"bottomright",openAccountLink:"topleft",couponRestrictions:"topright",freightSummaryMsg:"bottomright",totalFSMsg:"bottomright",freightAnonMsg:"bottomright",taxAnonMsg:"bottomright",totalAnonMsg:"bottomright",totalCouponMsg:"bottomright",taxExempt:"bottomright",freightTruckFailure:"bottomright",freightQtyFailure:"bottomright",savingStoryMsg:"bottomright",savingStoryMsgPCP:"bottomright",couponSummary:"bottomleft",multDelEst:"bottomleft",subtituteMsg:"bottomleft",cdUpchargeMsg:"bottomleft",RewardsStoryMsg:"bottomright",ShredderHelpMsg:"bottomleft"}};
document.write("<div id='dhtmltooltip' style='display:none;'></div>");var prevTimerID=0;function KeyDownHandler(btn){if(event.keyCode==13){event.returnValue=false;event.cancel=true;btn.click();}}
function CheckCompare(obj,SKUsToCompare){var objSKUsToCompare=document.getElementById(SKUsToCompare);var arrSKUsToCompare=objSKUsToCompare.value.split(",");if((arrSKUsToCompare.length<2)||(arrSKUsToCompare.length>20)){var strErrorMessage,strNumOfItemsErrorMessage="";if(arrSKUsToCompare[0].length>0)strNumOfItemsErrorMessage="You have chosen <strong>"+arrSKUsToCompare.length+"</strong> item(s).<br/>";if(arrSKUsToCompare.length<2)strErrorMessage=strNumOfItemsErrorMessage+"Please choose at least <strong>2</strong> items to compare.";else strErrorMessage=strNumOfItemsErrorMessage+"You can choose choose a maximum of <strong>20</strong> items to compare.";var width=300;ddrivetip(obj,strErrorMessage,width);return false;}
else{return true;}}
function IsNumeric(obj){var validChars="0123456789";var currentChar;var replaceWith='';var input=obj.value;var width=120;for(i=0;i<input.length;i++){currentChar=input.charAt(i);if(validChars.indexOf(currentChar)==-1){ddrivetip(obj,'Please enter a valid number',width);obj.value=replaceWith;break;}
else
replaceWith+=currentChar;}}
function validateZipCode(ziptestBox){var zipcodeobj=document.getElementById(ziptestBox);var width=150;if(zipcodeobj!=null){var zipcode=zipcodeobj.value;if(zipcode.length==5&&zipcode!='00000'){return true;}
else{ddrivetip(zipcodeobj,'Zip code should be a valid five digit number',width);return false;}}}
function IsQtyNumeric(obj,tip){var validChars="0123456789";var currentChar;var replaceWith='';var input=obj.value;var width=120;if(!tip)tip='Please enter a valid quantity';for(i=0;i<input.length;i++){currentChar=input.charAt(i);if(validChars.indexOf(currentChar)==-1){ddrivetip(obj,tip,width);obj.value=replaceWith;break;}
else
replaceWith+=currentChar;}}
function IsNumericFieldEmpty(obj){var input=obj.value;var width=120;if(input.length<1){ddrivetip(obj,'Please enter a valid number',width);return true;}
else{return false;}}
function IsQtyNumericFieldEmpty(obj){var input=obj.value;var width=120;if(input.length<1){ddrivetip(obj,'Please enter a valid quantity',width);return true;}
else{return false;}}
function validateZipPnl(obj){var width=180;textbox=document.getElementById(obj);var zipcode=document.getElementById(obj).value;if(zipcode.length==5&&zipcode!='00000'){return true;}
else{ddrivetip(textbox,'Zip code should be a valid five digit number.',width);return false;}}
function ddrivetip(obj,thetext,width){InitializeTimer();var tooltip=document.getElementById('dhtmltooltip');tooltip.style.display="";tooltip.style.width=width+"px";tooltip.innerHTML="<div class='dhtmltooltipFore'>"+thetext+"<span></span></div>";var button=$(obj);repositionTOOLTIP(button,tooltip);}
function repositionTOOLTIP(objAnchor,divToReposition){$(divToReposition).className='';var scrollTop=getScrollTop();var top=222;var left=222;var findPos=getOffset(objAnchor);var curLeft=findPos['x'];var curTop=findPos['y'];if((curTop+divToReposition.clientHeight)>=(document.documentElement.clientHeight+scrollTop)-40){$(divToReposition).className+=' top';var top=(curTop-objAnchor.clientHeight-$(divToReposition).clientHeight-5);}
else{top=curTop+objAnchor.clientHeight+10;}
if((curLeft)>=(document.documentElement.clientWidth/2)){left=curLeft-divToReposition.clientWidth+objAnchor.clientWidth;}
else{$(divToReposition).className+=' left';left=curLeft;}
divToReposition.style.left=left+"px";divToReposition.style.top=top+"px";}
function hideddrivetip(){var tooltip=document.getElementById('dhtmltooltip');tooltip.style.display='none';tooltip.style.left='-3000px';tooltip.style.innerHTML='';}
var secs
var timerID=null
var timerRunning=false
var delay=1000
function InitializeTimer(){secs=3
StopTheClock()
StartTheTimer()}
function StopTheClock(){if(timerRunning)clearTimeout(timerID)
timerRunning=false}
function StartTheTimer(){if(secs==0){StopTheClock();hideddrivetip();}
else{self.status=secs
secs=secs-1
timerRunning=true
timerID=self.setTimeout("StartTheTimer()",delay)}}
function PositElem(obj){var availHeight;var availWidth;if(typeof(window.innerWidth)=='number'){availHeight=window.innerHeight;availWidth=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){availHeight=document.documentElement.clientHeight;availWidth=document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){availHeight=document.body.clientHeight;availWidth=document.body.clientWidth;}
var indicatorHeight=50;var left=(availWidth/2);if(left>100)left=left-100;var top=(availHeight/2)+document.documentElement.scrollTop-(indicatorHeight/2);var indicator=document.getElementById(obj);indicator.style.position="absolute";indicator.style.zIndex="999";indicator.style.top=top+"px";indicator.style.left=left+"px";indicator.style.display="block";}
function PositElem1(obj){var availHeight;var availWidth;if(typeof(window.innerWidth)=='number'){availHeight=window.innerHeight;availWidth=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){availHeight=document.documentElement.clientHeight;availWidth=document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){availHeight=document.body.clientHeight;availWidth=document.body.clientWidth;}
var left=(availWidth/3);var indicatorHeight=350;var indicator=$(obj);var top=availHeight+document.documentElement.scrollTop-indicatorHeight;top=top/2;indicator.style.position="absolute";indicator.style.top=top+"px";indicator.style.left=left+"px";indicator.style.display="block";}
function tryShow(findNumber,imgName,obj,Xpos,Ypos){if(imgName!="")showDetails("imageDetails",findNumber,imgName,obj,Xpos,Ypos);}
function ShowItemImage(requestObject){var detailText=requestObject.responseText.split("|");var imgName=detailText[0];var findNumber=detailText[1];if(imgName!="")showDetails("imageDetails",findNumber,imgName,tdObj,20,20);}
function showDetails(divName,findNumber,imgName,obj,Xpos,Ypos){if(!document.getElementById(divName)){var newNode=document.createElement("div");newNode.setAttribute("id","imageDetails");document.body.appendChild(newNode);var divTag=document.getElementById("imageDetails");var curtop=0;var curleft=0;function findPosY(obj){if($||document.all){while(obj){curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(document.layers)curtop+=obj.y;return curtop;}
function findPosX(obj){if($||document.all){while(obj){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(document.layers)curleft+=obj.x;return curleft;}
findPosY(obj);findPosX(obj)
divTag.style.position="absolute";divTag.style.left=curleft+Xpos+"px";divTag.style.top=curtop+Ypos+"px";var HTMLString="<div style='padding:2px;border:1px solid #333;display:block;;background:#fff;z-index:100;'>";HTMLString=HTMLString+"<img src ='"+imgName+"'><br/>";HTMLString=HTMLString+"Item # "+findNumber;HTMLString=HTMLString+"</div>";divTag.innerHTML=HTMLString;}
return true;}
function hideImages(){try{document.body.style.cursor="auto";hideDetails();}
catch(e){}}
function hideDetails(){var divTag=document.getElementById("imageDetails");if(divTag){var parentObj=divTag.parentNode;parentObj.removeChild(divTag);}
return true}
function processCallBackError(returnmessage,context){if(context=="server"){alert("Callback Error: "+returnmessage+", "+context);}
else{alert("Callback Error: "+returnmessage+", "+context);}}
function openWindow(){window.open('/preferredbenefits','pcp','menubar=no,width=660,height=400,resizable=1,scrollbars=yes,toolbar=no,left=100,top=100');}
function getposOffset(overlay,offsettype){var totaloffset=(offsettype=="left")?overlay.offsetLeft:overlay.offsetTop;var parentEl=overlay.offsetParent;while(parentEl!=null){totaloffset=(offsettype=="left")?totaloffset+parentEl.offsetLeft:totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}
return totaloffset;}
function overlay(curobj,subobjstr,opt_position){overlayclose(subobjstr);if($){var subobj=$(subobjstr);subobj.style.display="block";var xpos=getposOffset(curobj,"left")+((typeof opt_position!="undefined"&&opt_position.indexOf("right")!=-1)?-(subobj.offsetWidth-curobj.offsetWidth):0);var ypos=getposOffset(curobj,"top")+((typeof opt_position!="undefined"&&opt_position.indexOf("bottom")!=-1)?curobj.offsetHeight:0);if(curobj.id=="couponSummary"){xpos=xpos-110;ypos=ypos+36;}
else if(curobj.id=="couponRestrictions"){ypos=ypos-330;}
else if(curobj.id=="multDelEst"||curobj.id=="cdUpchargeMsg"){ypos=getMouseY(ypos)+10;}
else if(curobj.id=="ShredderHelpMsg"){if(eval(xpos)>900){xpos=xpos-60;}}
subobj.style.left=xpos+"px";subobj.style.top=ypos+"px";return false;}
else
return true;}
function getMouseY(ypos){if(navigator.appName=="Microsoft Internet Explorer"){return event.clientY;}
else{if(ypos>800)return 400;else return ypos;}}
function overlayclose(subobjstr){if($(subobjstr)){$(subobjstr).style.display="none";}
if($("pnlFInder"))QView.prototype.showDropDowns();$('helpTitle').innerHTML="";$('helpContent').innerHTML="";}
function showWhatisthis(anchor){var helpTitle=eval("Resource.checkoutTitle."+anchor.id);var helpContent=eval("Resource.checkoutContent."+anchor.id);var helpPosition=eval("Resource.checkoutPosition."+anchor.id);if($('CompanyNameHidden')){if($('CompanyNameHidden').value.toLowerCase()=="map"){helpContent=replaceAll(helpContent,'$COMPANY_NAME$','Medical Arts Press');helpContent=replaceAll(helpContent,'$CONTACT_INFO$','800-328-2179 ext 7386');helpContent=replaceAll(helpContent,'$DOMAIN$','medicalartspress');}
else{helpContent=replaceAll(helpContent,'$COMPANY_NAME$',$('CompanyNameHidden').value);helpContent=replaceAll(helpContent,'$CONTACT_INFO$','800-982-3400 option 2');helpContent=replaceAll(helpContent,'$DOMAIN$','quill');}}
var url=document.URL;url=url.toLowerCase();if(url.indexOf('cart.aspx')>0){helpContent=helpContent.replace('exclusive coupons,','');}
$("WhatIsThis").style.display="block";MiniSKUMiniCartPopUp.repositionDIV($("WhatIsThis"),anchor);$('helpTitle').innerHTML=helpTitle;$('helpContent').innerHTML=helpContent;}
function showWhatisthisMsg(anchor,helpContent){var helpTitle=eval("Resource.checkoutTitle."+anchor.id);var helpPosition=eval("Resource.checkoutPosition."+anchor.id);$("WhatIsThis").style.display="block";MiniSKUMiniCartPopUp.repositionDIV($("WhatIsThis"),anchor);if(anchor.id=="ShredderHelpMsg")QView.prototype.hideDropDowns();$('helpTitle').innerHTML=helpTitle;$('helpContent').innerHTML=helpContent;}
function replaceAll(id,v1,v2){var i=id.indexOf(v1);while(i>-1){id=id.replace(v1,v2);i=id.indexOf(v1,i+v2.length+1);}
return id;}
function trimAll(sString){sString=sString.replace(/[^a-z A-Z 0-9]+/g,'');while(sString.substring(0,1)==' '){sString=sString.substring(1,sString.length);}
while(sString.substring(sString.length-1,sString.length)==' '){sString=sString.substring(0,sString.length-1);}
return sString;}
function ltrimrtrim(str){str=str.replace(/^\s+|\s+$/g,"");return str;}
function setFocusTo(control){Field=control;setTimeout("Field.focus();",1);}
function showErrorMessage(paneName,id,errMsg){$(paneName+'ErrorInfo').innerHTML=errMsg;$(paneName+'ErrorMessage').style.display='block';setFocusTo(id);return false;}
function processMyError(returnmessage,context){window.location="/default.aspx";}
var TabMenuConst=function(){}
TabMenuConst.prototype={currentTab:null,currentTabPanel:null,tabID:null,panlID:null,init:function(tabID,id,panlID){this.tabID=tabID;this.panlID=panlID;var tab;var tabPanel;if($(tabID+id))this.currentTab=$(tabID+id);var n=0;if($(panlID+id)){this.currentTabPanel=$(panlID+id);while($(panlID+n)){if($(panlID+n)&&$(tabID+n)){$(panlID+n).className="noDisplay";$(tabID+n).className="tabNotSelected";}
if(n==9)break;n++}}
else if($(panlID+"_ctl0"+id+"_TabPanel")){this.currentTabPanel=$(panlID+"_ctl0"+id+"_TabPanel")
while($(panlID+"_ctl0"+n+"_TabPanel")){if($(panlID+"_ctl0"+n+"_TabPanel")&&$(tabID+n)){$(panlID+"_ctl0"+n+"_TabPanel").className="noDisplay";$(tabID+n).className="tabNotSelected";}
if(n==9)break;n++}}
else
return false;if(this.currentTab){this.currentTab.className="tabSelected";this.currentTabPanel.className="dispaly";}
initScrollbars();},tabClick:function(id){var nextTab=$(this.tabID+id);if($(this.panlID+id))var nextTabPanel=$(this.panlID+id)
else if($(this.panlID+"_ctl0"+id+"_TabPanel"))var nextTabPanel=$(this.panlID+"_ctl0"+id+"_TabPanel");else return false;if(this.currentTab){this.currentTab.className="tabNotSelected"
this.currentTabPanel.className="noDisplay"}
nextTab.className="tabSelected"
nextTabPanel.className="display";this.currentTab=nextTab;this.currentTabPanel=nextTabPanel;initScrollbars();}}
function ie6SelectFix(div,state){div=$(div);if(div){if(div.className.match("ie6HideDropDowns")&&state==1)div.className=div.className.replace(" ie6HideDropDowns","");else if(!div.className.match("ie6HideDropDowns")&&state==0)div.className+=" ie6HideDropDowns";}}
var accordion={headerClick:function(header,index){var nextPanel=header.parentNode;var currentPanel;if(nextPanel.className=="AcPanelSelected"||animEffect2.z)return false;var panels=header.parentNode.parentNode.childNodes;for(var i=panels.length;i--;){if(panels[i].className=="AcPanelSelected")currentPanel=panels[i];}
var nextContent=$next(header,"div");var currentContent=$next($first(currentPanel,"div"),"div");currentPanel.className="AcPanel";nextPanel.className="AcPanelSelected"
currentContent.style.display="block";var start=new Array;var end=new Array;var dCurrent=getDimensions(currentContent);var dNext=getDimensions(nextContent);start[0]=dCurrent.height;start[1]=0;end[0]=0;end[1]=dNext.height;nextContent.style.height="0px";animEffect2.init(start,end,function(v){currentContent.style.height=v[0]+"px";nextContent.style.height=v[1]+"px";},10,function(){currentContent.style.display="";currentContent.style.height="";});PromoMiniSkuTrack(index);}}
var customUI={drop_down_max:4,init:function(){},select_init:function(el){var input=$(el.getAttribute("rel"));var a=$first(el,"A");var options=input.options;var ul=$first($first(el,"DIV"),"UL");a.innerHTML=options[options.selectedIndex].innerHTML;eventAdd(el,"click",function(event){customUI.select_click(el,event,a,options,ul,input);})
eventAdd(a,"blur",function(event){customUI.select_click(el,a,options,ul,input,null);})
var str="";for(var i=0;i<options.length;i++){str+="<li id="+i+">"+options[i].innerHTML+"</li>"}
ul.innerHTML=str;},select_click:function(el,event,a,options,ul,input){if(event==null)event=window.event
var btn=event.target!=null?event.target:event.srcElement;if(btn.tagName=="A"){a.focus();if(el.className.match("SelectExpand"))el.className="customSelect";else el.className="customSelect SelectExpand";}
else{if(btn.id&&btn.tagName=="LI"){a.innerHTML=options[btn.id].innerHTML;input.selectedIndex=btn.id;input.onchange();}
menuTimeout=setTimeout(function(){el.className="customSelect";},200);}},reset_selected:function(ul){var lis=ul.getElementsByTagName("LI");for(var i=lis.length;i--;){lis[i].className="";}},check_key:function(el,event,a,options,ul,input){if(el.className.Match("SelectExpand"))return false;var current;var lis=ul.getElementsByTagName("LI");for(var i=lis.length;i--;){if(lis[i].className=="fieldSelected")current=lis[i];}
if(event.keyCode==40&&$next(current)){current.className="";current=$next(current);a.innerHTML=current.innerHTML;current.className="fieldSelected";}
else if(event.keyCode==38&&$prev(current)){current.className="";current=$prev(current);a.innerHTML=current.innerHTML;current.className="fieldSelected";}
else if(event.keyCode==13){a.blur();customUI.submitSelected(el,a,options,ul,input,current);}},toggle_box:function(className){}}

var funcEmpty=function(){};var Class={create:function(){return function(){this.initialize.apply(this,arguments);}},createOnLoad:function(){return function(){var t=this;var a=arguments;onLoad(function(){t.initialize.apply(t,a);});}}};Object.extend=function(destination,source){for(var property in source){destination[property]=source[property];}
return destination;};Object.extend(String.prototype,{strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},startsWith:function(str){return(this.match("^"+str)==str)}});Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}};Function.prototype.bindAsEventListener=function(object){var __method=this,args=$A(arguments),object=args.shift();return function(event){var e=event||window.event;if(!e.target)e.target=e.srcElement;if(e.clientX&&!e.pageX){var s=getScrollPos();e.pageX=e.clientX-s.x;e.pageY=e.clientY-s.y;}
return __method.apply(object,[e].concat(args).concat($A(arguments)));}};var $A=Array.from=function(iterable){if(!iterable)return[];if(iterable.toArray){return iterable.toArray();}else{var results=[];for(var i=0,length=iterable.length;i<length;i++)results.push(iterable[i]);return results;}};var Form={serialize:function(form){form=$(form);var elem,elems=form.elements;var length=elems.length;var out='';for(var i=0;i<length;i++){elem=elems[i];out+=(i>0?'&':'')+encodeURIComponent(elem.name)+'='+encodeURIComponent(elem.value);}
return out;}};function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)elements.push($(arguments[i]));return elements;}
if(typeof element=='string')element=document.getElementById(element);return element;}
function $first(parent,type){parent=$(parent);type=type.toUpperCase();var e=parent.firstChild;while(e&&e.nodeName.toUpperCase()!=type)e=e.nextSibling;return e;}
function $last(parent,type){parent=$(parent);type=type.toUpperCase();var e=parent.lastChild;while(e&&e.nodeName.toUpperCase()!=type)e=e.previousSibling;return e;}
function $next(element,loop,reverse){element=$(element);var sibling=element;do{sibling=reverse?sibling.previousSibling:sibling.nextSibling;if(sibling==null)if(loop)sibling=reverse?element.parentNode.lastChild:element.parentNode.firstChild;else return null;if(sibling.nodeName==element.nodeName)return sibling;}while(true)}
function $prev(element,loop){return $next(element,loop,1);}
var $previous=$prev;function getElementsByClassNameInElement(strTagName,strClassName,id){var arrElements=(strTagName=="*"&&document.all)?document.all:document.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)&&(oElement.parentNode.id==id)){arrReturnElements.push(oElement);}}
return(arrReturnElements);}
function $findUp(element,type,stop){element=$(element);type=type.toUpperCase();do{if(!element||element==stop)return null;if(element.nodeName.toUpperCase()==type)return element;element=element.parentNode;}while(true)}
function getDimensions(element,bypassTopLeft){var results={};results.top=results.left=0;if(!bypassTopLeft)for(e=$(element);e!=null;e=e.offsetParent){results.top+=e.offsetTop;results.left+=e.offsetLeft;}
var element=$(element);if(element.style.display!='none'){results.width=element.offsetWidth;results.height=element.offsetHeight;}else{var els=element.style;var origVis=els.visibility;var origPos=els.position;els.visibility='hidden';els.position='absolute';els.display='';results.width=element.clientWidth;results.height=element.clientHeight;els.display='none';els.position=origPos;els.visibility=origVis;}
results.right=results.left+results.width;results.bottom=results.top+results.height;return results;}
function getScrollPos(){return{x:window.pageXOffset?window.pageXOffset:document.body&&document.body.scrollLeft?document.body.scrollLeft:document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:0,y:window.pageYOffset?window.pageYOffset:document.body&&document.body.scrollTop?document.body.scrollTop:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:0}}
var Ajax={getTransport:function(){var req;try{req=new XMLHttpRequest();return req;}catch(e){}
try{req=new ActiveXObject('Msxml2.XMLHTTP');return req;}catch(e){}
try{req=new ActiveXObject('Microsoft.XMLHTTP');return req;}catch(e){}
return false;}};Ajax.Request=Class.create();Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Request.prototype={initialize:function(url,options){this.transport=Ajax.getTransport();this.setOptions(options);if(url!=undefined)this.request(url);},setOptions:function(options){this.options={method:'POST',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:''};Object.extend(this.options,options||{});this.options.method=this.options.method.toUpperCase();},request:function(url){var params=this.options.parameters;this.url=url;if(this.options.method=='GET'&&params.length>0)this.url+=(this.url.indexOf('?')>=0?'&':'?')+params;try{this.transport.open(this.options.method,this.url,this.options.asynchronous,this.options.username,this.options.password);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var body=this.options.method=='POST'?(this.options.postBody||params):null;this.transport.send(body);if(!this.options.asynchronous&&this.transport.overrideMimeType)this.onStateChange();}
catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1)this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.options.method=='POST'){headers['Content-type']=this.options.contentType+(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)headers['Connection']='close';}
for(var name in headers)this.transport.setRequestHeader(name,headers[name]);},success:function(){return(!this.transport.status||(this.transport.status>=200&&this.transport.status<300));},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(state=='Complete'){if((this.getHeader('Content-type')||'').strip().match(/^application\/json(;.*)?$/i))json=this.evalJSONResponse();try{(this.options['on'+(this.success()?'Success':'Failure')]||funcEmpty)(transport,json,this.options);}catch(e){this.dispatchException(e);}}
try{(this.options['on'+state]||funcEmpty)(transport,json,this.options);}catch(e){this.dispatchException(e);}
if(state=='Complete'){if((this.getHeader('Content-type')||'').strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))this.evalResponse();this.transport.onreadystatechange=funcEmpty;}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null}},evalJSON:function(){try{var json=this.getHeader('X-JSON');return json?eval('('+json+')'):null;}catch(e){return null}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},evalJSONResponse:function(){try{return eval('('+this.transport.responseText+')');}catch(e){return null}},dispatchException:function(exception){(this.options.onException||funcEmpty)(this,exception);}};function eventAdd(element,eType,fn){var el=$(element);if(el.addEventListener){el.addEventListener(eType,fn,false);return true;}else if(el.attachEvent){return el.attachEvent('on'+eType,fn);}else{el['on'+eType]=fn;}}
function eventStopProp(e){if(e&&e.stopPropogation)e.stopPropogation();else if(window.event)window.event.cancelBubble=true;else if(e.cancelBubble)e.cancelBubble=true;}
function eventStopDef(e){if(e&&e.preventDefault)e.preventDefault();else if(window.event&&window.event.returnValue)window.event.ReturnValue=false;}
function onLoad(f){eventAdd(window,'load',f);}
function $clear(node){node=$(node);if(node.hasChildNodes())while(node.childNodes.length>=1)node.removeChild(node.firstChild);}
function $replace(element,html){element=$(element);if(element){$clear(element);element.innerHTML=html;}}
function ProcessEnter(ev,formID){var key=ev.which?ev.which:ev.keyCode;if(key==13){var f=$(formID);if(f)f.submit();return false;}
return true;}
function addBookmark(title,url){if(!title)title=document.title;if(!url)url=location.href;if(window.sidebar)window.sidebar.addPanel(title,url,"");else if(window.opera&&window.print){var elem=document.createElement('a');elem.setAttribute('href',url);elem.setAttribute('title',title);elem.setAttribute('rel','sidebar');elem.click();}
else if(document.all)window.external.AddFavorite(url,title);}
function getElementsByClassName(strTagName,strClassName){var arrElements=(strTagName=="*"&&document.all)?document.all:document.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)){arrReturnElements.push(oElement);}}
return(arrReturnElements);}
function escapeHtml(htmlText){var self=arguments.callee;if(self.escapeDiv){self.escapeText.nodeValue=htmlText;}else{self.escapeDiv=document.createElement('div');self.escapeText=document.createTextNode('');self.escapeText.nodeValue=htmlText;self.escapeDiv.appendChild(self.escapeText);}
return self.escapeDiv.innerHTML;}
var thispage=document.location.toString();if(!document.cookie&&thispage.indexOf(Resource.page.cookiesRequired)<0&&thispage.indexOf(Resource.page.contentPages)<0&&thispage.indexOf(Resource.page.error404)<0){document.cookie='testcookie=1; path=/; ';if(!document.cookie)window.location=Resource.page.cookiesRequired;}
var handlePostback={customErrorHandler:null,hooked:false,internalErrorHandler:function(sender,args){if(!args)return;var theError=args.get_error();if(theError){var theResponse=args.get_response();var errorMessage='N/A';var statusCode='N/A';var requestUrl='N/A';var requestBody='N/A';var responseBody='N/A';var responseHeaders='N/A';var docCookies='N/A';if(theError&&theResponse){try{errorMessage=theError.message;}catch(e){}
try{statusCode=theResponse.get_statusCode();}catch(e){}
try{requestUrl=theResponse.get_webRequest().getResolvedUrl();}catch(e){}
try{requestBody=theResponse.get_webRequest().get_body();if(requestBody.length>10003)requestBody=requestBody.substr(0,10000)+"...";}catch(e){}
try{responseBody=theResponse.get_responseData();if(responseBody.length>10003)responseBody=responseBody.substr(0,10000)+"...";}catch(e){}
try{responseHeaders=theResponse.getAllResponseHeaders();}catch(e){}
try{docCookies=document.cookie;}catch(e){}
var postbackReport="s="+encodeURIComponent(statusCode)+"&m="+encodeURIComponent(errorMessage)+"&ru="+encodeURIComponent(requestUrl)+"&rb="+encodeURIComponent(requestBody)+"&h="+encodeURIComponent(responseHeaders)+"&c="+encodeURIComponent(docCookies)+"&b="+encodeURIComponent(responseBody);var ajax=new Ajax.Request(Resource.ajax.postbackError,{parameters:postbackReport});}
args.set_errorHandled(true);if(handlePostback.customErrorHandler!=null)handlePostback.customErrorHandler(statusCode,errorMessage,requestBody);}},hookError:function(customHandler){if(typeof(Sys)=='undefined')return;if(customHandler)handlePostback.customErrorHandler=customHandler;if(handlePostback.hooked)return;handlePostback.hooked=true;var s=Sys;if(!s)return;s=s.WebForms;if(!s)return;s=s.PageRequestManager;if(!s)return;s=s.getInstance();if(!s)return;if(s.add_endRequest)s.add_endRequest(handlePostback.internalErrorHandler);},internalBeginHandler:function(sender,args){var r=args.get_request();if(r.get_headers()["X-MicrosoftAjax"]){var b=r.get_body();if(b==null)b="";var a="__MicrosoftAjax="+encodeURIComponent(r.get_headers()["X-MicrosoftAjax"]);if(b.length>0&&b.substr(b.length-1,1)!="&")b+="&";r.set_body(b+a);}},fixAjax:function(){if(typeof(Sys)=='undefined')return;var s=Sys;if(!s)return;s=s.WebForms;if(!s)return;s=s.PageRequestManager;if(!s)return;s=s.getInstance();if(!s)return;if(s.add_beginRqeuest)s.add_beginRequest(handlePostback.internalBeginHandler);}};function MyPageTrack(pagename){if(typeof(MyPageTrackReal)!="undefined")MyPageTrackReal(pagename);}
var AjaxTrackerCache=new Array();function AjaxControlCallback(method,command,params,customParams,ajaxPanel,callback,controlID,formID,allowOnlyLatestCallback,progressID,progressWait){var parameters='c='+encodeURIComponent(command)+'&p='+encodeURIComponent(params)+'&ai='+encodeURIComponent(controlID)+(customParams?'&'+customParams:'');if(formID){var form=$(formID);if(form){var clen=controlID.length;parameters+="&f=1";for(i=0;i<form.elements.length;i++)if(form.elements[i].id.startsWith(controlID))parameters+="&"+form.elements[i].id.substring(clen)+"="+encodeURIComponent(form.elements[i].value);}}
var tracker="_aolc_"+controlID+"_"+ajaxPanel;var trackerID=0;if(allowOnlyLatestCallback)trackerID=AjaxTrackerCache[tracker]=(AjaxTrackerCache[tracker]?AjaxTrackerCache[tracker]:0)+1;var progTimeout=null;if(progressID){var progress=$(progressID);if(progress){if(progressWait){if(!progress.timeout)progress.timeout=window.setTimeout(function(){progress.style.display='block';},progressWait);}else progress.style.display='block';}}
var ajax=new Ajax.Request(Resource.ajax.controlCallback,{method:method,parameters:parameters,ajaxPanel:ajaxPanel,callback:callback,tracker:tracker,trackerID:trackerID,progress:progress,onComplete:function(request,data,options){if(AjaxTrackerCache[options.tracker]&&AjaxTrackerCache[options.tracker]!=options.trackerID)return;if(progress){if(progress.timeout){window.clearTimeout(progress.timeout);progress.timeout=null;}
progress.style.display="none";}
if(options.ajaxPanel.length>0){var panel=$(options.ajaxPanel);if(panel)$replace(panel,request.responseText);}
if(options.callback)options.callback(request,data);}});}
function getMousePos(event){var x;var y;if(event==null)event=window.event;if(event.pageY)y=event.pageY;else if(event.clientY)y=event.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);else y=null;if(event.pageX)x=event.pageX;else if(event.clientX)x=event.clientY+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);else x=null;return{'x':x,'y':y};}
function getOffset(el){el=$(el);if(el.offsetParent&&el){var x=el.offsetLeft;var y=el.offsetTop;while(el.offsetParent){el=el.offsetParent;x+=el.offsetLeft;y+=el.offsetTop;}}
else{var x=el.offsetLeft;var y=el.offsetTop;}
return{'x':x,'y':y};}
var LightBox={Show:function(){$("light_box_global").style.display="block";},Hide:function(){$("light_box_global").style.display="none";}};var Loading={Show:function(){$("Loading_box_global").style.display="block";},Hide:function(){$("Loading_box_global").style.display="none";}};
Effect=Class.create();Effect.Transitions={linear:function(pos){return pos;},smooth:function(pos){return(-Math.cos(pos*Math.PI)/2)+0.5;}};Effect.SetOpacity=function(id,opacity){var object=$(id);if(!object)return;object=object.style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";};Effect.Base=function(){};Effect.Base.prototype={initialize:function(element,options){this.element=$(element);if(!this.element)return;if(this.addOptions)this.addOptions(options);else this.setOptions(options);if(this.options.delay>0)setTimeout(this.start.bind(this),this.options.delay*1000);else this.start();},setOptions:function(options){this.options={transition:Effect.Transitions.smooth,duration:1,fps:40.0,from:0.0,to:1.0,delay:0.0};Object.extend(this.options,options||{});},start:function(){if(this.setup)this.setup();this.cframe=0;this.started=new Date().getTime();this.finish=this.started+(this.options.duration*1000);this.interval=setInterval(this.loop.bind(this),25);},stop:function(){clearInterval(this.interval);this.interval=null;},loop:function(){var time=new Date().getTime();if(time>=this.finish){this.render(1.0);this.stop();var id=this.element.id;try{(this.options['onComplete']||funcEmpty)(id);}catch(e){}
return;}
var pos=(time-this.started)/(this.finish-this.started);var frame=Math.round(pos*this.options.fps*this.options.duration);if(frame>this.cframe){this.render(pos);this.cframe=frame;}},render:function(pos){pos=this.options.transition(pos);pos*=(this.options.to-this.options.from);pos+=this.options.from;if(this.update)this.update(pos);}};Effect.Timer=Class.create();Object.extend(Object.extend(Effect.Timer.prototype,Effect.Base.prototype),{update:function(pos){this.options.onUpdate(pos);}});Effect.Roll=Class.create();Object.extend(Object.extend(Effect.Roll.prototype,Effect.Base.prototype),{addOptions:function(userOptions){options={scaleX:false,scaleY:true,rollUp:false};Object.extend(options,userOptions||{});this.setOptions(options);},setup:function(){var el=this.element;this.origSize=getDimensions(el);var els=el.style;els.overflow='hidden';if(!this.options.rollUp){if(this.options.scaleY)els.height='1px';if(this.options.scaleX)els.width='1px';}
els.display='block';},update:function(pos){if(pos==this.options.to)var IsDone=true;var els=this.element.style;if(this.options.rollUp)pos=(1-pos);if(this.options.scaleY){var newHeight=Math.round(pos*this.origSize.height);if(newHeight>0)els.height=newHeight+'px';}
if(this.options.scaleX){var newWidth=Math.round(pos*this.origSize.width);if(newWidth>0)els.width=newWidth+'px';}
if((IsDone)&&(this.options.rollUp)&&(pos==0))els.display='none';}});Effect.Fade=Class.create();Object.extend(Object.extend(Effect.Fade.prototype,Effect.Base.prototype),{addOptions:function(userOptions){options={fadeIn:true};Object.extend(options,userOptions||{});this.setOptions(options);},setup:function(){if(this.options.fadeIn){var el=this.element;var els=el.style;Effect.SetOpacity(el,0);els.visibility='visible';if(els.display=='none'){this.wasNone=true;els.display='block';}}},update:function(pos){if(pos==this.options.to){if(this.options.fadeIn)Effect.SetOpacity(this.element,100);else{var el=this.element;Effect.SetOpacity(el,0);var els=el.style;els.visibility='hidden';if(this.wasNone)els.display='none';}}
else{if(this.options.fadeIn)Effect.SetOpacity(this.element,pos*100);else Effect.SetOpacity(this.element,(1-pos)*100);}}});function SlideDiv(el,start,end,speed,direction,callBack,running){if(running){var dist=(end-el._x)*speed;el._x+=dist;if(end-el._x<1&&end-el._x>-1){el._x=end;window.clearInterval(el.wi);el.wi=null;if(callBack)callBack(el);}
if(direction=="Y")el.style.top=el._x+'px';else el.style.left=el._x+'px';}else{if(el.wi)window.clearInterval(el.wi);if(!speed)speed=0.4;el._x=start;if(direction=="Y")el.style.top=el._x+'px';else el.style.left=el._x+'px';el.wi=window.setInterval(function(){SlideDiv(el,start,end,speed,direction,callBack,1);},30);}}
function dragme(div,event,mask){div=$(div);var divOffset=getOffset(div);var height=div.clientHeight;var width=div.clientWidth;if(mask){var mask=$(mask);var maskOffset=getOffset(mask);var Height=mask.clientHeight;var Width=mask.clientWidth;var rLimit=Width-width/2;var lLimit=width/2;var tLimit=height/2;var bLimit=Height-height/2;}
if(event==null)event=window.event
var target=event.target!=null?event.target:event.srcElement;var cx=parseInt(div.style.left);var cy=parseInt(div.style.top);var mouseX=event.clientX;var mouseY=event.clientY;document.onmousemove=mousemove;document.onmouseup=function(){if(div){div.style.cursor="";document.onmousemove=null;div.ondragstart=null;div=null;document.onselectstart=null;};}
document.body.focus();if(event.preventDefault)event.preventDefault();document.onselectstart=function(){return false;};target.ondragstart=function(){return false;};return false;function mousemove(event){if(event==null)event=window.event;var target=event.target!=null?event.target:event.srcElement;if(mask){var diffX=event.clientX-maskOffset['x'];var diffY=event.clientY-maskOffset['y'];if(diffX>lLimit&&diffX<rLimit)div.style.left=diffX-lLimit+"px";else if(diffX>rLimit)div.style.left=Width-width+"px";else if(diffX<lLimit)div.style.left="0px";if(diffY>tLimit&&diffY<bLimit)div.style.top=diffY-tLimit+"px";else if(diffY>bLimit)div.style.top=Height-height+"px";else if(diffY<tLimit)div.style.top="0px";}
else{div.style.left=cx+event.clientX-mouseX+"px";div.style.top=cy+event.clientY-mouseY+"px";}}}
function cleardrag(){document.onmousemove=null;}
var animConst=function(){};animConst.prototype={fps:40,z:null,x:0,a:null,init:function(start,end,callback,speed,callbackEnd){if(this.z)this.clear();var animObj=this;if(callbackEnd)this.callbackEnd=callbackEnd;this.z=window.setInterval(function(){animObj.proccess(start,end,callback,speed,start.length);},this.fps);},proccess:function(start,end,callback,speed,l){var y=Math.sin(this.x/100*Math.PI);var v=new Array;if(start.length){for(var i=l;i--;){v[i]=Math.round((end[i]-start[i])*y+start[i])}}
else
v=Math.round((end-start)*y+start)
if(this.x>=50){callback(end);this.callbackEnd();this.clear();return false;}
callback(v);this.x+=1*speed;},callbackEnd:function(){},clear:function(){this.x=0;window.clearInterval(this.z);this.z=null;}}
var animEffect=new animConst();var animEffect2=new animConst();function trueMouseOut(elem,event){if(!event)event=window.event;var relTag=event.toElement||event.relatedTarget;if(relTag){if(relTag==elem)return false;if(relTag.parentNode){while(relTag.parentNode){relTag=relTag.parentNode;if(relTag==elem)return false;else if(relTag.tagName=="HTML"){return true;break;}}}}
return true;}
function getScrollTop(){return document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;}

Effect.OpenUp=function(element){return new Effect.Roll(element,arguments[1]||{});};Effect.CloseDown=function(element){options={rollUp:true};Object.extend(options,arguments[1]||{});return new Effect.Roll(element,options);};Effect.Combo=function(element){element=$(element);if(element.style.display=='none'){return Effect.OpenUp(element,arguments[1]||{});}else{return Effect.CloseDown(element,arguments[1]||{});}};
Nav={init:function(){var page=$("aspnetForm");var uls=getElementsByClassName("UL","navigation");for(var i=uls.length;i--;){if(uls[i].className.match("navDelay"))var delay=1;else var delay=0;checkForNestedUL(uls[i],delay);}
function checkForNestedUL(UL,delay){var li=$first(UL,"LI");do{if(li){var ul=$first(li,"ul");ul=ul?ul:$first(li,"div");if(ul){Nav.attEvent(li,ul,delay);checkForNestedUL(ul,delay)}}
else
break;var li=$next(li);}while(li)}},attEvent:function(el,ul,delay){eventAdd(el,"mouseover",function(){Nav.mouseOver(el,ul,delay)});eventAdd(el,"mouseout",function(event){Nav.mouseOut(el,delay,event)});eventAdd(el,"click",function(event){Nav.mouseOut(el,delay,event)});},mouseOver:function(el,ul,delay){var cName=el.className.match("navOver");if(delay){if(el.rel)window.clearTimeout(el.rel);if(cName)return false;el.rel=setTimeout(function(){el.className+=" navOver";if(el.id&&$(el.id+"Frame"))Nav.IframeFix(ul,$(el.id+"Frame"));},400);}
else{if(cName)return false;el.className+=" navOver";}},mouseOut:function(el,delay,event){if(trueMouseOut(el,event)){if(delay){if(el.rel)window.clearTimeout(el.rel);el.rel=setTimeout(function(){el.className=el.className.replace("navOver","");},300);}
else{el.className=el.className.replace("navOver","");}}},IframeFix:function(el,frame){frame.style.height=el.clientHeight+"px";}}
onLoad(function(){Nav.init();});
var scrollspeed=3;var maxwidth=925;var iedom=document.all||document.getElementById,actualwidth='',cross_scroll,loadedyes=0,lefttime,righttime;function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function showhidediv(what){}
function getposOffset(what,offsettype){var totaloffset=(offsettype=="left")?what.offsetLeft:what.offsetTop;var parentEl=what.offsetParent;while(parentEl!=null){totaloffset=(offsettype=="left")?totaloffset+parentEl.offsetLeft:totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}
return totaloffset;}
function moveleft(e){motionengine(e)
if(loadedyes){if(iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth+10)){cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px";lefttime=setTimeout("moveleft(this)",10);}
else{showhidediv("right");}}}
function stopmotion(e){clearTimeout(lefttime);clearTimeout(righttime);}
function moveright(e){motionengine(e)
if(loadedyes){if(iedom&&parseInt(cross_scroll.style.left)<0){cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px";righttime=setTimeout("moveright(this)",10);}
else{showhidediv("left");}}}
function motionengine(e){if(!loadedyes){if(iedom){loadedyes=1
crossmain=document.getElementById?document.getElementById("motioncontainer"):document.all.motioncontainer;if(typeof crossmain.style.maxWidth!=='undefined')crossmain.style.maxWidth=maxwidth+'px';menuwidth=crossmain.offsetWidth;cross_scroll=document.getElementById?document.getElementById("motiongallery"):document.all['motiongallery'];cross_scroll.style.left="0px";actualwidth=document.getElementById?document.getElementById("trueContainer").offsetWidth:document.all['trueContainer'].offsetWidth;}}}

function OpenEGain(bOmni,sCharUrl){if(bOmni==1)SetOmniture();var sWinParas;var EGainWindow;sWinParas='width=300,height=300,left=100,top=100,status=1,resizable=0,scrollbars=1,location=0;menubar=0';EGainWindow=window.open(sCharUrl,'EGain_Signin_Window',sWinParas);EGainWindow.focus();}
function SetOmniture(){QuillChat();}
SearchSuggest=funcEmpty;SearchSuggest.prototype={KEYUP:38,KEYDOWN:40,KEYENTER:13,KEYTAB:9,KEYESC:27,searchIsOpen:false,oldKeywords:null,searchBox:null,suggestContainer:null,suggestDiv:null,initSearchBox:null,selected:null,canShow:false,preDropDown:null,submitID:null,containerPrefix:'searchSuggest',init:function(searchBox,submitButton){if(this.initSearchBox)control=$(this.initSearchBox);else{control=$(searchBox);}
if(!control){this.initSearchBox=searchBox;eventAdd(window,'load',this.init.bind(this));return;}
this.submitID=submitButton;this.searchBox=control;if(control.value!='Keyword or Item #')this.oldKeywords=control.value;this.suggestContainer=$(this.containerPrefix+"Info");this.suggestDiv=$(this.containerPrefix+"Div");control.onblur=this.hide.bind(this);control.onkeyup=this.handleKeyUp.bindAsEventListener(this);control.onkeydown=this.handleKeyDown.bindAsEventListener(this);},handleKeyUp:function(evt){var key=evt.keyCode;if(key==this.KEYUP||key==this.KEYDOWN||key==this.KEYTAB||key==this.KEYENTER||key==this.KEYESC){return true;}
var keywords=this.searchBox.value;if(keywords!=this.oldKeywords){this.oldKeywords=this.preDropDown=keywords;if(keywords.length>2){var params='q='+encodeURIComponent(keywords)
var ajax=new Ajax.Request(Resource.ajax.searchSuggest,{method:'get',parameters:params,onComplete:this.buildList.bind(this)});}
else if(keywords.length==0){this.hide();}}
return true;},handleKeyDown:function(evt){var key=evt.keyCode;if(key==this.KEYESC){if(!this.searchIsOpen)return true;this.selectLink(null);this.hide();return true;}
else if(key==this.KEYENTER){this.preDropDown=this.oldKeywords=this.searchBox.value;if(this.selected)SearchSuggestTrack(this.preDropDown);this.hide();return true;}
else if(key!=this.KEYUP&&key!=this.KEYDOWN){return true;}
if(!this.searchIsOpen){this.show();if(!this.searchIsOpen)return true;}
var newLink=this.selected;if(key==this.KEYDOWN){if(!newLink){newLink=this.suggestDiv.firstChild;if(!newLink)return true;}
else{newLink=newLink.nextSibling;}
if(newLink&&newLink.className&&newLink.className=="header")newLink=newLink.nextSibling;}
else{if(!newLink){newLink=this.suggestDiv.lastChild;if(!newLink)return true;}
else{newLink=newLink.previousSibling;}
if(newLink&&newLink.className&&newLink.className=="header")newLink=newLink.previousSibling;}
this.selectLink(newLink);if(!newLink){if(this.preDropDown)this.searchBox.value=this.preDropDown;return true;}
this.searchBox.value=this.oldKeywords=newLink.getAttribute("keyword");return true;},show:function(){if(this.searchIsOpen||this.suggestContainer.style.visibility=="visible"||this.searchBox.value.length==0||this.searchBox.value=='Keyword or Item #'||!this.canShow){return true;}
this.searchIsOpen=true;var effect=new Effect.Fade(this.suggestContainer,{fadeIn:true,duration:0.2});},hide:function(){if(!this.searchIsOpen)return;this.searchIsOpen=false;this.suggestContainer.style.visibility="hidden";if(this.preDropDown&&this.searchBox.value!=this.preDropDown)this.searchBox.value=this.preDropDown;if(this.searchBox.value.length<3)this.canShow=false;return true;},selectLink:function(item){if(this.selected)this.selected.className="";if(item)item.className="keySelected";this.selected=item;},buildList:function(requestObject,data){var listType;var nodeLink;var link;if(data!=null&&data.length>0){var frag=document.createDocumentFragment();for(var linkIndex in data){link=data[linkIndex];if(typeof(link)=="object"){listType=link[3];nodeLink=document.createElement("a");if(link[2]!=0){var span=document.createElement("span");span.appendChild(document.createTextNode(link[2]));nodeLink.appendChild(span);}
nodeLink.appendChild(document.createTextNode(link[0]));if(listType!=0){switch(listType){case 1:nodeLink.setAttribute("keyword",link[2]);break;case 2:case 3:nodeLink.setAttribute("keyword",link[0]);break;}
nodeLink.onmousedown=this.submitClick.bindAsEventListener(this);nodeLink.onmouseover=this.linkMouseOver.bindAsEventListener(this);}
else{nodeLink.className="header";}
frag.appendChild(nodeLink);}}
this.selectLink(null);this.suggestDiv.innerHTML="";this.suggestDiv.appendChild(frag);this.canShow=true;this.show();}
else{this.hide();}},linkMouseOver:function(evt){var element=evt.srcElement||evt.target;this.selectLink(element);},submitClick:function(evt){var element=evt.srcElement||evt.target;var submit=$(this.submitID);if(submit&&element){this.searchBox.value=this.preDropDown=this.oldKeywords=element.getAttribute("keyword");this.searchBox.focus();submit.click();SearchSuggestTrack(this.preDropDown);this.hide();}}};
function ShowFlash(swf,w,h){document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'"><param name="movie" value="'+swf+'"><param name="allowScriptAccess" value="always"><param name="quality" value="high"><param name="wmode" value="opaque"><embed src="'+swf+'" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" allowScriptAccess="always"></embed></object>');}
function IsFlashAvailable(){var fAvail=false,foundVer=0;var plugin=(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"])?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(plugin){var words=navigator.plugins["Shockwave Flash"].description.split(" ");if(words.length>2)if(words[2]>=6)fAvail=true;}
else if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(navigator.appVersion.indexOf("Win")!=-1)){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");fAvail=true;}
catch(e){}}
return fAvail;}
window.onscroll=handleScroll;function handleScroll(){var mainCartDiv=$("MiniCartInfo");if(mainCartDiv!=null){var top=0;if(mainCartDiv.clientHeight<=document.body.offsetHeight){if(document.documentElement.scrollTop==0)top=8;else top=document.documentElement.scrollTop;}
var topPX=top.toString()+"px";mainCartDiv.style.top=topPX;}}
PopUpScripts=function(){};PopUpScripts.prototype={glbMiniSKUButton:null,glbQuickViewButton:null,glbTimeOutId:0,bCloseMiniSKU:1,getMiniSkuHTMLComparePage:function(obj,sku,effortCode,findNumber,qtyId,promoCode,callTrackID,campaignID,positionID){var qty=$("ctl00_MainContent_"+qtyId).value;glbMiniSKUButton=obj;if(typeof(callTrackID)=="undefined")callTrackID="";if(typeof(campaignID)=="undefined")campaignID="";if(typeof(positionID)=="undefined")positionID="";if(typeof(promoCode)=="undefined")promoCode="";var params="action=2"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+qty+"&promoCode="+promoCode+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAddToCart.bind(this),asynchronous:true});},getMiniSkuHTML:function(obj,sku,effortCode,findNumber,qty,promoCode,callTrackID,campaignID,positionID){glbMiniSKUButton=obj;if(typeof(callTrackID)=="undefined")callTrackID="";if(typeof(campaignID)=="undefined")campaignID="";if(typeof(positionID)=="undefined")positionID="";if(typeof(promoCode)=="undefined")promoCode="";var params="action=1"+"&sku="+sku+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+qty+"&CallTrackID="+callTrackID+"&CampaignID="+campaignID+"&PositionID="+positionID+"&PromoCode="+promoCode+"&rnd="+Math.random();if(!(popupLoading)){popupLoading=1;var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniSKU.bind(this),asynchronous:true});}},getUpdateMiniSkuHTML:function(obj,sku,effortCode,findNumber,qty,imprintConfigId,ovReferenceId,cartItemIndex){glbMiniSKUButton=obj;var params="action=6"+"&sku="+sku+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+qty+"&imprintConfigId="+imprintConfigId+"&OVReferenceID="+ovReferenceId+"&CartItemIndex="+cartItemIndex+"&rnd="+Math.random();if((!$('MiniSKUInfo').effect)||(!document.all)){var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniSKU.bind(this),asynchronous:true});}},getInkTonerMiniSkuHTML:function(obj,sku,promoCode,showAccessoriesAfterAddToCart){glbMiniSKUButton=obj;if(typeof(showAccessoriesAfterAddToCart)=="undefined")showAccessoriesAfterAddToCart=0;var params="action=9"+"&sku="+sku+"&PromoCode="+promoCode+"&ShowAccessoriesAfterAddToCart="+showAccessoriesAfterAddToCart+"&rnd="+Math.random();if(!(popupLoading)){popupLoading=1;var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniSKU.bind(this),asynchronous:true});}},displayMiniSKU:function(requestObj){ie6SelectFix("inkTonerDropDownFix",0);if(requestObj.responseText!=""){var miniSkuInfoDiv=$('MiniSKUInfo');miniSkuInfoDiv.effect=1;var miniSKUDiv=$('MiniSKU');miniSKUDiv.innerHTML="";miniSKUDiv.innerHTML=requestObj.responseText;miniSkuInfoDiv.style.display="block";miniSKUDiv.style.width="";miniSKUDiv.style.height="";miniSKUDiv.style.overflow="hidden";this.repositionDIV(miniSkuInfoDiv,glbMiniSKUButton);var effect=new Effect.Roll(miniSkuInfoDiv,{scaleX:false,scaleY:false,rollUp:false,duration:0.5,onComplete:function(){popupLoading=null;miniSKUDiv.style.overflow="";}});if(QViewPopUp.addToCartFromQview==1&&QViewPopUp.QViewMode==1&&$("pnlFInder")){var finderPos=getOffset("pnlFInder");if(parseInt($("MiniSKUInfo").style.top)<(finderPos['y']+50)){QViewPopUp.hideDropDowns();}}
MiniSkuTrack();}},closeMiniSku:function(){if(popupLoading)return false;if(QViewPopUp.addToCartFromQview==1){QViewPopUp.CloseQViewEnablePage();QViewPopUp.showDropDowns();}
var miniSKUDiv=$("MiniSKU");var mainDiv=$("MiniSKUInfo");mainDiv.style.display="none";addToCartShowing=0;ie6SelectFix("inkTonerDropDownFix",1);$('MiniSKUInfo').effect=null;popupLoading=null;miniSKUDiv.style.width="";miniSKUDiv.style.height="";miniSKUDiv.style.overflow="hidden";},addItemsToCart:function(){if(typeof(glbTimeOutId)!="undefined")clearTimeout(glbTimeOutId);if(!IsQtyNumericFieldEmpty($("miniSKUQuantity"))){var effortCode=$("miniSKUEffortCode").value;var findNumber=$("miniSKUFindNumber").value;var Qty=$("miniSKUQuantity").value;var promoCode=$("PromoCode").value;var params="action=2"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+Qty+"&promoCode="+promoCode+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAddToCart.bind(this),asynchronous:true});}},addItemToCartFromPromoSKU:function(index,showAccessoriesAfterAddToCart){if(!IsQtyNumericFieldEmpty($("promoMiniSKU_Qty"+index))){var effortCode=$("promoMiniSKU_EffortCode"+index).value;var findNumber=$("promoMiniSKU_FindNumber"+index).value;var Qty=$("promoMiniSKU_Qty"+index).value;var sku=$("promoMiniSKU_SKU"+index).value;if(showAccessoriesAfterAddToCart==1){QViewPopUp.glbAccessoryParentSKU=sku;QViewPopUp.addToCartFromQview=1;QViewPopUp.QViewMode=1;}
var promoCode=$("promoMiniSKU_PromoCode"+index).value;var params="action=2"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+Qty+"&promoCode="+promoCode+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAddToCart.bind(this),asynchronous:true});}},addItemsToCartFromWidget:function(obj,effortCode,findNumber,qty,promoCode){glbMiniSKUButton=obj;clearTimeout(glbTimeOutId);if(qty!=null){var params="action=2"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+qty+"&promoCode="+promoCode+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAddToCart.bind(this),asynchronous:true});}},addItemsToCartNoMiniSKU:function(obj,effortCode,findNumber,qty,promoCode){glbMiniSKUButton=obj;if(qty!=null){var params="action=2"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+qty+"&promoCode="+promoCode+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAddToCart.bind(this),asynchronous:true});}},processAddToCart:function(requestObj){if(requestObj.responseText=="BASKETSTATEOK"){var params="action=3&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniCart.bind(this),asynchronous:true});}
else{var params="action=4"+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniQuantityError.bind(this),asynchronous:true});}},addAccesToCartNoMiniSKU:function(obj,effortCode,findNumber,qty,promoCode){glbMiniSKUButton=obj;if(qty!=null){var params="action=2"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+qty+"&promoCode="+promoCode+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAccesAddToCart.bind(this),asynchronous:true});}},processAccesAddToCart:function(requestObj){if(requestObj.responseText=="BASKETSTATEOK"){__doPostBack('ctl00$MainContent$RefreshLinkButton','');this.closeMiniSku();}
else{var params="action=4"+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniQuantityError.bind(this),asynchronous:true});}},processAddToCartPromoSKU:function(requestObj){if(requestObj.responseText=="BASKETSTATEOK"){this.bCloseMiniSKU=0;var params="action=3&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniCart.bind(this),asynchronous:true});}
else{var params="action=4"+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniQuantityError.bind(this),asynchronous:true});}},updateCartItem:function(){if(!IsQtyNumericFieldEmpty($("miniSKUQuantity"))){var effortCode=$("miniSKUEffortCode").value;var findNumber=$("miniSKUFindNumber").value;var Qty=$("miniSKUQuantity").value;var imprintConfigId=$("miniSKUImprintConfigID").value;var OVReferenceID=$("miniSKUOVReferenceID").value;var cartItemIndex=$("miniSkuCartItemIndex").value;var params="action=7"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+Qty+"&imprintConfigId="+imprintConfigId+"&OVReferenceID="+OVReferenceID+"&CartItemIndex="+cartItemIndex+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processUpdateCart.bind(this),asynchronous:true});}},processUpdateCart:function(requestObj){var strResponse=requestObj.responseText.toUpperCase();if(strResponse=="BASKETSTATEOK"||strResponse=="NOITEMINBASKET"){__doPostBack('ctl00$MainContent$CheckoutCart$CheckoutPageUpdateLink','');this.closeMiniSku();}
else{var params="action=8"+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniQuantityError.bind(this),asynchronous:true});}},displayMiniCart:function(requestObj){if(requestObj.responseText!=""){var timeoutFactor=7000;var miniCartDiv=$('MiniCart');miniCartDiv.innerHTML=requestObj.responseText;if(this.bCloseMiniSKU==1)this.closeMiniSku();var miniCartInfoDiv=$('MiniCartInfo');if(miniCartInfoDiv!=null)miniCartInfoDiv.style.display='block';var basketDiv=$('hdCart');if(basketDiv)basketDiv.innerHTML=$('HeaderCartCont').innerHTML;miniCartInfoDiv.style.height=miniCartDiv.offsetHeight;if(miniCartInfoDiv.clientHeight>document.body.offsetHeight)timeoutFactor=10000;glbTimeOutId=setTimeout(function(){var miniCartInfoDiv=$('MiniCartInfo');if(miniCartInfoDiv!=null)miniCartInfoDiv.style.display='none';},timeoutFactor);if((QViewPopUp.addToCartFromQview==1)&&(QViewPopUp.QViewMode==1)){QViewPopUp.addToCartFromQview=0;QViewPopUp.QViewMode=0;QViewPopUp.DisplayAccessoriesAfterAddToCart(null);}
else{var effect=new Effect.Roll(miniCartInfoDiv,{scaleX:false,scaleY:true,rollUp:false,duration:0.5});}}},getMiniCart:function(){var params="action=3&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.displayMiniCart.bind(this),asynchronous:true});},closeMiniCart:function(){var miniCartDiv=$('MiniCart');miniCartDiv.innerHTML="";var miniCartInfoDiv=$('MiniCartInfo');miniCartInfoDiv.style.display="none";addToCartShowing=0;},displayMiniQuantityError:function(requestObj){var infoDiv=$('MiniSKUInfo');var miniSKUDiv=$('MiniSKU');miniSKUDiv.innerHTML=requestObj.responseText;infoDiv.style.display="block";infoDiv.style.height=miniSKUDiv.offsetHeight;miniSKUDiv.style.width="";miniSKUDiv.style.height="";miniSKUDiv.style.overflow="hidden";this.repositionDIV(infoDiv,glbMiniSKUButton);if(document.all)var effect=new Effect.Roll(infoDiv,{scaleX:false,scaleY:false,rollUp:false,duration:0.5,onComplete:function(){popupLoading=null;miniSKUDiv.style.overflow="";}});},addItemsToCartFromQtyError:function(){var strControlName="miniQtyErrorQTY";var ovreferenceID="";if(!IsQtyNumericFieldEmpty($(strControlName))){var objVarantID=$("miniQtyErrorVariantID");var objQty=$("miniQtyErrorQTY");var objOvreferenceID=$("miniOvreferenceID");var arrEffortCodeFindNum=objVarantID.value.split("-");var effortCode=arrEffortCodeFindNum[0];var findNumber=arrEffortCodeFindNum[1];var Qty=objQty.value;var objQtyOverFlow=$("miniQtyErrorQTYOverFlow");var qtyOverFlow="";if(objQtyOverFlow!=null){qtyOverFlow=objQtyOverFlow.value;}
if(objOvreferenceID!=null){ovreferenceID=objOvreferenceID.value;}
var params="action=5"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+Qty+"&qtyOverFlow="+qtyOverFlow+"&imprintConfigId="+"&OVReferenceID="+ovreferenceID+"&rnd="+Math.random();if(location.pathname=="/cart/cart.aspx"){var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAccesAddToCart.bind(this),asynchronous:true});}
else{var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processAddToCart.bind(this),asynchronous:true});}}},updateCartItemFromQtyError:function(){var strControlName="miniQtyErrorQTY";if(!IsQtyNumericFieldEmpty($(strControlName))){var objVarantID=$("miniQtyErrorVariantID");var objQty=$(strControlName);var objOvreferenceID=$("miniOvreferenceID");var arrEffortCodeFindNum=objVarantID.value.split("-");var objQtyOverFlow=$("miniQtyErrorQTYOverFlow");var effortCode=arrEffortCodeFindNum[0];var findNumber=arrEffortCodeFindNum[1];var Qty=objQty.value;var ovreferenceID=objOvreferenceID.value;var qtyOverFlow="";if(objQtyOverFlow!=null)qtyOverFlow=objQtyOverFlow.value;if(objOvreferenceID!=null){ovreferenceID=objOvreferenceID.value;}
var params="action=5"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+Qty+"&qtyOverFlow="+qtyOverFlow+"&OVReferenceID="+ovreferenceID+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.processUpdateCart.bind(this),asynchronous:true});}},findPosY:function(obj){var curtop=0;if($||document.all){while(obj){curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(document.layers)curtop+=obj.y;return curtop;},findPosX:function(obj){var curleft=0;if($||document.all){while(obj){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(document.layers)curleft+=obj.x;return curleft;},repositionDIV:function(divToReposition,objAnchor){divToReposition=$(divToReposition);if(!divToReposition)return false;var top=0;var left=0;var scrollTop=getScrollTop();if(objAnchor!=null){var anchorPos=getDimensions(objAnchor);if((anchorPos.top+divToReposition.clientHeight)>=(document.documentElement.clientHeight+scrollTop)){var topRepositionFactor=anchorPos.top+divToReposition.clientHeight-document.documentElement.clientHeight;var top=(anchorPos.top-topRepositionFactor+scrollTop);}
else
top=anchorPos.top;if((anchorPos.left+anchorPos.width+divToReposition.clientWidth+10)>=(document.documentElement.clientWidth+document.documentElement.scrollLeft))left=anchorPos.left-divToReposition.clientWidth;else left=anchorPos.left+anchorPos.width;if(left<0)left=(document.documentElement.clientWidth/2-divToReposition.clientWidth/2)+document.documentElement.scrollLeft;}
else{top=(document.documentElement.clientHeight/2-divToReposition.clientHeight/2)+scrollTop;left=(document.documentElement.clientWidth/2-divToReposition.clientWidth/2);}
divToReposition.style.top=top+"px";divToReposition.style.left=left+"px";divToReposition.style.display="block";},hideDiv:function(div){if($(div))$(div).style.display="none";},repositionTOOLTIP:function(divToReposition,objAnchor){$(divToReposition).className='';var top=0;var left=0;if((this.findPosY(objAnchor)+divToReposition.clientHeight)>=(document.documentElement.clientHeight+document.documentElement.scrollTop)-40){$(divToReposition).className+=' top';var top=(this.findPosY(objAnchor)-objAnchor.clientHeight-$(divToReposition).clientHeight+5);}
else{top=this.findPosY(objAnchor)+divToReposition.clientHeight;}
if((this.findPosX(objAnchor))>=(document.documentElement.clientWidth/2)){left=this.findPosX(objAnchor)-divToReposition.clientWidth+objAnchor.clientWidth;}
else{$(divToReposition).className+=' left';left=this.findPosX(objAnchor);}
var leftPX=left.toString()+"px";divToReposition.style.left=leftPX;var topPx=top.toString()+"px";divToReposition.style.top=topPx;},processKeyPress:function(ev,keyPressOnMiniSKU){var key=ev.which?ev.which:ev.keyCode;if(key==13){if(keyPressOnMiniSKU==1){this.addItemsToCart();}
else if(keyPressOnMiniSKU==2){this.updateCartItem();}
else if(keyPressOnMiniSKU==3){this.closeMiniSKU();if(document.location.href.toLowerCase().indexof("checkout.aspx")<0)this.getMiniCart();}
else if(keyPressOnMiniSKU==4){this.addItemsToCartFromQtyError();}
else if(keyPressOnMiniSKU==5){this.updateCartItemFromQtyError();}
return false;}
else{return true;}},GetDeliveryDates:function(sku,brand,zip,vendorNum,minSellQty,shipViaCode,leadTimeDays){var params="action=10"+"&sku="+sku+"&brand="+brand+"&zip="+zip+"&vendorNum="+vendorNum+"&minSellQty="+minSellQty+"&shipViaCode="+shipViaCode+"&leadTimeDays="+leadTimeDays+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.popUpScripts,{method:'get',parameters:params,onComplete:this.ProcessGetDeliveryDates.bind(this),asynchronous:true});;},ProcessGetDeliveryDates:function(requestObj){if(requestObj.responseText!=""){if(requestObj.responseText.split('|')[0]!=""){$('ctl00_MainContent_lblZipMessage').innerHTML=requestObj.responseText.split('|')[0];$('ctl00_MainContent_selectedZipCode').innerHTML=requestObj.responseText.split('|')[1];}
else{$('ctl00_MainContent_lblZipMessage').innerHTML="Unable to calculate delivery estimate!";$('ctl00_MainContent_selectedZipCode').innerHTML=requestObj.responseText.split('|')[1];}}},displayMiniSKUMessage:function(anchor,message){ie6SelectFix("inkTonerDropDownFix",0);if(message!=""){var miniSkuInfoDiv=$('MiniSKUInfo');miniSkuInfoDiv.effect=1;var miniSKUDiv=$('MiniSKU');miniSKUDiv.innerHTML="";miniSKUDiv.innerHTML=message;miniSkuInfoDiv.style.display="block";miniSkuInfoDiv.style.width="";miniSkuInfoDiv.style.overflow="";miniSkuInfoDiv.style.height="";initScrollbars();this.repositionDIV(miniSkuInfoDiv,anchor);}}};
QView=function(){};QView.prototype={glbQViewButton:null,glbAccessoryParentSKU:null,glbShowAccessories:true,glbTimeOutId:0,addToCartFromQview:0,QViewMode:0,glbInkToner:null,QViewLeft:null,QViewTop:null,QViewHeight:null,QViewWidth:null,GetQViewSkuDetailsHtml:function(obj,sku,effortCode,findNumber,bGetInkAndToner,repositionAndAnimate){this.glbInkToner=bGetInkAndToner;if(typeof(repositionAndAnimate)=="undefined")repositionAndAnimate=1;if(repositionAndAnimate==1)this.glbQViewButton=obj;var params="action=1"+"&sku="+sku+"&effortCode="+effortCode+"&findNumber="+findNumber+"&rnd="+Math.random();if(!(popupLoading)){popupLoading=1;var ajax=new Ajax.Request(Resource.ajax.QView,{method:'get',parameters:params,onComplete:this.DisplayQViewSkuDetails.bind(this,repositionAndAnimate),asynchronous:true});}},DisplayQViewSkuDetails:function(repositionAndAnimate,requestObj){if(requestObj.responseText!=""){ie6SelectFix("inkTonerDropDownFix",0);var QViewInfoDiv=$('QViewInfo');var QViewDiv=$('QView');QViewDiv.innerHTML="";QViewDiv.innerHTML=requestObj.responseText;QViewInfoDiv.style.width="";QViewInfoDiv.style.height="";QViewInfoDiv.style.overflow="hidden";QViewInfoDiv.style.display="block";initScrollbars();this.repositionDIV(QViewInfoDiv,this.glbQViewButton);this.ShowTab.init("TabControl_ancTabID",0,"TabControl_tab");if(repositionAndAnimate==1){var effect=new Effect.Roll(QViewInfoDiv,{scaleX:true,scaleY:false,rollUp:false,duration:0.5,onComplete:function(){popupLoading=null;QViewInfoDiv.style.overflow=""}});}
else{popupLoading=null;}}},GetQViewSkuImagesHtml:function(sku,effortCode,findNumber){var params="action=2"+"&sku="+sku+"&effortCode="+effortCode+"&findNumber="+findNumber+"&rnd="+Math.random();{var ajax=new Ajax.Request(Resource.ajax.QView,{method:'get',parameters:params,onComplete:this.DisplayQViewSkuImages.bind(this,0),asynchronous:true});}},GetQViewSkuImagesHtmlDirect:function(obj,sku,effortCode,findNumber){this.glbQViewButton=obj;var params="action=2"+"&sku="+sku+"&effortCode="+effortCode+"&findNumber="+findNumber+"&showBackButton=0"+"&rnd="+Math.random();if(!(popupLoading)){popupLoading=1;var ajax=new Ajax.Request(Resource.ajax.QView,{method:'get',parameters:params,onComplete:this.DisplayQViewSkuImages.bind(this,1),asynchronous:true});}},DisplayQViewSkuImages:function(repositionAndAnimate,requestObj){if(requestObj.responseText!=""){ie6SelectFix("inkTonerDropDownFix",0);var QViewInfoDiv=$("QViewInfo");var QViewDiv=$('QView');QViewDiv.innerHTML=requestObj.responseText;if(repositionAndAnimate==0){}
else{QViewInfoDiv.style.display="block";QViewInfoDiv.style.width="";QViewInfoDiv.style.height="";QViewInfoDiv.style.overflow="hidden";this.repositionDIV(QViewInfoDiv,this.glbQViewButton);var effect=new Effect.Roll(QViewInfoDiv,{scaleX:true,scaleY:true,rollUp:false,duration:0.5,onComplete:function(){popupLoading=null;QViewInfoDiv.style.overflow=""}});}}},GetQViewAccessoriesHtml:function(obj,sku,bGetInkAndToner){this.glbQViewButton=obj;if(bGetInkAndToner==null)bGetInkAndToner="false";this.glbInkToner=bGetInkAndToner;var params="action=3"+"&sku="+sku+"&GetInkAndTonerOffer="+bGetInkAndToner+"&rnd="+Math.random();if(!(popupLoading)){popupLoading=1;var ajax=new Ajax.Request(Resource.ajax.QView,{method:'get',parameters:params,onComplete:this.DisplayQViewAccessories.bind(this),asynchronous:true});}},DisplayQViewAccessories:function(requestObj){if(requestObj.responseText!=""){if(typeof(this.glbTimeOutId)!="undefined")clearTimeout(this.glbTimeOutId);var timeoutFactor=5000;var accessoriesTimeOut=null;accessoriesTimeOut=setTimeout("QViewPopUp.CloseQView();",timeoutFactor);ie6SelectFix("inkTonerDropDownFix",0);var QViewInfoDiv=$("QViewInfo");var QViewDiv=$('QView');QViewDiv.onmouseover=function(){clearTimeout(accessoriesTimeOut);};QViewDiv.innerHTML=requestObj.responseText;this.QViewScroller=new SCSCRIPT;this.QViewScroller.name="QViewScroll";this.QViewScroller.itemsPerPage=4;this.QViewScroller.initFinder('QView');QViewInfoDiv.style.width="";QViewInfoDiv.style.height="";QViewInfoDiv.style.overflow="hidden";QViewInfoDiv.style.display="block";this.repositionDIV(QViewInfoDiv,this.glbQViewButton);var effect=new Effect.Roll(QViewInfoDiv,{scaleX:true,scaleY:true,rollUp:false,duration:0.5,onComplete:function(){popupLoading=null;QViewInfoDiv.style.overflow="";}});}},GetPWReviewsFromQview:function(sku){var params="action=4"+"&sku="+sku+"&rnd="+Math.random();if(!(popupLoading)){popupLoading=1;var ajax=new Ajax.Request(Resource.ajax.QView,{method:'get',parameters:params,onComplete:this.DisplayQViewPWReviews.bind(this),asynchronous:true});}},DisplayQViewPWReviews:function(requestObj){ie6SelectFix("inkTonerDropDownFix",0);var QViewInfoDiv=$("QViewInfo");var QViewDiv=$('QView');QViewDiv.innerHTML=requestObj.responseText;QViewInfoDiv.style.display="block";initScrollbars();popupLoading=null;},GetPWReviews:function(obj,sku,reviewsHtmlPath){this.glbQViewButton=obj;var params="action=5"+"&sku="+sku+"&htmlfilepath="+reviewsHtmlPath+"&rnd="+Math.random();if(!(popupLoading)){popupLoading=null;var ajax=new Ajax.Request(Resource.ajax.QView,{method:'get',parameters:params,onComplete:this.DisplayPWReviews.bind(this),asynchronous:true});}},DisplayPWReviews:function(requestObj){ie6SelectFix("inkTonerDropDownFix",0);var QViewInfoDiv=$("QViewInfo");var QViewDiv=$('QView');QViewDiv.innerHTML=requestObj.responseText;QViewInfoDiv.style.display="block";initScrollbars();MiniSKUMiniCartPopUp.repositionDIV(QViewInfoDiv,this.glbQViewButton);popupLoading=null;eventAdd($("prContents"),"mousedown",QViewPopUp.QReviewsCheck);this.QReviewsCheck();popupLoading=null;},QReviewsCheck:function(){this.clickCounter=0;var z=window.setInterval(function(){QViewPopUp.QReviewsCounter(z)},100);},QReviewsCounter:function(z){this.clickCounter+=1;if(!$("QReviews")&&z){initScrollbars();$("prContents").innerHTML+="<div id='QReviews'></div>";var els=$("prReviewSummary").getElementsByTagName("A");var len=els.length;for(var i=0;i<len;i++){if(els[i].name=="ReviewHeader")els[i].name="";}
window.clearInterval(z);this.clickCounter=0;return false;}
if(this.clickCounter>10){window.clearInterval(z);this.clickCounter=0;}},ShowPopUp:function(obj,imageURL,event){if($("pnlQView"))return false;this.glbQViewButton=obj;script="<div class='rb rbWhite' id='zoomImgSmall' style='padding:0px;width:200px;'><div class='rbTop'><div class='a1'></div><div class='a2'></div><div class='a3'></div><div class='a4'></div></div><div class='rbInner'>";script+="<div class='rbContent clearAfter'>";script+="<img src='"+imageURL+"' alt='' />";script+="</div></div><div class='rbBottom'><div class='a4'></div><div class='a3'></div><div class='a2'></div><div class='a1'></div></div></div>";var QViewInfoDiv=$("QViewInfo");var QViewDiv=$('QView');QViewDiv.innerHTML=script;QViewInfoDiv.style.display="block";this.repositionDIV(QViewInfoDiv,obj);popupLeft=this.QViewLeft;QViewInfoDiv.style.left=(this.QViewLeft+10)+"px";QViewInfoDiv.style.top=(this.QViewTop+30)+"px";dragme('QViewInfo',event,null);},HidePopUp:function(){if(!$('zoomImgSmall'))return false;cleardrag();var QViewInfoDiv=$("QViewInfo");var QViewDiv=$("QView");QViewDiv.innerHTML="";QViewInfoDiv.style.display="none";},CloseQView:function(){if(popupLoading)return false;var QViewInfoDiv=$("QViewInfo");$("QViewInfo").style.display="none";QViewInfoDiv.style.width="";QViewInfoDiv.style.height="";QViewInfoDiv.style.overflow="hidden";popupLoading=null;ie6SelectFix("inkTonerDropDownFix",1);},CloseQViewEnablePage:function(){},HandleCloseQViewEffect:function(){var QViewInfoDiv=$("QViewInfo");QViewInfoDiv.style.display="none";var QViewDiv=$("QView");QViewDiv.innerHTML="";QViewInfoDiv.effect=null;QViewInfoDiv.style.cssText="z-index:20000;position:absolute;";},AddToCart:function(obj,sku,effortCode,findNumber,promoCode,mode,bGetInkAndToner,closeQView){this.glbInkToner=bGetInkAndToner;if(typeof(this.glbTimeOutId)!="undefined")clearTimeout(this.glbTimeOutId);this.glbAccessoryParentSKU=sku;this.addToCartFromQview=1;this.QViewMode=mode;if(mode==1)this.glbShowAccessories=true;else this.glbShowAccessories=false;MiniSKUMiniCartPopUp.getMiniSkuHTML(obj,sku,effortCode,findNumber,'',promoCode);if(closeQView==1){var qview=this;var t=setTimeout(function(){popupLoading=null;qview.CloseQView();},300);}},AddToCartNoMiniCart:function(obj,sku,effortCode,findNumber,qty,promoCode){var params="action=4"+"&effortCode="+effortCode+"&findNumber="+findNumber+"&qty="+qty+"&promoCode="+promoCode+"&rnd="+Math.random();var ajax=new Ajax.Request(Resource.ajax.QView,{method:'get',parameters:params,onComplete:this.ProcessAddToCart.bind(this),asynchronous:true});},DisplayAccessoriesAfterAddToCart:function(requestObj){if(this.glbInkToner=="0")this.glbInkToner="false";ie6SelectFix("inkTonerDropDownFix",0);var QViewInfoDiv=$("QViewInfo");QViewInfoDiv.style.display="none";var QViewDiv=$("QView");QViewDiv.innerHTML="";QViewInfoDiv.effect=null;QViewInfoDiv.style.cssText="z-index:20000;position:absolute;";this.GetQViewAccessoriesHtml(null,this.glbAccessoryParentSKU,this.glbInkToner);},ShowTab:new TabMenuConst,openDiv:function(btn,mask,method,coords,dimensions){var animations=true;var shadow=false;var btn=$(btn);var mask=$(mask);if(method==1){mask.style.top=coords.y+"px";mask.style.left=coords.x+"px";return false;}
if($("QViewInfo").style.left=="-2000px")return false
var startValue;var endValue;if(btn){var btnOffset=getDimensions(btn);var maskOffset=getDimensions(mask);startValue=new Array(maskOffset.width,maskOffset.height,maskOffset.left,maskOffset.top);endValue=new Array(btnOffset.width,btnOffset.height,btnOffset.left,btnOffset.top);}
else{startValue=new Array(mask.clientWidth,mask.clientHeight);endValue=new Array(0,0);}
if(shadow==true&&btn&&animations==true){mask=$("shadow");mask.style.display="block";mask.style.width=startValue[0]+"px";mask.style.height=startValue[1]+"px";mask.style.left=startValue[2]+"px";mask.style.top=startValue[3]+"px";QEffects.x=1;$("QViewInfo").style.left="-2000px";}
else{mask.style.display="block";mask.className="BoxNoShadow";mask.style.overflow="hidden";}
if(animations==true){QEffects.init(startValue,endValue,function(v){mask.style.width=v[0]+"px";mask.style.height=v[1]+"px";if(v[2]){mask.style.left=v[2]+"px";mask.style.top=v[3]+"px";}},6,function(){mask.style.display="none";mask.style.left="-2000px";mask.style.width="";mask.style.height="";mask.style.top="";if(shadow==false){mask.style.display="none";mask.className="";$("QView").innerHTML="";mask.style.overflow="";}});}
else{mask.style.display="none";mask.style.left="-2000px";mask.style.width="";mask.style.height="";mask.style.top="";$("QView").innerHTML="";$("QViewInfo").style.left="-2000px";}},findPosY:function(obj){var curtop=0;if($||document.all){while(obj){curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(document.layers)curtop+=obj.y;return curtop;},findPosX:function(obj){var curleft=0;if($||document.all){while(obj){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(document.layers)curleft+=obj.x;return curleft;},repositionDIV:function(divToReposition,objAnchor){divToReposition=$(divToReposition);if(!divToReposition)return false;var top=0;var left=0;var scrollTop=getScrollTop();if(objAnchor!=null){var anchorPos=getDimensions(objAnchor);if((anchorPos.top+divToReposition.clientHeight)>=(document.documentElement.clientHeight+scrollTop)){var topRepositionFactor=anchorPos.top+divToReposition.clientHeight-document.documentElement.clientHeight;var top=(anchorPos.top-topRepositionFactor+scrollTop);}
else
top=anchorPos.top;if((anchorPos.left+anchorPos.width+divToReposition.clientWidth+10)>=(document.documentElement.clientWidth+document.documentElement.scrollLeft))left=anchorPos.left-divToReposition.clientWidth;else left=anchorPos.left+anchorPos.width;if(left<0)left=(document.documentElement.clientWidth/2-divToReposition.clientWidth/2)+document.documentElement.scrollLeft;}
else{top=(document.documentElement.clientHeight/2-divToReposition.clientHeight/2)+scrollTop;left=(document.documentElement.clientWidth/2-divToReposition.clientWidth/2);}
divToReposition.style.top=top+"px";divToReposition.style.left=left+"px";this.QViewTop=top;this.QViewLeft=left;this.QViewHeight=divToReposition.clientHeight;this.QViewWidth=divToReposition.clientWidth;},hideDropDowns:function(){if($("finderMask"))$("finderMask").className="ie6HideDropDowns";},showDropDowns:function(){if($("finderMask"))$("finderMask").className="";}};
function initScrollbars(div){if(div)var arrScrollBars=getElementsByClassNameInElement('div','customScrollBar',div);else var arrScrollBars=getElementsByClassName("div","customScrollBar");for(i=0;i<arrScrollBars.length;i++){customScroll(arrScrollBars[i].id);}}
function customScroll(div){if(!div)return false;var scroller=document.getElementById(div)
var slide=document.getElementById(div+"Slide");var slider=document.getElementById(div+"Slider");var content=document.getElementById(div+"Content");var mouseYStart;var mouseYCurrent;var prevMouseY;var currentSliderTop=0;var currentContentTop=0;var echo=document.getElementById("echo");var echo2=document.getElementById("echo2");var dragObject;var height;height=parseInt(scroller.getAttribute("sHeight"));if(!height)return false;var scaleSlider=0;var contentHeight=content.clientHeight;eventAdd(document,'mouseup',mouseUp);scroller.style.height=height+"px";content.style.top="0px";slider.style.top="0px";if(height>=contentHeight){slide.style.display="none";scroller.style.height="auto";scroller.style.position="static";scroller.style.paddingRight="0px";content.style.position="static";return false;}
slide.style.display="block";scroller.style.paddingRight=16+"px";scroller.style.position="relative";content.style.position="relative";scroller.style.overflow="hidden";scrollerHeight=height;sliderHeight=slider.clientHeight;slideHeight=height;slide.style.height=height-10+"px";slider.style.height=sliderHeight+"px";slider.onmousedown=function(event){if(event==null)event=window.event
var target=event.target!=null?event.target:event.srcElement;slider.src="/Images/sliderDragHover.gif";mouseYCurrent=getMouseY(event);prevMouseY=mouseYCurrent;dragObject=this;document.onmousemove=mouseMove;document.body.focus();document.onselectstart=function(){return false;};target.ondragstart=function(){return false;};return false;};slide.onmousedown=slideTab;if(content.addEventListener)slide.addEventListener('DOMMouseScroll',handleWheel,false);slide.onmousewheel=handleWheel;function handleWheel(event){var delta=wheel(event);if(delta>0)DynamicSlide("up","slide",Math.round(height/3));else if(delta<0)DynamicSlide("down","slide",Math.round(height/3));else return false;}
function slideTab(event){if(event==null)event=window.event
var target=event.target!=null?event.target:event.srcElement;if(target==slider)return false;var mouseY=getMouseY(event);var mouseYRelative=mouseY;var offsetAmmount=height;sliderOffset=getOffset(slider);if(mouseYRelative>sliderOffset['y']){DynamicSlide("down","slide",offsetAmmount);}
else{DynamicSlide("up","slide",offsetAmmount);}
if(event.preventDefault){event.preventDefault();}
return false;}
function DynamicSlide(direction,method,ammount){if(ammount)var offsetAmmount=ammount;else var offsetAmmount=height;var ratio3=(height-sliderHeight)/(contentHeight-height);if(direction=="down"){var end=Math.round(content.offsetTop-offsetAmmount)
var endSlider=Math.round(slider.offsetTop+(offsetAmmount*ratio3));if((-(contentHeight-height))>=(end)){end=Math.round(-(contentHeight-height));endSlider=Math.round(height-sliderHeight);}}
else if(direction=="up"){var end=Math.round(content.offsetTop+offsetAmmount);var endSlider=Math.round(slider.offsetTop-(offsetAmmount*ratio3));if(end>=0){end=0;endSlider=0;}}
else
return false
if(method=="slide"){SlideDiv(content,content.offsetTop,end,.5,"Y");SlideDiv(slider,slider.offsetTop,endSlider,.5,"Y");}
else{content.style.top=end+"px";slider.style.top=endSlider+"px";}
currentContentTop=end;currentSliderTop=endSlider;}
function mouseMove(event){if(event==null)event=window.event;if(dragObject){var mouseY=getMouseY(event);if(mouseY<0)return false;var Dmouse=mouseYCurrent-mouseY;var pixelRatio=(contentHeight-height)/(height-sliderHeight);var ratio=height/contentHeight;var sliderPos=currentSliderTop-Dmouse+ratio;if(prevMouseY>mouseY){if(0>=(currentSliderTop-Dmouse+ratio)){slider.style.top=0+"px";}
else{slider.style.top=currentSliderTop-Dmouse+ratio+"px";prevMouseY=mouseY;}
content.style.top=Math.round(-1*(slider.offsetTop*pixelRatio))+"px";}
else if(prevMouseY<mouseY){if(((currentSliderTop-Dmouse+ratio)+sliderHeight)>=(height)){slider.style.top=height-sliderHeight+"px";}
else{slider.style.top=currentSliderTop-Dmouse+ratio+"px";prevMouseY=mouseY;}
content.style.top=Math.round(-1*(slider.offsetTop*pixelRatio))+"px";}
currentContentTop=content.offsetTop;}}
function mouseUp(){if(dragObject){currentSliderTop=slider.offsetTop;slider.style.top=currentSliderTop+"px";document.onmousemove=null;dragObject.ondragstart=null;dragObject=null;slider.src="/Images/sliderDrag.gif";document.onselectstart=null;}}
function wheel(event){var delta=0;if(event==null)event=window.event;if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera)delta=-delta;}
else if(event.detail)delta=-event.detail/3;if(event.preventDefault)event.preventDefault();event.returnValue=false;return delta;}
function getMouseY(event){if(event==null)event=window.event;if(event.pageY)return event.pageY;else if(event.clientY)return event.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);else return null;}}
var SCSCRIPT=function(){};SCSCRIPT.prototype={fx:null,ControlID:null,mask:null,scroller:null,pageWidth:null,list:null,items:null,currentPage:0,height:170,itemWidth:180,itemsPerPage:5,pages:null,name:null,mode:null,initFinder:function(controlId){this.fx=new animConst();this.fx.name=controlId;this.ControlID=controlId;this.mask=$(this.ControlID+'scrollerMask');this.scroller=$(this.ControlID+'scrollz');if(this.scroller!=null){this.pageWidth=parseInt(this.itemWidth*this.itemsPerPage);this.list=this.getElementsByClassNameInElement('div','itemb',this.scroller.id);this.items=this.list.length;this.scroller.style.width=this.items*this.itemWidth+"px";this.mask.style.height=this.height+"px";this.mask.style.width=this.pageWidth-1+"px";this.pages=Math.ceil(this.items/this.itemsPerPage);this.setupHelpers();}},setupHelpers:function(){var c=this.currentPage;var helper=$(this.ControlID+"helper");if(c==0)$(this.ControlID+"toLeft").className="scLeft ScrPhLeft";else $(this.ControlID+"toLeft").className="scLeft";if(c==this.pages-1)$(this.ControlID+"toRight").className="scRight ScrPhRight";else $(this.ControlID+"toRight").className="scRight";if(helper){if(this.mode=="pagination")helper.innerHTML="<span class=\"scPager\">[ Page "+(c+1)+" of "+this.pages+" ]</span>";else helper.innerHTML="";for(var i=0;i<this.pages;i++){if(i==c){helper.innerHTML+="<a class='selected' href='javascript:void(0);'>"+(i+1)+"</a>";}
else{helper.innerHTML+="<a href=\"javascript:"+this.name+".getOverHere("+i+");\" alt=''>"+(i+1)+"</a>";}}}},getOverHere:function(targetPage){if(this.fx.z!=null&&(targetPage=="toLeft"||targetPage=="toRight"))return false;var pages=this.pages;var c=this.currentPage;var obj=this.scroller;var endPage=this.pages-1;var startPage=0;if(targetPage=='toLeft'){if(c==0&&startPage==0)return false;targetPage=(c-1);if(targetPage<startPage)return false;}
else if(targetPage=='toRight'){if(c==pages)return false;targetPage=(c+1);if(targetPage>endPage)return false;}
this.currentPage=targetPage;this.setupHelpers();var start=parseInt(this.scroller.style.left);var end=-(targetPage)*this.pageWidth;this.fx.init(start,end,function(v){obj.style.left=v+"px";},2);},getElementsByClassNameInElement:function(strTagName,strClassName,id){var arrElements=(strTagName=="*"&&document.all)?document.all:document.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)&&(oElement.parentNode.id==id)){arrReturnElements.push(oElement);}}
return(arrReturnElements);}}
var addToCartShowing=0;var visibleAddToCart=null;function lastChild(el){var l=el.lastChild;while(l!=null&&l.nodeType!=1){l=l.previousSibling;}
return l;}
function previousSiblingByClass(el,className){var l=el.previousSibling;while(l!=null&&l.className!=className){l=l.previousSibling;}
return l;}
function showAddToCart(obj){if(!addToCartShowing){if(visibleAddToCart!=null){var strClass=obj.className;var strnewClass=strClass.replace(" itemOver"," ");visibleAddToCart.className=strnewClass;addToCartShowing=0;}
if(!obj.qtyErrorDiv){obj.qtyErrorDiv=lastChild(lastChild(obj));obj.quantityValue=previousSiblingByClass(obj.qtyErrorDiv,"hidden");obj.quantity=previousSiblingByClass(obj.quantityValue,"qtyInputScroll");obj.quantityValue=obj.quantityValue.value;}
obj.qtyErrorDiv.style.display="none";obj.quantity.value=obj.quantityValue;if(obj.className.match("itemOver"))return false;var n=4;if(obj.parentNode.id.match("ctl03"))n=3;for(var i=0;i<10;i++){var o=obj.id.match("item"+(i*n-1))
if(o!=null){obj.className+=" cartLeft";}}
visibleAddToCart=obj;obj.className=obj.className+" itemOver";}}
function hideAddToCart(override){if(visibleAddToCart!=null){if(override){visibleAddToCart.className="itemb";addToCartShowing=0;visibleAddToCart=null;}
else if(!addToCartShowing){visibleAddToCart.className="itemb";addToCartShowing=0;visibleAddToCart=null;}}}
function resetAddToCart(obj){if(visibleAddToCart!=null){var strClass=obj.className;var strnewClass=strClass.replace(" itemOver"," ");visibleAddToCart.className=strnewClass;addToCartShowing=0;}}
function addItemsToCartFromWidget(obj,EffortCode,FindNumber,Quantity,PromoCode,MultipleSellQty,MaximumSellQty){if(Quantity){if(Quantity!=""){hideAddToCart(1);addToCartShowing=1;MiniSKUMiniCartPopUp.addItemsToCartFromWidget(obj,EffortCode,FindNumber,Quantity,PromoCode);}}}

