//Mark OG - 26 March Added "function setCampaignCode()"

  var request = new Array(); // in case we need an associative array to handle query string.

  function makeRequestArray() //makes an associative array request["fname"] etc ...
  {
    //populate the empty array request() with name / value pairs from the query string.
	  var query = document.location.search;
	  query = query.substring(1,query.length);
	  query = query.replace(/\+/g," ");
	
	  var arrQ = query.split("&");
	  for(i=0;i<arrQ.length; i++)
  	{
	    arrQ2 = arrQ[i].split('=');
	    request[arrQ2[0]] = arrQ2[1];
	  }
  } 
  
  makeRequestArray();
  var liveHub = (request['hub']) ? parseInt(request['hub']):1;
  
  
  
  
  
  
  
  
//Sets the campaign code for  the jump pages NBX/health/, NBX/finance/ for all countries
function setCampaignCode(users_value){		
												
	var cam_code;								
	//check eBlast Type from the Query String
	//RENTED LIST
	if (request["campaign"]=="eblastrented"){
		
			//Check User selection from Radial Buttons
			if (users_value == "contact"){ 
				cam_code = 'rentcontact';
			}
			if (users_value == "trade_up"){
				cam_code = 'renttradeup';
			}
	}													
	//SIEBLE LIST
	if (request["campaign"]=="eblastsiebel"){
		
			if (users_value == "contact"){
				cam_code = 'siebcontact';
			}
			if (users_value == "trade_up"){
				cam_code = 'siebtradeup';
			}
	}
	
	document.form1.campaign_code.value = cam_code;	
	
}
