function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  var path = "; path=/ ";
  document.cookie = name + "=" + escape(value) + expire + path;
}

//var apiHttpUrl = "http://mktg.jinfonet.com/srv/formsubmit?uuid=605358eb-02ee-ac51-837f-48c2820dc5b4_"+ "&first_name=" + readCookie("JCOOKIE_USEREFIRSTNAME") + "&last_name=" + readCookie("JCOOKIE_USERELASTNAME") + "&title=" + readCookie("JCOOKIE_USERTITLE") + "&company_name=" + readCookie("JCOOKIE_USERECOMPANY") + "&primary_address_street=" + readCookie("JCOOKIE_USERADDRESS1") + " " +readCookie("JCOOKIE_USERADDRESS2") + "&primary_address_state=" + readCookie("JCOOKIE_USERESTATE") + "&primary_address_country=" + readCookie("JCOOKIE_USERECOUNTRY") + "&email=" + readCookie("JCOOKIE_USEREMAIL") + "&phone_work=" + readCookie("JCOOKIE_USEREPHONE");
var apiHttpUrl = "http://sales.jinfonet.com:8080/campaignsystem/storeRegisterInfoToPros.jsp?"+ "first_name=" + readCookie("JCOOKIE_USEREFIRSTNAME") + "&last_name=" + readCookie("JCOOKIE_USERELASTNAME") + "&title=" + readCookie("JCOOKIE_USERTITLE") + "&company_name=" + readCookie("JCOOKIE_USERECOMPANY") + "&primary_address_street=" + readCookie("JCOOKIE_USERADDRESS1") + " " +readCookie("JCOOKIE_USERADDRESS2") + "&primary_address_state=" + readCookie("JCOOKIE_USERESTATE") + "&primary_address_country=" + readCookie("JCOOKIE_USERECOUNTRY") + "&email=" + readCookie("JCOOKIE_USEREMAIL") + "&phone_work=" + readCookie("JCOOKIE_USEREPHONE");
document.write('<iframe width="1" height="1" scrolling="no" frameborder="0" id="APIFrame" name="APIFrame" src="'+ apiHttpUrl + '"></iframe>');
