var anonymusID = '494d0376-7b1b-490d-adfb-c678b63cc93b'; var newUser = 'True'; //Should be modify on the client side var hostID = 1; function trackIt(){ var url = window.location; if (newUser.toLowerCase() == 'true'){ createCookie('SodaAnonymusID',anonymusID,1000); } postData('http://www.kadian.com:80/sodaapi/pages/activitytracker.aspx?u=' + encodeURIComponent(url) + '&anonymusID=' + anonymusID + '&new=' + newUser + '&hostID='+hostID); } function postData(url){ //prompt('',url) var xmlHttp = null; // Mozilla, Opera, Safari, Internet Explorer 7 if (typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); } if (!xmlHttp) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { xmlHttp = null; } } } if (xmlHttp) { try{ xmlHttp.open('GET',url, true); xmlHttp.onreadystatechange=function() { if (xmlHttp.readyState==4) { } } xmlHttp.send(null); }catch(e){/*alert(e);*/} } } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }