//Some basic info about the store used by cookie.js for saving cookies var cart_cookie_name = "pitnews_cart"; //Non-inline frame cart requires these to be set var cart_count = 0; var basket = ""; //Set the store tracker cookie var expdate = new Date(); FixCookieDate(expdate); //fix date for Macs expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000)); //24 hours from now SetCookie("gs_st","38.107.191.102-1283855360",expdate,"/",null,false); //build the pid objects //basic info will be need to display on the form var pid_list = new Array; //This keeps track of the type of subs we have //This way we can turn on and off certain type of subscription services var sub_type_pids = new Array; var pid_details = new Object; pid_details.pid = 58; pid_details.name = "Track 'n Trade Pro 4.0 - Futures"; pid_details.price = 197.00; pid_details.msrp = 299.95; pid_details.is_sub = "0"; pid_details.bit_flag = "-0"; pid_details.savings = 102.95; pid_details.savings_percent = 34.3; pid_details.pairs = new Array(); pid_details.rates = new Array(); pid_list[58] = pid_details; var pid_details = new Object; pid_details.pid = 24; pid_details.name = "Historical Trade Simulator Plug-in"; pid_details.price = 197.00; pid_details.msrp = 249.95; pid_details.is_sub = "0"; pid_details.bit_flag = "2-2"; pid_details.savings = 52.95; pid_details.savings_percent = 21.2; pid_details.pairs = new Array(); pid_details.rates = new Array(); pid_list[24] = pid_details; //Used to keep subscriptions and non-subs organized var ptype = new Array(2); function formBuilder() { //No one loaded storetracker with any products if(pid_list.length == 0){ alert("No Product Ids were loaded in Store Tracker to build a form with. Cannot build the form"); return(false); //They are trying to build a form without any products/services } else if(arguments.length == 0){ alert("No Product Ids were passed in to build a form with. Cannot build the form"); return(false); } //This is for the two type of forms we have to build //Non-Sub are not categorized by type... very simple //Sub forms have groups and service types ptype[0] = new Array; //Non-Sub ptype[1] = new Array; //Sub //begin writing the basic stuff for the form document.writeln("
| "); document.writeln(" | "+rate.name+": | "); document.writeln("Avg $"+rate.mon_rate+"/mo | "); document.writeln(""); if(rate.savings > 0) document.writeln("SAVE "+rate.savings_percent+"%!"); document.writeln(" | "); //This keeps an idex of where all services are for the type //this way when we want to turn on only the Futures services... we now to turn on pid_1[0] - pid_1[2] and so forth // sub_type_pids[t].push(found); // found++; } document.writeln("