function checkSessionCookie()
{if(!isSessionCookieEnabled())
{window.alert("Cookies must be enabled to continue.");window.location="noCookies.asp";}}
function isSessionCookieEnabled()
{var ret=ReadCookie("SFCookieEnabled");if(ret!="True")
{SetCookie("SFCookieEnabled","True");ret=ReadCookie("SFCookieEnabled");}
if(ret!="True")
{return false;}else{return true;}}
function ReadCookie(cookieName)
{var theCookie=""+document.cookie;var ind=theCookie.indexOf(cookieName);if(ind==-1||cookieName=="")return"";var ind1=theCookie.indexOf(';',ind);if(ind1==-1)ind1=theCookie.length;return unescape(theCookie.substring(ind+cookieName.length+1,ind1));}
function SetCookie(cookieName,cookieValue,nDays)
{var today=new Date();var expire=new Date();if(nDays==null||nDays==0)nDays=1;expire.setTime(today.getTime()+3600000*24*nDays);document.cookie=cookieName+"="+escape(cookieValue)+";expires="+expire.toGMTString();}
function LTrim(value)
{var re=/\s*((\S+\s*)*)/;return value.replace(re,"$1");}
function RTrim(value)
{var re=/((\s*\S+)*)\s*/;return value.replace(re,"$1");}
function Trim(value)
{return LTrim(RTrim(value));}
function isInteger(theField,emptyOK,theMessage)
{if(theField.value=="")
{if(emptyOK)
{return(true);}
{alert(theMessage);theField.focus();theField.select();return(false);}}
var i;var s=theField.value;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(!((c>="0")&&(c<="9")))
{alert(theMessage);theField.focus();theField.select();return(false);}}
if(s>0)
{return(true);}
{alert(theMessage);theField.focus();theField.select();return(false);}}
function isValidEmailAddress(email)
{if((email.indexOf("@")==-1)||(email.indexOf(".")==-1))
{return false;}
return true;}
function hiderror(){document.getElementById('err').innerHTML=""}
function showError(msg,url,l)
{error="<strong>A Javascript error has occured!<br />"
error+="____________________________________________________<br /><br />"
error+="Error message: "+msg+".<br />"
error+="URL: "+url+"<br />"
error+="Line: "+l+"<br />"
error+="____________________________________________________<br /></strong>"
error+="<span onmouseover='hiderror()' class='small'>[mouseOver here to hide error message]</span>"
document.getElementById('err').innerHTML=error;self.scroll(0,0);alert("A Javascript error has occured!\n\nError message: "+msg+"\n\Line: "+l);return false;}
function blockError(){return true;}
function setJSErrorHandling()
{}<!--
var ua=navigator.userAgent
var ps=navigator.productSub
var dom=(document.getElementById)?1:0
var ie4=(document.all&&!dom)?1:0
var ie5=(document.all&&dom)?1:0
var nn4=(navigator.appName.toLowerCase()=="netscape"&&parseInt(navigator.appVersion)==4)
var nn6=(dom&&!ie5)?1:0
var sNav=(nn4||nn6||ie4||ie5)?1:0
var cssFilters=((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)?1:0
var tipStyle=[],tipMessage=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip="eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root=((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")?"document.documentElement":"document.body"
var PX=(nn6)?"px":""
if(sNav){window.onresize=ReloadTip
document.onmousemove=MoveTip
if(nn4)document.captureEvents(Event.MOUSEMOVE)}
if(nn4||nn6){mx="e.pageX"
my="e.pageY"
scl="window.pageXOffset"
sct="window.pageYOffset"
if(nn4){obj="document.TipLayer."
sl="left"
st="top"
ih="clip.height"
iw="clip.width"
vl="'show'"
hl="'hide'"
sv="visibility="}
else obj="document.getElementById('TipLayer')."}
if(ie4||ie5){obj="TipLayer."
mx="event.x"
my="event.y"
scl="eval(doc_root).scrollLeft"
sct="eval(doc_root).scrollTop"
if(ie5){mx=mx+"+"+scl
my=my+"+"+sct}}
if(ie4||dom){sl="style.left"
st="style.top"
ih="offsetHeight"
iw="offsetWidth"
vl="'visible'"
hl="'hidden'"
sv="style.visibility="}
if(ie4||ie5||ps>=20020823){ww="eval(doc_root).clientWidth"
wh="eval(doc_root).clientHeight"}
else{ww="window.innerWidth"
wh="window.innerHeight"
evlh=eval(wh)
evlw=eval(ww)
sbw=15}
function applyCssFilter(){if(cssFilters&&FiltersEnabled){var dx=" progid:DXImageTransform.Microsoft."
TipLayer.style.filter="revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"}}
function stm(t,s){if(sNav){if(t.length<2||s.length<25){var ErrorNotice="DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
if(t.length<2&&s.length<25)alert(ErrorNotice+"It looks like you removed an entry or more from the tipStyle Array and tipMessage Array of this tip.\nTheir should be 25 entries in every tipStyle Array even though empty and 2 in every tipMessage Array. You defined only "+s.length+" entries in the tipStyle Array and "+t.length+" entry in the tipMessage Array. This tip won't be viewed to avoid errors")
else if(t.length<2)alert(ErrorNotice+"It looks like you removed an entry or more from the tipMessage Array of this tip.\nTheir should be 2 entries in every tipMessage Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
else if(s.length<25)alert(ErrorNotice+"It looks like you removed an entry or more from the tipStyle Array of this tip.\nTheir should be 25 entries in every tipStyle Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")}
else{var ab="";var ap=""
var titCol=(s[0])?"COLOR='"+s[0]+"'":""
var txtCol=(s[1])?"COLOR='"+s[1]+"'":""
var titBgCol=(s[2])?"BGCOLOR='"+s[2]+"'":""
var txtBgCol=(s[3])?"BGCOLOR='"+s[3]+"'":""
var titBgImg=(s[4])?"BACKGROUND='"+s[4]+"'":""
var txtBgImg=(s[5])?"BACKGROUND='"+s[5]+"'":""
var titTxtAli=(s[6]&&s[6].toLowerCase()!="left")?"ALIGN='"+s[6]+"'":""
var txtTxtAli=(s[7]&&s[7].toLowerCase()!="left")?"ALIGN='"+s[7]+"'":""
var add_height=(s[15])?"HEIGHT='"+s[15]+"'":""
if(!s[8])s[8]="Verdana,Arial,Helvetica"
if(!s[9])s[9]="Verdana,Arial,Helvetica"
if(!s[12])s[12]=1
if(!s[13])s[13]=1
if(!s[14])s[14]=200
if(!s[16])s[16]=0
if(!s[17])s[17]=0
if(!s[18])s[18]=10
if(!s[19])s[19]=10
hs=s[11].toLowerCase()
if(ps==20001108){if(s[2])ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
var closeLink=(hs=="sticky")?"<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
var title=(t[0]||hs=="sticky")?"<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>":""
var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol+">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
if(nn4){with(eval(obj+"document")){open()
write(txt)
close()}}
else eval(obj+"innerHTML=txt")
tbody={Pos:s[10].toLowerCase(),Xpos:s[18],Ypos:s[19],Transition:s[20],Duration:s[21],Alpha:s[22],ShadowType:s[23].toLowerCase(),ShadowColor:s[24],Width:parseInt(eval(obj+iw)+3+sbw)}
if(ie4){TipLayer.style.width=s[14]
tbody.Width=s[14]}
Count=0
move=1}}}
function MoveTip(e){if(move){var X,Y,MouseX=eval(mx),MouseY=eval(my);tbody.Height=parseInt(eval(obj+ih)+3)
tbody.wiw=parseInt(eval(ww+"+"+scl));tbody.wih=parseInt(eval(wh+"+"+sct))
switch(tbody.Pos){case"left":X=MouseX-tbody.Width-tbody.Xpos;Y=MouseY+tbody.Ypos;break
case"center":X=MouseX-(tbody.Width/2);Y=MouseY+tbody.Ypos;break
case"float":X=tbody.Xpos+eval(scl);Y=tbody.Ypos+eval(sct);break
case"fixed":X=tbody.Xpos;Y=tbody.Ypos;break
default:X=MouseX+tbody.Xpos;Y=MouseY+tbody.Ypos}
if(tbody.wiw<tbody.Width+X)X=tbody.wiw-tbody.Width
if(tbody.wih<tbody.Height+Y+sbw){if(tbody.Pos=="float"||tbody.Pos=="fixed")Y=tbody.wih-tbody.Height-sbw
else Y=MouseY-tbody.Height}
if(X<0)X=0
eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
ViewTip()}}
function ViewTip(){Count++
if(Count==1){if(cssFilters&&FiltersEnabled){for(Index=28;Index<31;Index++){TipLayer.filters[Index].enabled=0}
for(s=0;s<28;s++){if(TipLayer.filters[s].status==2)TipLayer.filters[s].stop()}
if(tbody.Transition==51)tbody.Transition=parseInt(Math.random()*50)
var applyTrans=(tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)?1:0
var advFilters=(tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)?1:0
var which=(applyTrans)?0:(advFilters)?tbody.Transition-23:0
if(tbody.Alpha>0&&tbody.Alpha<100){TipLayer.filters[28].enabled=1
TipLayer.filters[28].opacity=tbody.Alpha}
if(tbody.ShadowColor&&tbody.ShadowType=="simple"){TipLayer.filters[29].enabled=1
TipLayer.filters[29].color=tbody.ShadowColor}
else if(tbody.ShadowColor&&tbody.ShadowType=="complex"){TipLayer.filters[30].enabled=1
TipLayer.filters[30].color=tbody.ShadowColor}
if(applyTrans||advFilters){eval(obj+sv+hl)
if(applyTrans)TipLayer.filters[0].transition=tbody.Transition
TipLayer.filters[which].duration=tbody.Duration
TipLayer.filters[which].apply()}}
eval(obj+sv+vl)
if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters))TipLayer.filters[which].play()
if(hs=="sticky")move=0}}
function stickyhide(){eval(HideTip)}
function ReloadTip(){if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh)))location.reload()
else if(hs=="sticky")eval(HideTip)}
function htm(){if(sNav){if(hs!="keep"){move=0;if(hs!="sticky")eval(HideTip)}}}
var FiltersEnabled=0
tipStyle['dataEntry']=["white","black","steelblue","whitesmoke","","","","","","","","","","",200,"",2,2,10,10,"","","","simple","gray"]
document.write('<div id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100"></div>');function openChat(varUrl)
{var winleft=(screen.width-700)/2;var wintop=(screen.height-450)/2;window.open(varUrl,'chat','toolbar=0,location=0,status=1,menubar=0,scrollbars=0,resizable=1,width=700,height=450,top='+wintop+',left='+winleft);}
function openMessenger()
{lt=ReadCookie('lhtop')-30;ll=ReadCookie('lhleft')-4;lh=ReadCookie('lhheight');lw=ReadCookie('lhwidth');window.open('livehelp/messenger.asp','messenger','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,width='+lw+',height='+lh+',top='+lt+',left='+ll);}
function popupEliminatorScrollToTop()
{var elem=document.getElementById("tblThankyouMessage");if(elem!=null)
{elem.scrollIntoView(true);elem.focus();}}
function hideThankYou()
{hideAjaxLightbox();}
var ajax_CheckStock_Enabled=true;var ajax_MTP_Enabled=true;var ajax_Review_Enabled=true;var ajax_addToCart_Enabled=false;var ajax_shipping_Enabled=true;function ajaxAddToCart(theFormName)
{if(ajax_addToCart_Enabled)
{showAjaxLightbox();$("#ssAddToCart").html("<h1>Adding item . . .</h1>");$.post("addproduct_ajax.asp",$("#"+theFormName).serialize(),function(theResponse){updateAddToCart(theResponse);},"html");return true;}else{return false;}}
function ajaxShowMTP(strProductID)
{if(ajax_MTP_Enabled)
{$("#MTPrice_"+strProductID).html('Loading volume discounts . . .');$.post("getDynamicScript.asp?Action=ShowMTPrices&sProdId="+strProductID,"",function(theResponse){$("#MTPrice_"+strProductID).html(theResponse);},"html");}else{show_page("MTPrices.asp?sProdId="+strProductID)}
return false;}
function ajaxShowProductReview(strProductID)
{if(ajax_Review_Enabled)
{$("#divShowProductReview").html('Loading reviews . . .');$.post("getDynamicScript.asp?Action=ReadReviews&PRODUCT_ID="+strProductID,"",function(theResponse){$("#divShowProductReview").html(theResponse);},"html");return false;}
return true;}
function ajaxWriteProductReview(strProductID)
{if(ajax_Review_Enabled)
{$("#divShowProductReview").html('Loading reviews . . .');$.post("getDynamicScript.asp?Action=WriteReview&PRODUCT_ID="+strProductID,"",function(theResponse){$("#divShowProductReview").html(theResponse);},"html");return false;}
return true;}
function ajaxSubmitProductReviewVote(value,id)
{if(ajax_Review_Enabled)
{$("#productReviewVotingButtons").html('Submitting vote . . .');$.post("getDynamicScript.asp?Action=RateReview","ReviewAction="+value+"&contentReferenceID="+id,function(theResponse){$("#productReviewVotingButtons").html(theResponse);},"html");return true;}
return false;}
function ajaxSubmitProductReview(theFormName)
{if(ajax_Review_Enabled)
{$.post("getDynamicScript.asp",$("#"+theFormName).serialize(),function(theResponse){$("#productReview").html(theResponse);},"html");return true;}else{return false;}}
function ajaxCheckStock(strProductID)
{if(ajax_CheckStock_Enabled)
{$("#checkStock_"+strProductID).html('Checking stock . . .');$.post("StockInfo.asp","sProdId="+strProductID,function(theResponse){$("#checkStock_"+strProductID).html(theResponse);},"html");}else{show_page("StockInfo.asp?sProdId="+strProductID)}
return false;}
function ajaxUpdateVisitorShippingPreferences(theFormName)
{if(ajax_shipping_Enabled)
{$("#divVisitorShippingPreferenceMessage").show();$("#divVisitorShippingPreferenceMessage").html('Calculating shipping . . . <img src="images/zoomloader.gif" />');$.post("order_ajax.asp","updateVisitorShippingPreferences=Update&PageAjaxed=updateVisitorShippingPreferences&"+$("#"+theFormName).serialize(),function(theResponse){updateShippingOptions(theResponse);},"html");return true;}else{return false;}}
function updateAddToCart(theResponse)
{$("#ssAddToCart").html(theResponse)
updateAjaxLightbox();if(document.getElementById('divMiniCart')){ajaxed.getCartDetail('add',updateMiniCart,null,null,'getDynamicScript.asp?Action=DisplayMiniCart');}}
function updateDiv(strDivID,theResponse)
{showElement(strDivID);document.getElementById(strDivID).innerHTML=theResponse;}
function updateCheckStock(theResponse){hideElement('divCheckStockLink');updateDiv('divCheckStock',theResponse);}
function updateMiniCart(theResponse){$("#divMiniCart").html(theResponse)}
function updateOrderSummary(theResponse){$("#divOrderSummaryWrapper").html(theResponse)}
function updateShippingOptions(theResponse)
{$("#divVisitorShippingPreferenceMessage").html('Shipping calculated');$("#divVisitorShippingPreferenceMessage").hide(2000);$("#divVisitorShippingPreferences").html(theResponse);$("#divOrderSummaryWrapper").show();$("#divOrderSummaryWrapper").html('Recalculating order . . .');$.post("order_ajax.asp","PageAjaxed=displayOrderSummary",function(theResponse){updateOrderSummary(theResponse);},"html");}
function expandSectionContent(sectionName,keepSummary)
{var e=document.getElementById(sectionName+"_selector");var expanded=(e.innerHTML=="+");if(expanded)
{if(!keepSummary){hideElement(sectionName+"_content_summary")}
showElement(sectionName+"_content_complete")
e.innerHTML="-"}else{showElement(sectionName+"_content_summary")
hideElement(sectionName+"_content_complete")
e.innerHTML="+"}}
function displayWindow(theurl,thewindowname,doihavescrollbars,thewidth,theheight,amiresizable)
{if(!thewindowname){thewindowname='Untitled';}
if(!doihavescrollbars){doihavescrollbars='yes';}
if(!thewidth){thewidth=500;}
if(!theheight){theheight=500;}
if(!amiresizable){amiresizable='yes';}
window.open(theurl,thewindowname,'toolbar=0,location=0,width='+thewidth+',height='+theheight+',scrollbars='+doihavescrollbars+',resizable='+amiresizable);}
function getPageScroll(){var yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;}else if(document.body){yScroll=document.body.scrollTop;}
arrayPageScroll=new Array('',yScroll)
return arrayPageScroll;}
function centerAjaxLightbox(){var arrayPageSize=new Array($(document.body).width(),$(document.body).height(),$(window).width(),$(window).height());var arrayPageScroll=getPageScroll();$('#boxed').css("top",arrayPageScroll[1]+((arrayPageSize[3]-50-$('#boxed').height())/2)+'px');$('#boxed').css("left",((arrayPageSize[0]-100-$('#boxed').width())/2)+'px');}
function showAjaxLightbox()
{if($("#loading-panel").length<=0){initAjaxLightbox();}
$("select").css("display","none");$("#ssAddToCart").css("display","block");$("#loading-panel").css("height",($(document.body).height()+'px'));$("#loading-panel").show();$("#boxed").fadeIn('slow');$("#loadingif").show();$("#boxed-close").hide();centerAjaxLightbox();return false;}
function updateAjaxLightbox(){$("#loadingif").hide();$("#boxed-close").show();centerAjaxLightbox();}
function hideAjaxLightbox(){$('#boxed').hide();$('#loading-panel').hide();$("select").css("display","block");}
function initAjaxLightbox(){if(!document.getElementsByTagName){return;}
var objBody=document.getElementsByTagName("body").item(0);var objOverlay=document.createElement("div");objOverlay.setAttribute('id','loading-panel');objOverlay.onclick=function(){hideAjaxLightbox();return false;}
objOverlay.style.display='none';objOverlay.style.position='absolute';objOverlay.style.top='0';objOverlay.style.left='0';objOverlay.style.zIndex='999999';objOverlay.style.width='100%';if($.browser.msie){objOverlay.style.backgroundColor='#333';objOverlay.style.backgroundColor='transparent';objOverlay.style.backgroundImage='url(../images/pixel.gif)';objOverlay.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="images/overlay.png", sizingMethod="scale")';}
objBody.insertBefore(objOverlay,objBody.firstChild);var objBoxed=document.createElement("div");objBoxed.setAttribute('id','boxed');objBoxed.style.position='absolute';objBoxed.style.width='800px';objBoxed.style.display='block';objBoxed.style.zIndex='9999999';objBody.insertBefore(objBoxed,objOverlay.nextSibling);var objDiv=document.createElement("div");objDiv.setAttribute('class','relative');objDiv.style.position='relative';objDiv.style.width="100%";objBoxed.appendChild(objDiv);var objA=document.createElement("a");objA.setAttribute('href','javascript:hideThankYou();');objA.setAttribute('title','Close This Dialog');objA.setAttribute('class','close-circle');if($.browser.msie){objA.style.position='absolute';objA.style.color='#0066CC';objA.style.cursor='pointer';objA.style.height='48px';objA.style.right='-52px';objA.style.top='-51px';objA.style.width='48px';objA.style.backgroundColor='#333';objA.style.backgroundColor='transparent';objA.style.backgroundImage='url(../images/pixel.gif)';objA.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="images/close_circle.png", sizingMethod="scale")';}
objDiv.appendChild(objA);var objImage=document.createElement("img");objImage.setAttribute('id','loadingif');objImage.setAttribute('src','images/zoomloader.gif');objBoxed.appendChild(objImage);var objssAddToCart=document.createElement("div");objssAddToCart.setAttribute('id','ssAddToCart');objssAddToCart.style.display='block';objBoxed.appendChild(objssAddToCart);}
var popupWindow;var popupWindowMessage;var popupWindowPath;var popupWindowFeatures;function checkpopupWindow()
{if(popupWindow==null)
{var ret=confirm(popupWindowMessage);window.open(popupWindowPath,"",popupWindowFeatures)}else{popupWindow.focus();}}
function show_page(path){var sPath
sPath=new String(path)
var sFeatures,h,w,win,i,ind
var urlncodedPath
h=window.screen.availHeight
w=window.screen.availWidth
sFeatures="height="+h*.50+",width="+w*.52+",screenY="+(h*.30)+",screenX="+(w*.33)+",top="+(h*.30)+",left="+(w*.33)+",resizable=yes"
sPath=sPath.replace("#","%23")
popupWindowMessage="This site uses pop-ups to implement specific functionality. It appears you have pop-ups blocked.";popupWindowPath=sPath;popupWindowFeatures=sFeatures;window.setTimeout("checkpopupWindow();",1000);popupWindow=window.open(sPath,"",sFeatures)}
function show_stockinfo(path){var sFeatures,h,w,win,i
h=window.screen.availHeight
w=window.screen.availWidth
sFeatures="scrollbars=yes,height="+h*.50+",width="+w*.52+",screenY="+(h*.30)+",screenX="+(w*.33)+",top="+(h*.30)+",left="+(w*.33)+",resizable=yes"
win=window.open(path,"",sFeatures)}
function show_invmsg()
{var sFeatures,h,w,win,i
path='invenmessage.asp'
h=window.screen.availHeight
w=window.screen.availWidth
sFeatures="height="+h*.42+",width="+w*.40+",screenY="+(h*.30)+",screenX="+(w*.33)+",top="+(h*.30)+",left="+(w*.33)+",resizable"
win=window.open(path,"",sFeatures)}
function emailwishlist(){var sFeatures,h,w,friendWin,path
h=window.screen.availHeight
w=window.screen.availWidth
path='EmailWishList.asp'
sFeatures="height="+h*.75+",width="+w*.80+",resizable"
friendWin=window.open(path,"",sFeatures)}
function linkCorrect(){if(window.document.links.length>1){for(i=0;i<window.document.links.length;i++){if(window.document.links[i].href!="javascript:window.close()"){temp=window.document.links[i].href
window.document.links[i].href="javascript:openParent('"+temp+"')"}}}}
function openParent(sHref){window.opener.location=sHref;window.close();}
function specialCase(e,form){if((e.name=="CardName")||(e.name=="CardNumber")||(e.name=="CardExpiryMonth")||(e.name=="CardExpiryYear")){if(((form.CardName.value.length<=0)||(form.CardNumber.value.length<=0)||(form.CardExpiryMonth.value.length<=0)||(form.CardExpiryYear.value.length<=0))&&((form.CardName.value.length>0)||(form.CardNumber.value.length>0)||(form.CardExpiryMonth.value.length>0)||(form.CardExpiryYear.value.length>0))){return"Please enter all Credit Card Information.";}
if((form.CardName.value.length>0)&&(form.CardNumber.value.length>0)&&(form.CardExpiryMonth.value.length>0)&&(form.CardExpiryYear.value.length>0)){if(!isCardDateValid(form.CardExpiryYear.value,form.CardExpiryMonth.value)){return"The Credit Card has Expired.";}
if(isCardNumValid(form.CardNumber.value))
{return"The Credit Card Number is an invalid format.";}else{if(!isCorrectCreditCardType(form.CardType,form.CardNumber))
{return"The Credit Card Number is invalid for the selected Card Type.";}}}}
if((e.name=="CheckNumber")||(e.name=="BankName")||(e.name=="RoutingNumber")||(e.name=="CheckingAccountNumber")){if(((form.CheckNumber.value.length<=0)||(form.BankName.value.length<=0)||(form.RoutingNumber.value.length<=0)||(form.CheckingAccountNumber.value.length<=0))&&((form.CheckNumber.value.length>0)||(form.BankName.value.length>0)||(form.RoutingNumber.value.length>0)||(form.CheckingAccountNumber.value.length>0))){return"Please enter all eCheck Information.";}}
if((e.name=="POName")||(e.name=="PONumber")){if(((form.POName.value.length<=0)||(form.PONumber.value.length<=0))&&((form.POName.value.length>0)||(form.PONumber.value.length>0))){return"Please enter all Purchase Order Information.";}}
if((form.CardName.value.length<=0)&&(form.CardNumber.value.length<=0)&&(form.CardExpiryMonth.value.length<=0)&&(form.CardExpiryYear.value.length<=0)&&(form.CheckNumber.value.length<=0)&&(form.BankName.value.length<=0)&&(form.RoutingNumber.value.length<=0)&&(form.CheckingAccountNumber.value.length<=0)&&(form.POName.value.length<=0)&&(form.PONumber.value.length<=0)){return"Please enter payment method Information.";}
return"";}
function stripChar(sValue,sChar){var i,tempChar,buildString;buildString=""
for(var i=0;i<sValue.length;i++){tempChar=sValue.charAt(i);if(tempChar!=sChar){buildString=buildString+tempChar;}}
return buildString;}
function isCardDateValid(year,month){var dateCheck,now;if(year.length==2){if(parseInt(year)<50){year="20"+year;}}
now=new Date();dateCheck=new Date(year,month);if(now>dateCheck){return false;}
else{return true;}}
function isCardNumValid(num){var num1,num2,tempNum;if(!isNumber(num)){return true;}
num1=""
if(!(num.length%2==0)){for(var j=0;j<num.length;j++){if((j+1)%2==0){tempNum=2*num.charAt(j);}
else{tempNum=1*num.charAt(j);}
num1=num1+tempNum.toString();}}
else{for(var j=0;j<num.length;j++){if((j+1)%2==0){tempNum=1*num.charAt(j);}
else{tempNum=2*num.charAt(j);}
num1=num1+tempNum.toString();}}
num2=0;for(var j=0;j<num1.length;j++){num2=num2+parseInt(num1.charAt(j));}
if(num2%10==0){return false;}
else{return true;}}
function isNumber(value){for(var i=0;i<value.length;i++){a=parseInt(value.charAt(i));if(isNaN(a)){return false;break;}}
return true;}
function sfCheck(form){var e,title,empty_fields,char_check,invalid_card,month,year,invalid_date,eMail,invalid_eMail
var iQuantity,quantity_check,checkSpecial,tempError,special_Error,msg,upperLine,lowerLine
var bad_Zip,num,invalid_phoneNumber,passwd_mismatch
msg="";empty_fields="";char_check="";special_Error="";tempError="";num=form.length
for(var i=0;i<form.length;i++){e=form.elements[i]
if((e.title==null)||(e.title=="")){title=e.name;}
else{title=e.title;}
if(((e.type=="text")||(e.type=="textarea")||(e.type=="password"))&&!e.special&&!e.disabled){if(e.value.length<=0&&!e.optional&&(e.name.indexOf("Ship")==-1)){empty_fields+="\n            "+title;continue;}
if(e.number){num=e.value;num=stripChar(num,".");num=stripChar(num,",");if(!isNumber(num)){char_check+="\n             "+title;}}
if(e.creditCardNumber){e.value=stripChar(e.value," ");e.value=stripChar(e.value,"-");invalid_card=isCardNumValid(e.value);if(!isCardNumValid(form.CardNumber.value))
{if(!isCorrectCreditCardType(form.CardType,form.CardNumber))
{alert("The Credit Card Number is invalid for the selected Card Type.");return false;}}}
if((e.creditCardExpMonth)||(e.creditCardExpYear)){if(e.creditCardExpMonth){month=e.value;month=stripChar(month," ")
if(!isNumber(month)){invalid_date=true;month=null;}}
if(e.creditCardExpYear){year=e.value;year=stripChar(year," ")
if(!isNumber(year)){invalid_date=true;year=null;}}
if((month!=null)&&(year!=null)){if(!isCardDateValid(year,month)){invalid_date=true;}}}
if(e.eMail){eMail=e.value;if((eMail.indexOf("@")!=-1)&&(eMail.indexOf(".")!=-1)){invalid_eMail=false;}
else{invalid_eMail=true;}}
if(e.name=="txtEmail"){eMail=e.value;if((eMail.indexOf("@")!=-1)&&(eMail.indexOf(".")!=-1)){invalid_eMail=false;}
else{invalid_eMail=true;}}
if(e.name=="Email"){eMail=e.value;if((eMail.indexOf("@")!=-1)&&(eMail.indexOf(".")!=-1)){invalid_eMail=false;}
else{invalid_eMail=true;}}
if(e.name=="txtFriend"){eMail=e.value;if((eMail.indexOf("@")!=-1)&&(eMail.indexOf(".")!=-1)){invalid_eMail=false;}
else{invalid_eMail=true;}}
if(e.phoneNumber){num=e.value;num=stripChar(num," ");num=stripChar(num,"-");num=stripChar(num,"+");if(num.length<10){invalid_phoneNumber=true;}}}
if(e.quantityBox){iQuantity=e.value;if(!isNumber(iQuantity)){quantity_check=true;}
if(parseInt(iQuantity)<0){quantity_check=true;}
if((iQuantity)<1){quantity_check=true;}}
if(e.password){if(form.Password.value!=form.Password2.value){passwd_mismatch=true;}}
if(e.zipcode){if(e.value.length>0&&e.value.length<5){bad_Zip=true;}}
if(e.special){checkSpecial=specialCase(e,form);if(tempError!=checkSpecial){special_Error=special_Error+checkSpecial}
tempError=checkSpecial;}
if(e.type=="select-one"&&!e.optional){if(e.options.selectedIndex!=-1)
{if(e.options[e.options.selectedIndex].value==""){empty_fields+="\n            "+title;continue;}}else{empty_fields+="\n            "+title;continue;}}}
if(!bad_Zip&&!empty_fields&&!char_check&&!special_Error&&!invalid_card&&!invalid_date&&!invalid_eMail&&!quantity_check&&!invalid_phoneNumber&&!passwd_mismatch){return true}
msg="The form was not submited due to the following error(s).\n";upperLine="\n_________________________________________________________\n\n";lowerLine="_________________________________________________________\n";if(empty_fields){msg+=upperLine;msg+="The following field(s) must be filled in:\n";msg+=lowerLine;msg+=empty_fields;}
if(char_check){msg+=upperLine;msg+="The following field(s) need a numeric value:\n";msg+=lowerLine;msg+=char_check;}
if(quantity_check){msg+=upperLine;msg+="Please Enter a Positive Integer.\n"
msg+=lowerLine;}
if(invalid_card){msg+=upperLine;msg+="The Credit Card Number is an invalid format.\n";msg+=lowerLine;}
if(invalid_date){msg+=upperLine;msg+="The Credit Card has Expired.\n";msg+=lowerLine;}
if(invalid_eMail){msg+=upperLine;msg+="The Email Address is in an invalid format.\n";msg+=lowerLine;}
if(invalid_phoneNumber){msg+=upperLine;msg+="Please enter a valid Phone Number with area code.\n";msg+=lowerLine;}
if(special_Error){msg+=upperLine;msg+=special_Error+"\n";msg+=lowerLine;}
if(passwd_mismatch){msg+=upperLine;msg+="Your passwords did not match. Please enter them again.\n";msg+=lowerLine;}
if(bad_Zip){msg+=upperLine;msg+="The postal code is too short. Please enter it again.\n";msg+=lowerLine;}
alert(msg);return false;}
function sfCheckPlus(frm){if(window.document.form1.ShipZip.value!=""||window.document.form1.ShipFirstName.value!=""||window.document.form1.ShipMiddleInitial.value!=""||window.document.form1.ShipLastName.value!=""||window.document.form1.ShipCompany.value!=""||window.document.form1.ShipAddress1.value!=""||window.document.form1.ShipAddress2.value!=""||window.document.form1.ShipCity.value!=""||(window.document.form1.ShipState.value!=""&&window.document.form1.ShipState.value!=null)||(window.document.form1.ShipCountry.value!=""&&window.document.form1.ShipCountry.value!=null)||window.document.form1.ShipPhone.value!=""||window.document.form1.ShipEmail.value!=""||window.document.form1.ShipFax.value!="")
{var blnShipStateRequired;blnShipStateRequired=(window.document.form1.ShipCountry.options[document.form1.ShipCountry.selectedIndex].text=="us"||window.document.form1.ShipCountry.options[document.form1.ShipCountry.selectedIndex].text=="ca");if((window.document.form1.ShipZip.value==""&&window.document.form1.ShipZip.optional==false)||window.document.form1.ShipFirstName.value==""||window.document.form1.ShipLastName.value==""||window.document.form1.ShipAddress1.value==""||window.document.form1.ShipCity.value==""||(document.form1.ShipState.options[document.form1.ShipState.selectedIndex].text==""&&blnShipStateRequired)||window.document.form1.ShipCountry.options[document.form1.ShipCountry.selectedIndex].text==""||window.document.form1.ShipPhone.value==""||window.document.form1.ShipEmail.value=="")
{window.alert("Please either fill in all shipping info or no shipping info.")
return false}
else
{return sfCheck(frm)}}}
function POCheck(poname,poNum)
{if(poname==""||poNum=="")
{alert("Please Enter the required purchase order information");return false;}
else
{return true;}}
function ECheck(frm)
{if(frm.CheckNumber.value==""||frm.BankName.value==""||frm.RoutingNumber.value==""||frm.CheckingAccountNumber.value=="")
{alert("Please Enter the required e-check information");return false;}
else
{return true;}}
function isInteger(theField,emptyOK,theMessage)
{if(theField.value=="")
{if(emptyOK)
{return(true);}
alert(theMessage);theField.focus();theField.select();return(false);}
var i;var s=theField.value;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(!((c>="0")&&(c<="9")))
{alert(theMessage);theField.focus();theField.select();return(false);}}
if(s>=0)
{return(true);}
{alert(theMessage);theField.focus();theField.select();return(false);}}
function isDigit(c)
{return((c>="0")&&(c<="9"))}
function isFloat(theField,emptyOK,theMessage)
{if(theField.value=="")
{if(emptyOK)
{return(true);}
{alert(theMessage);theField.focus();theField.select();return(false);}}
var i;var s=theField.value;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(c!='.')
{if(!((c>="0")&&(c<="9")))
{alert(theMessage);theField.focus();theField.select();return(false);}}}
if(s>=0)
{return(true);}
{alert(theMessage);theField.focus();theField.select();return(false);}}
function isCorrectCreditCardType(theSelect,theField)
{var cardType=theSelect.options[theSelect.selectedIndex].value;var normalizedCCN=theField.value;normalizedCCN=stripChar(normalizedCCN," ");normalizedCCN=stripChar(normalizedCCN,"-");if(isCardMatch(cardType,normalizedCCN))return true;return false;}
function isAnyCard(cc)
{if(!isMasterCard(cc)&&!isVisa(cc)&&!isAmericanExpress(cc)&&!isDinersClub(cc)&&!isDiscover(cc)&&!isEnRoute(cc)&&!isJCB(cc))return false;return true;}
function isCardMatch(cardType,cardNumber)
{if(cardType=="1")return(isAmericanExpress(cardNumber));if(cardType=="2")return(isVisa(cardNumber));if(cardType=="3")return(isDiscover(cardNumber));if(cardType=="4")return(isMasterCard(cardNumber));if(cardType=="5")return(isDinersClub(cardNumber));if(cardType=="6")return(isCarteBlanche(cardNumber));if(cardType=="xx")return(isEnRoute(cardNumber));if(cardType=="xx")return(isJCB(cardNumber));return false;}
function isAmericanExpress(cc)
{firstdig=cc.substring(0,1);seconddig=cc.substring(1,2);if((cc.length==15)&&(firstdig==3)&&((seconddig==4)||(seconddig==7)))return true;return false;}
function isCarteBlanche(cc)
{return isDinersClub(cc);}
function isDinersClub(cc)
{firstdig=cc.substring(0,1);seconddig=cc.substring(1,2);if((cc.length==14)&&(firstdig==3)&&((seconddig==0)||(seconddig==6)||(seconddig==8)))return true;return false;}
function isDiscover(cc)
{first4digs=cc.substring(0,4);if((cc.length==16)&&(first4digs=="6011"))return true;return false;}
function isEnRoute(cc)
{first4digs=cc.substring(0,4);if((cc.length==15)&&((first4digs=="2014")||(first4digs=="2149")))return true;return false;}
function isJCB(cc)
{first4digs=cc.substring(0,4);if((cc.length==16)&&((first4digs=="3088")||(first4digs=="3096")||(first4digs=="3112")||(first4digs=="3158")||(first4digs=="3337")||(first4digs=="3528")))return true;return false;}
function isMasterCard(cc)
{firstdig=cc.substring(0,1);seconddig=cc.substring(1,2);if((cc.length==16)&&(firstdig==5)&&((seconddig>=1)&&(seconddig<=5)))return true;return false;}
function isVisa(cc)
{if(((cc.length==16)||(cc.length==13))&&(cc.substring(0,1)==4))return true;return false;}
function isValidEmailAddress(email)
{if((email.indexOf("@")==-1)||(email.indexOf(".")==-1))
{return false;}
return true;}
function getElementValue(theItem,theDefault)
{var theValue;if(theItem!=undefined)
{switch(theItem.type)
{case"hidden":theValue=theItem.value;break;case"checkbox":theValue=theItem.checked;break;case"text":theValue=theItem.value;break;case"select-one":theValue=getSelectValue(theItem);break;default:{if(theItem.length>0)
{theValue=getRadio(theItem);}else{theValue=theItem.innerText;}
break;}}}else{theValue=theDefault;}
return theValue;}
function getRadio(theRadio)
{if(theRadio.length>0)
{for(var i=0;i<theRadio.length;i++)
{if(theRadio[i].checked)
{return(theRadio[i].value);}}
return('');}else{if(theRadio.checked)
{return(theRadio.value);}else{return('');}}}
function getSelectText(theSelect)
{if(theSelect.selectedIndex==-1)
{return('');}else{return(theSelect.options[theSelect.selectedIndex].text);}}
function getSelectValue(theSelect)
{if(theSelect.selectedIndex==-1)
{return('');}else{return(theSelect.options[theSelect.selectedIndex].value);}}function emailCheck(emailStr){emailStr=Trim(emailStr)
var checkTLD=1;var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;var emailPat=/^(.+)@(.+)$/;var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";var validChars="\[^\\s"+specialChars+"\]";var quotedUser="(\"[^\"]*\")";var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;var atom=validChars+'+';var word="("+atom+"|"+quotedUser+")";var userPat=new RegExp("^"+word+"(\\."+word+")*$");var domainPat=new RegExp("^"+atom+"(\\."+atom+")*$");var matchArray=emailStr.match(emailPat);if(matchArray==null)
{alert("Email address seems incorrect (check @ and .'s)");return false;}
var user=matchArray[1];var domain=matchArray[2];for(i=0;i<user.length;i++){if(user.charCodeAt(i)>127){alert("This email username contains invalid characters.");return false;}}
for(i=0;i<domain.length;i++){if(domain.charCodeAt(i)>127){alert("This email domain name contains invalid characters.");return false;}}
if(user.match(userPat)==null){alert("This email username doesn't seem to be valid.");return false;}
var IPArray=domain.match(ipDomainPat);if(IPArray!=null){for(var i=1;i<=4;i++){if(IPArray[i]>255){alert("Destination IP address is invalid!");return false;}}
return true;}
var atomPat=new RegExp("^"+atom+"$");var domArr=domain.split(".");var len=domArr.length;for(i=0;i<len;i++){if(domArr[i].search(atomPat)==-1){alert("This email domain name does not seem to be valid.");return false;}}
if(checkTLD&&domArr[domArr.length-1].length!=2&&domArr[domArr.length-1].search(knownDomsPat)==-1){alert("This email address must end in a well-known domain or two letter "+"country.");return false;}
if(len<2){alert("This email address is missing a hostname!");return false;}
return true;}
function emailFriend(sName){var h,w,friendWin
h=window.screen.availHeight
w=window.screen.availWidth
sFeatures="height="+h*.75+",width="+w*.80+",resizable"
friendWin=window.open("EmailFriend.asp?ProdID="+sName,"",sFeatures)}

