var ajaxDone = "false"; var pageid = 0; function URLEncode(plaintext) { var SAFECHARS = "0123456789" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz"; var HEX = "0123456789ABCDEF"; var encoded = ""; for (var i = 0; i < plaintext.length; i++ ) { var ch = plaintext.charAt(i); if (ch == " ") { encoded += "+"; } else if (SAFECHARS.indexOf(ch) != -1) { encoded += ch; } else { var charCode = ch.charCodeAt(0); if (charCode > 255) { alert( "Unicode Character '" + ch + "' cannot be encoded using standard URL encoding.\n" + "(URL encoding only supports 8-bit characters.)\n" + "A space (+) will be substituted." ); encoded += "+"; } else { encoded += "%"; encoded += HEX.charAt((charCode >> 4) & 0xF); encoded += HEX.charAt(charCode & 0xF); } } } return encoded; }; function getURLParam(strParamName){ var strReturn = ""; var strHref = window.location.href; if ( strHref.indexOf("?") > -1 ){ var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase(); var aQueryString = strQueryString.split("&"); for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){ if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 ){ var aParam = aQueryString[iParam].split("="); strReturn = aParam[1]; break; } } } return strReturn; } function clearNodes(node){ while(node.childNodes.length!=0) { node.removeChild(node.firstChild); } return node; } function var_dump(obj) { if(typeof obj == "object") { return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + obj; } else { return "Type: "+typeof(obj)+"\nValue: "+obj; } }//end function var_dump function replaceTag(tagid,content) { var node = document.getElementById(tagid); var temp = document.createElement("span"); temp.innerHTML = content; var parent = node.parentNode; parent.replaceChild(temp,node); return; if(document.all) { var parent = node.parentNode; parent.replaceChild(temp,node); return; parent.removeChild(node); for(i=0;i'; document.write(str); } function executeTracking(pid, ref, pks, pkc, winloc, pkcg) { pageid = pid; try { xajax_executeTracking(pid,ref,pks,pkc,winloc,pkcg); } catch(exception){ if(document.body) document.body.style.cursor = 'default'; checkIfAjaxWorked(); showVariables(); } } function showVariables() { var eles = document.getElementsByTagName("span"); for(var i=0;i=0) { e.style.display = ''; } } }