/*Copyright © PokeIn Library (Commercial Edition) v1.57 */(function () {function PokeIn() {};var pCall = {};PokeIn.clid = '100009532';PokeIn.OnError = null;PokeIn.p5 = '/alpesa/comet/Handler.aspx';PokeIn.p6 = '/alpesa/comet/Handler.aspx';PokeIn.p10 = new Date().getTime();PokeIn.IsConnected = false;PokeIn.isMozilla = /Firefox/i.test(navigator.userAgent);PokeIn.isIE6 = /MSIE 6/i.test(navigator.userAgent);PokeIn.isIE8 = /MSIE 8/i.test(navigator.userAgent);PokeIn.isIE7 = /MSIE 7/i.test(navigator.userAgent);PokeIn.isIE9 = /MSIE 9/i.test(navigator.userAgent);PokeIn.ieVersion = (PokeIn.isIE8) ? 8 : (PokeIn.isIE7) ? 7 : (PokeIn.isIE6) ? 6 : (PokeIn.isIE9) ? 9 : 0;PokeIn.isIE = (PokeIn.ieVersion > 0) ? true : false;PokeIn.isOpera = /Opera/i.test(navigator.userAgent);PokeIn.isSafari = /Safari/i.test(navigator.userAgent);PokeIn.FormMethod = "POST";PokeIn.ListenActive = false;PokeIn.p14 = 0;PokeIn.p9 = { s: [], l: {}, sc: 0, sn: 0, ready: true, force_false: false };PokeIn.p12 = -1;PokeIn.joinedTo = "";PokeIn.sleepMode = false;PokeIn.LTimeout = 80000;PokeIn.IsListenActive = function () {return PokeIn.ListenActive;};PokeIn.SessionClone = function (clientId) {if (PokeIn.SessionCloneDetected != null) {PokeIn.SessionCloneDetected(clientId);};};PokeIn.GetJointId = function () {return PokeIn.joinedTo;};PokeIn._ToXML = function (p8, name) {if (p8.generic_type) {throw "Class " + name + " has a generic type definition. PokeIn has no support for client to server Generic type serialization.";};var mess = ''+ '<' + name + ' xmlns:xsd="http://www.w3.org/2001/XMLSchema">';mess += PokeIn.ToXML(p8).replace(/[,]/g, "");mess += '' + name + '>';return mess;};PokeIn.DateTo = function (dt) {var h = dt.getHours();if (parseInt(h) < 10) { h = "0" + h; };var m = dt.getMinutes();if (parseInt(m) < 10) { m = "0" + m; };var s = dt.getSeconds();if (parseInt(s) < 10) { s = "0" + s; };var mm = dt.getMonth();if (mm == 0) { mm = 12; };if (parseInt(mm) < 10) { mm = "0" + mm; };var dd = dt.getDate();if (parseInt(dd) < 10) { dd = "0" + dd; };return dt.getFullYear() + "-" + mm + "-" + dd + "T" + h + ":" + m + ":" + s;};PokeIn.ToXML = function (p8, obj_name, main_obj) {var p7 = "";if (typeof p8 == "object") {if (p8 instanceof Array) {var itemType = main_obj["Type_" + obj_name];for (i = 0, ln = p8.length; i < ln; i++) {p7 += "<" + itemType + ">" + PokeIn.ToXML(p8[i]) + "" + itemType + ">";};}else if (p8.toUTCString) {p7 += PokeIn.DateTo(p8);}else {for (o in p8) {if (o.indexOf("Type_") == 0) {continue;};var _end = "" + o + ">";p7 += "<" + o + ">" + PokeIn.ToXML(p8[o], o, p8) + _end;};};}else if (typeof p8 == "string") {p7 = p8;}else if (p8.toString) {p7 = p8.toString();};return p7;};PokeIn.AddEvent = function (_e, _n, _h) {if (window.attachEvent) {_e.attachEvent("on" + _n, _h);}else {_e.addEventListener(_n, _h, false);};};PokeIn.RemoveEvent = function (_e, _n, _h) {if (window.detachEvent) {_e.detachEvent("on" + _n, _h);}else {_e.removeEventListener(_n, _h, false);};};PokeIn.GetClientId = function () {return PokeIn.clid;};_pci_ = PokeIn.GetClientId;PokeIn.Listen = function (cc) {if (!PokeIn.IsConnected && cc == null) {return;};if (PokeIn.ListenActive) {return false;};PokeIn.p4(-1, cc);};PokeIn.CompilerError = function (message) {if (PokeIn.OnCompilerError != null) {PokeIn.OnCompilerError(message);};};PokeIn.ClientObjectsDoesntExist = function () {if (PokeIn.OnClientObjectsRemoved != null) {PokeIn.OnClientObjectsRemoved();};};var _______ = [{ r: new RegExp(",", "g"), t: "," }, { r: new RegExp("@", "g"), t: "@" },{ r: new RegExp("\\?", "g"), t: "?" }, { r: new RegExp(";", "g"), t: ";" },{ r: new RegExp("&", "g"), t: "&" }, { r: new RegExp("\"", "g"), t: "\"" },{ r: new RegExp("'", "g"), t: "'" }, { r: new RegExp("#", "g"), t: "#" },{ r: new RegExp("\\+", "g"), t: "+" }, { r: new RegExp("%", "g"), t: "%" },{ r: new RegExp("/", "g"), t: "/" }, { r: new RegExp("<", "g"), t: "<"}];PokeIn.p18 = function () {PokeIn.p13 = [];var len = PokeIn.clid.length - 1;var clide = PokeIn.clid.substring(1, len + 1);var le = _______.length;for (var i = 0; i < le; i++) {PokeIn.p13[i] = { r: new RegExp(":" + clide + i.toString() + ":", "g"), t: ":" + clide + i.toString() + ":" };};};PokeIn.p18();PokeIn.CreateText = function (mess, _in) {if (mess == null) { return ""; };var le = _______.length, ve = _______;if (_in) {for (var i = 0; i < le; i++) {mess = mess.replace(PokeIn.p13[i].r, ve[i].t);};mess = mess.replace(/"/g, "&");mess = mess.replace(/\/g, '\\');mess = mess.replace(/'/g, '\\\'');}else {mess = mess.replace(/[\\]/g, '\');for (var i = 0; i < le; i++) {mess = mess.replace(ve[i].r, PokeIn.p13[i].t);};};if (_in) {eval(mess);}else {return mess;};};PokeIn.StrFix = function (p23) {if (p23 == null || p23.replace == null) { return ""; };p23 = p23.replace(/[&]/g, '"');p23 = p23.replace(/["]/g, '\\"');p23 = p23.replace(/[\\]/g, '\');p23 = p23.replace(/[,]/g, "");p23 = '"' + p23 + '"';return p23;};_pfx_ = PokeIn.StrFix;PokeIn.Send = function (mess, p0) {if (!PokeIn.IsConnected) {return;};mess = PokeIn.CreateText(mess, false);PokeIn.p9.ready = false;setTimeout(function () {if (!PokeIn.p9.force_false) {PokeIn.p9.ready = true;};}, 25);var _id = PokeIn.p9.sn++;p0 = (p0 == null) ? false : p0;PokeIn.p9.s[_id] = { p1: false, p2: p0, message: mess, is_send: true };return _id;};PokeIn.p11 = 0;PokeIn.SendLost++;PokeIn.p15 = function () {if (PokeIn.p9.ready && (PokeIn.ListenActive || PokeIn.sleepMode)) {if (PokeIn.ListenActive) {PokeIn.p11 = 0;};PokeIn.SendLost = 0;if (PokeIn.p9.sn > PokeIn.p9.sc) {PokeIn.p9.ready = false;PokeIn.p9.force_false = true;var _pool = PokeIn.p9.sc;PokeIn.p9.sc++;for (; PokeIn.p9.sc < PokeIn.p9.sn; PokeIn.p9.sc++) {if (!PokeIn.p9.s[PokeIn.p9.sc].p2) {PokeIn.p9.s[_pool].message += "\"" + PokeIn.p9.s[PokeIn.p9.sc].message;delete (PokeIn.p9.s[PokeIn.p9.sc]);} else { break; };};PokeIn.p4(_pool);if (PokeIn.sleepMode) {setTimeout(function () {PokeIn.p9.ready = true;}, 100);};};if (PokeIn.ListenActive) {return;};};if (!PokeIn.ListenActive && PokeIn.IsConnected) {PokeIn.p11++;if (PokeIn.p11 > PokeIn.p11Max) {var reco = true;if (PokeIn.sleepMode) {if (PokeIn.p11 * 80 < PokeIn.LTimeout - 5000) {reco = false;};};if (reco) {PokeIn.p11 = 0;PokeIn.p9.ready = true;PokeIn.Listen();};};} else if (PokeIn.ListenActive) {PokeIn.SendLost++;if (PokeIn.SendLost > 30) {PokeIn.kickFrame();PokeIn.SendLost = 0;return;};};};PokeIn.p11Max = 25;PokeIn.Close = function () {var _id = PokeIn.Send(_pci_() + '.$PLH();');PokeIn.p4(_id);};PokeIn.Closed = function (ir) {if (!PokeIn.IsConnected) {if (false) {if (ir == null) {PokeIn.ReConnect();};}return;};PokeIn.OnError = null;document.PokeInWasConnected = PokeIn.IsConnected;PokeIn.IsConnected = false;PokeIn.Started = false;try {if (!PokeIn.cDom) {PokeIn.p9.l.p16.abort();};} catch (e) { }clearInterval(PokeIn.p12);PokeIn.p12 = -1;if (document.PokeInWasConnected) {if (!PokeIn._wUnLoad && ir != 1) {if (PokeIn.OnClose != null) {setTimeout(function () {PokeIn.OnClose();}, 10);};};};};document.PokeInWasConnected = false;PokeIn.Started = false;PokeIn.IR5 = 0;PokeIn.OU = function () {PokeIn._wUnLoad = true;if (!PokeIn.sleepMode) {try {PokeIn.p9.l.abort();PokeIn.p9.l = null;} catch (e) { };} else {try {PokeIn.Close();} catch (e) { };};};PokeIn.Start = function (p3) {setTimeout(function () {if (PokeIn.Started) {return;};if (PokeIn.IR5 > 3) {var p22 = "?";if (self.location.href.indexOf("?") > 0) {p22 = "&";};self.location = self.location + p22 + "rt=" + PokeIn.p10;if (p3 != null) {p3(false);};return;};PokeIn.IR5++;PokeIn.Started = true;PokeIn.p9.l = { message: "", is_send: false, p16: null };PokeIn.Listen("c");try {PokeIn.RemoveEvent(document, "unload", PokeIn.OU);} catch (e) { };PokeIn.AddEvent(document, "unload", PokeIn.OU);PokeIn.OnConnected = function () {PokeIn.IsConnected = true;if (p3 != null) {p3(true);};PokeIn.p12 = setInterval(PokeIn.p15, 80);};}, 50);};PokeIn.isInitScript = false;PokeIn.scriptResponse = function (ipa) {var que = PokeIn.frames[ipa].docBase.Queue;var str = "";while (que.length > 0) {str += que.shift();};eval(PokeIn.CreateText(str, true));};PokeIn.ipaOrder = 0;PokeIn.cDom = false;PokeIn.lastId = 0;PokeIn.sendRequest = function (url) {PokeIn.InitScriptLoader();var id = PokeIn.ipaOrder % 3;PokeIn.lastId = id;PokeIn.ipaOrder++;if (PokeIn.ipaOrder > 10000) {PokeIn.ipaOrder = 0;};PokeIn.frames[id].docBase.callTarget(url);};PokeIn.GetBody = function () {var parents = document.getElementsByTagName("body");if (parents == null) {throw "Your web page must contain a 'body' element";};if (parents.length > 0) {return parents[0];} else {throw "Your web page must contain a 'body' element";};};PokeIn.kickFrame = function () {if (PokeIn.cDom) {var parents = PokeIn.GetBody();try {for (var i = 0; i < PokeIn.frames.length; i++) {delete parents.removeChild(PokeIn.frames[i]);};} catch (e) { };if (PokeIn.isIE && PokeIn.ieVersion < 8) {window.location.reload(true);} else {PokeIn.ReConnect();};} else {PokeIn.ListenActive = false;};};PokeIn.InitScriptLoader = function () {if (PokeIn.isInitScript) { return; };PokeIn.isInitScript = true;PokeIn.frames = [];for (var i = 0; i < 3; i++) {PokeIn.frames[i] = null;PokeIn.PopFrame(i);};};PokeIn.PopFrame = function (i) {var parents = PokeIn.GetBody();if (PokeIn.frames[i] != null) {PokeIn.frames[i].src = "javascript:''";delete parents.removeChild(PokeIn.frames[i]);};PokeIn.frames[i] = document.createElement("iframe");PokeIn.frames[i].style.cssText = "display:none;position:absolute;left:-100px;width:100px";PokeIn.frames[i].src = "javascript:''";parents.appendChild(PokeIn.frames[i]);var dBase = null;if (PokeIn.frames[i].contentDocument) {dBase = PokeIn.frames[i].contentDocument;} else {dBase = PokeIn.frames[i].contentWindow.document;};dBase.open();dBase.writeln("
");var ctr = "";if (PokeIn.isOpera) {ctr = "document.dz.innerHTML='';ift = document.createElement('iframe');document.dz.appendChild(ift);"+ "ift.style.cssText='display:none;position:absolute;left:-1px';"};dBase.writeln("");dBase.close();dBase.resback = PokeIn.scriptResponse;PokeIn.frames[i].docBase = dBase;};PokeIn.IEHTTPMode = false;PokeIn.CreateAjax = function (is_send, id) {var xmlHttp = null;try {xmlHttp = new XMLHttpRequest();}catch (e) {try {try {if (PokeIn.isIE) {xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');PokeIn.IEHTTPMode = true;};}catch (e) {xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');PokeIn.IEHTTPMode = true;};}catch (e) {try {xmlHttp = new XMLHttpRequest();}catch (e) {if (PokeIn.OnError != null) {PokeIn.OnError("Connection Problem : No Ajax Support");};};};};return xmlHttp;};PokeIn.p4 = function (p17, cc) {if (!PokeIn.IsConnected && cc == null) {return;};var txt = [];txt.push('c=' + _pci_());var p20 = PokeIn.p6;var xmlHttp;if (p17 != -1) {try {txt.push('ms=' + PokeIn.p9.s[p17].message);} catch (e) {return;};xmlHttp = PokeIn.CreateAjax(true, p17);}else {p20 = PokeIn.p5;if (PokeIn.p9.l.p16 == null) {xmlHttp = PokeIn.CreateAjax(true, p17);PokeIn.p9.l.p16 = xmlHttp;}else {xmlHttp = PokeIn.p9.l.p16;try {xmlHttp.abort();} catch (e) { };};};txt = txt.join('&');var uext = 'co=' + (PokeIn.p10++);if (p20.indexOf('?') > 0) {uext = '&' + uext;} else {uext = '?' + uext;};if (p17 == -1) {if (PokeIn.p5 != PokeIn.p6) {if (!PokeIn.isOpera) {PokeIn.sendRequest(p20 + uext + "&" + txt);setTimeout(function () {PokeIn.ListenActive = !PokeIn.sleepMode;}, 5);return;} else {PokeIn.p5 = PokeIn.p6;PokeIn.p4(-1);return;};};};xmlHttp.open("POST", p20 + uext, true);xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8;Chars=UTF-100009532;');xmlHttp.setRequestHeader('Cache-Control', 'no-cache');xmlHttp.setRequestHeader("Cache-Control", "no-store");if (!PokeIn.IEHTTPMode) {try {xmlHttp.onerror = function () {if (p17 == -1) {try {PokeIn.ListenActive = false;if (PokeIn.p11Max < 100) {PokeIn.p11Max += 10;};} catch (e) { };};};} catch (eee) { };};xmlHttp.onreadystatechange = function () {var oStatus = "";try {oStatus = xmlHttp.status;}catch (e) { };if (p17 == -1 && xmlHttp.readyState != 4 && oStatus != 503 && oStatus != 404) {if (PokeIn.p11Max == 25) {PokeIn.ListenActive = true;};};if (xmlHttp.readyState == 2) {if (p17 != -1) {PokeIn.p9.force_false = false;PokeIn.p9.ready = true;try { PokeIn.p9.s[p17].p1 = true; } catch (ez) { };};};if (xmlHttp.readyState == 4 && (oStatus == 200 || oStatus == 304)) {PokeIn.p11Max = 25;if (p17 != -1) {if (PokeIn.p9.s[p17] != null) {if (!PokeIn.p9.s[p17].p1) {PokeIn.p9.force_false = false;PokeIn.p9.ready = true;};};} else {PokeIn.ListenActive = false;};try {if (xmlHttp.responseText != "") {var mess = PokeIn.CreateText(xmlHttp.responseText, true);if (mess != null) {var _mess = mess.replace("PokeIn.Listen();", "");if (PokeIn.OnMessageReceived != null) {PokeIn.OnMessageReceived(_mess);_mess += ";if(PokeIn.OnMessageExecuted!=null){PokeIn.OnMessageExecuted();};";};setTimeout(eval(_mess), 1);if (mess.length != _mess.length) {PokeIn.Listen();};}};}catch (e) {if (p17 == -1) {if (!PokeIn.ListenActive) {PokeIn.Listen();};};if (PokeIn.OnError != null) {var rt = "No Response";try {if (xmlHttp.responseText != null) {rt = xmlHttp.responseText;};} catch (e3) { };PokeIn.OnError('Error: ' + e + ' :-: ' + rt, true);return;};};if (p17 != -1) {delete (PokeIn.p9.s[p17]);xmlHttp.abort();};};};xmlHttp.send(txt);};PokeIn.Controls = [];function p24(settings) {var width = settings.size.width;var height = settings.size.height;this.captions = settings.messages;this.colors = { bgColor: settings.bgColor, fontColor: settings.fontColor };this.fileTypes = settings.FileTypes;var element = settings.targetElement;this.Name = "UploadControl" + PokeIn.Controls.length;this.Element = document.createElement("DIV");this.Element.style.cssText = "position:relative;width:" + width + "px;height:" + height + "px;overflow:hidden;background-color:" + this.colors.bgColor;this.frame = document.createElement("IFRAME");this.frame.style.cssText = "position:absolute;left:1px;top:0px;width:" + (width) + "px;height:" + height + "px;border:0;";this.frame.frameBorder = 0;this.frame.scrolling = "no";this.Element.appendChild(this.frame);this.faker = document.createElement("DIV");this.faker.style.cssText = "display:none;position:absolute;left:1px;top:4px;width:" + (width) + "px;height:" + (height - 1) + "px;font:normal normal 12px sans,Arial;";this.faker.innerHTML = " " + this.captions.OnUpload;this.Element.appendChild(this.faker);this.started = false;var _this = this;this._uploading = "";this.Start = function () {if (_this.started) {return false;};var node = _this.frame.contentDocument;if (node == null) {node = _this.frame.contentWindow.document;};if (node.uFile.value != "") {_this._uploading = "" + node.uFile.value;var parts = _this._uploading.split('.');var hasType = false;if (parts.length > 0) {var ext = parts[parts.length - 1];if (this.fileTypes.length == 0) {hasType = true;}else {for (var ft in this.fileTypes) {if (this.fileTypes[ft].toLowerCase() == ext.toLowerCase()) {hasType = true;break;};};};};if (!hasType) {throw "InvalidFileType";};_this.started = true;if (_this.OnUploadStart != null) {_this.OnUploadStart(_this.Name, node.uFile.value);};_this.frame.style.display = "none";_this.faker.style.display = "block";node.StartUpload();} else {throw "FileNotSelected";};};this.OnLoad = function () {if (_this.started) {if (!PokeIn.IsConnected) {_this.faker.innerHTML = "";return;};_this.started = false;if (!_this.errorReceived) {_this.faker.innerHTML = _this.captions.OnSuccess;};if (_this.OnUploadCompleted != null) {_this.OnUploadCompleted(_this.Name, _this._uploading);};_this._uploading = "";setTimeout(function () {_this.faker.style.display = "none";_this.frame.style.display = "";_this.faker.innerHTML = _this.captions.OnUpload;}, 1000);};};if (this.frame.addEventListener) {this.frame.addEventListener("load", this.OnLoad, false);}else if (this.frame.attachEvent) {this.frame.attachEvent('onload', this.OnLoad);};_this.idl = PokeIn.Controls.length;_this.width = width;_this.height = height;_this.onduty = true;this.goload = function () {_this.onduty = false;_this.frame.src = "/alpesa/comet/Handler.aspx?c=" + PokeIn.clid + "&i=" + (_this.width) + "." + _this.height + "," + _this.colors.bgColor + "&n=" + _this.idl;};setTimeout(_this.goload, 500);this.faker.style.backgroundColor = this.colors.bgColor;this.Element.style.backgroundColor = this.colors.bgColor;this.faker.style.color = this.colors.fontColor;this.errorReceived = false;element.appendChild(this.Element);this.OnUploadStart = null;this.OnUploadCompleted = null;this.Close = function () {element.removeChild(this.Element);};this.OnFinalizing = function () {_this.faker.innerHTML = _this.captions.OnFinalize;};this.OnError = function (message, custom) {_this.faker.innerHTML = _this.captions.OnFail;_this.errorReceived = true;_this.started = false;_this.faker.style.cursor = "pointer";if (custom) {alert(message);}};_this.faker.onmousedown = function () {if (_this.errorReceived) {_this.faker.style.cursor = "default";_this.faker.style.display = "none";_this.frame.style.display = "";_this.faker.innerHTML = _this.captions.OnUpload;}};PokeIn.Controls[PokeIn.Controls.length] = this;};p24.prototype.Size = function (w, h) {this.Element.style.width = w + "px";this.frame.style.width = w + "px";this.faker.style.width = w + "px";this.Element.style.height = h + "px";this.frame.style.height = h + "px";this.faker.style.height = (h - 1) + "px";this.width = w;this.height = h;if (!this.onduty) {setTimeout(_this.goload, 100);};};p24.prototype.BackgroundColor = function (color) {this.Element.style.backgroundColor = color;this.faker.style.backgroundColor = color;this.Element.style.backgroundColor = color;this.colors.bgColor = color;if (!this.onduty) {setTimeout(_this.goload, 100);};};p24.prototype.ForeColor = function (color) {this.faker.style.color = color;this.colors.fontColor = color;};p24.prototype.Captions = function (messages) {this.captions = messages;};PokeIn.CreateUploadControl = function (settings) {return new p24(settings);};PokeIn.ReConnect = function () {PokeIn.Close();PokeIn.Closed(1);setTimeout(function () {var scr = document.createElement("script");scr.type = "text/javascript";scr.src = PokeIn.p5 + "?re=1&ms=connect&rc=" + PokeIn.p10;if (PokeIn.joinedTo != "") {scr.src += "&j=" + PokeIn.joinedTo;};var bdy = document.getElementsByTagName("body");if (bdy.length == 0) {throw ("document body must be defined to use PokeIn.ReConnect!");return;}bdy[0].appendChild(scr);PokeIn.p10++;}, 1500);};PokeIn.Inter = setInterval(function () {if (document.OnPokeInReady != null) {clearInterval(PokeIn.Inter);PokeIn.Inter = 0;setTimeout(function () {document.OnPokeInReady();}, 1);};if (document.OnPokeInStart != null) {clearInterval(PokeIn.Inter);PokeIn.Inter = 0;setTimeout(function () {PokeIn.Start(function (status) {document.OnPokeInStart(status);});}, 1);};if (PokeIn.Started) {clearInterval(PokeIn.Inter);PokeIn.Inter = 0;};}, 250);window.PokeIn = PokeIn;window.pCall = pCall;PokeIn._wUnLoad = false;PokeIn.AddEvent(window, "beforeunload", function (_ev) {PokeIn._wUnLoad = true;try {PokeIn.Close();} catch (e) {}try {PokeIn.p9.l.p16.abort();}catch (e) {};});})(window);;;;;;;;; function AhkSendMess(){};pCall['AhkSendMess'] = AhkSendMess;pCall['AhkSendMess'].SendStatusToClients=function(a0,a1){a0=_pfx_(a0);PokeIn.Send(_pci_() + ".AhkSendMess.SendStatusToClients("+a0+","+a1+");");};pCall['AhkSendMess'].SendPushMessageToUser=function(a0,a1){a1=_pfx_(a1);PokeIn.Send(_pci_() + ".AhkSendMess.SendPushMessageToUser("+a0+","+a1+");");};