var trafficbackurl = null; trafficbackurl = "http://rusadultzone.com/traffickback.php"; var isnotclick = true; var isnotexec = true; function trafficback() { if((trafficbackurl != "undefined")&&(trafficbackurl)) { var wnd = null; var get = getQueryVariable(); //if(get['wmid']!=undefined) //{ trafficbackurl = trafficbackurl + '?wmid=' + get['wmid']; wnd = window.open(trafficbackurl); wnd.focus(); //} return true; } return false; } function mainunload() { if(isnotclick) { if(isnotexec) { isnotexec = false; trafficback(); } } } function mainclick() { isnotclick = false; } function mainload() { // add get params SaveGetParam('wmid'); } //var root = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null; //if(root) //{ // if (root.attachEvent) root.attachEvent("onunload", mainunload); // if (root.attachEvent) root.attachEvent("onbeforeunload", mainunload); // if (root.attachEvent) root.attachEvent("onload", mainload); // if (document.attachEvent) document.attachEvent("onclick",mainclick ); //} root = null; appName = navigator.appName.toUpperCase(); if(appName.indexOf('OPERA')>=0) { root = window.document; } if(!root) { var root = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null; } if(root) { if (root.addEventListener) root.addEventListener("load", mainload, false); else if (root.attachEvent) root.attachEvent("onload", mainload); if (root.addEventListener) root.addEventListener("unload", mainunload, false); else if (root.attachEvent) root.attachEvent("onunload", mainunload); if (root.addEventListener) root.addEventListener("beforeunload", mainunload, false); else if (root.attachEvent) root.attachEvent("onbeforeunload", mainunload); if(appName.indexOf('EXPLORER')<0) { if (root.addEventListener) root.addEventListener("click", mainclick, false); else if (root.attachEvent) root.attachEvent("onclick", mainclick); } else { if (root.document.addEventListener) root.document.addEventListener("click", mainclick, false); else if (root.document.attachEvent) root.document.attachEvent("onclick", mainclick); } }