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 addRedirect(a){location.href=a+"/Page_Product/Parts_Select.aspx?isAdd=true"}function selectRedirect(){var a=window.document.location.href;if(a.indexOf("/Page_Product/Parts_Select.aspx?isAdd=true")>0){location.href="/Page_Product/Parts_Select.aspx"}}function ViewShoppingCart(){var a="http://"+location.host;location.href=a+"/online/Page_Cart/ListShoppingCart.aspx";return false}function CheckOut(d){var b="https://"+location.host;var c=document.getElementById("ctl00_lblShoppingItems");var a=c.innerHTML;if(a!="0 Item(s)"){location.href=b+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=="EnterPartNumber"){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=="ENTERVINONLY"){alert("Error: VIN is required.")}else{if(b.length<=16){alert("Error: length of the content in VIN should be 17!")}else{if(b.length==0){alert("Error: VIN is Required.")}else{if(new RegExp("^[a-z0-9A-Z]{17}$").test(b)){location.href="/Page_Product/VinSearch.aspx?vinnum="+b}else{alert("Invalid VIN number, please try again.")}}}}};