// The strURL will be changed when deployed var strURL = "http://tracking.icoke.cn/web_service/list/Add_File.aspx?cli=icokem111&schno=1&"; var listID = 5; var campaignID = "website"; // deefine the campaignID when new campaign launched, default "website" var imgDiv = null; var uid = ""; if (uid == "") uid="0"; //not login function FlashTrack(argBtName,argDriverItem){ var para = "li="+listID; var docURL = document.URL; docURL = ""; //URL will not record since 2006/3/21 var docTitle = document.title; var BtName, DriverItem; BtName = argBtName; DriverItem = argDriverItem; if (BtName == null || BtName == "") BtName = "blank"; if (DriverItem == null || DriverItem == "") DriverItem = "blank"; var strData = para +'&1='+uid+'&2='+campaignID+'&3='+encodeURIComponent(docURL); if (BtName != undefined) strData += '&4=' + encodeURIComponent(BtName); if (DriverItem != undefined) strData += '&5=' + encodeURIComponent(DriverItem); strData += '&6=W_S_DATE'; //Test Code //alert(strURL+strData); if (imgDiv != null) imgDiv.removeNode(true); imgDiv = document.createElement("div"); imgDiv.innerHTML =""; //alert(imgDiv.innerHTML); } function Track() { var para = "li="+listID; var docURL = document.URL; docURL = ""; //URL will not record since 2006/3/21 var docTitle = document.title; var theElement=event.srcElement; var BtName = ""; var DriverItem = ""; try { BtName = theElement.BtName; }catch(e){} try { DriverItem = theElement.DriverItem; }catch(e){} if (BtName == null || BtName == "") BtName = "blank"; if (DriverItem == null || DriverItem == "") DriverItem = "blank"; if (BtName != "blank"){ var strData = para +'&1='+uid+'&2='+campaignID+'&3='+encodeURIComponent(docURL); if (BtName != undefined) strData += '&4=' + encodeURIComponent(BtName); if (DriverItem != undefined) strData += '&5=' + encodeURIComponent(DriverItem); strData += '&6=W_S_DATE'; //Test Code //alert(strURL+strData); if (imgDiv != null) imgDiv.removeNode(true); imgDiv = document.createElement("div"); imgDiv.innerHTML = ""; //alert(imgDiv.innerHTML); } } document.onclick = Track ;