/** Credits: http://www.webtoolkit.info/javascript-url-decode-encode.html **/
var ew_Utf8Encoder = { //added ex_ to avoid conflicts
// URL utf-8 encoding
encode : function (str) {
return escape(this._utf8_encode(str));
},
// UTF-8 encoding
_utf8_encode : function (str) {
str = str.replace(/\r\n/g,"\n");
var encoded_str = "";
for (var n = 0; n < str.length; n++) {
var c = str.charCodeAt(n);
if (c < 128) {
encoded_str += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
encoded_str += String.fromCharCode((c >> 6) | 192);
encoded_str += String.fromCharCode((c & 63) | 128);
} else {
encoded_str += String.fromCharCode((c >> 12) | 224);
encoded_str += String.fromCharCode(((c >> 6) & 63) | 128);
encoded_str += String.fromCharCode((c & 63) | 128);
}
}
return encoded_str;
}
}
document.write("
");
document.write(" \
\
\
");
function extrawatch_createRequestObject() {
var ro;
if(window.ActiveXObject){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
function extrawatch_sendUnloadReq() {
var rand='1122860750';
try {
http = extrawatch_createRequestObject();
var newdate = new Date();
var url = "/index.php?option=com_extrawatch&task=ajax&action=unloaded&rand=" + rand + "&timeID="+newdate.getTime() + "&env=ExtraWatchJoomlaEnv&projectId=";
http.open("GET", url, true);
http.send(null);
}
catch (err) {
}
}
window.addEventListener("unload", function(){
extrawatch_sendUnloadReq();
}, true);