function GetBrowserType(){var a={};var b=navigator.userAgent.toLowerCase();var c;(c=b.match(/msie ([\d.]+)/))?a.ie=c[1]:(c=b.match(/firefox\/([\d.]+)/))?a.firefox=c[1]:(c=b.match(/chrome\/([\d.]+)/))?a.chrome=c[1]:(c=b.match(/opera.([\d.]+)/))?a.opera=c[1]:(c=b.match(/version\/([\d.]+).*safari/))?a.safari=c[1]:0;return a}function ViewShoppingCart(){var a="http://"+location.host;location.href=a+"/online/Page_Cart/ListShoppingCart.aspx";return false}function CheckOut(d){var c="https://"+location.host;var b=document.getElementById("ctl00_lblShoppingItems");var a=b.innerHTML;if(a!="0 Item(s)"){location.href=c+d+"?ShoppingCartPage=true";return false}else{alert("You do not have any items in your cart.");return false}}function Search(){var b="http://"+location.host;var a=document.getElementById("ctl00_txtPartNumber");var c=a.value.replace(/\u0020/g,"").replace(/(^\\s*)|(\\s*$)/g,"");if(c.length<=2){alert("Please input a valid part number!")}else{if(c=="EnterPartNumberHere"){alert("Part Number is required!")}else{if(new RegExp("[^-A-Za-z0-9 ]+").test(c)||!new RegExp("[a-zA-Z0-9]+(-([a-zA-Z0-9]{3,8}))*").test(c)){alert("Invalid part number,please try again.")}else{location.href=b+"/Page_Product/PartsSearch.aspx?PartNumber="+c}}}return false}function VinSearch(){var a=document.getElementById("ctl00_txtVinSearchContent");var b=a.value.replace(/\u0020/g,"").replace(/(^\\s*)|(\\s*$)/g,"").toUpperCase();if(b=="ENTERVINHERE"){alert("The VIN should be 17 characters in length.")}else{location.href="/Page_Product/VinSearch.aspx?vinNo="+escape(b)}}function GetDomainAndHtml(c){if(c!=""){var b=window.location.host;var a="http://"+b+"/"+c+".html";return a}else{return window.location.href}}$(function(){$("#liveChat,#faqLiveChat").click(function(){var a=(screen.width-490);var b="height=480,width=480,top=0,left="+a+",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no";window.open("http://sb.live2support.com/ls3/l2schat17233-1664-441.html","",b)})});function FillVin(){var e=document.cookie;if(e!=null){var f=e.split(";");for(var d=0;d<f.length;d++){var a=f[d].split("=");if(a.length==2){var c=a[0].replace(/^\s+|\s+$/g,"");var b=a[1].replace(/^\s+|\s+$/g,"");if("vin"==c){$("#ctl00_txtVinSearchContent").val(b).css("color","#000000");break}}}var h=new Date();var g=10;h.setTime(h.getTime()-g*24*3600*1000);document.cookie="vin='';expires="+h.toGMTString()+";path=/"}};
