function onEnter(evt) { var keyCode = null; if( evt.which ) { keyCode = evt.which; } else if( evt.keyCode ) { keyCode = evt.keyCode; } if( 13 == keyCode ) { ajax('checkr.asp') //ajax('checkr.asp',1,function(v) { }); return false; } return true; } function ajax(u) { var xhr; try { xhr = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xhr = new ActiveXObject('Microsoft.XMLHTTP'); } catch (e2) { try { xhr = new XMLHttpRequest(); } catch (e3) { xhr = false; } } } xhr.onreadystatechange = function() { if(xhr.readyState == 4) { if(xhr.status == 200) { document.getElementById("whoisResponse").innerHTML = xhr.responseText; document.getElementById('ajaxLoader').style.display = 'none'; } } }; u = u + '?d=' + document.getElementById('d').value + '&nocache=' + Math.floor(Math.random()*9999); document.getElementById('ajaxLoader').style.display = 'block'; xhr.open('GET', u, true); xhr.send(null); } function cart(d,u,s,change) { u = u + '?d=' + d + '&nocache=' + Math.floor(Math.random()*9999); var r=[function(){ return new XMLHttpRequest(); }, function(){ return new ActiveXObject("Msxml2.XMLHTTP"); }, function(){ return new ActiveXObject("Microsoft.XMLHTTP"); }]; for(var i in r) { try { var v=r[i],q=v(); } catch(e) { continue; } } if (!q && typeof XMLHttpRequest != 'undefined') { q = new XMLHttpRequest(); } if(change) q.onreadystatechange=function(){ if(q.readyState==4 && q.status==200) change(q.responseText); }; q.open('GET',u,s?1:0); q.send(null); document.getElementById("viewCart").innerHTML = q.responseText; }