function JSONscriptRequest(fullUrl) { this.fullUrl = fullUrl; this.noCacheIE = '&noCacheIE=' + (new Date()).getTime(); this.headLoc = document.getElementsByTagName("head").item(0); this.scriptId = 'JscriptId' + JSONscriptRequest.scriptCounter++; } JSONscriptRequest.scriptCounter = 1; JSONscriptRequest.prototype.buildScriptTag = function () { this.scriptObj = document.createElement("script"); this.scriptObj.setAttribute("type", "text/javascript"); this.scriptObj.setAttribute("charset", "utf-8"); this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE); this.scriptObj.setAttribute("id", this.scriptId); } JSONscriptRequest.prototype.removeScriptTag = function () { if(document.getElementById(this.scriptObj.id)){ this.headLoc.removeChild(this.scriptObj); } } JSONscriptRequest.prototype.addScriptTag = function () { this.headLoc.appendChild(this.scriptObj); } //======================================================================= // 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.1 2005/05/26 08:28:59 mikebird Exp $ 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) { alert(Misc.text); } } this.statusbar = function(text) { window.status = text; } this.confirm_action = function() { this.action = confirm('Sind Sie sicher dass Sie diese aktion durchführen möchten?\n\nACHTUNG: Diese Aktion kann mann nicht rückgängig machen!'); 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(aardvarkCookie)", 1500);} else { this.image.onerror = setTimeout(object+".parse(aardvarkCookie)", 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 = '199404'; 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.ms-livehelp.com/live/icon.php?status=online&departmentid=16'; this.offline_image = 'http://www.ms-livehelp.com/live/icon.php?status=offline&departmentid=16'; this.chatwin; this.endchat = false; this.initiate_accept = function() { window.open('http://www.ms-livehelp.com/live/request.php?initiate&chatid=199404', 'initiate_199404', '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.ms-livehelp.com/live/response.php', '', 'reset'); window.setTimeout('document.getElementById(\'div_initiate\').style.visibility = \'hidden\';', 500);} this.check = function(variables) { var response = ''; if (LiveConnection1.vars.live_199404) { response = LiveConnection1.vars.live_199404; 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.ms-livehelp.com/live/cobrowse.php?changepage'; break;} } } if ((this.time - this.start) < 7200000) { window.setTimeout('Live.tracker();', 5000);} } this.tracker = function() { this.time = Misc.epoch(); LiveConnection1.add('live', ''); LiveConnection1.add('departmentid', '16'); 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;} jsonObj = new JSONscriptRequest('http://www.ms-livehelp.com/class/js/aardvark_cookie.php?output=json'); jsonObj.buildScriptTag(); jsonObj.addScriptTag(); LiveConnection1.send('http://www.ms-livehelp.com/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.ms-livehelp.com/live/main.php', 'guest_199404', '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.ms-livehelp.com/live/main.php?nick='+nick, 'guest_199404', '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.ms-livehelp.com/live/main.php?departmentid='+departmentid, 'guest_199404', '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.ms-livehelp.com/live/main.php?departmentid='+departmentid+'&nick='+nick, 'guest_199404', '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("\"Wenn"); } var aardvarkCookie = ''; function jsoncallback(jsonData){ aardvarkCookie = jsonData.aardvarkCookie; jsonObj.removeScriptTag(); } var Live = new Live(); setTimeout('Live.tracker();', 1000); //if(document.getElementById('aardvark_test')){ document.getElementById('aardvark_test').innerHTML = aardvarkCookie; } //=======================================================================