Spill Resistant (3)
Laptop Keyboard (3)
')[0]; // if (ajaxID == 'javascript') { // eval(content); // } // else { // if (document.getElementById(ajaxID)) { // document.getElementById(ajaxID).innerHTML = content; // } // } // }; // afterAjax(); //}).fail(function (msg) { //}); return false; } } }); }); function myKeyDown(e) { var key; if (window.event) { key = window.event.keyCode; } else { key = e.which; } //IE //firefox if (key == 13 || e.which == 13) { priceLink(document.getElementById('MinPrice').value, document.getElementById('MaxPrice').value); event.keyCode = 0 return false; } } function priceLink(min, max) { var url = ""; var minURL = '/laptops/refine/46562~191220$47117~47371$min~min' var maxURL = '/laptops/refine/46562~191220$47117~47371$max~max' var bothURL = '/laptops/refine/46562~191220$47117~47371$max~max$min~min' var noneURL = '/laptops/refine/46562~191220$47117~47371' min = str2val(min); max = str2val(max); if (min >= max && max > 0) { min = 0 } if (min > 0 && max > 0) { url = bothURL.replace("min~min", "min~" + min).replace("max~max", "max~" + max); } else if (min > 0) { url = minURL.replace("min~min", "min~" + min); } else if (max > 0) { url = maxURL.replace("max~max", "max~" + max); } else { url = noneURL; } document.location.href = url; } function str2val(inp) { if (inp == "" || inp == undefined) { return 0 } var NewStr = ""; var decPT = "."; var I = 0; var ch = ""; for (var i = 0; i < inp.length; i++) { ch = inp.charAt(i); if ((ch >= 0 && ch <= 9) || (ch == "-") || (ch == decPT)) { NewStr += ch; } } if (NewStr == "") { return 0 } else { return parseFloat(NewStr) } }