// 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 xmlHttp2 = new Array; var targetdiv2 = new Array; var currentUrl = ""; var targetdiv = ""; function changePage(url, target) { // abort any previously running connections xmlHttp.abort(); targetdiv = target; // 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; } } } // 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 changePage2(url, target, product_id) { // code for Mozilla, etc. if (typeof XMLHttpRequest != 'undefined') { xmlHttp2[product_id] = new XMLHttpRequest(); } // code for IE else if (window.ActiveXObject) { try { xmlHttp2[product_id] = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp2[product_id] = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlHttp2[product_id] = false; } } } // abort any previously running connections //xmlHttp2[product_id].abort(); targetdiv2[product_id] = target; // Open a connection to the server xmlHttp2[product_id].open("GET", url, true); changeCursor("wait"); // Setup a function for the server to run when it's done xmlHttp2[product_id].onreadystatechange = updatePage2; // Send the request xmlHttp2[product_id].send(null); } function changePage3(url, target, product_id) { // code for Mozilla, etc. if (typeof XMLHttpRequest != 'undefined') { xmlHttp2[product_id] = new XMLHttpRequest(); } // code for IE else if (window.ActiveXObject) { try { xmlHttp2[product_id] = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp2[product_id] = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlHttp2[product_id] = false; } } } // abort any previously running connections //xmlHttp2[product_id].abort(); targetdiv2[product_id] = target; // Open a connection to the server xmlHttp2[product_id].open("GET", url, true); changeCursor("wait"); // Setup a function for the server to run when it's done xmlHttp2[product_id].onreadystatechange = updatePage3; // Send the request xmlHttp2[product_id].send(null); } function changePage4(url, target, product_id) { // code for Mozilla, etc. if (typeof XMLHttpRequest != 'undefined') { xmlHttp2[product_id] = new XMLHttpRequest(); } // code for IE else if (window.ActiveXObject) { try { xmlHttp2[product_id] = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp2[product_id] = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlHttp2[product_id] = false; } } } // abort any previously running connections //xmlHttp2[product_id].abort(); targetdiv2[product_id] = target; // Open a connection to the server xmlHttp2[product_id].open("GET", url, true); changeCursor("wait"); // Setup a function for the server to run when it's done xmlHttp2[product_id].onreadystatechange = updatePage2; // Send the request xmlHttp2[product_id].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 updatePage2() { for(product_id in xmlHttp2) { if (typeof xmlHttp2[product_id] != 'number') { if (xmlHttp2[product_id].readyState == 4) { changeCursor("default"); var response = xmlHttp2[product_id].responseText; document.getElementById(targetdiv2[product_id]).innerHTML = response; xmlHttp2[product_id] = 0; } } } } function updatePage3() { for(product_id in xmlHttp2) { if (typeof xmlHttp2[product_id] != 'number') { if (xmlHttp2[product_id].readyState == 4) { changeCursor("default"); var response = xmlHttp2[product_id].responseText; alert(document.getElementById(targetdiv2[product_id]).innerHTML); document.getElementById(targetdiv2[product_id]).innerHTML = response; alert(response); xmlHttp2[product_id] = 0; } } } } 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); } }