var lz_title_timer;
var lz_title_step = 0;
var lz_title_modes = new Array(document.title,"");
var lz_standard_title = document.title;
var lz_document_head = document.getElementsByTagName("head")[0];
var lz_geo_resolution;
var lz_geo_resolution_needed = false;
var lz_geo_retries = 1;
if (typeof(encodeURIComponent) == 'undefined')
{
encodeURIComponent = function(uri)
{
return (escape(uri));
}
}
function lz_jssess()
{
this.Save = lz_jssess_save;
this.Load = lz_jssess_load;
this.GeoResolutions = 0;
this.GeoResolved = Array();
this.BrowserId = "952b9cf";
this.UserId = "ab54fa6";
function lz_jssess_save()
{
var data = "" + this.BrowserId + ";" + this.UserId + ";" + this.GeoResolved + ";" + this.GeoResolutions + "";
if(window.name == null || window.name == "undefinded" || window.name == "" || (window.name == null && window.name.indexOf("") == -1))
{
if(window.name == null || window.name == "undefinded" || window.name == "")
window.name = data;
else
window.name += data;
}
else
{
var regex = new RegExp(/\.*?<\/LiveZilla>/g);
window.name = window.name.replace(regex,"");
window.name += data;
}
}
function lz_jssess_load()
{
var data = window.name;
if(data.indexOf("") != -1)
{
data = data.split("")[1].split("")[0].split(";");
this.BrowserId = data[0];
this.UserId = data[1];
this.GeoResolved = data[2].split(",");
this.GeoResolutions = data[3];
}
}
}
function lz_geo_resolver()
{
this.ResolveAsync = lz_resolver_connect_async;
this.TimeoutConnection = lz_resolver_timeout_connection;
this.OnEndEvent;
this.OnTimeoutEvent;
var OnEnd;
var OnTimeout;
var lz_resolver_request;
var lz_resolver_timeout_timer;
function lz_resolver_connect_async()
{
OnEnd = this.OnEndEvent;
OnTimeout = this.OnTimeoutEvent;
lz_resolver_timeout_timer = setTimeout(this.TimeoutConnection,15000);
lz_resolver_request = document.createElement("script");
lz_resolver_request.id = "livezilla_geoscript";
lz_resolver_request.src = "https://ssl.livezilla.net/geo/resolute/?aid=&method=" + OnEnd + "&spanm=lz_tracking_set_geo_span";
lz_document_head.appendChild(lz_resolver_request);
}
function lz_resolver_timeout_connection()
{
if(OnTimeout != null)
OnTimeout();
}
}
function lz_global_replace_breaks(_text)
{
_text = _text.replace(/[\r\n]+/g, "
");
return _text.replace(/[\t]+/g, " ");
}
function lz_global_base64_url_encode(_text)
{
_text = lz_global_base64_encode(lz_global_utf8_encode(_text.toString()));
_text = _text.replace("=", "_");
_text = _text.replace("+", "-");
_text = _text.replace("/", ",");
return _text;
}
function lz_global_base64_url_decode(_text)
{
if(!(_text != null && _text.length > 0))
return "";
_text = _text.replace("_","=");
_text = _text.replace("-","+");
_text = _text.replace(",","/");
_text = lz_global_utf8_decode(lz_global_base64_decode(_text));
return _text;
}
function lz_global_base64_decode(_text)
{
var base64_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var bits;
var decOut = '';
var i = 0;
for(; i<_text.length; i += 4)
{
bits = (base64_chars.indexOf(_text.charAt(i)) & 0xff) <<18 |
(base64_chars.indexOf(_text.charAt(i +1)) & 0xff) <<12 |
(base64_chars.indexOf(_text.charAt(i +2)) & 0xff) << 6 |
base64_chars.indexOf(_text.charAt(i +3)) & 0xff;
decOut += String.fromCharCode((bits & 0xff0000) >>16, (bits & 0xff00) >>8, bits & 0xff);
}
if(_text.charCodeAt(i -2) == 61)
return(decOut.substring(0, decOut.length -2));
else if(_text.charCodeAt(i -1) == 61)
return(decOut.substring(0, decOut.length -1));
else
return(decOut);
}
function lz_global_base64_encode(_input)
{
var base64_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
do
{
chr1 = _input.charCodeAt(i++);
chr2 = _input.charCodeAt(i++);
chr3 = _input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2))
enc3 = enc4 = 64;
else if (isNaN(chr3))
enc4 = 64;
output = output + base64_chars.charAt(enc1) + base64_chars.charAt(enc2) +
base64_chars.charAt(enc3) + base64_chars.charAt(enc4);
}
while (i < _input.length);
return output;
}
function lz_global_utf8_encode(_string,_encodeuri)
{
_string = _string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < _string.length; n++)
{
var c = _string.charCodeAt(n);
if (c < 128)
{
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048))
{
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else
{
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
if(_encodeuri)
return encodeURIComponent(utftext);
else
return utftext;
}
function lz_global_utf8_decode(utftext)
{
var string = "";
var i = 0;
var c, c1, c2
c = c1 = c2 = 0;
while ( i < utftext.length )
{
c = utftext.charCodeAt(i);
if (c < 128)
{
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224))
{
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else
{
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
function lz_set_title_mode()
{
document.title = lz_title_modes[lz_title_step++ % 2];
}
function lz_switch_title_mode(_active)
{
if(_active)
{
if(lz_title_timer == null)
lz_title_timer = setInterval("lz_set_title_mode()",800);
}
else
{
clearInterval(lz_title_timer);
lz_title_timer = null;
document.title = lz_standard_title;
lz_title_step = 0;
}
}
function lz_global_replace_smilies(_text)
{
var shorts = new Array(/:-\)/g,/::smile/g,/:\)/g,/:-\(/g,/::sad/g,/:\(/g,/:-]/g,/::lol/g,/;-\)/g,/::wink/g,/;\)/g,/:'-\(/g,/::cry/g,/:-O/g,/::shocked/g,/:-\\\\/g,/::sick/g,/:-p/g,/::tongue/g,/:-P/g,/:\?/g,/::question/g,/8-\)/g,/::cool/g,/zzZZ/g,/::sleep/g,/:-\|/g,/::neutral/g);
var images = new Array("smile","smile","smile","sad","sad","sad","lol","lol","wink","wink","wink","cry","cry","shocked","shocked","sick","sick","tongue","tongue","tongue","question","question","cool","cool","sleep","sleep","neutral","neutral");
for(var i = 0;i ");
return _text;
}
function lz_global_replacements(_text,_smileys)
{
_text = _text.replace(/\\'/g,"'");
_text = _text.replace(/\"/g,"\"");
if(_smileys)
_text = lz_global_replace_smilies(_text);
return _text;
}
function lz_global_timestamp()
{
var now = new Date();
var ts = Math.round((now.getTime()/1000));
return (ts);
}
function lz_global_microstamp()
{
var now = new Date();
var ts = now.getTime();
return (ts);
}
function lz_global_get_long_poll_runtime()
{
if(lz_chat_data.LastConnectionFailed)
return 20;
var value = lz_chat_data.PollTimeout - lz_chat_data.ChatFrequency - 25;
if(value >= 60)
value = 65;
return value;
}
function lz_chat_get_locale_time()
{
var time = new Date().toLocaleTimeString()
time = time.split(" (");
return time[0];
}
function lz_chat_get_locale_date()
{
var date = new Date().toLocaleString();
date = date.split(" (");
return date[0];
}
function lz_global_handle_exception(exception,file,line)
{
//alert(exception);
return true;
}
function lz_global_trim(_str)
{
return _str.replace(/^\s+|\s+$/g,"");
}window.onerror=lz_global_handle_exception;
if(document.getElementById('livezilla_style') == null)
{
var lz_poll_id = 0;
var lz_poll_url = "http://www.atelier-prisma.de/livezilla/server.php";
var lz_poll_timeout = 150;
var lz_poll_frequency = 30;
var lz_poll_frequency_config = 30;
var lz_referrer = document.referrer;
var lz_stopped = false;
var lz_request_window = null;
var lz_alert_window = null;
var lz_request_active = null;
var lz_session;
var lz_style = document.createElement('LINK');
var lz_area_code = "";
var lz_user_name = "";
var lz_user_email = "";
var lz_user_company = "";
var lz_timezone_offset = (new Date().getTimezoneOffset() / 60) * -1;
var lz_geo_data_count = 6;
var lz_alert_html = 'PHRhYmxlIGlkPSJsel9jaGF0X2FsZXJ0X2JveCIgY2VsbHNwYWNpbmc9IjQiIGNlbGxwYWRkaW5nPSIwIj4KCTx0cj4KCQk8dGQgaGVpZ2h0PSIxNSIgdmFsaWduPSJ0b3AiIGlkPSJsel9jaGF0X2FsZXJ0X2JveF90aXRsZSIgY29sc3Bhbj0iMiI+TGl2ZVppbGxhPC90ZD4KCTwvdHI+Cgk8dHI+CgkJPHRkIHdpZHRoPSI1MCIgYWxpZ249ImNlbnRlciI+PGltZyBzcmM9Imh0dHA6Ly93d3cuYXRlbGllci1wcmlzbWEuZGUvbGl2ZXppbGxhL2ltYWdlcy9pY29uX2luZm8uZ2lmIiBhbHQ9IiIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBib3JkZXI9IjAiIHN0eWxlPSJtYXJnaW4tbGVmdDo4cHg7Ij48L3RkPgoJCTx0ZCBpZD0ibHpfY2hhdF9hbGVydF9ib3hfdGV4dCI+PC90ZD4KCTwvdHI+Cgk8dHI+CgkJPHRkIGhlaWdodD0iMjUiIHZhbGlnbj0idG9wIiBhbGlnbj0iY2VudGVyIiBjb2xzcGFuPSIyIj48aW5wdXQgdHlwZT0iYnV0dG9uIiBpZD0ibHpfY2hhdF9hbGVydF9idXR0b24iIHZhbHVlPSJPSyI+PC90ZD4KCTwvdHI+CjwvdGFibGU+CgoKCg==';
var lz_geo_span = 0;
var lz_geo_result_id = 0;
lz_tracking_load_style();
lz_tracking_start_system();
}
function lz_is_geo_resolution_needed()
{
return (lz_geo_resolution_needed && lz_session.GeoResolved.length != 6 && lz_session.GeoResolutions < 5);
}
function lz_tracking_load_style()
{
lz_style.id = "livezilla_style";
lz_style.href = "http://www.atelier-prisma.de/livezilla/templates/style.css?cache=" + Math.random();
lz_style.rel='stylesheet';
lz_style.type='text/css';
lz_document_head.appendChild(lz_style);
}
function lz_tracking_start_system()
{
if(location.search.indexOf("lzcobrowse") != -1)
return;
lz_session = new lz_jssess();
lz_session.Load();
try
{
if(window.opener != null && typeof(window.opener.lz_get_session) != 'undefined')
{
lz_session.UserId = window.opener.lz_get_session().UserId;
lz_session.GeoResolved = window.opener.lz_get_session().GeoResolved;
}
}
catch(ex)
{
// ACCESS DENIED
}
lz_session.Save();
if(!lz_tracking_geo_resolute())
lz_tracking_poll_server();
}
function lz_get_session()
{
return lz_session;
}
function lz_tracking_server_request(_get)
{
if(lz_stopped)
return;
var lastScript = document.getElementById("pollscript");
if(lastScript == null)
{
_get = "?request=track&start=" + lz_global_microstamp() + _get;
var newScript = document.createElement("script");
newScript.id = "livezilla_pollscript";
newScript.src = lz_poll_url + _get;
lz_document_head.appendChild(newScript);
}
}
function lz_tracking_callback(_freq,_starttime)
{
if(lz_poll_frequency_config != _freq)
lz_poll_frequency_config = lz_poll_frequency = _freq;
else if((lz_global_microstamp() - _starttime) > ((lz_poll_frequency*1000) /4))
{
for(var i = 0;i<5;i++)
{
if((lz_poll_frequency+1) < (lz_poll_timeout/1.25))
lz_poll_frequency++;
}
}
else if(lz_poll_frequency > _freq)
lz_poll_frequency-=0.1;
var lastScript = document.getElementById("livezilla_pollscript");
if(lastScript != null)
lz_document_head.removeChild(lastScript);
}
function lz_tracking_poll_server()
{
var getValues = "&browid="+lz_session.BrowserId+"&url="+lz_global_base64_url_encode(window.location.href);
getValues += (lz_session.UserId != null) ? "&livezilla="+ lz_session.UserId : "";
getValues += "&cd="+window.screen.colorDepth+"&rh="+screen.height+"&rw="+screen.width+"&rf="+lz_global_base64_url_encode(lz_referrer)+"&tzo="+lz_timezone_offset;
getValues += "&code="+lz_area_code+"&en="+lz_user_name+"&ee="+lz_user_email+"&ec="+lz_user_company;
if(lz_geo_resolution_needed && lz_session.GeoResolved.length == 6)
{
if(lz_geo_result_id != 4)
{
if("LTc3Nw==" == lz_session.GeoResolved[0])
lz_geo_result_id = 5;
else if("LTUyMg==" == lz_session.GeoResolved[0])
lz_geo_result_id = 2;
else
lz_geo_result_id = 3;
}
getValues += "&geo_lat=" + lz_session.GeoResolved[0] + "&geo_long=" + lz_session.GeoResolved[1] + "&geo_region=" + lz_session.GeoResolved[2] + "&geo_city=" + lz_session.GeoResolved[3] + "&geo_tz=" + lz_session.GeoResolved[4] + "&geo_ctryiso=" + lz_session.GeoResolved[5];
}
getValues += "&geo_rid=" + lz_geo_result_id;
if(lz_geo_span > 0)
getValues += "&geo_ss=" + lz_geo_span;
++lz_poll_id;
if(lz_request_active != null)
getValues += "&actreq=1";
lz_tracking_server_request(getValues,true);
if(!lz_stopped)
setTimeout("lz_tracking_poll_server(null);",(lz_poll_frequency*1000));
}
function lz_tracking_set_sessid(_userId, _browId)
{
if(lz_session.UserId != _userId)
{
lz_session.UserId = _userId;
lz_session.BrowserId = _browId;
lz_session.Save();
}
}
function lz_tracking_request_conversation(_reqId,_template,_text,_height,_width)
{
if(lz_poll_id <= 1)
return;
if(lz_request_active == null)
{
lz_request_active = _reqId;
window.focus();
_template = lz_global_utf8_decode(lz_global_base64_decode(_template)).replace("",lz_global_utf8_decode(lz_global_base64_decode(_text)));
lz_request_window = new lz_livebox("lz_request_window",_height,_width,_template);
lz_request_window.lz_livebox_show();
}
}
function lz_tracking_check_request(_reqId)
{
if(lz_request_window == null && lz_request_active != null)
lz_tracking_declined_request();
}
function lz_tracking_close_request()
{
if(lz_request_active != null)
lz_request_active = null;
if(lz_request_window != null)
lz_request_window.lz_livebox_close();
}
function lz_tracking_guide(_url,_text,_ask,_id)
{
if((_ask == "True" && confirm(lz_global_utf8_decode(lz_global_base64_decode(_text)))) || _ask == "False")
window.location.href = lz_global_utf8_decode(lz_global_base64_decode(_url));
else
lz_tracking_declined_guide(_id);
}
function lz_tracking_stop_tracking()
{
lz_stopped = true;
}
function lz_tracking_geo_result(_lat,_long,_region,_city,_tz,_ctryi2)
{
lz_session.GeoResolved = Array(_lat,_long,_region,_city,_tz,_ctryi2);
lz_session.Save();
lz_tracking_poll_server();
}
function lz_tracking_set_geo_span(_timespan)
{
lz_geo_span = _timespan;
}
function lz_tracking_geo_resolute()
{
if(lz_is_geo_resolution_needed())
{
lz_geo_result_id = 1;
lz_session.GeoResolutions++;
lz_session.Save();
lz_geo_resolution = new lz_geo_resolver();
lz_geo_resolution.OnEndEvent = "lz_tracking_geo_result";
if(lz_geo_retries-- > 0 && lz_session.GeoResolutions < 4)
lz_geo_resolution.OnTimeoutEvent = lz_tracking_geo_resolute;
else
lz_geo_resolution.OnTimeoutEvent = lz_tracking_geo_failure;
lz_geo_resolution.ResolveAsync();
return true;
}
else
return false;
}
function lz_tracking_geo_failure()
{
lz_tracking_set_geo_span(60);
lz_geo_result_id = 4;
lz_session.GeoResolved = Array('LTUyMg==','LTUyMg==','','','','');
lz_session.Save();
lz_tracking_poll_server();
}
function lz_tracking_declined_request()
{
var getValues = "&browid="+lz_session.BrowserId+"&url="+lz_global_base64_url_encode(window.location.href);
getValues += (lz_session.UserId != null) ? "&livezilla="+lz_session.UserId : "";
getValues += "&decreq="+lz_request_active;
lz_tracking_server_request(getValues);
}
function lz_tracking_declined_guide(_id)
{
var getValues = "&browid="+lz_session.BrowserId+"&url="+lz_global_base64_url_encode(window.location.href);
getValues += (lz_session.UserId != null) ? "&livezilla="+lz_session.UserId : "";
getValues += "&decguide="+_id;
lz_tracking_server_request(getValues);
}
function lz_tracking_accepted_request(_id)
{
var getValues = "&browid="+lz_session.BrowserId+"&url="+lz_global_base64_url_encode(window.location.href);
getValues += (lz_session.UserId != null) ? "&livezilla="+lz_session.UserId : "";
getValues += "&accreq="+_id;
lz_tracking_server_request(getValues);
}
function lz_tracking_send_alert(_text)
{
if(lz_alert_window != null)
document.body.removeChild(document.getElementById('lz_alert_window'));
lz_alert_window = new lz_livebox('lz_alert_window',350,110,lz_global_base64_decode(lz_alert_html));
lz_alert_window.lz_livebox_show();
document.getElementById("lz_chat_alert_box").style.visibility = "visible";
document.getElementById("lz_chat_alert_button").onclick = function(){if(lz_alert_window != null){document.body.removeChild(document.getElementById('lz_alert_window'));lz_alert_window=null;}};
document.getElementById("lz_chat_alert_box_text").innerHTML = lz_global_utf8_decode(lz_global_base64_decode(_text));
window.focus();
}
var lzibst_height;
var lzibst_width;
function lz_livebox(_name,_width,_height,_template)
{
this.lz_livebox_scroll_finished = false;
this.lz_livebox_template = _template;
this.lz_livebox_name = _name;
this.lz_livebox_move = lz_livebox_move_box;
this.lz_livebox_show = lz_livebox_show_box;
this.lz_livebox_close = lz_livebox_close_box;
this.lz_livebox_chat = lz_livebox_direct_chat;
lzibst_height = _height;
lzibst_width = _width;
function lz_livebox_direct_chat(_sess,_id,_intid)
{
void(window.open('http://www.atelier-prisma.de/livezilla/livezilla.php?intid='+_intid+'&en='+lz_global_base64_url_encode(document.getElementById('lz_invitation_name').value)+'&code=','LiveZilla','width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=no'));
}
function lz_livebox_close_box(uid)
{
if(!this.lz_livebox_scroll_finished)
return;
document.body.removeChild(this.MainDiv);
lz_request_window = null;
}
function lz_livebox_show_box()
{
this.MainDiv = document.createElement('DIV');
this.MainDiv.id = this.lz_livebox_name;
this.MainDiv.style.height = lzibst_height+'px';
this.MainDiv.style.width = lzibst_width+'px';
this.MainDiv.style.position = 'absolute';
this.MainDiv.style.left = -400+'px';
this.MainDiv.style.top = -400+'px';
this.MainDiv.style.zIndex = 1001;
this.MainDiv.innerHTML = this.lz_livebox_template;
document.body.appendChild(this.MainDiv);
document.getElementById('lz_invitation_name').value = lz_global_base64_url_decode("");
window.setTimeout("window['"+ this.lz_livebox_name +"'].lz_livebox_move()",2500);
}
function lz_livebox_move_box()
{
var current = parseInt(this.MainDiv.style.top.replace("px","").replace("pt",""));
current+=15;
this.MainDiv.style.top = current+'px';
this.MainDiv.style.left = lz_livebox_center_get_left()+'px';
if(current < (lz_livebox_center_get_top()-15))
window.setTimeout("window['"+ this.lz_livebox_name +"'].lz_livebox_move()",15);
else
this.lz_livebox_scroll_finished = true;
if(this.lz_livebox_scroll_finished && document.body.onresize == null)
{
window.onresize =
window.onscroll = lz_livebox_center_box;
}
}
}
function lz_livebox_center_box()
{
if(document.getElementById("lz_request_window") != null)
{
document.getElementById("lz_request_window").style.top = lz_livebox_center_get_top()+'px';
document.getElementById("lz_request_window").style.left = lz_livebox_center_get_left()+'px';
}
if(document.getElementById("lz_alert_window") != null)
{
document.getElementById("lz_alert_window").style.top = lz_livebox_center_get_top()+'px';
document.getElementById("lz_alert_window").style.left = lz_livebox_center_get_left()+'px';
}
}
function lz_livebox_center_get_left()
{
var scrollleft = (document.documentElement) ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : 50;
var xc = (document.documentElement) ? 50 : window.pageXOffset;
var xd = (document.documentElement) ? (document.documentElement.offsetWidth * 50 / 100) + scrollleft : (window.innerWidth * 50 / 100) + window.pageXOffset;
var top;
if (3 == 2)
top = xc + scrollleft;
else if (3 == 3)
top = xd;
else
top = 50;
top -= (lzibst_width / 2);
return top;
}
function lz_livebox_center_get_top()
{
var scrolltop = (document.documentElement) ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : 50;
var xc = (document.documentElement) ? 50 : window.pageYOffset;
var xd = (document.documentElement) ? (document.documentElement.offsetHeight * 50 / 100) + scrolltop : (window.innerHeight * 50 / 100) + window.pageYOffset;
if(window.pageYOffset != null)
xd = (window.innerHeight * 50 / 100) + window.pageYOffset;
var top;
if (3 == 2)
top = xc + scrolltop;
else if (3 == 3)
top = xd;
else
top = 50;
top -= (lzibst_height / 2);
return top;
}