enters the chatroom.";
this.ClientErrorUnavailable = "This service is not available. We apologize for any inconvenience this may cause.";
this.ClientIntLeft = "The representative has left the conversation. If you have further questions please leave a message:";
this.ClientIntDeclined = "All available representatives are currently occupied. Your request could not be served. We apologize for any inconvenience this may cause. Please try again later or leave a message:";
this.ClientStillWaitingInt = "We are still trying to connect you, please be patient. If you don't want to wait please leave a message:";
this.ClientThankYou = "Thank you!";
this.ClientIntIsConnected = "A representative will be connected, please be patient.";
this.ClientNoInternUsers = "No representative of this department is available. Please try again later or switch to another department. You can also leave a message:";
this.ClientNoInternUsersShort = "No representative of this department is available. Please try again later or switch to another department.";
this.ClientErrorGroups = "This service is deactivated for the following reason: No department is allowed to accept external chats. We apologize for any inconvenience this may cause.";
this.RateSuccess = "Thank you, we received your rating. Your response helps us to improve this service. We greatly appreciate your feedback.";
this.RateMax = "You are not allowed to rate our service more than 3 times a day.";
this.System = "System";
this.QueueMessage = "Your current position in the queue is . Approximate waiting time: minute(s).";
this.NextOperator = "The next representative available is reserved for you.";
}
function lz_chat_data_templates()
{
this.MessageInternal = 'PHRhYmxlIHdpZHRoPSI5NyUiIGJvcmRlcj0iMCIgY2VsbHNwYWNpbmc9IjAiIGNlbGxwYWRkaW5nPSIwIiBhbGlnbj0iY2VudGVyIiBzdHlsZT0ibWFyZ2luLXRvcDo2cHg7Ij4KCTx0cj4KCQk8dGQ+CgkJCTx0YWJsZSB3aWR0aD0iMTAwJSIgY2VsbHNwYWNpbmc9IjAiIGNlbGxwYWRkaW5nPSIwIiBoZWlnaHQ9IjIwIj4KCQkJCTx0cj4KCQkJCQk8dGQgd2lkdGg9IjYiIGJhY2tncm91bmQ9Ii4vaW1hZ2VzL2NoYXRfYmdfZ3JlZW5fbGVmdC5naWYiPjwvdGQ+CgkJCQkJPHRkIHdpZHRoPSI2IiBiYWNrZ3JvdW5kPSIuL2ltYWdlcy9jaGF0X2JnX2dyZWVuX2NlbnRlci5naWYiPjwvdGQ+CgkJCQkJPHRkIHZhbGlnbj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1hZ2VzL2NoYXRfYmdfY29udGludWVfbGVmdF9ib3R0b20uZ2lmIiBhbHQ9IiIgd2lkdGg9IjMiIGhlaWdodD0iMyIgYm9yZGVyPSIwIj48L3RkPgoJCTx0ZCB2YWxpZ249ImJvdHRvbSI+PGltZyBzcmM9Ii4vaW1hZ2VzL2NoYXRfYmdfY29udGludWVfcmlnaHRfYm90dG9tLmdpZiIgYWx0PSIiIHdpZHRoPSIzIiBoZWlnaHQ9IjMiIGJvcmRlcj0iMCI+PC90ZD4KCTwvdHI+CjwvdGFibGU+';
}
function lz_chat_internal_user()
{
this.Id = '';
this.Webcam = -1;
this.Fullname = '';
this.Available = false;
this.TextAlign = 'left';
}
function lz_chat_external_user()
{
this.Id = '';
this.Username = '';
this.Email = '';
this.Company = '';
this.MailText = '';
this.Group = '';
this.Typing = false;
this.MessagesSent = new Array();
this.MessagesReceived = new Array();
this.Session;
this.TextAlign = 'left';
}
function lz_chat_file_upload()
{
this.Filename;
this.Running;
this.Permitted;
this.Error;
}
}
function lz_chat_post()
{
this.MessageText = '';
this.MessageId = '';
this.MessageTime = 0;
this.Received = false;
}
function lz_chat_show_waiting_message()
{
if(lz_chat_data.Status.Status == lz_chat_data.STATUS_ALLOCATED && !lz_chat_data.WaitingMessageAppended)
{
lz_chat_add_system_text(5,"");
lz_chat_data.WaitingMessageAppended = true;
}
}
function lz_chat_initiate_forwarding(_group)
{
if(lz_chat_data.QueueMessageAppended)
{
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.getElementById('lz_chat_queue_position').id = "oq_a" + lz_global_timestamp();
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.getElementById('lz_chat_queue_waiting_time').id = "oq_b" + lz_global_timestamp();
lz_chat_data.QueueMessageAppended = false
}
lz_chat_data.ConnectedMessageAppended = false;
lz_chat_data.WaitingMessageAppended = false;
lz_chat_set_intern('','','',false,false);
if(lz_chat_data.FileUpload.Running)
lz_chat_file_stop();
lz_chat_add_system_text(0,null);
lz_chat_set_intern_image(false,false,false,false,'','');
lz_chat_set_group(_group);
lz_chat_set_status(lz_chat_data.STATUS_ALLOCATED);
}
function lz_chat_message()
{
var msg = frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.5.0'].document.getElementById('lz_chat_text').value;
if(lz_chat_data.Status.Status == lz_chat_data.STATUS_STOPPED)
return lz_chat_chat_alert(lz_chat_data.Language.RepresentativeLeft,frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0']);
else if(msg.length > 0 && lz_global_trim(msg).length > 0 && msg.length <= lz_chat_data.MAXCHATLENGTH)
{
var message = new lz_chat_post();
message.MessageText = lz_global_utf8_encode(msg,true);
message.MessageId = lz_chat_data.MessageCount++;
lz_chat_data.ExternalUser.Typing = false;
lz_chat_add_extern_text(msg);
lz_chat_data.ExternalUser.MessagesSent[lz_chat_data.ExternalUser.MessagesSent.length] = message;
lz_chat_shout();
}
else if(msg.length > lz_chat_data.MAXCHATLENGTH)
return lz_chat_chat_alert(lz_chat_data.Language.MessageTooLong,frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0']);
setTimeout("lz_chat_clear_field()",1);
return false;
}
function lz_chat_clear_field()
{
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.5.0'].document.getElementById('lz_chat_text').value = "";
lz_chat_focus_textbox();
}
function lz_chat_focus_textbox()
{
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.5.0'].focus();
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.5.0'].document.getElementById('lz_chat_text').focus();
}
function lz_chat_chat_alert_move()
{
if(lz_chat_data.ActiveAlertFrame != null && lz_chat_data.ActiveAlertFrame.document.getElementById('lz_chat_alert_box').style.visibility == "visible")
lz_chat_chat_alert_set_position(lz_chat_data.ActiveAlertFrame);
}
function lz_chat_chat_alert_set_position(_frame)
{
if(frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat') != null)
var frame_rows = frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat').rows.split(",");
else
var frame_rows = Array(0,0,0,0,0);
var top = (_frame.document.body.clientHeight-_frame.document.getElementById('lz_chat_alert_box').offsetHeight-frame_rows[2]-frame_rows[3]) / 2;
var left = (_frame.document.body.scrollWidth-_frame.document.getElementById('lz_chat_alert_box').offsetWidth+20) / 2;
_frame.document.getElementById('lz_chat_alert_box').style.top = top + _frame.document.body.scrollTop;
_frame.document.getElementById('lz_chat_alert_box').style.left = left;
}
function lz_chat_chat_alert(_text,_frame,_event)
{
_frame.document.getElementById('lz_chat_alert_box_text').innerHTML = _text;
_frame.document.getElementById('lz_chat_alert_box').style.visibility = "visible";
_frame.document.getElementById("lz_chat_alert_button").onclick = function(){_frame.document.getElementById('lz_chat_alert_box').style.visibility = 'hidden';};
lz_chat_chat_alert_set_position(_frame);
if(_event == -1)
_frame.document.getElementById('lz_chat_alert_button').disabled = true;
else if(_event != null)
_frame.document.getElementById('lz_chat_alert_button').onclick = _event;
lz_chat_data.ActiveAlertFrame = _frame;
}
function lz_chat_take_smiley(_smiley)
{
var sign = "";
switch(_smiley)
{
case"smile":sign = ":-)";break;
case"sad":sign = ":-(";break;
case"neutral":sign = ":-|";break;
case"tongue":sign = ":-P";break;
case"cry":sign = ":'-(";break;
case"lol":sign = ":-]";break;
case"shocked":sign = ":-O";break;
case"wink":sign = ";-)";break;
case"cool":sign = "8-)";break;
case"sick":sign = ":-\\\\";break;
case"question":sign = ":?";break;
case"sleep":sign = "zzZZ";break;
}
lz_chat_switch_smiley_box();
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.5.0'].document.getElementById('lz_chat_text').value += sign;
lz_chat_focus_textbox();
}
function lz_chat_set_intern(_id,_fullname,_groupname,_typing,_vcard)
{
if(_id.length > 0)
{
lz_chat_data.InternalUser.Id = lz_global_utf8_decode(lz_global_base64_decode(_id));
lz_chat_data.InternalUser.Fullname = (_fullname.length > 0) ? lz_global_utf8_decode(lz_global_base64_decode(_fullname)) : lz_chat_data.InternalUser.Id;
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_internal_fullname').innerHTML = lz_chat_data.InternalUser.Fullname;
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_internal_groupname').innerHTML = lz_global_utf8_decode(lz_global_base64_decode(_groupname));
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_vcard_image').href =
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_vcard_text').href = "./visitcard.php?vcardid=" + encodeURIComponent(lz_chat_data.InternalUser.Id);
}
lz_chat_data.InternalUser.Available = (_id.length > 0);
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_internal_typing').style.visibility = (_id.length > 0 && _typing) ? "visible" : "hidden";
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_vcard_image').style.visibility = (_id.length > 0 && _vcard) ? "visible" : "hidden";
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_vcard_text').style.visibility = (_id.length > 0 && _vcard) ? "visible" : "hidden";
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_top_bg').style.visibility = (_id.length == 0) ? "visible" : "hidden";
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_representative').style.visibility = (_id.length > 0) ? "visible" : "hidden";
}
function lz_chat_set_intern_image(_ispic,_update,_webcam,_filtered,_wcfile,_prfile)
{
if(_filtered)
{
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_intern_image').src = "./intern_images/filtered.jpg";
return;
}
if(_webcam)
lz_chat_data.InternalUser.Webcam = 5;
else if(lz_chat_data.InternalUser.Webcam > -1)
{
lz_chat_data.InternalUser.Webcam--;
return;
}
var current_picture = frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_intern_image').src;
if(_ispic && (_webcam || current_picture.indexOf("nopic.jpg") != -1 || _update || (current_picture.indexOf("wc.jpg") != -1 && !_webcam)))
lz_chat_data.TempImage.src = (_webcam) ? _wcfile+"?"+ Math.random() : _prfile+"?"+ Math.random();
else if(!_ispic)
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_intern_image').src = "./intern_images/nopic.jpg";
}
function lz_chat_show_intern_image()
{
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_intern_image').src = lz_chat_data.TempImage.src;
if(lz_chat_data.TempImage.height > 0)
frames['lz_chat_frame.1.1'].document.getElementById('lz_chat_pic').style.width = (lz_chat_data.TempImage.width > 80) ? lz_chat_data.TempImage.width : 80;
}
function lz_chat_switch_extern_typing(_typing)
{
var announce = (_typing != lz_chat_data.ExternalUser.Typing);
if(_typing)
{
if(lz_chat_data.TimerTyping != null)
clearTimeout(lz_chat_data.TimerTyping);
lz_chat_data.TimerTyping = setTimeout("lz_chat_switch_extern_typing(false);",5000);
lz_switch_title_mode(false);
}
lz_chat_data.ExternalUser.Typing = _typing;
if(announce)
lz_chat_shout();
}
function lz_chat_show_connected()
{
if(!lz_chat_data.ConnectedMessageAppended)
{
lz_chat_data.ConnectedMessageAppended = true;
lz_chat_add_system_text(6,null);
}
}
function lz_chat_show_queue_position(_position,_time)
{
if(!lz_chat_data.QueueMessageAppended)
{
var qmessage = lz_chat_data.Language.QueueMessage.replace("","-1");
qmessage = qmessage.replace("","-1");
lz_chat_add_system_text(-1,qmessage);
lz_chat_data.QueueMessageAppended = true;
}
var cposition = parseInt(frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.getElementById('lz_chat_queue_position').innerHTML);
var cwtime = parseInt(frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.getElementById('lz_chat_queue_waiting_time').innerHTML);
if(_position == 1 && (cposition != _position))
lz_chat_add_system_text(9,"");
if(cposition == -1 || (_position > 0 && _position <= cposition))
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.getElementById('lz_chat_queue_position').innerHTML = _position;
if(cwtime == -1 || (_time > 0 && _time <= cwtime))
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.getElementById('lz_chat_queue_waiting_time').innerHTML = _time;
}
function lz_chat_add_system_text(_type,_texta)
{
var text = "";
if(_type == 0)
text = lz_chat_data.Language.ClientForwarding;
else if(_type == 1)
text = lz_chat_data.Language.ClientInternArrives.replace("",lz_global_utf8_decode(lz_global_base64_decode(_texta)));
else if(_type == 2)
text = lz_chat_data.Language.ClientErrorUnavailable + lz_global_utf8_decode(lz_global_base64_decode(_texta));
else if(_type == 3)
text = lz_chat_data.Language.ClientIntLeft + " " + lz_chat_data.Language.LanguageLeaveMessageShort + ". " + lz_chat_data.Language.ClientThankYou;
else if(_type == 4)
text = lz_chat_data.Language.ClientIntDeclined + " " + lz_chat_data.Language.LanguageLeaveMessageShort + ". " + lz_chat_data.Language.ClientThankYou;
else if(_type == 5)
text = lz_chat_data.Language.ClientStillWaitingInt + " " + lz_chat_data.Language.LanguageLeaveMessageShort + ". " + lz_chat_data.Language.ClientThankYou;
else if(_type == 6)
text = lz_chat_data.Language.ClientIntIsConnected;
else if(_type == 8)
text = lz_chat_data.Language.ClientNoInternUsers + " " + lz_chat_data.Language.LanguageLeaveMessageShort + ". " + lz_chat_data.Language.ClientThankYou;
else if(_type == 9)
text = lz_chat_data.Language.NextOperator;
else
text = _texta;
text = lz_global_replace_smilies(text,true);
if(lz_chat_data.LastSender != lz_chat_data.SYSTEM)
{
text = lz_global_base64_decode(lz_chat_data.Templates.MessageExternal).replace("",text);
lz_chat_data.AlternateRow = true;
}
else
{
if(lz_chat_data.AlternateRow)
text = lz_global_base64_decode(lz_chat_data.Templates.MessageAddAlt).replace("",text);
else
text = lz_global_base64_decode(lz_chat_data.Templates.MessageAdd).replace("",text);
lz_chat_data.AlternateRow = !lz_chat_data.AlternateRow;
}
text = text.replace("",lz_chat_get_locale_time());
text = text.replace("",lz_chat_data.Language.System);
lz_chat_append_text(text);
lz_chat_data.LastSender = lz_chat_data.SYSTEM;
}
function lz_chat_add_internal_text(_text, _acid)
{
_text = lz_global_utf8_decode(lz_global_base64_decode(_text));
_acid = lz_global_utf8_decode(lz_global_base64_decode(_acid));
var message = new lz_chat_post();
message.MessageId = _acid;
message.MessageText = _text;
message.MessageTime = lz_global_timestamp();
if(!lz_chat_message_is_received(message))
{
if(lz_chat_data.LastSender != lz_chat_data.INTERNAL)
{
_text = lz_global_base64_decode(lz_chat_data.Templates.MessageInternal).replace("",_text);
lz_chat_data.AlternateRow = true;
}
else
{
if(lz_chat_data.AlternateRow)
_text = lz_global_base64_decode(lz_chat_data.Templates.MessageAddAlt).replace("",_text);
else
_text = lz_global_base64_decode(lz_chat_data.Templates.MessageAdd).replace("",_text);
lz_chat_data.AlternateRow = !lz_chat_data.AlternateRow;
}
_text = _text.replace("",lz_chat_get_locale_time());
_text = _text.replace("",lz_chat_data.InternalUser.TextAlign);
_text = _text.replace("",lz_chat_data.InternalUser.Fullname);
_text = lz_global_replace_smilies(_text,true);
var re = new RegExp(']*>(.*)', 'gim');
var matches = _text.match(re);
var icon = "";
if(matches)
icon = "
 | ";
_text = _text.replace("",icon);
lz_switch_title_mode(true);
lz_chat_append_text(_text);
if(lz_chat_data.LastSound < (lz_global_timestamp()-1))
{
lz_chat_data.LastSound = lz_global_timestamp();
lz_chat_data.TimerSound = setTimeout(lz_chat_play_sound,30);
}
lz_chat_data.LastSender = lz_chat_data.INTERNAL;
}
}
function lz_chat_message_is_received(_message)
{
for(var mIndex in lz_chat_data.ExternalUser.MessagesReceived)
if(lz_chat_data.ExternalUser.MessagesReceived[mIndex].MessageId == _message.MessageId)
return true;
lz_chat_data.ExternalUser.MessagesReceived[lz_chat_data.ExternalUser.MessagesReceived.length] = _message;
lz_chat_shout();
var mNewMessages = new Array();
for(var mIndex in lz_chat_data.ExternalUser.MessagesReceived)
if(lz_chat_data.ExternalUser.MessagesReceived[mIndex].MessageTime >= (lz_global_timestamp()-3600))
mNewMessages[mNewMessages.length] = lz_chat_data.ExternalUser.MessagesReceived[mIndex];
lz_chat_data.ExternalUser.MessagesReceived = mNewMessages;
return false;
}
function lz_chat_message_set_received(_id)
{
for(var mIndex in lz_chat_data.ExternalUser.MessagesReceived)
if(lz_chat_data.ExternalUser.MessagesReceived[mIndex].MessageId == _id)
return (lz_chat_data.ExternalUser.MessagesReceived[mIndex].Received = true);
return true;
}
function lz_chat_set_id(_id)
{
lz_chat_data.Id = _id;
return true;
}
function lz_chat_add_extern_text(_text)
{
_text = _text.replace(/\/g,">");
_text = lz_global_replace_breaks(_text);
if(lz_chat_data.LastSender != lz_chat_data.EXTERNAL)
{
_text = lz_global_base64_decode(lz_chat_data.Templates.MessageExternal).replace("",_text);
lz_chat_data.AlternateRow = true;
}
else
{
if(lz_chat_data.AlternateRow)
_text = lz_global_base64_decode(lz_chat_data.Templates.MessageAddAlt).replace("",_text);
else
_text = lz_global_base64_decode(lz_chat_data.Templates.MessageAdd).replace("",_text);
lz_chat_data.AlternateRow = !lz_chat_data.AlternateRow;
}
_text = lz_global_replace_smilies(_text,true);
_text = _text.replace("",lz_chat_get_locale_time());
_text = _text.replace("",lz_global_htmlentities(lz_chat_data.ExternalUser.Username));
_text = _text.replace("",lz_chat_data.ExternalUser.TextAlign);
lz_chat_append_text(_text);
lz_chat_data.LastSender = lz_chat_data.EXTERNAL;
}
function lz_chat_append_text(_html)
{
window.focus();
if(!lz_chat_data.Status.Loaded)
return;
var newMessage = frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.createElement("DIV");
newMessage.innerHTML = _html;
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].document.getElementById('lz_chat_main').appendChild(newMessage);
setTimeout("frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].scroll(0,1000000000)",10);
if(lz_chat_data.Status.Status < lz_chat_data.STATUS_STOPPED)
lz_chat_focus_textbox();
}
function lz_chat_print()
{
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].focus();
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0'].print();
}
function lz_chat_release_post(_id)
{
if(lz_chat_data.Status.Status < lz_chat_data.STATUS_STOPPED)
{
newMessageList = new Array();
for (var mIndex in lz_chat_data.ExternalUser.MessagesSent)
{
if(lz_chat_data.ExternalUser.MessagesSent[mIndex].MessageId != _id)
newMessageList[newMessageList.length] = lz_chat_data.ExternalUser.MessagesSent[mIndex];
}
lz_chat_data.ExternalUser.MessagesSent = newMessageList;
}
}
function lz_chat_change_window_state(_minimized)
{
lz_switch_title_mode(_minimized);
}
function lz_chat_set_status(_status)
{
if(lz_chat_data.Status.Status != _status && _status == lz_chat_data.STATUS_ALLOCATED)
{
if(lz_chat_data.TimerWaiting != null)
clearTimeout(lz_chat_data.TimerWaiting);
lz_chat_data.TimerWaiting = setTimeout("lz_chat_show_waiting_message();",90000);
}
if(lz_chat_data.Status.Status < lz_chat_data.STATUS_STOPPED)
lz_chat_data.Status.Status = _status;
}
function lz_chat_handle_response(_status, _response)
{
lz_chat_data.LastConnectionFailed = false;
lz_chat_data.ConnectionRunning = false;
lz_chat_process_xml(_response);
}
function lz_chat_handle_shout_response(_status, _response)
{
lz_chat_process_xml(_response);
setTimeout("lz_chat_reshout()",lz_chat_data.ChatFrequency * 1000);
}
function lz_chat_process_xml(_xml)
{
try
{
if(_xml.length > 0 && _xml.indexOf("") != -1)
{
lz_chat_data.LastConnection = lz_global_timestamp();
var lzTstart = "";
var lzTend = "";
eval(lz_global_base64_decode(_xml.substr(_xml.indexOf(lzTstart) + lzTstart.length,_xml.indexOf(lzTend)-_xml.indexOf(lzTstart)-lzTstart.length)));
}
else if(lz_chat_data.Status.Status < lz_chat_data.STATUS_INIT)
setTimeout("lz_chat_handle_connection_error(null,null);",2000);
}
catch(ex){}
}
function lz_chat_handle_connection_error(_status, _response)
{
lz_chat_data.ShoutNeeded = true;
lz_chat_data.ConnectionRunning =
lz_chat_data.ShoutRunning = false;
lz_chat_data.LastConnectionFailed = true;
if(lz_chat_data.Status.Status < lz_chat_data.STATUS_INIT)
lz_chat_reload_groups();
}
function lz_chat_release_frame(_name)
{
lz_chat_data.PermittedFrames--;
if(lz_chat_data.PermittedFrames==-1)
lz_chat_close();
if(lz_chat_data.PermittedFrames == 0 && lz_chat_data.Status.Status == lz_chat_data.STATUS_START)
{
lz_chat_set_parentid();
setTimeout("lz_chat_detect_sound();",30);
if(!lz_chat_data.SetupError)
{
if(lz_geo_resolution_needed && lz_chat_data.ExternalUser.Session.GeoResolved.length != 7)
lz_chat_geo_resolute();
else
{
lz_chat_data.GeoResolution.SetStatus(7);
setTimeout("lz_chat_startup();",500);
}
}
else
lz_chat_release(false,lz_chat_data.SetupError);
}
else if(lz_chat_data.PermittedFrames == 0 && lz_chat_data.Status.Status == lz_chat_data.STATUS_INIT)
lz_chat_loaded();
}
function lz_chat_switch_file_upload()
{
var frame_rows = frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat').rows.split(",");
if(frame_rows[2] != 0)
frame_rows[2] = 0;
if(frame_rows[3] != 0)
frame_rows[3] = 0;
if(frame_rows[1] == 0 && lz_chat_data.Status.Status == lz_chat_data.STATUS_STOPPED)
{
lz_chat_chat_alert(lz_chat_data.Language.RepresentativeLeft,frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0']);
return;
}
if(!lz_chat_data.InternalUser.Available)
{
lz_chat_chat_alert(lz_chat_data.Language.WaitForRepresentative,frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0']);
return;
}
frame_rows[1] = (frame_rows[1] == 0) ? 57 : 0;
frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat').rows = frame_rows.join(",");
}
function lz_chat_switch_rating()
{
if(!lz_chat_data.InternalUser.Id.length > 0)
{
lz_chat_chat_alert(lz_chat_data.Language.WaitForRepresentative,frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.chat.4.0']);
return;
}
var frame_rows = frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat').rows.split(",");
if(frame_rows[1] != 0)
frame_rows[1] = 0;
if(frame_rows[3] != 0)
frame_rows[3] = 0;
frame_rows[2] = (frame_rows[2] == 0) ? 57 : 0;
frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat').rows = frame_rows.join(",");
}
function lz_chat_switch_smiley_box()
{
var frame_rows = frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat').rows.split(",");
if(frame_rows[1] != 0)
frame_rows[1] = 0;
if(frame_rows[2] != 0)
frame_rows[2] = 0;
frame_rows[3] = (frame_rows[3] == 0) ? 57 : 0;
frames['lz_chat_frame.3.2'].document.getElementById('lz_chat_frameset_chat').rows = frame_rows.join(",");
}
function lz_chat_release(_groupAvailable, _groupError)
{
lz_chat_set_status(lz_chat_data.STATUS_START);
lz_chat_data.Status.Loaded = true;
var goMessage = (!_groupAvailable && 0 != 2 && !lz_chat_data.NoPreChatMessages);
if(goMessage && lz_chat_data.GetParameters.indexOf("reset") != -1)
goMessage = false;
if(_groupError.length == 0)
{
if(lz_chat_data.DirectLogin)
lz_chat_login(lz_chat_data.Groups.GetGroupById(frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.login.1.0'].document.getElementById('lz_chat_login_groups').value).Id);
else if(!goMessage)
{
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.login.1.0'].document.getElementById('lz_chat_login').style.visibility = 'visible';
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.login.1.0'].document.getElementById('lz_chat_login_button').disabled = false;
}
}
if(!goMessage || _groupError.length != 0)
{
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.login.1.0'].document.body.removeChild(frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.login.1.0'].document.getElementById('lz_chat_loading'));
frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.login.1.0'].document.getElementById('lz_chat_login_details').style.display = "block";
if(_groupError.length != 0)
lz_chat_chat_alert(_groupError,frames['lz_chat_frame.3.2'].frames['lz_chat_frame.3.2.login.1.0'],-1);
}
else
lz_chat_goto_message(false);
}
function lz_chat_change_url(_url)
{
lz_chat_remove_from_parent();
lz_chat_data.WindowNavigating = true;
window.location.href = _url;
}
var lz_title_timer;
var lz_title_step = 0;
var lz_title_modes = new Array(document.title,"New Messages");
var lz_standard_title = document.title;
var lz_document_head = document.getElementsByTagName("head")[0];
var lz_geo_resolution;
var lz_geo_resolution_needed = false;
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 = "543987d";
this.UserId = "3e8f6e7";
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_chat_window()
{
this.BrowserId = "";
this.LastActive = 0;
this.Closed = false;
this.Deleted = false;
}
function lz_geo_resolver()
{
this.ResolveAsync = lz_resolver_connect_async;
this.TimeoutConnection = lz_resolver_timeout_connection;
this.SetStatus = lz_resolver_set_status;
this.SetSpan = lz_resolver_set_span;
this.Status = 0;
this.Span = 0;
this.OnEndEvent;
this.OnTimeoutEvent;
this.OnSpanEvent;
var OnEnd;
var OnTimeout;
var OnSpan;
var lz_resolver_request;
var lz_resolver_timeout_timer;
function lz_resolver_connect_async()
{
OnEnd = this.OnEndEvent;
OnTimeout = this.OnTimeoutEvent;
OnSpan = this.OnSpanEvent;
lz_resolver_timeout_timer = setTimeout(this.TimeoutConnection,15000);
lz_resolver_request = document.createElement("script");
lz_resolver_request.id = "livezilla_geoscript";
var oak = '';
lz_resolver_request.src = "http://ssl.livezilla.net/geo/resolute/?aid=&gv=1011&method=" + OnEnd + "&spanm=" + OnSpan + "&oak=" + oak;
lz_document_head.appendChild(lz_resolver_request);
}
function lz_resolver_timeout_connection()
{
if(OnTimeout != null)
OnTimeout();
}
function lz_resolver_set_status(_status)
{
this.Status = _status;
}
function lz_resolver_set_span(_span)
{
this.Span = _span;
}
}
function lz_global_replace_breaks(_text)
{
_text = _text.replace(/[\r\n]+/g, "
");
return _text.replace(/[\t]+/g, " ");
}
function lz_global_base64_url_encode(_text)
{
if(_text.length == 0)
return "";
_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,"");
}
function lz_global_get_entities()
{
var map = new Array(), symbol = '',entities = new Array();
entities['34'] = '"';
entities['39'] = ''';
entities['38'] = '&';
entities['60'] = '<';
entities['62'] = '>';
entities['160'] = ' ';
entities['161'] = '¡';
entities['162'] = '¢';
entities['163'] = '£';
entities['164'] = '¤';
entities['165'] = '¥';
entities['166'] = '¦';
entities['167'] = '§';
entities['168'] = '¨';
entities['169'] = '©';
entities['170'] = 'ª';
entities['171'] = '«';
entities['172'] = '¬';
entities['173'] = '';
entities['174'] = '®';
entities['175'] = '¯';
entities['176'] = '°';
entities['177'] = '±';
entities['178'] = '²';
entities['179'] = '³';
entities['180'] = '´';
entities['181'] = 'µ';
entities['182'] = '¶';
entities['183'] = '·';
entities['184'] = '¸';
entities['185'] = '¹';
entities['186'] = 'º';
entities['187'] = '»';
entities['188'] = '¼';
entities['189'] = '½';
entities['190'] = '¾';
entities['191'] = '¿';
entities['192'] = 'À';
entities['193'] = 'Á';
entities['194'] = 'Â';
entities['195'] = 'Ã';
entities['196'] = 'Ä';
entities['197'] = 'Å';
entities['198'] = 'Æ';
entities['199'] = 'Ç';
entities['200'] = 'È';
entities['201'] = 'É';
entities['202'] = 'Ê';
entities['203'] = 'Ë';
entities['204'] = 'Ì';
entities['205'] = 'Í';
entities['206'] = 'Î';
entities['207'] = 'Ï';
entities['208'] = 'Ð';
entities['209'] = 'Ñ';
entities['210'] = 'Ò';
entities['211'] = 'Ó';
entities['212'] = 'Ô';
entities['213'] = 'Õ';
entities['214'] = 'Ö';
entities['215'] = '×';
entities['216'] = 'Ø';
entities['217'] = 'Ù';
entities['218'] = 'Ú';
entities['219'] = 'Û';
entities['220'] = 'Ü';
entities['221'] = 'Ý';
entities['222'] = 'Þ';
entities['223'] = 'ß';
entities['224'] = 'à';
entities['225'] = 'á';
entities['226'] = 'â';
entities['227'] = 'ã';
entities['228'] = 'ä';
entities['229'] = 'å';
entities['230'] = 'æ';
entities['231'] = 'ç';
entities['232'] = 'è';
entities['233'] = 'é';
entities['234'] = 'ê';
entities['235'] = 'ë';
entities['236'] = 'ì';
entities['237'] = 'í';
entities['238'] = 'î';
entities['239'] = 'ï';
entities['240'] = 'ð';
entities['241'] = 'ñ';
entities['242'] = 'ò';
entities['243'] = 'ó';
entities['244'] = 'ô';
entities['245'] = 'õ';
entities['246'] = 'ö';
entities['247'] = '÷';
entities['248'] = 'ø';
entities['249'] = 'ù';
entities['250'] = 'ú';
entities['251'] = 'û';
entities['252'] = 'ü';
entities['253'] = 'ý';
entities['254'] = 'þ';
entities['255'] = 'ÿ';
for (key in entities)
{
var symbol = String.fromCharCode(key);
map[symbol] = entities[key];
}
return map;
}
function lz_global_htmlentities(_value)
{
var entities = lz_global_get_entities();
var key = '',entity = '';
for (key in entities)
{
entity = entities[key];
_value = _value.split(key).join(entity);
}
return _value;
}
function lz_connector(_url,_post,_timeout)
{
this.Url = _url;
this.Post = _post;
this.Timeout = _timeout;
this.ChangeState = lz_connector_change_state;
this.ConnectAsync = lz_connector_connect_async;
this.ConnectSync = lz_connector_connect_sync;
this.TimeoutConnection = lz_connector_timeout_connection;
this.OnEndEvent;
this.OnErrorEvent;
this.OnTimeoutEvent;
var OnEnd;
var OnError;
var OnTimeout;
var lz_connector_request;
var lz_connector_timeout_timer;
var lz_connector_aborted = false;
function lz_connector_connect_async()
{
OnEnd = this.OnEndEvent;
OnError = this.OnErrorEvent;
OnTimeout = this.OnTimeoutEvent;
if(this.Timeout > 0)
lz_connector_timeout_timer = setTimeout(this.TimeoutConnection,this.Timeout);
lz_connector_request = lz_connector_create_request_object();
lz_connector_request.open('POST', this.Url, true);
lz_connector_request.onreadystatechange = lz_connector_change_state;
lz_connector_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
lz_connector_request.setRequestHeader("Content-length", this.Post.length);
lz_connector_request.setRequestHeader('Connection', 'close');
lz_connector_request.send(this.Post);
}
function lz_connector_connect_sync()
{
lz_connector_request=lz_connector_create_request_object();
lz_connector_request.open('POST', this.Url, true);
lz_connector_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
lz_connector_request.setRequestHeader("Content-length", this.Post.length);
lz_connector_request.setRequestHeader('Connection', 'close');
lz_connector_request.send(this.Post);
return lz_connector_request.responseText;
}
function lz_connector_change_state()
{
if (lz_connector_request.readyState == 4)
{
if(lz_connector_request.status == 100 || lz_connector_request.status == 200)
lz_connector_end_connection(lz_connector_request.status,lz_connector_request.responseText);
else
lz_connector_error_connection(lz_connector_request.status,lz_connector_request.responseText);
}
}
function lz_connector_is_running()
{
return ( lz_connector_request.readyState > 0 && lz_connector_request.readyState < 4);
}
function lz_connector_end_connection(_status, _response)
{
clearTimeout(lz_connector_timeout_timer);
if(!lz_connector_aborted && OnEnd != null)
OnEnd(_status, _response);
}
function lz_connector_error_connection(_status, _response)
{
clearTimeout(lz_connector_timeout_timer);
if(!lz_connector_aborted && OnError != null)
OnError(_status, _response);
}
function lz_connector_timeout_connection()
{
lz_connector_aborted = true;
if(lz_connector_is_running())
lz_connector_request.abort();
if(OnTimeout != null)
OnTimeout();
}
function lz_connector_create_request_object()
{
var requestObject = null;
try
{
requestObject = new ActiveXObject("MSXML2.XMLHTTP");
}
catch (err_MSXML2)
{
try
{
requestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (err_Microsoft)
{
if (typeof XMLHttpRequest != "undefined")
requestObject = new XMLHttpRequest;
}
}
return requestObject;
}
}
function lz_group(_id,_amount,_description,_email,_document)
{
this.Id = _id;
this.Amount = _amount;
this.Description = (_description.length > 0) ? _description : _id;
this.Email = _email;
this.Option = null;
this.ActiveDocument = _document;
this.UpdateOption = lz_group_create_option;
this.Update = lz_group_update;
this.Changed = false;
this.UpdateOption();
function lz_group_create_option()
{
if(this.Option == null)
{
this.Option = this.ActiveDocument.createElement('option');
}
this.Option.value = this.Id;
this.Option.name = this.Email;
this.Option.group = this;
if(this.Amount == 0)
{
this.Option.style.color = "#808080";
this.Option.style.background = "#eeeeee";
this.Option.label = " " + this.Description;
this.Option.text = " " + this.Description;
if(!lz_chat_data.NoPreChatMessages)
{
this.Option.label += " (" + lz_chat_data.Language.LanguageLeaveMessageShort + ")";
this.Option.text += " (" + lz_chat_data.Language.LanguageLeaveMessageShort + ")";
}
}
else
{
this.Option.style.color = "#000000";
this.Option.style.background = "#f5ffec";
this.Option.label = " " + this.Description + " (Online)";
this.Option.text = " " + this.Description + " (Online)";
}
}
function lz_group_update(_id,_amount,_description,_email)
{
if(this.Id != _id || this.Amount != _amount || this.Description != ((_description.length > 0) ? _description : _id) || this.Email != _email)
{
this.Id = _id;
this.Amount = _amount;
this.Description = (_description.length > 0) ? _description : _id;
this.Email = _email
this.Changed = true;
}
else
this.Changed = false;
}
}
function lz_group_list(_document,_selectBox)
{
this.HeaderOnline;
this.HeaderOffline;
this.Groups = Array();
this.SelectBox = _selectBox;
this.ActiveDocument = _document;
this.GroupOnline = false;
this.GroupOffline = null;
this.Add = lz_group_list_add;
this.Update = lz_group_list_update;
this.Place = lz_group_list_place_group;
this.CreateHeader = lz_group_list_create_header;
this.PlaceGroup = lz_group_list_place_group;
this.GetGroupById = lz_group_list_get_group_by_id;
function lz_group_list_add(_id,_amount,_description,_email)
{
var existing = false;
var currentGroup;
var lastGroup;
for(var i = 0;i 0);
this.GroupOffline = (this.GroupOffline || lz_global_base64_decode(contents[1]) == 0);
this.Add(lz_global_utf8_decode(lz_global_base64_decode(contents[0])),lz_global_utf8_decode(lz_global_base64_decode(contents[1])),lz_global_utf8_decode(lz_global_base64_decode(contents[2])),lz_global_utf8_decode(lz_global_base64_decode(contents[3])));
}
if(!this.GroupOnline && this.HeaderOnline.parentNode == this.SelectBox)
this.SelectBox.removeChild(this.HeaderOnline);
else if(this.GroupOnline && (this.HeaderOnline.parentNode == null || (this.HeaderOnline.parentNode != null && this.HeaderOnline.parentNode != this.SelectBox)))
this.SelectBox.insertBefore(this.HeaderOnline,this.SelectBox.childNodes[0]);
if(!this.GroupOffline && this.HeaderOffline.parentNode == this.SelectBox)
this.SelectBox.removeChild(this.HeaderOffline);
if(this.Groups.length > addedGroups.length)
{
var existing;
for(var i = 0;i 0)
{
this.SelectBox.insertBefore(_group.Option,this.HeaderOffline);
}
else
{
this.SelectBox.appendChild(_group.Option);
}
_group.UpdateOption();
}
function lz_group_list_create_header()
{
if(this.SelectBox.childNodes.length == 0)
{
this.HeaderOnline = this.ActiveDocument.createElement('option');
this.SelectBox.appendChild(this.HeaderOnline);
this.HeaderOnline.text = "Online";
this.HeaderOnline.style.color = "#FFFFFF";
this.HeaderOnline.style.background = "#8C8C8C";
this.HeaderOffline = this.ActiveDocument.createElement('option');
this.SelectBox.appendChild(this.HeaderOffline);
this.HeaderOffline.text = "Offline";
this.HeaderOffline.style.color = "#FFFFFF";
this.HeaderOffline.style.background = "#8C8C8C";
}
}
function lz_group_list_get_group_by_id(_id)
{
for(var i = 0;i