// remote scripting library // (c) copyright 2005 modernmethod, inc var sajax_debug_mode = false; var sajax_request_type = "GET"; function sajax_debug(text) { if (sajax_debug_mode) alert("RSD: " + text) } function sajax_init_object() { sajax_debug("sajax_init_object() called..") var A; try { A=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { A=new ActiveXObject("Microsoft.XMLHTTP"); } catch (oc) { A=null; } } if(!A && typeof XMLHttpRequest != "undefined") A = new XMLHttpRequest(); if (!A) sajax_debug("Could not create connection object."); return A; } function sajax_do_call(func_name, args) { var i, x, n; var uri; var post_data; uri = ""; if (sajax_request_type == "GET") { if (uri.indexOf("?") == -1) uri = uri + "?rs=" + escape(func_name); else uri = uri + "&rs=" + escape(func_name); for (i = 0; i < args.length-1; i++) uri = uri + "&rsargs[]=" + escape(args[i]); uri = uri + "&rsrnd=" + new Date().getTime(); post_data = null; } else { post_data = "rs=" + escape(func_name); for (i = 0; i < args.length-1; i++) post_data = post_data + "&rsargs[]=" + escape(args[i]); } x = sajax_init_object(); x.open(sajax_request_type, uri, true); if (sajax_request_type == "POST") { x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1"); x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); } x.onreadystatechange = function() { if (x.readyState != 4) return; sajax_debug("received " + x.responseText); var status; var data; status = x.responseText.charAt(0); data = x.responseText.substring(2); if (status == "-") alert("Error: " + data); else args[args.length-1](data); } x.send(post_data); sajax_debug(func_name + " uri = " + uri + "/post = " + post_data); sajax_debug(func_name + " waiting.."); delete x; } // wrapper for get_categories function x_get_categories() { sajax_do_call("get_categories", x_get_categories.arguments); } // wrapper for get_options function x_get_options() { sajax_do_call("get_options", x_get_options.arguments); } // wrapper for get_quantity function x_get_quantity() { sajax_do_call("get_quantity", x_get_quantity.arguments); } // wrapper for get_price function x_get_price() { sajax_do_call("get_price", x_get_price.arguments); } // wrapper for get_attributes function x_get_attributes() { sajax_do_call("get_attributes", x_get_attributes.arguments); } // wrapper for get_attributes_info function x_get_attributes_info() { sajax_do_call("get_attributes_info", x_get_attributes_info.arguments); } // wrapper for get_category_name function x_get_category_name() { sajax_do_call("get_category_name", x_get_category_name.arguments); } // wrapper for calculate_shipping function x_calculate_shipping() { sajax_do_call("calculate_shipping", x_calculate_shipping.arguments); } // wrapper for calculate_shippingRates function x_calculate_shippingRates() { sajax_do_call("calculate_shippingRates", x_calculate_shippingRates.arguments); } // wrapper for get_price_newdb_psi function x_get_price_newdb_psi() { sajax_do_call("get_price_newdb_psi", x_get_price_newdb_psi.arguments); } // wrapper for get_product_poster_details function x_get_product_poster_details() { sajax_do_call("get_product_poster_details", x_get_product_poster_details.arguments); } // wrapper for get_product_details function x_get_product_details() { sajax_do_call("get_product_details", x_get_product_details.arguments); } // wrapper for get_price_newdb_posters function x_get_price_newdb_posters() { sajax_do_call("get_price_newdb_posters", x_get_price_newdb_posters.arguments); } // wrapper for get_sizes function x_get_sizes() { sajax_do_call("get_sizes", x_get_sizes.arguments); } // wrapper for get_price_newdb function x_get_price_newdb() { sajax_do_call("get_price_newdb", x_get_price_newdb.arguments); } // wrapper for call_ups function x_call_ups() { sajax_do_call("call_ups", x_call_ups.arguments); } // wrapper for get_ups_methods function x_get_ups_methods() { sajax_do_call("get_ups_methods", x_get_ups_methods.arguments); } // wrapper for test_call function x_test_call() { sajax_do_call("test_call", x_test_call.arguments); } // wrapper for get_price_pack function x_get_price_pack() { sajax_do_call("get_price_pack", x_get_price_pack.arguments); } // wrapper for get_price_by_stock function x_get_price_by_stock() { sajax_do_call("get_price_by_stock", x_get_price_by_stock.arguments); } // wrapper for get_price_catalogs function x_get_price_catalogs() { sajax_do_call("get_price_catalogs", x_get_price_catalogs.arguments); } // wrapper for get_price_by_stock_ver2 function x_get_price_by_stock_ver2() { sajax_do_call("get_price_by_stock_ver2", x_get_price_by_stock_ver2.arguments); } // wrapper for get_price_pack_ver2 function x_get_price_pack_ver2() { sajax_do_call("get_price_pack_ver2", x_get_price_pack_ver2.arguments); } // wrapper for call_ups_xml function x_call_ups_xml() { sajax_do_call("call_ups_xml", x_call_ups_xml.arguments); } // wrapper for get_ups_xml_methods function x_get_ups_xml_methods() { sajax_do_call("get_ups_xml_methods", x_get_ups_xml_methods.arguments); } // wrapper for set_product function x_set_product() { sajax_do_call("set_product", x_set_product.arguments); } // wrapper for get_ups_xml_methods_job function x_get_ups_xml_methods_job() { sajax_do_call("get_ups_xml_methods_job", x_get_ups_xml_methods_job.arguments); } // wrapper for get_ups_xml_methods_lfp function x_get_ups_xml_methods_lfp() { sajax_do_call("get_ups_xml_methods_lfp", x_get_ups_xml_methods_lfp.arguments); } // wrapper for select_state function x_select_state() { sajax_do_call("select_state", x_select_state.arguments); } // wrapper for validate_zip_code function x_validate_zip_code() { sajax_do_call("validate_zip_code", x_validate_zip_code.arguments); } var DIR_WS_TEMPLATE = 'includes/templates/rps/'; var IMG_DIR = ''; var REQUEST_URI = '/'; var HTTP_SERVER = 'http://www.rushprintingservices.com'; var CURRENT_PAGE = 'index'; var CPATH = ''; var MARK = ''; var PRODUCT_ID = ''; var DISCOUNT_PERCENT = ''; var TYPE = ''; var SEL_SHIPPING = ''; var PROMO = '';