function gup( name ){  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  var regexS = "[\\?&]"+name+"=([^&#]*)";  var regex = new RegExp( regexS );  var results = regex.exec( window.location.href );  if( results == null )    return "";  else    return results[1];}	
	

var passed_string = gup( 'kw' ); 
var passed_string2 = gup( 'source' );

var strReplaceAll = passed_string;

var intIndexOfMatch = strReplaceAll.indexOf( "%20" );
 

// Loop over the string value replacing out each matching
// substring.
while (intIndexOfMatch != -1){
// Relace out the current instance.
strReplaceAll = strReplaceAll.replace( "%20", " " )
 

// Get the index of any next matching substring.
intIndexOfMatch = strReplaceAll.indexOf( "%20" );
}

function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

var ppc = getCookie("ppc");
var kw = getCookie("kw");
 
function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
{
  var cookie_string = name + "=" + escape ( value );

  if ( exp_y )
  {
    var expires = new Date ( exp_y, exp_m, exp_d );
    cookie_string += "; expires=" + expires.toGMTString();
  }

  if ( path )
        cookie_string += "; path=" + escape ( path );

  if ( domain )
        cookie_string += "; domain=" + escape ( domain );
  
  if ( secure )
        cookie_string += "; secure";
  
  document.cookie = cookie_string;
}

if (ppc)

{

} else
	
{	

set_cookie ("ppc",passed_string2,2099,12,31,"/","fmsbonds.com",false);
set_cookie ("kw",strReplaceAll,2099,12,31,"/","fmsbonds.com",false);
	
}
