Why you have escaped the quotes?
Anyway, it doesn't trow error for me that way
Code:
<script>
// JavaScript Document
function clickit(cn,clink) {
if(document.images) {
(new Image()).src="clickstats.php?num="+cn+"&url="+ clink+"&val="+urlencode($js_string);
}
return true;
}
</script>