/*********************************
	Generic - Browser Sniff
**********************************/
function browserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns4 = (this.b=="ns" && this.v < 5)
	this.ns6 = (this.b=="ns" && this.v >= 5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.iexp)
}
is = new browserCheck();

function is_netscape4(section){
	if(is.ns4){
		window.location.href = section +"_netscape4.shtml";
	}
}

/*********************************
	Homepage - Alternate Homepages
**********************************/
function randomizer(){
	var randnum = Math.random();
	
	if ((randnum > 0) && (randnum < .25)){
		window.location="index-hiring.shtml";
	}
	else if ((randnum > .25) && (randnum < .50)){
		window.location="index-team-building.shtml";
	}
	else if ((randnum > .50) && (randnum < .75)){
		window.location="index-organizational.shtml";
	}
	else if ((randnum > .75) && (randnum < 1)){
		window.location="index-employee.shtml";
	}

}

/*********************************
	Solutions - Dynamic Drop Down
**********************************/
function showmore(span_id, content){
	
	if(is.ns4){
		return;
	}
	else{
		more = document.getElementById(span_id);
		more.innerHTML = content;
	}
}

/*********************************
	Solutions - Map Area
**********************************/
function On2(location, mapimg) {
	document[mapimg].src = "../images/loc_on_" + location + ".gif";
}
function Off2(mapimg) {
	document[mapimg].src = "../images/spacer2.gif";
}

/*********************************
SOLUTIONS - Parse QueryString
*********************************/

function createRequestObject() {
  FORM_DATA = new Object();
    // The Object ("Array") where our data will be stored.
  separator = ',';
    // The token used to separate data from multi-select inputs
  query = '' + this.location;
  qu = query
    // Get the current URL so we can parse out the data.
    // Adding a null-string '' forces an implicit type cast
    // from property to string, for NS2 compatibility.
  query = query.substring((query.indexOf('?')) + 1);
    // Keep everything after the question mark '?'.
  if (query.length < 1) { return false; }  // Perhaps we got some bad data?
  keypairs = new Object();
  numKP = 1;
    // Local vars used to store and keep track of name/value pairs
    // as we parse them back into a usable form.
  while (query.indexOf('&') > -1) {
    keypairs[numKP] = query.substring(0,query.indexOf('&'));
    query = query.substring((query.indexOf('&')) + 1);
    numKP++;
      // Split the query string at each '&', storing the left-hand side
      // of the split in a new keypairs[] holder, and chopping the query
      // so that it gets the value of the right-hand string.
  }
  keypairs[numKP] = query;
    // Store what's left in the query string as the final keypairs[] data.<
  for (i in keypairs) {
    keyName = keypairs[i].substring(0,keypairs[i].indexOf('='));
      // Left of '=' is name.
    keyValue = keypairs[i].substring((keypairs[i].indexOf('=')) + 1);
      // Right of '=' is value.
    while (keyValue.indexOf('+') > -1) {
      keyValue = keyValue.substring(0,keyValue.indexOf('+')) + ' ' + keyValue.substring(keyValue.indexOf('+') + 1);
        // Replace each '+' in data string with a space.
    }
    keyValue = unescape(keyValue);
      // Unescape non-alphanumerics
    if (FORM_DATA[keyName]) {
      FORM_DATA[keyName] = FORM_DATA[keyName] + separator + keyValue;
        // Object already exists, it is probably a multi-select input,
        // and we need to generate a separator-delimited string
        // by appending to what we already have stored.
    } else {
      FORM_DATA[keyName] = keyValue;
        // Normal case: name gets value.
    }
  }
  return FORM_DATA;
}
FORM_DATA = createRequestObject();
  // This is the array/object containing the GET data.
  // Retrieve information with 'FORM_DATA [ key ] = value'.

var adgroupx=FORM_DATA['adgroup'];
var keywordx=FORM_DATA['keyword'];
var trackcodex=FORM_DATA['trackcode'];
var listingx=FORM_DATA['listing'];