//Should be modify on the client side var hostID = 2; function trackLink(linkUrl,locUrl){ var url = window.location; if (locUrl != null) url = locUrl; postData('http://www.painbalance.org:80/pages/activitylinkstracker.aspx?u=' + encodeURIComponent(url) + '&hostID='+hostID + '&l=' + encodeURIComponent(linkUrl)); } function postData(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=/"; }