<!--

/*
 * This function parses ampersand-separated name=value argument pairs from
 * the query string of the top window's URL. It stores the name=value pairs in 
 * properties of an object and returns that object. 
 *
 * Based on code from JavaScript, The Definitive Guide, by D. Flanagan, 4th ed.
 * Matt Barney, 8/22/2008
 */
function getTopArgs() {
  var args = new Object();
  var query = top.location.search.substring(1);     // Get query string from the topmost window
  var pairs = query.split("&");                 // Break at ampersand
  for(var i = 0; i < pairs.length; i++) {
    var pos = pairs[i].indexOf('=');          // Look for "name=value"
    if (pos == -1) continue;                  // If not found, skip
    var argname = pairs[i].substring(0,pos);  // Extract the name
    var value = pairs[i].substring(pos+1);    // Extract the value
    value = decodeURIComponent(value);        // Decode it, if needed
    args[argname.toUpperCase()] = value;      // Store as a property
  }
  return args;                                  // Return the object
}

/*
 * This function loads the passed-in URL into the outermost window, such as a page
 * that contains the current page in an IFRAME.
 *
 */
function load_outer_page(inURL)
{
	top.location.href = inURL;
}

// -->
