    function setUpGuidRetrievalFuction() {
        var elqDt = new Date();
        var elqMs = elqDt.getMilliseconds();
        var guidSrcUrl = elqCurE + "?pps=70&siteid=" + elqSiteID  + "&ref=" + elqReplace(elqReplace(location.href,"&","%26"),"#","%23") + "&ms=" + elqMs;

        var script_id = "elq_script_id";
	var script_element = document.getElementById(script_id);
	var no_op = "";
	if ((typeof(script_element) != "undefined") && (script_element != null)) {
		document.getElementsByTagName("head")[0].removeChild(script_element);
	}
        var script = document.createElement("script");
        script.setAttribute("type", "text/javascript");
        script.setAttribute("language", "JavaScript");
        script.setAttribute("src", guidSrcUrl);
        script.setAttribute("id", script_id);
        document.getElementsByTagName("head")[0].appendChild(script);
    }

    var guidVerificationRetryAttemptsRemaining = 10;
    function verifyGuidRetrievalFuctionExistance() {
	// alert("typeof(GetElqCustomerGUID) = " + typeof(GetElqCustomerGUID));
	if (typeof(GetElqCustomerGUID) == "function") {
	    if ((typeof(intervalId) != "undefined") && (intervalId != null)) {
	    	clearInterval(intervalId);
	    }
	    //   Populate the form field (form name = registration, field name = eloquaGUID), if it exists
 	    if ((typeof(document.registration) != "undefined")
		 && (typeof(document.registration.eloquaGUID) != "undefined")
		 && (typeof(document.registration.eloquaGUID.value) != "undefined")) {
		document.registration.eloquaGUID.value = GetElqCustomerGUID();
	    }
	    //   Isolate the domain (last two dots and tokens) for this page.
	    var tmpHostname = window.location.hostname;
	    var domainValue = "";
	    var dotCnt = 0;
	    var i = tmpHostname .lastIndexOf(".");
	    while (i > 0) {
		dotCnt++;
		domainValue = tmpHostname.substring(i) + domainValue;
		tmpHostname = tmpHostname.substring(0, i);
		i = tmpHostname.lastIndexOf(".");
	    }
	    //   Write the Eloqua GUID to the domain determined above.
	    if ((domainValue != null) && (domainValue != "")) {
	    	document.cookie = "eloquaGUID=" + escape(GetElqCustomerGUID()) + ";domain=" + domainValue  + ";path=/"
	    }
	    else {
	    	document.cookie = "eloquaGUID=" + escape(GetElqCustomerGUID()) + ";path=/"
	    }
	}
	else {
	    setUpGuidRetrievalFuction();
	    if ((--guidVerificationRetryAttemptsRemaining <= 0)
		 && (typeof(intervalId) != "undefined") && (intervalId != null)) {
	    	clearInterval(intervalId);
	    }
	    // else {alert("Retry attempts remaining = " + guidVerificationRetryAttemptsRemaining);}
	} 
    }

    setUpGuidRetrievalFuction();
    var intervalId = setInterval(verifyGuidRetrievalFuctionExistance, 1000);

