/* FILE ARCHIVED ON 21:43:52 Dec 27, 2011 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 18:30:45 Dec 13, 2016. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* ----------------------------------------------------------------------------------------- $Id: jscript_ajax.js 899 2007-02-06 20:14:56 VaM $ VaM Shop - open source ecommerce solution http://vamshop.ru http://vamshop.com Copyright (c) 2007 VaM Shop ----------------------------------------------------------------------------------------- based on: (c) 2006 Andrew Berezin (jscript_ajax.js,v 1.1 2007/03/17); zen-cart.com Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ function loadXMLDoc(ajax_page, put_vars, caching) { var url="./index_ajax.php?ajax_page=" + ajax_page; var req = new JsHttpRequest(); req.onreadystatechange = function() { if (req.readyState == 4) { if (req.responseJS) { for (var id in req.responseJS) { if (document.getElementById(id)) { document.getElementById(id).innerHTML = req.responseJS[id]; } } } if(typeof(AJAX_DEBUG) == 'boolean' && AJAX_DEBUG == true) { if (req.responseText) { var divDBG = document.getElementById('ajax-debug'); if(!divDBG) { divDBG = document.createElement("div"); divDBG.id = "ajax-debug"; divDBG.style.position = "absolute"; divDBG.style.overflown = "hidden"; divDBG.style.left = 0 + "px"; divDBG.style.top = 0 + "px"; divDBG.style.top = 0 + "px"; divDBG.style.backgroundColor = "White"; divDBG.style.margin = "10px"; divDBG.style.padding = "4px"; divDBG.style.border = "3px dashed red"; document.body.appendChild(divDBG); } // vardump(divDBG.style); if (divDBG) { divDBG.innerHTML = req.responseText; } } } } } if(typeof(caching) != 'boolean') caching = true; req.caching = caching; req.open('POST', url, true); req.send(put_vars); } function hashFormFields(of) { var hsh = new Object(); for(var i=0;i