//======================================================================= // Copyright © 2005 UberTec Ltd. All Rights Reserved // This file is part of Help Center Live. // Help Center Live is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // Help Center Live is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Help Center Live; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Contributors: Michael Bird // File Comments: // This file contains any misc javascript functions // $Id: misc.php,v 1.3 2005/05/26 08:27:35 mikebird Exp $ // This is a compressed version for faster page loading. // The normal vesrion is in the /normal directory function Misc() { this.date = new Date(); this.mac = navigator.platform.indexOf('Mac'); this.text = ''; this.action = false; this.epoch = function() { this.date = new Date(); return this.date.getTime();} this.alert_mac = function(text) { this.text = text; if (this.mac > -1) { setTimeout('alert(Misc.text);', 100);} } this.statusbar = function(text) { window.status = text;} this.confirm_action = function() { this.action = confirm('Tem a certeza que quer fazer isso?\n\nATENÇÃO: Essa acção não é reversível!'); if (this.action == false) { return false;} else { return true;} } } var Misc = new Misc(); //======================================================================= //======================================================================= // Copyright © 2005 Andrew Gregory. All Rights Reserved // This file is part of Cross-Browser XMLHttpRequest. // Cross-Browser XMLHttpRequest is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // Cross-Browser XMLHttpRequest is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Help Center Live; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Contributors: Andrew Gregory, Michael Bird // File Comments: // Cross-Browser XMLHttpRequest // $Id: xmlhttprequest.php,v 1.3 2005/05/26 08:27:35 mikebird Exp $ // This is a compressed version for faster page loading. // The normal vesrion is in the /normal directory if (window.ActiveXObject && !window.XMLHttpRequest) { window.XMLHttpRequest = function() { var msxmls = new Array( 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'); for (var i = 0; i < msxmls.length; i++) { try { return new ActiveXObject(msxmls[i]);} catch (e) { } } return null;};} if (window.opera && !window.XMLHttpRequest) { window.XMLHttpRequest = function() { this.readyState = 0; this.status = 0; this.statusText = ''; this._headers = []; this._aborted = false; this._async = true; this._defaultCharset = 'ISO-8859-1'; this._getCharset = function() { var charset = _defaultCharset; var contentType = this.getResponseHeader('Content-type').toUpperCase(); val = contentType.indexOf('CHARSET='); if (val != -1) { charset = contentType.substring(val);} val = charset.indexOf(';'); if (val != -1) { charset = charset.substring(0, val);} val = charset.indexOf(','); if (val != -1) { charset = charset.substring(0, val);} return charset;}; this.abort = function() { this._aborted = true;}; this.getAllResponseHeaders = function() { return this.getAllResponseHeader('*');}; this.getAllResponseHeader = function(header) { var ret = ''; for (var i = 0; i < this._headers.length; i++) { if (header == '*' || this._headers[i].h == header) { ret += this._headers[i].h + ': ' + this._headers[i].v + '\n';} } return ret;}; this.getResponseHeader = function(header) { var ret = getAllResponseHeader(header); var i = ret.indexOf('\n'); if (i != -1) { ret = ret.substring(0, i);} return ret;}; this.setRequestHeader = function(header, value) { this._headers[this._headers.length] = {h:header, v:value};}; this.open = function(method, url, async, user, password) { this.method = method; this.url = url; this._async = true; this._aborted = false; this._headers = []; if (arguments.length >= 3) { this._async = async;} if (arguments.length > 3) { return false;} this.readyState = 1; if (this.onreadystatechange) { this.onreadystatechange();} }; this.send = function(data) { if (!navigator.javaEnabled()) { return false;} if (this._async) { setTimeout(this._sendasync, 0, this, data);} else { this._sendsync(data);} } this._sendasync = function(req, data) { if (!req._aborted) { req._sendsync(data);} }; this._sendsync = function(data) { this.readyState = 2; if (this.onreadystatechange) { this.onreadystatechange();} var url = new java.net.URL(new java.net.URL(window.location.href), this.url); var conn = url.openConnection(); for (var i = 0; i < this._headers.length; i++) { conn.setRequestProperty(this._headers[i].h, this._headers[i].v);} this._headers = []; if (this.method == 'POST') { conn.setDoOutput(true); var wr = new java.io.OutputStreamWriter(conn.getOutputStream(), this._getCharset()); wr.write(data); wr.flush(); wr.close();} var gotContentEncoding = false; var gotContentLength = false; var gotContentType = false; var gotDate = false; var gotExpiration = false; var gotLastModified = false; for (var i = 0; ; i++) { var hdrName = conn.getHeaderFieldKey(i); var hdrValue = conn.getHeaderField(i); if (hdrName == null && hdrValue == null) { break;} if (hdrName != null) { this._headers[this._headers.length] = {h:hdrName, v:hdrValue}; switch (hdrName.toLowerCase()) { case 'content-encoding': gotContentEncoding = true; break; case 'content-length' : gotContentLength = true; break; case 'content-type' : gotContentType = true; break; case 'date' : gotDate = true; break; case 'expires' : gotExpiration = true; break; case 'last-modified' : gotLastModified = true; break;} } } var val; val = conn.getContentEncoding(); if (val != null && !gotContentEncoding) this._headers[this._headers.length] = {h:'Content-encoding', v:val}; val = conn.getContentLength(); if (val != -1 && !gotContentLength) this._headers[this._headers.length] = {h:'Content-length', v:val}; val = conn.getContentType(); if (val != null && !gotContentType) this._headers[this._headers.length] = {h:'Content-type', v:val}; val = conn.getDate(); if (val != 0 && !gotDate) this._headers[this._headers.length] = {h:'Date', v:(new Date(val)).toUTCString()}; val = conn.getExpiration(); if (val != 0 && !gotExpiration) this._headers[this._headers.length] = {h:'Expires', v:(new Date(val)).toUTCString()}; val = conn.getLastModified(); if (val != 0 && !gotLastModified) this._headers[this._headers.length] = {h:'Last-modified', v:(new Date(val)).toUTCString()}; var reqdata = ''; var stream = conn.getInputStream(); java.lang.System.err.println(stream); if (stream) { var reader = new java.io.BufferedReader(new java.io.InputStreamReader(stream, this._getCharset())); var line; while ((line = reader.readLine()) != null) { if (this.readyState == 2) { this.readyState = 3; if (this.onreadystatechange) { this.onreadystatechange();} } reqdata += line + '\n';} reader.close(); this.status = 200; this.statusText = 'OK'; this.responseText = reqdata; this.readyState = 4; if (this.onreadystatechange) { this.onreadystatechange();} if (this.onload) { this.onload();} } else { this.status = 404; this.statusText = 'Not Found'; this.responseText = ''; this.readyState = 4; if (this.onreadystatechange) { this.onreadystatechange();} if (this.onerror) { this.onerror();} } };};} //======================================================================= //======================================================================= // Copyright © 2005 UberTec Ltd. All Rights Reserved // This file is part of Aardvark. // Aardvark is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // Aardvark is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Help Center Live; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Contributors: Michael Bird // File Comments: // The Aardvark class allows variables to be transferred between client and // server asynchronously using the XMLHttpRequest object, or the fallback method // if the XMLHttpRequest object is not supported. // $Id: aardvark.php,v 1.11 2006/05/14 11:19:30 mikebird Exp $ function Aardvark(object) { this.object = object; this.xmlhttp = new XMLHttpRequest(); this.mac = navigator.platform.indexOf('Mac'); this.msie = navigator.userAgent.indexOf("MSIE"); this.image = new Image(); this.fallback = false; this.url = ''; this.variables = new Array(); this.vars = new Array(); this.connect_host = ''; this.install_host = ''; this.initiated = false; this.url_built = false; this.response = ''; this.gc = 'reset'; this.validateurl = function() { this.connect_host = this.url; this.install_host = document.location.toString(); this.connect_host = this.connect_host.replace(/(.*?)\/\/(.*?)\/(.*)/i, "$1//$2"); this.install_host = this.install_host.replace(/(.*?)\/\/(.*?)\/(.*)/i, "$1//$2"); this.connect_host = this.connect_host.replace(/(.*?)\/\/(.*?)/i, "$2"); this.install_host = this.install_host.replace(/(.*?)\/\/(.*?)/i, "$2"); if (this.connect_host !== this.install_host) { this.fallback = true;} } this.add = function(variable, data) { var i = this.variables.length; this.variables.push(Array()); this.variables[i].push('variable'); this.variables[i].push('data'); this.variables[i]['variable'] = escape(variable); this.variables[i]['data'] = escape(data);} this.build = function(url) { if (!this.url_built) { url_location = document.location.toString(); domain = url_location.match( /:\/\/([^\/:]+)/ ); domain = domain[1]?domain[1]:''; this.add('domain', escape(domain)); if (this.variables.length > 0) { for (var i = 0; i < this.variables.length; i++) { if (url.indexOf('?') > -1) { url += '&aardvark_'+this.variables[i]['variable']+'='+this.variables[i]['data'];} else { url += '?aardvark_'+this.variables[i]['variable']+'='+this.variables[i]['data'];} } } this.url = url; this.url_built = true;} } this.garbage = function() { switch (this.gc) { case 'append': break; case 'reset': default: this.variables = new Array(); break;} } this.send = function(url, response, gc) { this.response = response; if (gc !== '') { this.gc = gc;} this.build(url); this.validateurl(); this.garbage(); if (!this.fallback && this.url.substring(0, 5) !== 'https') { this.xmlhttp = new XMLHttpRequest(); this.xmlhttp.onreadystatechange = function() { var content = ''; var headers = new Array(); var i = 0; try { if (eval(object+".xmlhttp.readyState") == 4) { if (eval(object+".xmlhttp.status") == 200) { if (navigator.appName == 'Microsoft Internet Explorer') { headers = eval(object+".xmlhttp.getAllResponseHeaders()"); headers = headers.split("\n"); for (i = 0; i < headers.length; i++) { if (headers[i].substring(0, 11) == 'Set-Cookie:') { headers[i] = headers[i].substring(11, headers[i].length) headers[i] = headers[i].split("; "); if (headers[i][0].substring(0, 1) == ' ') { content += headers[i][0].substring(1, headers[i][0].length) + '; ';} else { content += headers[i][0] + '; ';} } } } else { headers = eval(object+".xmlhttp.getResponseHeader('Set-Cookie')"); headers = headers.split("path=/"); for (i = 0; i < headers.length; i++) { headers[i] = headers[i].split("; "); if (headers[i][0] !== '') { if (headers[i][0].substring(0, 2) == ', ') { content += headers[i][0].substring(2, headers[i][0].length) + '; ';} else if (headers[i][0].substring(0, 1) == "\n") { content += headers[i][0].substring(1, headers[i][0].length) + '; ';} else { content += headers[i][0] + '; ';} } } } content = content.replace(/, /gm, "; "); content = content.replace(/\n/gm, "; "); eval(object+".parse('"+content+"')");} } else if (eval(object+".xmlhttp.readyState") == 0) { eval(object+".fallback = true"); eval(object+".send("+object+".url, '"+response+"', '"+gc+"')");} } catch(e) { return false;} }; this.xmlhttp.open("GET", this.url, true); this.xmlhttp.send(null);} else { if (navigator.platform.indexOf('Mac') > -1) { document.getElementById('aardvark_div_'+object).innerHTML = 'Aardvark'; this.image = document.getElementById('aardvark_img_'+object);} else { this.image = new Image(); this.image.src = this.url;} if (this.msie > -1) { setTimeout(object+".parse(document.cookie)", 1500);} else { this.image.onerror = setTimeout(object+".parse(document.cookie)", 1200);} } } this.parse = function(content) { this.url_built = false; var variables = new Array(); content = content.split("; "); var arr = 0; var clen = content.length; var rcontent = ''; var i = 0; var varname = ''; var vardata = ''; for (i = 0; i < clen; i++) { rcontent = content[i].split('='); if (rcontent[0].substring(0, 9) == 'aardvark_') { if (rcontent[0].substring(9, rcontent[0].length) !== '') { varname = unescape(rcontent[0].substring(9, rcontent[0].length)); vardata = unescape(rcontent[1]); if (!eval("this.vars."+varname)) { this.vars.push(varname);} if (vardata.toString() != 'undefined') { eval("this.vars."+varname+" = '"+vardata+"'");} arr = variables.length; variables.push(Array()); variables[arr].push('variable'); variables[arr].push('data'); variables[arr]['variable'] = this.object+'.'+varname; variables[arr]['data'] = vardata; document.cookie = rcontent[0]+'=; expires=01/01/1970 00:00:00; path=/;';} } } if (this.response !== '') { eval(this.response);} } if (navigator.platform.indexOf('Mac') > -1) { document.write('
');} } //======================================================================= //======================================================================= // Copyright © 2005 UberTec Ltd. All Rights Reserved // This file is part of Help Center Live. // Help Center Live is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // Help Center Live is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Help Center Live; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Contributors: Michael Bird // File Comments: // This file is used to track visitors using javascript // $Id: live.php,v 1.7 2006/06/05 12:42:05 mikebird Exp $ // This is a compressed version for faster page loading. // The normal vesrion is in the /normal directory var LiveConnection1 = new Aardvark('LiveConnection1'); var LiveConnection2 = new Aardvark('LiveConnection2'); function Live() { this.time = Misc.epoch(); this.start = Misc.epoch(); this.mac = navigator.platform.indexOf('Mac'); this.chatid = '6960'; this.image_width = 0; this.initiate_flag = 0; this.status = 'offline'; this.footprint = '&footprint=yes'; this.refurl = document.referrer; this.page = document.location.toString(); this.useragent = navigator.appName+' - '+navigator.userAgent; this.online_image = 'http://www.hostingdomus.com.br/livechat/live/icon.php?status=online&departmentid='; this.offline_image = 'http://www.hostingdomus.com.br/livechat/live/icon.php?status=offline&departmentid='; this.chatwin; this.endchat = false; this.initiate_accept = function() { window.open('http://www.hostingdomus.com.br/livechat/live/request.php?initiate&chatid=6960', 'initiate_6960', 'toolbar=no, scrollbars=yes, status=no, location=no, menubar=no, directories=no, width=400, height=400'); document.getElementById('div_initiate').style.visibility = 'hidden';} this.initiate_decline = function() { this.time = Misc.epoch(); LiveConnection2.add('decline_initiate', ''); LiveConnection2.send('http://www.hostingdomus.com.br/livechat/live/response.php', '', 'reset'); window.setTimeout('document.getElementById(\'div_initiate\').style.visibility = \'hidden\';', 500);} this.check = function(variables) { var response = ''; if (LiveConnection1.vars.live_6960) { response = LiveConnection1.vars.live_6960; this.time = Misc.epoch(); var i = 0; var max = 0; var action = response.split('|'); max = action.length - 1; for (i = 0; i < max; ++i) { switch (action[i]) { case 'online': if (this.status == 'offline') { document.getElementById('image_live').src = this.online_image;} this.status = 'online'; break; case 'offline': if (this.status == 'online') { document.getElementById('image_live').src = this.offline_image;} this.status = 'offline'; break; case 'initiate': this.launch('initiate',''); break; case 'cobrowse': parent.window.location.href = 'http://www.hostingdomus.com.br/livechat/live/cobrowse.php?changepage'; break;} } } if ((this.time - this.start) < 7200000) { window.setTimeout('Live.tracker();', 10000);} } this.tracker = function() { this.time = Misc.epoch(); LiveConnection1.add('cobrowse', ''); LiveConnection1.add('live', ''); LiveConnection1.add('departmentid', ''); LiveConnection1.add('page', this.page); LiveConnection1.add('refurl', this.refurl); LiveConnection1.add('useragent', this.useragent); LiveConnection1.add('time', Misc.epoch()); if (this.end_chat) { LiveConnection1.add('endchat', ''); this.endchat = false;} if (this.footprint) { LiveConnection1.add('footprint', ''); this.footprint = false;} LiveConnection1.send('http://www.hostingdomus.com.br/livechat/live/response.php', 'Live.check(variables)', 'reset'); } this.launch = function(action, departmentid, nick) { this.time = Misc.epoch(); if (action == 'initiate') { if (this.initiate_flag !== 1) { if (document.getElementById('div_initiate') !== null) { document.getElementById('div_initiate').style.visibility = 'visible'; window.setTimeout('document.getElementById(\'div_initiate\').style.visibility = \'hidden\';', 15000); this.initiate_flag = 1;} } } else { if (departmentid == '') { if (nick == '') { this.chatwin = window.open('http://www.hostingdomus.com.br/livechat/live/main.php', 'guest_6960', 'toolbar=no, scrollbars=yes, status=no, resizable=yes, location=no, menubar=no, directories=no, width=400, height=415');} else { this.chatwin = window.open('http://www.hostingdomus.com.br/livechat/live/main.php?nick='+nick, 'guest_6960', 'toolbar=no, scrollbars=yes, status=no, resizable=yes, location=no, menubar=no, directories=no, width=400, height=415');} } else { if (nick == '') { this.chatwin = window.open('http://www.hostingdomus.com.br/livechat/live/main.php?departmentid='+departmentid, 'guest_6960', 'toolbar=no, scrollbars=yes, status=no, resizable=yes, location=no, menubar=no, directories=no, width=400, height=415');} else { this.chatwin = window.open('http://www.hostingdomus.com.br/livechat/live/main.php?departmentid='+departmentid+'&nick='+nick, 'guest_6960', 'toolbar=no, scrollbars=yes, status=no, resizable=yes, location=no, menubar=no, directories=no, width=400, height=415');} } if (this.chatwin.opener == null) { this.chatwin.opener = self;} } } document.write("\"Clique"); } var Live = new Live(); setTimeout('Live.tracker();', 1000); //======================================================================= //======================================================================= // Copyright © 2005 UberTec Ltd. All Rights Reserved // This file is part of Help Center Live. // Help Center Live is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // Help Center Live is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Help Center Live; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Contributors: Michael Bird // File Comments: // This file is used enable cobrowse with the visitor // $Id: cobrowse.php,v 1.5 2005/06/19 17:57:04 mikebird Exp $ var CoBrowseConnection1 = new Aardvark('CoBrowseConnection1'); var CoBrowseConnection2 = new Aardvark('CoBrowseConnection2'); function CoBrowse() { this.time = Misc.epoch(); this.start = Misc.epoch(); this.mac = navigator.platform.indexOf('Mac'); this.image_width = 0; this.alert = false; this.alertsave = false; this.elements; this.chatid = '6960'; this.type; this.count = 0; this.input = Array(); this.textarea = Array(); this.select = Array(); this.handled = false; this.track = false; this.name = ''; this.marker; this.comarkers_left = 0; this.comarkers_right = 0; this.keepalive = 0; this.check = function(variables) { var response = ''; if (CoBrowseConnection1.vars.cobrowse_6960) { response = CoBrowseConnection1.vars.cobrowse_6960; this.time = Misc.epoch(); if (this.track) { var i = 0; var max = 0; var action = response.split('|'); max = action.length - 1; for (i = 0; i < max; ++i) { switch (action[i]) { case 'handleforms': this.handleforms(); break; case 'getforms': this.getforms(); break; case 'disconnect': if (this.keepalive > 3) { this.disconnect();} else { this.keepalive ++;} break;} } } } window.setTimeout('CoBrowse.tracker();', 8000); } this.tracker = function() { this.time = Misc.epoch(); if (this.track && this.connect_host == this.install_host) { CoBrowseConnection1.add('cobrowse', ''); CoBrowseConnection1.add('time', Misc.epoch()); CoBrowseConnection1.send('http://www.hostingdomus.com.br/livechat/live/response.php', 'CoBrowse.check(variables)', 'reset');} else { window.setTimeout('CoBrowse.tracker();', 8000);} if (!this.handled) { this.handled = true; this.handleforms();} } this.disconnect = function() { this.track = false; this.keepalive = 0; this.clearmarkers();} this.insertmarker = function(type, x, y) { if (this.mac > -1) { this.name = 'hcl_cobrowse_marker_' + type; parent.window.document.getElementById(this.name).style.visibility = 'true'; parent.window.document.getElementById(this.name).style.top = y+'px'; parent.window.document.getElementById(this.name).style.left = x+'px';} else { if (type == 'right') { this.comarkers_right++; this.name = 'hcl_cobrowse_marker_' + type + '_' + this.comarkers_right;} else if (type == 'left') { this.comarkers_left++; this.name = 'hcl_cobrowse_marker_' + type + '_' + this.comarkers_left;} parent.window.document.body.innerHTML = parent.window.document.body.innerHTML + '
';} } this.clearmarkers = function() { if (this.mac > -1) { parent.window.document.getElementById('hcl_cobrowse_marker_right').style.visibility = 'hidden'; parent.window.document.getElementById('hcl_cobrowse_marker_left').style.visibility = 'hidden';} else { for (this.count = 1; this.count < (this.comarkers_right + 1); this.count++) { parent.window.document.getElementById('hcl_cobrowse_marker_right_'+this.count).style.visibility = 'hidden';} for (this.count = 1; this.count < (this.comarkers_left + 1); this.count++) { parent.window.document.getElementById('hcl_cobrowse_marker_left_'+this.count).style.visibility = 'hidden';} } } this.getforms = function(type, name, value) { this.time = Misc.epoch(); this.elements = parent.window.document.getElementsByTagName(type); for (this.count = 0; this.count < this.elements.length; this.count++) { if (this.elements[this.count].name == name) { if (type == 'input') { if (this.elements[this.count].type == 'checkbox' || this.elements[this.count].type == 'radio') { if (value == 'true') { this.input[this.count][2] = 'true'; this.elements[this.count].checked = true;} else { this.input[this.count][2] = 'false'; this.elements[this.count].checked = false;} } else { this.input[this.count][2] = value; this.elements[this.count].value = value;} } else if (type == 'textarea') { this.textarea[this.count][2] = value; this.elements[this.count].value = value;} else if (type == 'select') { this.select[this.count][2] = value; this.elements[this.count].selectedIndex = value;} } } } this.setforms = function(tag, type, name, value) { var docoforms = false; this.time = Misc.epoch(); if (type == 'password') { if (!this.alertsave) { this.alert = confirm('Um operador está actualmente numa sessão de conversação consigo. Deseja que os conteúdos deste campo de password sejam transmitidos?'); this.alertsave = true;} if (this.alert) { docoforms = true;} } else { docoforms = true;} if (docoforms) { CoBrowseConnection2.add('coforms', ''); CoBrowseConnection2.add('type', tag); CoBrowseConnection2.add('name', escape(name)); CoBrowseConnection2.add('value', escape(value)); CoBrowseConnection2.add('time', Misc.epoch()); CoBrowseConnection2.send('http://www.hostingdomus.com.br/livechat/live/response.php', '', 'reset');} } this.initiateforms = function() { this.elements = parent.window.document.getElementsByTagName('input'); for (this.count = 0; this.count < this.elements.length; this.count++) { if (this.elements[this.count].type == 'checkbox') { if (this.elements[this.count].checked == true) { CoBrowse.setforms('input', this.elements[this.count].type, this.elements[this.count].name, 'true');} else { CoBrowse.setforms('input', this.elements[this.count].type, this.elements[this.count].name, 'false');} } else if (this.elements[this.count].type !== 'password') { CoBrowse.setforms('input', this.elements[this.count].type, this.elements[this.count].name, this.elements[this.count].value);} } this.elements = parent.window.document.getElementsByTagName('textarea'); for (this.count = 0; this.count < this.elements.length; this.count++) { CoBrowse.setforms('textarea', this.elements[this.count].type, this.elements[this.count].name, this.elements[this.count].value);} this.elements = parent.window.document.getElementsByTagName('select'); for (this.count = 0; this.count < this.elements.length; this.count++) { if (this.elements[this.count].options) { CoBrowse.setforms('select', '', this.elements[this.count].name, this.elements[this.count].selectedIndex);} } } this.handleforms = function() { this.elements = parent.window.document.getElementsByTagName('input'); for (this.count = 0; this.count < this.elements.length; this.count++) { if (this.input[this.count]) { if (this.input[this.count][2] !== this.elements[this.count].value) { if (this.elements[this.count].type == 'checkbox') { if (this.elements[this.count].checked == true) { this.input[this.count][2] = 'true';} else { this.input[this.count][2] = 'false';} } else { this.input[this.count][2] = this.elements[this.count].value;} CoBrowse.setforms('input', this.input[this.count][0], this.input[this.count][1], this.input[this.count][2]);} } else { this.input[this.count] = Array(3); this.input[this.count][0] = this.elements[this.count].type; this.input[this.count][1] = this.elements[this.count].name; if (this.elements[this.count].type == 'checkbox') { if (this.elements[this.count].checked == true) { this.input[this.count][2] = 'true';} else { this.input[this.count][2] = 'false';} } else { this.input[this.count][2] = this.elements[this.count].value;} } } this.elements = parent.window.document.getElementsByTagName('textarea'); for (this.count = 0; this.count < this.elements.length; this.count++) { if (this.textarea[this.count]) { if (this.textarea[this.count][2] !== this.elements[this.count].value) { this.textarea[this.count][2] = this.elements[this.count].value; CoBrowse.setforms('textarea', this.textarea[this.count][0], this.textarea[this.count][1], this.textarea[this.count][2]);} } else { this.textarea[this.count] = Array(3); this.textarea[this.count][0] = this.elements[this.count].type; this.textarea[this.count][1] = this.elements[this.count].name; this.textarea[this.count][2] = this.elements[this.count].value;} } this.elements = parent.window.document.getElementsByTagName('select'); for (this.count = 0; this.count < this.elements.length; this.count++) { if (this.elements[this.count].options) { if (this.select[this.count]) { if (this.select[this.count][2] !== this.elements[this.count].selectedIndex) { this.select[this.count][2] = this.elements[this.count].selectedIndex; CoBrowse.setforms('select', this.select[this.count][0], this.select[this.count][1], this.select[this.count][2]);} } else { this.select[this.count] = Array(3); this.select[this.count][0] = ''; this.select[this.count][1] = this.elements[this.count].name; this.select[this.count][2] = this.elements[this.count].selectedIndex;} } } } if (this.mac > -1) { document.write(''); document.write('');} } var CoBrowse = new CoBrowse(); setTimeout('CoBrowse.tracker();', 1000); //=======================================================================