// code for Mozilla, etc. if (typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); } // code for IE else if (window.ActiveXObject) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlHttp = false; } } } var currentUrl = ""; var targetdiv = ""; function changePage(url, target) { // abort any previously running connections xmlHttp.abort(); targetdiv = target; if (typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); } // Open a connection to the server xmlHttp.open("GET", url, true); changeCursor("wait"); // Setup a function for the server to run when it's done xmlHttp.onreadystatechange = updatePage; // Send the request xmlHttp.send(null); } function changeCursor(cursorType) { document.body.style.cursor = cursorType; } function updatePage() { if (xmlHttp.readyState == 4) { changeCursor("default"); var response = xmlHttp.responseText; document.getElementById(targetdiv).innerHTML = response; } } function redItUp(personId,lotId,auctionId) { var url = "./includes/redUpTheBook.php?personId=" + escape(personId) + "&lotId=" + escape(lotId) + "&auctionId=" + escape(auctionId); xmlHttp.open("GET", url, true); xmlHttp.send(null); } /** * * @access public * @return void **/ function checkStock(stockIds) { /* Create a new XMLHttpRequest object to talk to the Web server */ var xmlHttp = false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlHttp = false; } } @end @*/ if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); } var url = "./includes/checkstock.php?stockId=" + escape(stockIds); xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange = alertOnStock; xmlHttp.send(null); } /** * * @access public * @return void **/ function alertOnStock() { if (xmlHttp.readyState == 4) { var response = xmlHttp.responseText; eval(response); } }