window.PFCCallback=function() { var s = document.createElement('script'); // Create a script element s.type = "text/javascript"; // optional in html5 s.async = true; // asynchronous? true/false s.src = "http://ram-ai-sales.profundcom.net/dms/w2.php?Visitor=New&tx_id=&tx_page_viewed_id=440624&PageTitle="+document.title; var fs = document.getElementsByTagName('script')[0]; // Get the first script fs.parentNode.insertBefore(s, fs); }; window.addEventListener('beforeunload',window.PFCCallback); window.PFCCallback();// send the title now