Hi All You Experts,

Could someone please help me??
I have written a function which loads in the body of the asp page and checks to see if a user has a cookie already set and it if doesnt then it sets it and writes out some more javascript code (google analytics).

I have got the whole setting/retrieveing cookie bit sorted its just the writing of the additional javascript code. I have tried document.write but that doesn't help.

The function is:

function testFunction(){
var c = getCookie(val);
if(!c){
alert('Setting New Cookie\nName :' + val);
setCookie(val, 'tracked', 1000);
}
else{
document.write('cookie set');
}

}

I would like the following code to be written straight after the setCookie function is called:

<!-- Google Code for Lead Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = 1098528816;
var google_conversion_language = "en_GB";
var google_conversion_format = "1";
var google_conversion_color = "FFFFFF";
if (100.0) {
var google_conversion_value = 100.0;
}
var google_conversion_label = "Lead";
//-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height="1" width="1" border="0" src="http://www.googleadservices.com/pagead/conversion/1098528816/?value=100.0&label=Lead&script=0">
</noscript>

How would I go about doing this. Any help??

Thanks