// SCRIPT TO GRAB INFO PASSED VIA QUARYSTRING FROM ONE PAGE TO ANOTHER
// e.g. NAME PASSED FROM MINI-SIGNUP TO READ SIGNUP PAGE FOR 7steps.


// Build an empty URL structure in which we will store
// the individual query values by key.
var objURL = new Object();
 
 
// Use the String::replace method to iterate over each
// name-value pair in the query string. Location.search
// gives us the query string (if it exists).
window.location.search.replace(
new RegExp( "([^?=&]+)(=([^&]*))?", "g" ),
 
// For each matched query string pair, add that
// pair to the URL struct using the pre-equals
// value as the key.
function( $0, $1, $2, $3 ){
objURL[ $1 ] = $3;
}
);
 
// Change pluses to spaces
function convertSpaces(str) {
var out = "", flag = 0;
for (i = 0; i < str.length; i++) {
if (str.charAt(i) != "+") {
out += str.charAt(i);
flag = 0;
}
else {
if(flag == 0) {
out += " ";
flag = 1;
      }
   }
}
return out;
}
