<!--
function preProcessEloquaForm(elqForm) {
/*jg
alert('in preProcess');
return false;
*/

  // since this is a direct submission, refresh the eloId cookie in case it existed with a stale value or is otherwise out of sync
  var eloId = GetElqCustomerGUID();
  document.cookie="eloId=" + eloId + "; path=/; domain=" + _udn + "; expires=" + (new Date((new Date()).getTime()+63072000000)).toGMTString() + ";";

  // jg: add utmzCookie field to form
  if(!document.getElementById) { 
    return; //Prevent older browsers from getting any further.
  }
  //jg alert('got past first return ');
  if(document.createElement) { //W3C Dom method.
    var input = document.createElement("input");
    input.id = 'utmzCookie';
    input.name = 'utmzCookie';
    input.value = getCookie("__utmz");
    input.type = "hidden";
    document.getElementById("dynamicFormFieldsDiv").appendChild(input);
//jg alert('1st input value = ' + input.value + '\nutmzCookie.value = ' + elqForm.utmzCookie.value);

    var input = document.createElement("input");
    input.id = 'eloID';
    input.name = 'eloID';
    input.value = eloId;
    input.type = "hidden";
    document.getElementById("dynamicFormFieldsDiv").appendChild(input);
//jg alert('2nd input value = ' + input.value + '\neloID.value = ' + elqForm.eloID.value);    
                  
  } else { //Older Method
    document.getElementById("dynamicFormFieldsDiv").innerHTML += "<input name='utmzCookie' id='utmzCookie' type='hidden' value='" + getCookie("utmz") + "' />";
    document.getElementById("dynamicFormFieldsDiv").innerHTML += "<input name='eloID' id='eloID' type='hidden' value='" + eloId + "' />";
  }
//jg   alert('got to end of function.\neloID = ' + elqForm.eloID.value + '\nutmzCookie = ' + elqForm.utmzCookie.value);
  return true;

}
//-->

