Build select group box at client side

This commit is contained in:
Dmitriy Simushev 2013-03-04 09:27:38 +00:00
parent f1803662a8
commit 88fffc078b
8 changed files with 159 additions and 119 deletions

View File

@ -5,5 +5,5 @@
Copyright (c) 2005-2011 Mibew Messenger Community
License: http://mibew.org/license.php
*/
(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors"},modelEvents:{invalid:"showError","submit:error":"showError"},preventSubmit:function(b){b.preventDefault()},changeGroupDescription:function(){var b=this.ui.groupSelect.prop("selectedIndex"),
a=this.model.get("groups").descriptions||[];this.ui.groupDescription.text(a[b]||"")},showError:function(b,a){this.ui.errors.html("string"==typeof a?a:a.message)}})})(Mibew,Backbone);
(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors"},modelEvents:{invalid:"showError","submit:error":"showError"},preventSubmit:function(a){a.preventDefault()},changeGroupDescription:function(){var a=this.ui.groupSelect.prop("selectedIndex"),
a=this.model.get("groups")[a].description||"";this.ui.groupDescription.text(a)},showError:function(a,b){this.ui.errors.html("string"==typeof b?b:b.message)}})})(Mibew,Backbone);

View File

@ -164,8 +164,8 @@ a);this.trigger("multiple:add");return a}})})(Mibew,Backbone,_);
Copyright (c) 2005-2011 Mibew Messenger Community
License: http://mibew.org/license.php
*/
(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors"},modelEvents:{invalid:"showError","submit:error":"showError"},preventSubmit:function(b){b.preventDefault()},changeGroupDescription:function(){var b=this.ui.groupSelect.prop("selectedIndex"),
a=this.model.get("groups").descriptions||[];this.ui.groupDescription.text(a[b]||"")},showError:function(b,a){this.ui.errors.html("string"==typeof a?a:a.message)}})})(Mibew,Backbone);
(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors"},modelEvents:{invalid:"showError","submit:error":"showError"},preventSubmit:function(a){a.preventDefault()},changeGroupDescription:function(){var a=this.ui.groupSelect.prop("selectedIndex"),
a=this.model.get("groups")[a].description||"";this.ui.groupDescription.text(a)},showError:function(a,b){this.ui.errors.html("string"==typeof b?b:b.message)}})})(Mibew,Backbone);
/*
This file is part of Mibew Messenger project.
http://mibew.org

View File

@ -56,9 +56,11 @@
* Change group description
*/
changeGroupDescription: function() {
var groupId = this.ui.groupSelect.prop('selectedIndex');
var descriptions = this.model.get('groups').descriptions || [];
this.ui.groupDescription.text(descriptions[groupId] || '');
var selectedIndex = this.ui.groupSelect.prop('selectedIndex');
var description = this.model
.get('groups')[selectedIndex]
.description || '';
this.ui.groupDescription.text(description);
},
/**

View File

@ -58,14 +58,16 @@
/**
* Available groups list.
*
* Contains following keys:
* - 'select': string, HTML code for select box;
* - 'descriptions': array, groups descriptions;
* - 'defaultDescription': string, description for group that
* selected by default.
* Contains objects with following keys:
* - 'id': int, group id;
* - 'name': string, group name;
* - 'description': string, group description;
* - 'online': boolean, indicates if group online;
* - 'selected': boolean, indicates if group selected
* by default.
*
* If there is no available groups this field is equal to null.
* @type Object
* @type Array
* @todo Create HTML code at client side
*/
groups: null

View File

@ -231,14 +231,8 @@ function setup_leavemessage($name, $email, $group_id, $info, $referrer) {
);
if (Settings::get('enablegroups') == '1') {
$groups = setup_groups_select($group_id, false);
if ($groups) {
$data['leaveMessage']['leaveMessageForm']['groups'] = array(
'select' => $groups['select'],
'descriptions' => $groups['descriptions'],
'defaultDescription' => $groups['defaultdescription']
);
}
$data['leaveMessage']['leaveMessageForm']['groups']
= prepare_groups_select($group_id);
}
$data['startFrom'] = 'leaveMessage';
@ -280,15 +274,8 @@ function setup_survey($name, $email, $group_id, $info, $referrer) {
if (Settings::get('enablegroups') == '1'
&& Settings::get('surveyaskgroup') == '1') {
$groups = setup_groups_select($group_id, true);
if ($groups) {
$data['survey']['surveyForm']['groups'] = array(
'select' => $groups['select'],
'descriptions' => $groups['descriptions'],
'defaultDescription' => $groups['defaultdescription'],
);
}
$data['survey']['surveyForm']['groups']
= prepare_groups_select($group_id);
}
$data['startFrom'] = 'survey';
@ -296,50 +283,83 @@ function setup_survey($name, $email, $group_id, $info, $referrer) {
return $data;
}
function setup_groups_select($groupid, $markoffline)
{
$showgroups = ($groupid == '')?true:group_has_children($groupid);
if (!$showgroups) {
/**
* Prepare groups list to build group select box.
*
* If $group_id specified groups list will consist of group with id equals to
* $group_id and its children.
*
* @param int $group_id Id of selected group
* @return array|boolean Array of groups info arrays or boolean false if there
* are no suitable groups.
* Group info array contain following keys:
* - 'id': int, group id;
* - 'name': string, group name;
* - 'description': string, group description;
* - 'online': boolean, indicates if group online;
* - 'selected': boolean, indicates if group selected by default.
*/
function prepare_groups_select($group_id) {
$show_groups = ($group_id == '')
? true
: group_has_children($group_id);
if (!$show_groups) {
return false;
}
$allgroups = get_groups(false);
$all_groups = get_groups(false);
if (empty($allgroups)) {
if (empty($all_groups)) {
return false;
}
$val = "";
$selectedgroupid = $groupid;
$groupdescriptions = array();
$defaultdescription = "";
foreach ($allgroups as $k) {
$groupname = $k['vclocalname'];
if ($k['inumofagents'] == 0 || ($groupid && $k['parent'] != $groupid && $k['groupid'] != $groupid )) {
$groups_list = array();
$selected_group_id = $group_id;
foreach($all_groups as $group) {
$group_is_empty = (bool)($group['inumofagents'] == 0);
$group_related_with_specified = (empty($group_id)
|| $group['parent'] == $group_id
|| $group['groupid'] == $group_id);
if ($group_is_empty || !$group_related_with_specified) {
continue;
}
if ($k['ilastseen'] !== NULL && $k['ilastseen'] < Settings::get('online_timeout')) {
if (!$selectedgroupid) {
$selectedgroupid = $k['groupid']; // select first online group
}
} else {
$groupname .= $markoffline?" (offline)":"";
}
$isselected = $k['groupid'] == $selectedgroupid;
if ($isselected) {
$defaultdescription = $k['vclocaldescription'];
}
$val .= "<option value=\"" . $k['groupid'] . "\"" . ($isselected ? " selected=\"selected\"" : "") . ">$groupname</option>";
$groupdescriptions[] = $k['vclocaldescription'];
if (group_is_online($group) && !$selected_group_id) {
$selected_group_id = $group['groupid'];
}
return array(
'select' => $val,
'descriptions' => $groupdescriptions,
'defaultdescription' => $defaultdescription
$groups_list[] = array(
'id' => $group['groupid'],
'name' => get_group_name($group),
'description' => get_group_description($group),
'online' => group_is_online($group),
'selected' => (bool)($group['groupid'] == $selected_group_id)
);
}
// One group must be selected by default
if (! empty($groups_list)) {
// Check if there is selected group
$selected_group_present = false;
foreach($groups_list as $group) {
if ($group['selected']) {
$selected_group_present = true;
break;
}
}
// If there is no selected group select the first one
if (! $selected_group_present) {
$groups_list[0]['selected'] = true;
}
}
return $groups_list;
}
/**
* Prepare some data for chat for both user and operator
*

View File

@ -18,11 +18,19 @@
{{#if groups}}
<tr>
<td class="text"><strong>{{L10n "form.field.department"}}</strong></td>
<td><select name="group" style="min-width:200px;">{{{groups.select}}}</select></td>
<td>
<select name="group" style="min-width:200px;">
{{#each groups}}
<option value="{{this.id}}" {{#if this.selected}}selected="selected"{{/if}}>{{this.name}}</option>
{{/each}}
</select>
</td>
</tr>
<tr>
<td class="text"><strong>{{L10n "form.field.department.description"}}</strong></td>
<td class="text" id="groupDescription">{{groups.defaultDescription}}</td>
<td class="text" id="groupDescription">
{{#each groups}}{{#if this.selected}}{{this.description}}{{/if}}{{/each}}
</td>
</tr>
{{/if}}
<tr>

View File

@ -13,11 +13,17 @@
{{#if groups}}
<tr>
<td><strong>{{L10n "form.field.department"}}</strong></td>
<td><select name="group">{{{groups.select}}}</select></td>
<td>
<select name="group">
{{#each groups}}
<option value="{{this.id}}" {{#if this.selected}}selected="selected"{{/if}}>{{this.name}}{{#unless this.online}} (offline){{/unless}}</option>
{{/each}}
</select>
</td>
</tr>
<tr>
<td><strong>{{L10n "form.field.department.description"}}</strong></td>
<td id="groupDescription">{{groups.defaultDescription}}</td>
<td id="groupDescription">{{#each groups}}{{#if this.selected}}{{this.description}}{{/if}}{{/each}}</td>
</tr>
{{/if}}
<tr>

View File

@ -4,58 +4,60 @@
Copyright (c) 2005-2011 Mibew Messenger Community
License: http://mibew.org/license.php
*/
(function(){var r=Handlebars.template,s=Handlebars.templates=Handlebars.templates||{};s.chat_avatar=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j=this.escapeExpression;return(a=g["if"].call(c,c.imageLink,{hash:{},inverse:this.program(3,function(){return'<div class="default-avatar"></div>'},f),fn:this.program(1,function(a,b){var f,c;f='<img src="';(c=g.imageLink)?c=c.call(a,{hash:{},data:b}):(c=a.imageLink,c="function"===typeof c?c.apply(a):c);return f+=j(c)+
'" border="0" alt="" />'},f),data:f}))||0===a?a:""});s.chat_controls_close=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};return c='<div class="tpl-image" title="'+(b((j=g.L10n,j?j.call(c,"chat.window.close_title",f):a.call(c,"L10n","chat.window.close_title",f)))+'"></div>')});s.chat_controls_history=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;
b=this.escapeExpression;f={hash:{},data:f};return c='<div class="tpl-image" title="'+(b((j=g.L10n,j?j.call(c,"page.analysis.userhistory.title",f):a.call(c,"L10n","page.analysis.userhistory.title",f)))+'"></div>')});s.chat_controls_redirect=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=g.helperMissing,l=this.escapeExpression;return(a=g["if"].call(c,(j=c.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,f;
c={hash:{},data:b};return c='\n<div class="tpl-image" title="'+(l((f=g.L10n,f?f.call(a,"chat.window.toolbar.redirect_user",c):k.call(a,"L10n","chat.window.toolbar.redirect_user",c)))+'"></div>\n')},f),data:f}))||0===a?a:""});s.chat_controls_refresh=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};return c='<div class="tpl-image" title="'+(b((j=g.L10n,j?j.call(c,"chat.window.toolbar.refresh",f):a.call(c,
"L10n","chat.window.toolbar.refresh",f)))+'"></div>')});s.chat_controls_secure_mode=r(function(){this.compilerInfo=[2,">= 1.0.0-rc.3"];return'<div class="tpl-image" title="SSL"></div>'});s.chat_controls_send_mail=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};return c='<div class="tpl-image" title="'+(b((j=g.L10n,j?j.call(c,"chat.window.toolbar.mail_history",f):a.call(c,"L10n","chat.window.toolbar.mail_history",
f)))+'"></div>')});s.chat_controls_sound=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j=g.helperMissing,k=this.escapeExpression;return(a=g["if"].call(c,c.enabled,{hash:{},inverse:this.program(3,function(a,b){var c,f;c={hash:{},data:b};return c='\n <div class="tpl-image sound-control-off" title="'+(k((f=g.L10n,f?f.call(a,"chat.window.toolbar.turn_on_sound",c):j.call(a,"L10n","chat.window.toolbar.turn_on_sound",c)))+'"></div>\n')},f),fn:this.program(1,function(a,
b){var c,f;c={hash:{},data:b};return c='\n <div class="tpl-image sound-control-on" title="'+(k((f=g.L10n,f?f.call(a,"chat.window.toolbar.turn_off_sound",c):j.call(a,"L10n","chat.window.toolbar.turn_off_sound",c)))+'"></div>\n')},f),data:f}))||0===a?a:""});s.chat_controls_user_name=r(function(a,c,g,b,f){function j(a,c){var e,d,b;e=""+('\n <div class="user-name-control-input-bg"><input id="user-name-control-input" type="text" size="12" value="'+h((d=(d=a.user,null==d||!1===d?d:d.name),typeof d===
p?d.apply(a):d))+'" class="username" /></div>\n <a href="javascript:void(0)" class="user-name-control-set tpl-image" title="');b={hash:{},data:c};return e+=h((d=g.L10n,d?d.call(a,"chat.client.changename",b):m.call(a,"L10n","chat.client.changename",b)))+'"></a>\n '}function k(a,b){var e,d,c;c={hash:{},data:b};e='\n <a href="javascript:void(0)" title="'+(h((d=g.L10n,d?d.call(a,"chat.client.changename",c):m.call(a,"L10n","chat.client.changename",c)))+'">'+h((d=(d=a.user,null==d||!1===
d?d:d.name),typeof d===p?d.apply(a):d))+'</a>\n <a class="user-name-control-change tpl-image" title="');c={hash:{},data:b};return e+=h((d=g.L10n,d?d.call(a,"chat.client.changename",c):m.call(a,"L10n","chat.client.changename",c)))+'"></a>\n '}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var l,p="function",h=this.escapeExpression,m=g.helperMissing,n=this;return(a=g["if"].call(c,(l=c.user,null==l||!1===l?l:l.canChangeName),{hash:{},inverse:n.program(6,function(a,c){var e,d;
e={hash:{},data:c};return e="\n"+(h((d=g.L10n,d?d.call(a,"chat.client.name",e):m.call(a,"L10n","chat.client.name",e)))+"&nbsp;"+h((d=(d=a.user,null==d||!1===d?d:d.name),typeof d===p?d.apply(a):d))+"\n")},f),fn:n.program(1,function(a,c){var e,d;e={hash:{},data:c};e='\n <span class="user-name-control-prefix">'+(h((d=g.L10n,d?d.call(a,"chat.client.name",e):m.call(a,"L10n","chat.client.name",e)))+"</span>\n ");if((d=g["if"].call(a,a.nameInput,{hash:{},inverse:n.program(4,k,c),fn:n.program(2,j,c),
data:c}))||0===d)e+=d;return e+="\n"},f),data:f}))||0===a?a:""});s.chat_layout=r(function(a,c,g,b,f){function j(e){var d;return e=""+('\n <img src="'+q((d=(d=(d=e.page,null==d||!1===d?d:d.company),null==d||!1===d?d:d.chatLogoURL),typeof d===n?d.apply(e):d))+'" alt=""/>\n ')}function k(e){var d;return e=""+("\n <a onclick=\"window.open('"+q((d=(d=e.page,null==d||!1===d?d:d.webimHost),typeof d===n?d.apply(e):d))+'\');return false;" href="'+q((d=(d=e.page,null==
d||!1===d?d:d.webimHost),typeof d===n?d.apply(e):d))+'">\n <img src="'+q((d=(d=(d=e.page,null==d||!1===d?d:d.company),null==d||!1===d?d:d.chatLogoURL),typeof d===n?d.apply(e):d))+'" alt=""/>\n </a>\n ')}function l(e){var d;return e=""+("\n <a onclick=\"window.open('"+q((d=(d=e.page,null==d||!1===d?d:d.webimHost),typeof d===n?d.apply(e):d))+'\');return false;" href="'+q((d=(d=e.page,null==d||!1===d?d:d.webimHost),typeof d===n?d.apply(e):d))+
'">\n <img src="'+q((d=(d=e.page,null==d||!1===d?d:d.tplRoot),typeof d===n?d.apply(e):d))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function p(e){var d;return e=""+('\n <img src="'+q((d=(d=e.page,null==d||!1===d?d:d.tplRoot),typeof d===n?d.apply(e):d))+'/images/default-logo.gif" alt=""/>\n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var h,m,n="function",q=this.escapeExpression,t=this;b=g.helperMissing;
a='\n<div id="top">\n <div id="logo">\n ';if((m=g["if"].call(c,(h=(h=c.page,null==h||!1===h?h:h.company),null==h||!1===h?h:h.chatLogoURL),{hash:{},inverse:t.program(6,function(e,d){var a,c,b;a="\n ";if((b=g["if"].call(e,(c=e.page,null==c||!1===c?c:c.webimHost),{hash:{},inverse:t.program(9,p,d),fn:t.program(7,l,d),data:d}))||0===b)a+=b;return a+"\n "},f),fn:t.program(1,function(e,d){var a,c,b;a="\n \n ";if((b=g.unless.call(e,(c=e.page,null==c||!1===
c?c:c.webimHost),{hash:{},inverse:t.program(4,k,d),fn:t.program(2,j,d),data:d}))||0===b)a+=b;return a+"\n "},f),data:f}))||0===m)a+=m;a+='\n &nbsp;\n <div id="page-title">'+q((h=(h=c.page,null==h||!1===h?h:h.title),typeof h===n?h.apply(c):h))+'</div>\n <div class="clear">&nbsp;</div>\n </div>\n</div>\n\n\n<div id="chat-header">\n <div class="bgc"><div class="bgl"><div class="bgr">\n \n <div id="controls-region"></div>\n </div></div></div>\n</div>\n\n\n<div id="chat">\n <div class="bgl"><div class="bgr"><div class="sdwbgc"><div class="sdwbgl"><div class="sdwbgr">\n ';
if((m=g.unless.call(c,(h=c.user,null==h||!1===h?h:h.isAgent),{hash:{},inverse:t.noop,fn:t.program(11,function(){return'\n <div id="avatar-region"></div>\n '},f),data:f}))||0===m)a+=m;f={hash:{},data:f};return a=a+'\n \n <div id="messages-region"></div>\n \n <div id="status-region"></div>\n </div></div></div></div></div>\n</div>\n\n\n<div id="message-form-region"></div>\n\n\n<div id="footer">'+(q((h=g.L10n,h?h.call(c,"chat.window.poweredby",f):b.call(c,
"L10n","chat.window.poweredby",f)))+' <a id="poweredByLink" href="http://mibew.org" title="Mibew Community" target="_blank">mibew.org</a></div>')});s.chat_message=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=this.escapeExpression,l=g.helperMissing;a={hash:{},data:f};a="<span>"+(k((j=g.formatTime,j?j.call(c,c.created,a):l.call(c,"formatTime",c.created,a)))+"</span> \n");if((j=g["if"].call(c,c.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,
c){var b,f;b="<span class='n";(f=g.kindName)?f=f.call(a,{hash:{},data:c}):(f=a.kindName,f="function"===typeof f?f.apply(a):f);b+=k(f)+"'>";(f=g.name)?f=f.call(a,{hash:{},data:c}):(f=a.name,f="function"===typeof f?f.apply(a):f);return b+=k(f)+"</span>: "},f),data:f}))||0===j)a+=j;a+="\n<span class='m";(j=g.kindName)?j=j.call(c,{hash:{},data:f}):(j=c.kindName,j="function"===typeof j?j.apply(c):j);a+=k(j)+"'>";if((j=g["if"].call(c,c.allowFormatting,{hash:{},inverse:this.program(5,function(a,c){var b,
f;f={hash:{},data:c};return k((b=g.apply,b?b.call(a,a.message,"urlReplace, nl2br",f):l.call(a,"apply",a.message,"urlReplace, nl2br",f)))},f),fn:this.program(3,function(a,c){var b,f;f={hash:{},data:c};return k((b=g.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",f):l.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",f)))},f),data:f}))||0===j)a+=j;return a+="</span><br/>"});s.chat_message_form=r(function(a,c,g,b,f){function j(a,c){var e,d;e={hash:{},data:c};e='\n <select id="predefined" size="1" class="answer">\n <option>'+
(h((d=g.L10n,d?d.call(a,"chat.window.predefined.select_answer",e):m.call(a,"L10n","chat.window.predefined.select_answer",e)))+"</option>\n ");if((d=g.each.call(a,a.predefinedAnswers,{hash:{},inverse:n.noop,fn:n.program(5,k,c),data:c}))||0===d)e+=d;return e+="\n </select>\n "}function k(a){var c;return a=""+("\n <option>"+h((c=a["short"],typeof c===p?c.apply(a):c))+"</option>\n ")}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||
a.helpers;f=f||{};var l,p="function",h=this.escapeExpression,m=g.helperMissing,n=this;a='<div id="message">\n';if((b=g["if"].call(c,(l=c.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(1,function(){return'\n <div class="bgc"><div class="bgl"><div class="bgr">\n <textarea id="message-input" class="message" tabindex="0" rows="4" cols="10"></textarea>\n </div></div></div>\n'},f),data:f}))||0===b)a+=b;a+='\n</div>\n\n<div id="send">\n';if((b=g["if"].call(c,(l=c.user,
null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(3,function(a,c){var e,d,b;e='\n <div id="postmessage">\n <div id="predefined-wrapper">\n ';if((b=g["if"].call(a,(d=a.user,null==d||!1===d?d:d.isAgent),{hash:{},inverse:n.noop,fn:n.program(4,j,c),data:c}))||0===b)e+=b;b={hash:{},data:c};e=e+'\n </div>\n <a href="javascript:void(0)" id="send-message" title="'+(h((d=g.L10n,d?d.call(a,"chat.window.send_message",b):m.call(a,"L10n","chat.window.send_message",
b)))+'">');b={hash:{},data:c};return e+=h((d=g.L10n,d?d.call(a,"chat.window.send_message_short_and_shortcut",b):m.call(a,"L10n","chat.window.send_message_short_and_shortcut",b)))+"</a>\n </div>\n"},f),data:f}))||0===b)a+=b;return a+'\n</div>\n<div class="clear"></div>'});s.chat_status_base=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};a=this.escapeExpression;(g=g.title)?g=g.call(c,{hash:{},data:f}):(g=c.title,g="function"===typeof g?g.apply(c):g);return a(g)});
s.chat_status_message=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};a=this.escapeExpression;(g=g.message)?g=g.call(c,{hash:{},data:f}):(g=c.message,g="function"===typeof g?g.apply(c):g);return a(g)});s.chat_status_typing=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};return b((j=g.L10n,j?j.call(c,"typing.remote",f):a.call(c,"L10n","typing.remote",f)))});s.leave_message_description=
r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=g.helperMissing,l=this.escapeExpression;b={hash:{},data:f};a='<div class="buttons">\n <a href="javascript:window.close();" title="'+(l((j=g.L10n,j?j.call(c,"leavemessage.close",b):k.call(c,"L10n","leavemessage.close",b)))+'">\n <img class="tpl-image iclosewin" src="'+l((j=(j=c.page,null==j||!1===j?j:j.webimRoot),"function"===typeof j?j.apply(c):j))+'/images/free.gif" alt="');b={hash:{},data:f};a+=
l((j=g.L10n,j?j.call(c,"leavemessage.close",b):k.call(c,"L10n","leavemessage.close",b)))+'" />\n </a>\n</div>\n<div class="messagetxt">';b={hash:{},data:f};return a+=l((j=g.L10n,j?j.call(c,"leavemessage.descr",b):k.call(c,"L10n","leavemessage.descr",b)))+"</div>"});s.leave_message_form=r(function(a,c,g,b,f){function j(a,c){var b,e;b='<input type="hidden" name="group" value="';(e=g.groupId)?e=e.call(a,{hash:{},data:c}):(e=a.groupId,e=typeof e===l?e.apply(a):e);return b+=p(e)+'"/>'}this.compilerInfo=
[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var k,l="function",p=this.escapeExpression,h=this,m=g.helperMissing;a=""+('<form name="leaveMessageForm" method="post" action="">\n <input type="hidden" name="style" value="'+p((k=(k=c.page,null==k||!1===k?k:k.style),typeof k===l?k.apply(c):k))+'"/>\n <input type="hidden" name="info" value="');(b=g.info)?b=b.call(c,{hash:{},data:f}):(b=c.info,b=typeof b===l?b.apply(c):b);a+=p(b)+'"/>\n <input type="hidden" name="referrer" value="';(b=g.referrer)?
b=b.call(c,{hash:{},data:f}):(b=c.referrer,b=typeof b===l?b.apply(c):b);a+=p(b)+'"/>\n ';if((b=g.unless.call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(1,function(a,c){var b;return(b=g["if"].call(a,a.groupId,{hash:{},inverse:h.noop,fn:h.program(2,j,c),data:c}))||0===b?b:""},f),data:f}))||0===b)a+=b;b={hash:{},data:f};a=a+'\n\n <div class="errors"></div>\n\n <table cellspacing="1" cellpadding="5" border="0" class="form">\n <tr>\n <td><strong>'+(p((k=g.L10n,k?k.call(c,
"form.field.email",b):m.call(c,"L10n","form.field.email",b)))+':</strong></td>\n <td><input type="text" name="email" size="50" value="');(b=g.email)?b=b.call(c,{hash:{},data:f}):(b=c.email,b=typeof b===l?b.apply(c):b);a+=p(b)+'" class="username"/></td>\n </tr>\n <tr>\n <td><strong>';b={hash:{},data:f};a+=p((k=g.L10n,k?k.call(c,"form.field.name",b):m.call(c,"L10n","form.field.name",b)))+':</strong></td>\n <td><input type="text" name="name" size="50" value="';
(b=g.name)?b=b.call(c,{hash:{},data:f}):(b=c.name,b=typeof b===l?b.apply(c):b);a+=p(b)+'" class="username"/></td>\n </tr>\n ';if((b=g["if"].call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(4,function(a,c){var b,e,d;d={hash:{},data:c};b='\n <tr>\n <td class="text"><strong>'+(p((e=g.L10n,e?e.call(a,"form.field.department",d):m.call(a,"L10n","form.field.department",d)))+'</strong></td>\n <td><select name="group" style="min-width:200px;">');if((d=(e=(e=a.groups,
null==e||!1===e?e:e.select),typeof e===l?e.apply(a):e))||0===d)b+=d;b+='</select></td>\n </tr>\n <tr>\n <td class="text"><strong>';d={hash:{},data:c};return b+=p((e=g.L10n,e?e.call(a,"form.field.department.description",d):m.call(a,"L10n","form.field.department.description",d)))+'</strong></td>\n <td class="text" id="groupDescription">'+p((e=(e=a.groups,null==e||!1===e?e:e.defaultDescription),typeof e===l?e.apply(a):e))+"</td>\n </tr>\n "},f),data:f}))||
0===b)a+=b;a+="\n <tr>\n <td><strong>";b={hash:{},data:f};a+=p((k=g.L10n,k?k.call(c,"form.field.message",b):m.call(c,"L10n","form.field.message",b)))+':</strong></td>\n <td valign="top">\n <textarea name="message" tabindex="0" cols="40" rows="5">';(b=g.message)?b=b.call(c,{hash:{},data:f}):(b=c.message,b=typeof b===l?b.apply(c):b);a+=p(b)+"</textarea>\n </td>\n </tr>\n ";if((b=g["if"].call(c,c.showCaptcha,{hash:{},inverse:h.noop,fn:h.program(6,
function(){return'\n <tr>\n <td><img id="captcha-img" src="captcha.php"/></td>\n <td><input type="text" name="captcha" size="50" maxlength="15" value="" class="username"/></td>\n </tr>\n '},f),data:f}))||0===b)a+=b;a+='\n </table>\n <a href="javascript:void(0);" class="but" id="send-message">';b={hash:{},data:f};return a+=p((k=g.L10n,k?k.call(c,"mailthread.perform",b):m.call(c,"L10n","mailthread.perform",b)))+'</a>\n <div class="clear">&nbsp;</div>\n</form>'});
s.leave_message_layout=r(function(a,c,g,b,f){function j(a){var e;return a=""+('\n <img src="'+n((e=(e=(e=a.page,null==e||!1===e?e:e.company),null==e||!1===e?e:e.chatLogoURL),typeof e===m?e.apply(a):e))+'" alt=""/>\n ')}function k(a){var e;return a=""+("\n <a onclick=\"window.open('"+n((e=(e=a.page,null==e||!1===e?e:e.webimHost),typeof e===m?e.apply(a):e))+'\');return false;" href="'+n((e=(e=a.page,null==e||!1===e?e:e.webimHost),typeof e===m?e.apply(a):e))+
'">\n <img src="'+n((e=(e=(e=a.page,null==e||!1===e?e:e.company),null==e||!1===e?e:e.chatLogoURL),typeof e===m?e.apply(a):e))+'" alt=""/>\n </a>\n ')}function l(a){var e;return a=""+("\n <a onclick=\"window.open('"+n((e=(e=a.page,null==e||!1===e?e:e.webimHost),typeof e===m?e.apply(a):e))+'\');return false;" href="'+n((e=(e=a.page,null==e||!1===e?e:e.webimHost),typeof e===m?e.apply(a):e))+'">\n <img src="'+n((e=(e=a.page,
null==e||!1===e?e:e.tplRoot),typeof e===m?e.apply(a):e))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function p(a){var e;return a=""+('\n <img src="'+n((e=(e=a.page,null==e||!1===e?e:e.tplRoot),typeof e===m?e.apply(a):e))+'/images/default-logo.gif" alt=""/>\n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var h,m="function",n=this.escapeExpression,q=this;a='\n<div id="top2">\n <div id="logo">\n ';if((f=g["if"].call(c,
(h=(h=c.page,null==h||!1===h?h:h.company),null==h||!1===h?h:h.chatLogoURL),{hash:{},inverse:q.program(6,function(a,e){var d,c,b;d="\n ";if((b=g["if"].call(a,(c=a.page,null==c||!1===c?c:c.webimHost),{hash:{},inverse:q.program(9,p,e),fn:q.program(7,l,e),data:e}))||0===b)d+=b;return d+"\n "},f),fn:q.program(1,function(a,e){var d,c,b;d="\n \n ";if((b=g.unless.call(a,(c=a.page,null==c||!1===c?c:c.webimHost),{hash:{},inverse:q.program(4,k,e),fn:q.program(2,j,e),data:e}))||
0===b)d+=b;return d+"\n "},f),data:f}))||0===f)a+=f;return a+='\n &nbsp;\n <div id="page-title">'+n((h=(h=c.page,null==h||!1===h?h:h.title),typeof h===m?h.apply(c):h))+'</div>\n <div class="clear">&nbsp;</div>\n </div>\n</div>\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr" id="description-region">\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'});
s.leave_message_sent_description=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=g.helperMissing,l=this.escapeExpression;b={hash:{},data:f};a='<div class="buttons">\n <a href="javascript:window.close();" title="'+(l((j=g.L10n,j?j.call(c,"chat.mailthread.sent.close",b):k.call(c,"L10n","chat.mailthread.sent.close",b)))+'">\n <img class="tpl-image iclosewin" src="'+l((j=(j=c.page,null==j||!1===j?j:j.webimRoot),"function"===typeof j?j.apply(c):
j))+'/images/free.gif" alt="');b={hash:{},data:f};a+=l((j=g.L10n,j?j.call(c,"chat.mailthread.sent.close",b):k.call(c,"L10n","chat.mailthread.sent.close",b)))+'" />\n </a>\n</div>\n<div class="messagetxt">';b={hash:{},data:f};return a+=l((j=g.L10n,j?j.call(c,"leavemessage.sent.message",b):k.call(c,"L10n","leavemessage.sent.message",b)))+"</div>"});s.survey_form=r(function(a,c,g,b,f){function j(a,c){var b,e;b='<input type="hidden" name="group" value="';(e=g.groupId)?e=e.call(a,{hash:{},data:c}):
(e=a.groupId,e=typeof e===l?e.apply(a):e);return b+=p(e)+'"/>'}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var k,l="function",p=this.escapeExpression,h=this,m=g.helperMissing;a=""+('<form name="surveyForm" method="post" action="">\n <input type="hidden" name="style" value="'+p((k=(k=c.page,null==k||!1===k?k:k.style),typeof k===l?k.apply(c):k))+'"/>\n <input type="hidden" name="info" value="');(b=g.info)?b=b.call(c,{hash:{},data:f}):(b=c.info,b=typeof b===l?b.apply(c):b);a+=
p(b)+'"/>\n <input type="hidden" name="referrer" value="';(b=g.referrer)?b=b.call(c,{hash:{},data:f}):(b=c.referrer,b=typeof b===l?b.apply(c):b);a+=p(b)+'"/>\n <input type="hidden" name="survey" value="on"/>\n ';if((b=g.unless.call(c,c.showEmail,{hash:{},inverse:h.noop,fn:h.program(1,function(a,c){var b,e;b='<input type="hidden" name="email" value="';(e=g.email)?e=e.call(a,{hash:{},data:c}):(e=a.email,e=typeof e===l?e.apply(a):e);return b+=p(e)+'"/>'},f),data:f}))||0===b)a+=b;a+="\n ";
if((b=g.unless.call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(3,function(a,c){var b;return(b=g["if"].call(a,a.groupId,{hash:{},inverse:h.noop,fn:h.program(4,j,c),data:c}))||0===b?b:""},f),data:f}))||0===b)a+=b;a+="\n ";if((b=g.unless.call(c,c.showMessage,{hash:{},inverse:h.noop,fn:h.program(6,function(a,c){var b,e;b='<input type="hidden" name="message" value="';(e=g.message)?e=e.call(a,{hash:{},data:c}):(e=a.message,e=typeof e===l?e.apply(a):e);return b+=p(e)+'"/>'},f),data:f}))||0===b)a+=
b;a+='\n\n <div class="errors"></div>\n\n <table class="form">\n ';if((b=g["if"].call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(8,function(a,b){var c,e,d;d={hash:{},data:b};c="\n <tr>\n <td><strong>"+(p((e=g.L10n,e?e.call(a,"form.field.department",d):m.call(a,"L10n","form.field.department",d)))+'</strong></td>\n <td><select name="group">');if((d=(e=(e=a.groups,null==e||!1===e?e:e.select),typeof e===l?e.apply(a):e))||0===d)c+=d;c+="</select></td>\n </tr>\n <tr>\n <td><strong>";
d={hash:{},data:b};return c+=p((e=g.L10n,e?e.call(a,"form.field.department.description",d):m.call(a,"L10n","form.field.department.description",d)))+'</strong></td>\n <td id="groupDescription">'+p((e=(e=a.groups,null==e||!1===e?e:e.defaultDescription),typeof e===l?e.apply(a):e))+"</td>\n </tr>\n "},f),data:f}))||0===b)a+=b;b={hash:{},data:f};a=a+"\n <tr>\n <td><strong>"+(p((k=g.L10n,k?k.call(c,"presurvey.name",b):m.call(c,"L10n","presurvey.name",b)))+'</strong></td>\n <td><input type="text" name="name" size="50" value="');
(b=g.name)?b=b.call(c,{hash:{},data:f}):(b=c.name,b=typeof b===l?b.apply(c):b);a+=p(b)+'" class="username" ';if((b=g.unless.call(c,c.canChangeName,{hash:{},inverse:h.noop,fn:h.program(10,function(){return'disabled="disabled"'},f),data:f}))||0===b)a+=b;a+="/></td>\n </tr>\n ";if((b=g["if"].call(c,c.showEmail,{hash:{},inverse:h.noop,fn:h.program(12,function(a,c){var b,e;b={hash:{},data:c};b="\n <tr>\n <td><strong>"+(p((e=g.L10n,e?e.call(a,"presurvey.mail",b):m.call(a,"L10n",
"presurvey.mail",b)))+'</strong></td>\n <td><input type="text" name="email" size="50" value="');(e=g.email)?e=e.call(a,{hash:{},data:c}):(e=a.email,e=typeof e===l?e.apply(a):e);return b+=p(e)+'" class="username"/></td>\n </tr>\n '},f),data:f}))||0===b)a+=b;a+="\n ";if((b=g["if"].call(c,c.showMessage,{hash:{},inverse:h.noop,fn:h.program(14,function(a,c){var b,e;b={hash:{},data:c};b="\n <tr>\n <td><strong>"+(p((e=g.L10n,e?e.call(a,"presurvey.question",b):m.call(a,
"L10n","presurvey.question",b)))+'</strong></td>\n <td valign="top"><textarea name="message" tabindex="0" cols="45" rows="2">');(e=g.message)?e=e.call(a,{hash:{},data:c}):(e=a.message,e=typeof e===l?e.apply(a):e);return b+=p(e)+"</textarea></td>\n </tr>\n "},f),data:f}))||0===b)a+=b;a+='\n </table>\n <a href="javascript:void(0);" class="but" id="submit-survey">';b={hash:{},data:f};return a+=p((k=g.L10n,k?k.call(c,"presurvey.submit",b):m.call(c,"L10n","presurvey.submit",
b)))+'</a>\n <div class="clear">&nbsp;</div>\n</form>'});s.survey_layout=r(function(a,c,g,b,f){function j(a){var d;return a=""+('\n <img src="'+q((d=(d=(d=a.page,null==d||!1===d?d:d.company),null==d||!1===d?d:d.chatLogoURL),typeof d===n?d.apply(a):d))+'" alt=""/>\n ')}function k(a){var d;return a=""+("\n <a onclick=\"window.open('"+q((d=(d=a.page,null==d||!1===d?d:d.webimHost),typeof d===n?d.apply(a):d))+'\');return false;" href="'+q((d=(d=a.page,null==
d||!1===d?d:d.webimHost),typeof d===n?d.apply(a):d))+'">\n <img src="'+q((d=(d=(d=a.page,null==d||!1===d?d:d.company),null==d||!1===d?d:d.chatLogoURL),typeof d===n?d.apply(a):d))+'" alt=""/>\n </a>\n ')}function l(a){var d;return a=""+("\n <a onclick=\"window.open('"+q((d=(d=a.page,null==d||!1===d?d:d.webimHost),typeof d===n?d.apply(a):d))+'\');return false;" href="'+q((d=(d=a.page,null==d||!1===d?d:d.webimHost),typeof d===n?d.apply(a):d))+
'">\n <img src="'+q((d=(d=a.page,null==d||!1===d?d:d.tplRoot),typeof d===n?d.apply(a):d))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function p(a){var d;return a=""+('\n <img src="'+q((d=(d=a.page,null==d||!1===d?d:d.tplRoot),typeof d===n?d.apply(a):d))+'/images/default-logo.gif" alt=""/>\n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var h,m,n="function",q=this.escapeExpression,r=this;b=g.helperMissing;
a='\n<div id="top2">\n <div id="logo">\n ';if((m=g["if"].call(c,(h=(h=c.page,null==h||!1===h?h:h.company),null==h||!1===h?h:h.chatLogoURL),{hash:{},inverse:r.program(6,function(a,d){var b,c,f;b="\n ";if((f=g["if"].call(a,(c=a.page,null==c||!1===c?c:c.webimHost),{hash:{},inverse:r.program(9,p,d),fn:r.program(7,l,d),data:d}))||0===f)b+=f;return b+"\n "},f),fn:r.program(1,function(a,b){var c,f,h;c="\n \n ";if((h=g.unless.call(a,(f=a.page,null==f||!1===
f?f:f.webimHost),{hash:{},inverse:r.program(4,k,b),fn:r.program(2,j,b),data:b}))||0===h)c+=h;return c+"\n "},f),data:f}))||0===m)a+=m;a+='\n &nbsp;\n <div id="page-title">'+q((h=(h=c.page,null==h||!1===h?h:h.title),typeof h===n?h.apply(c):h))+'</div>\n <div class="clear">&nbsp;</div>\n </div>\n</div>\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr">\n <div class="buttons">\n <a href="javascript:window.close();" title="';
m={hash:{},data:f};a+=q((h=g.L10n,h?h.call(c,"leavemessage.close",m):b.call(c,"L10n","leavemessage.close",m)))+'"><img class="tpl-image iclosewin" src="'+q((h=(h=c.page,null==h||!1===h?h:h.webimRoot),typeof h===n?h.apply(c):h))+'/images/free.gif" alt="';m={hash:{},data:f};a+=q((h=g.L10n,h?h.call(c,"leavemessage.close",m):b.call(c,"L10n","leavemessage.close",m)))+'" /></a>\n </div>\n <div class="messagetxt">';m={hash:{},data:f};return a+=q((h=g.L10n,h?h.call(c,"presurvey.intro",m):b.call(c,
"L10n","presurvey.intro",m)))+'</div>\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'})})();
(function(){var r=Handlebars.template,s=Handlebars.templates=Handlebars.templates||{};s.chat_avatar=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g=this.escapeExpression;return(b=f["if"].call(c,c.imageLink,{hash:{},inverse:this.program(3,function(){return'<div class="default-avatar"></div>'},d),fn:this.program(1,function(b,a){var d,c;d='<img src="';(c=f.imageLink)?c=c.call(b,{hash:{},data:a}):(c=b.imageLink,c="function"===typeof c?c.apply(b):c);return d+=g(c)+
'" border="0" alt="" />'},d),data:d}))||0===b?b:""});s.chat_controls_close=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+(a((g=f.L10n,g?g.call(c,"chat.window.close_title",d):b.call(c,"L10n","chat.window.close_title",d)))+'"></div>')});s.chat_controls_history=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;
a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+(a((g=f.L10n,g?g.call(c,"page.analysis.userhistory.title",d):b.call(c,"L10n","page.analysis.userhistory.title",d)))+'"></div>')});s.chat_controls_redirect=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g,q=f.helperMissing,p=this.escapeExpression;return(b=f["if"].call(c,(g=c.user,null==g||!1===g?g:g.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(b,a){var c,d;
c={hash:{},data:a};return c='\n<div class="tpl-image" title="'+(p((d=f.L10n,d?d.call(b,"chat.window.toolbar.redirect_user",c):q.call(b,"L10n","chat.window.toolbar.redirect_user",c)))+'"></div>\n')},d),data:d}))||0===b?b:""});s.chat_controls_refresh=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+(a((g=f.L10n,g?g.call(c,"chat.window.toolbar.refresh",d):b.call(c,
"L10n","chat.window.toolbar.refresh",d)))+'"></div>')});s.chat_controls_secure_mode=r(function(){this.compilerInfo=[2,">= 1.0.0-rc.3"];return'<div class="tpl-image" title="SSL"></div>'});s.chat_controls_send_mail=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+(a((g=f.L10n,g?g.call(c,"chat.window.toolbar.mail_history",d):b.call(c,"L10n","chat.window.toolbar.mail_history",
d)))+'"></div>')});s.chat_controls_sound=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g=f.helperMissing,q=this.escapeExpression;return(b=f["if"].call(c,c.enabled,{hash:{},inverse:this.program(3,function(b,a){var c,d;c={hash:{},data:a};return c='\n <div class="tpl-image sound-control-off" title="'+(q((d=f.L10n,d?d.call(b,"chat.window.toolbar.turn_on_sound",c):g.call(b,"L10n","chat.window.toolbar.turn_on_sound",c)))+'"></div>\n')},d),fn:this.program(1,function(b,
a){var c,d;c={hash:{},data:a};return c='\n <div class="tpl-image sound-control-on" title="'+(q((d=f.L10n,d?d.call(b,"chat.window.toolbar.turn_off_sound",c):g.call(b,"L10n","chat.window.toolbar.turn_off_sound",c)))+'"></div>\n')},d),data:d}))||0===b?b:""});s.chat_controls_user_name=r(function(b,c,f,a,d){function g(b,c){var j,e,a;j=""+('\n <div class="user-name-control-input-bg"><input id="user-name-control-input" type="text" size="12" value="'+h((e=(e=b.user,null==e||!1===e?e:e.name),typeof e===
t?e.apply(b):e))+'" class="username" /></div>\n <a href="javascript:void(0)" class="user-name-control-set tpl-image" title="');a={hash:{},data:c};return j+=h((e=f.L10n,e?e.call(b,"chat.client.changename",a):l.call(b,"L10n","chat.client.changename",a)))+'"></a>\n '}function q(b,a){var j,e,c;c={hash:{},data:a};j='\n <a href="javascript:void(0)" title="'+(h((e=f.L10n,e?e.call(b,"chat.client.changename",c):l.call(b,"L10n","chat.client.changename",c)))+'">'+h((e=(e=b.user,null==e||!1===
e?e:e.name),typeof e===t?e.apply(b):e))+'</a>\n <a class="user-name-control-change tpl-image" title="');c={hash:{},data:a};return j+=h((e=f.L10n,e?e.call(b,"chat.client.changename",c):l.call(b,"L10n","chat.client.changename",c)))+'"></a>\n '}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var p,t="function",h=this.escapeExpression,l=f.helperMissing,k=this;return(b=f["if"].call(c,(p=c.user,null==p||!1===p?p:p.canChangeName),{hash:{},inverse:k.program(6,function(b,c){var j,e;
j={hash:{},data:c};return j="\n"+(h((e=f.L10n,e?e.call(b,"chat.client.name",j):l.call(b,"L10n","chat.client.name",j)))+"&nbsp;"+h((e=(e=b.user,null==e||!1===e?e:e.name),typeof e===t?e.apply(b):e))+"\n")},d),fn:k.program(1,function(b,c){var j,e;j={hash:{},data:c};j='\n <span class="user-name-control-prefix">'+(h((e=f.L10n,e?e.call(b,"chat.client.name",j):l.call(b,"L10n","chat.client.name",j)))+"</span>\n ");if((e=f["if"].call(b,b.nameInput,{hash:{},inverse:k.program(4,q,c),fn:k.program(2,g,c),
data:c}))||0===e)j+=e;return j+="\n"},d),data:d}))||0===b?b:""});s.chat_layout=r(function(b,c,f,a,d){function g(j){var e;return j=""+('\n <img src="'+m((e=(e=(e=j.page,null==e||!1===e?e:e.company),null==e||!1===e?e:e.chatLogoURL),typeof e===k?e.apply(j):e))+'" alt=""/>\n ')}function q(j){var e;return j=""+("\n <a onclick=\"window.open('"+m((e=(e=j.page,null==e||!1===e?e:e.webimHost),typeof e===k?e.apply(j):e))+'\');return false;" href="'+m((e=(e=j.page,null==
e||!1===e?e:e.webimHost),typeof e===k?e.apply(j):e))+'">\n <img src="'+m((e=(e=(e=j.page,null==e||!1===e?e:e.company),null==e||!1===e?e:e.chatLogoURL),typeof e===k?e.apply(j):e))+'" alt=""/>\n </a>\n ')}function p(j){var e;return j=""+("\n <a onclick=\"window.open('"+m((e=(e=j.page,null==e||!1===e?e:e.webimHost),typeof e===k?e.apply(j):e))+'\');return false;" href="'+m((e=(e=j.page,null==e||!1===e?e:e.webimHost),typeof e===k?e.apply(j):e))+
'">\n <img src="'+m((e=(e=j.page,null==e||!1===e?e:e.tplRoot),typeof e===k?e.apply(j):e))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function t(j){var e;return j=""+('\n <img src="'+m((e=(e=j.page,null==e||!1===e?e:e.tplRoot),typeof e===k?e.apply(j):e))+'/images/default-logo.gif" alt=""/>\n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var h,l,k="function",m=this.escapeExpression,n=this;a=f.helperMissing;
b='\n<div id="top">\n <div id="logo">\n ';if((l=f["if"].call(c,(h=(h=c.page,null==h||!1===h?h:h.company),null==h||!1===h?h:h.chatLogoURL),{hash:{},inverse:n.program(6,function(j,e){var b,c,a;b="\n ";if((a=f["if"].call(j,(c=j.page,null==c||!1===c?c:c.webimHost),{hash:{},inverse:n.program(9,t,e),fn:n.program(7,p,e),data:e}))||0===a)b+=a;return b+"\n "},d),fn:n.program(1,function(b,e){var c,a,d;c="\n \n ";if((d=f.unless.call(b,(a=b.page,null==a||!1===
a?a:a.webimHost),{hash:{},inverse:n.program(4,q,e),fn:n.program(2,g,e),data:e}))||0===d)c+=d;return c+"\n "},d),data:d}))||0===l)b+=l;b+='\n &nbsp;\n <div id="page-title">'+m((h=(h=c.page,null==h||!1===h?h:h.title),typeof h===k?h.apply(c):h))+'</div>\n <div class="clear">&nbsp;</div>\n </div>\n</div>\n\n\n<div id="chat-header">\n <div class="bgc"><div class="bgl"><div class="bgr">\n \n <div id="controls-region"></div>\n </div></div></div>\n</div>\n\n\n<div id="chat">\n <div class="bgl"><div class="bgr"><div class="sdwbgc"><div class="sdwbgl"><div class="sdwbgr">\n ';
if((l=f.unless.call(c,(h=c.user,null==h||!1===h?h:h.isAgent),{hash:{},inverse:n.noop,fn:n.program(11,function(){return'\n <div id="avatar-region"></div>\n '},d),data:d}))||0===l)b+=l;d={hash:{},data:d};return b=b+'\n \n <div id="messages-region"></div>\n \n <div id="status-region"></div>\n </div></div></div></div></div>\n</div>\n\n\n<div id="message-form-region"></div>\n\n\n<div id="footer">'+(m((h=f.L10n,h?h.call(c,"chat.window.poweredby",d):a.call(c,
"L10n","chat.window.poweredby",d)))+' <a id="poweredByLink" href="http://mibew.org" title="Mibew Community" target="_blank">mibew.org</a></div>')});s.chat_message=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g,q=this.escapeExpression,p=f.helperMissing;b={hash:{},data:d};b="<span>"+(q((g=f.formatTime,g?g.call(c,c.created,b):p.call(c,"formatTime",c.created,b)))+"</span> \n");if((g=f["if"].call(c,c.name,{hash:{},inverse:this.noop,fn:this.program(1,function(b,
c){var a,d;a="<span class='n";(d=f.kindName)?d=d.call(b,{hash:{},data:c}):(d=b.kindName,d="function"===typeof d?d.apply(b):d);a+=q(d)+"'>";(d=f.name)?d=d.call(b,{hash:{},data:c}):(d=b.name,d="function"===typeof d?d.apply(b):d);return a+=q(d)+"</span>: "},d),data:d}))||0===g)b+=g;b+="\n<span class='m";(g=f.kindName)?g=g.call(c,{hash:{},data:d}):(g=c.kindName,g="function"===typeof g?g.apply(c):g);b+=q(g)+"'>";if((g=f["if"].call(c,c.allowFormatting,{hash:{},inverse:this.program(5,function(b,c){var a,
d;d={hash:{},data:c};return q((a=f.apply,a?a.call(b,b.message,"urlReplace, nl2br",d):p.call(b,"apply",b.message,"urlReplace, nl2br",d)))},d),fn:this.program(3,function(b,c){var a,d;d={hash:{},data:c};return q((a=f.apply,a?a.call(b,b.message,"urlReplace, nl2br, allowTags",d):p.call(b,"apply",b.message,"urlReplace, nl2br, allowTags",d)))},d),data:d}))||0===g)b+=g;return b+="</span><br/>"});s.chat_message_form=r(function(b,c,f,a,d){function g(b,c){var j,e;j={hash:{},data:c};j='\n <select id="predefined" size="1" class="answer">\n <option>'+
(h((e=f.L10n,e?e.call(b,"chat.window.predefined.select_answer",j):l.call(b,"L10n","chat.window.predefined.select_answer",j)))+"</option>\n ");if((e=f.each.call(b,b.predefinedAnswers,{hash:{},inverse:k.noop,fn:k.program(5,q,c),data:c}))||0===e)j+=e;return j+="\n </select>\n "}function q(b){var c;return b=""+("\n <option>"+h((c=b["short"],typeof c===r?c.apply(b):c))+"</option>\n ")}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||
b.helpers;d=d||{};var p,r="function",h=this.escapeExpression,l=f.helperMissing,k=this;b='<div id="message">\n';if((a=f["if"].call(c,(p=c.user,null==p||!1===p?p:p.canPost),{hash:{},inverse:k.noop,fn:k.program(1,function(){return'\n <div class="bgc"><div class="bgl"><div class="bgr">\n <textarea id="message-input" class="message" tabindex="0" rows="4" cols="10"></textarea>\n </div></div></div>\n'},d),data:d}))||0===a)b+=a;b+='\n</div>\n\n<div id="send">\n';if((a=f["if"].call(c,(p=c.user,
null==p||!1===p?p:p.canPost),{hash:{},inverse:k.noop,fn:k.program(3,function(b,c){var j,e,a;j='\n <div id="postmessage">\n <div id="predefined-wrapper">\n ';if((a=f["if"].call(b,(e=b.user,null==e||!1===e?e:e.isAgent),{hash:{},inverse:k.noop,fn:k.program(4,g,c),data:c}))||0===a)j+=a;a={hash:{},data:c};j=j+'\n </div>\n <a href="javascript:void(0)" id="send-message" title="'+(h((e=f.L10n,e?e.call(b,"chat.window.send_message",a):l.call(b,"L10n","chat.window.send_message",
a)))+'">');a={hash:{},data:c};return j+=h((e=f.L10n,e?e.call(b,"chat.window.send_message_short_and_shortcut",a):l.call(b,"L10n","chat.window.send_message_short_and_shortcut",a)))+"</a>\n </div>\n"},d),data:d}))||0===a)b+=a;return b+'\n</div>\n<div class="clear"></div>'});s.chat_status_base=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};b=this.escapeExpression;(f=f.title)?f=f.call(c,{hash:{},data:d}):(f=c.title,f="function"===typeof f?f.apply(c):f);return b(f)});
s.chat_status_message=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};b=this.escapeExpression;(f=f.message)?f=f.call(c,{hash:{},data:d}):(f=c.message,f="function"===typeof f?f.apply(c):f);return b(f)});s.chat_status_typing=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return a((g=f.L10n,g?g.call(c,"typing.remote",d):b.call(c,"L10n","typing.remote",d)))});s.leave_message_description=
r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g,q=f.helperMissing,p=this.escapeExpression;a={hash:{},data:d};b='<div class="buttons">\n <a href="javascript:window.close();" title="'+(p((g=f.L10n,g?g.call(c,"leavemessage.close",a):q.call(c,"L10n","leavemessage.close",a)))+'">\n <img class="tpl-image iclosewin" src="'+p((g=(g=c.page,null==g||!1===g?g:g.webimRoot),"function"===typeof g?g.apply(c):g))+'/images/free.gif" alt="');a={hash:{},data:d};b+=
p((g=f.L10n,g?g.call(c,"leavemessage.close",a):q.call(c,"L10n","leavemessage.close",a)))+'" />\n </a>\n</div>\n<div class="messagetxt">';a={hash:{},data:d};return b+=p((g=f.L10n,g?g.call(c,"leavemessage.descr",a):q.call(c,"L10n","leavemessage.descr",a)))+"</div>"});s.leave_message_form=r(function(b,c,f,a,d){function g(e,b){var c,a;c='<input type="hidden" name="group" value="';(a=f.groupId)?a=a.call(e,{hash:{},data:b}):(a=e.groupId,a=typeof a===k?a.apply(e):a);return c+=m(a)+'"/>'}function q(e,
b){var c,a,j;c=""+('\n <option value="'+m((a=e.id,typeof a===k?a.apply(e):a))+'" ');if((j=f["if"].call(e,e.selected,{hash:{},inverse:n.noop,fn:n.program(6,p,b),data:b}))||0===j)c+=j;return c+=">"+m((a=e.name,typeof a===k?a.apply(e):a))+"</option>\n "}function p(){return'selected="selected"'}function r(e,b){var a;return(a=f["if"].call(e,e.selected,{hash:{},inverse:n.noop,fn:n.program(9,h,b),data:b}))||0===a?a:""}function h(e){var b;return m((b=e.description,
typeof b===k?b.apply(e):b))}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var l,k="function",m=this.escapeExpression,n=this,j=f.helperMissing;b=""+('<form name="leaveMessageForm" method="post" action="">\n <input type="hidden" name="style" value="'+m((l=(l=c.page,null==l||!1===l?l:l.style),typeof l===k?l.apply(c):l))+'"/>\n <input type="hidden" name="info" value="');(a=f.info)?a=a.call(c,{hash:{},data:d}):(a=c.info,a=typeof a===k?a.apply(c):a);b+=m(a)+'"/>\n <input type="hidden" name="referrer" value="';
(a=f.referrer)?a=a.call(c,{hash:{},data:d}):(a=c.referrer,a=typeof a===k?a.apply(c):a);b+=m(a)+'"/>\n ';if((a=f.unless.call(c,c.groups,{hash:{},inverse:n.noop,fn:n.program(1,function(e,b){var a;return(a=f["if"].call(e,e.groupId,{hash:{},inverse:n.noop,fn:n.program(2,g,b),data:b}))||0===a?a:""},d),data:d}))||0===a)b+=a;a={hash:{},data:d};b=b+'\n\n <div class="errors"></div>\n\n <table cellspacing="1" cellpadding="5" border="0" class="form">\n <tr>\n <td><strong>'+(m((l=f.L10n,
l?l.call(c,"form.field.email",a):j.call(c,"L10n","form.field.email",a)))+':</strong></td>\n <td><input type="text" name="email" size="50" value="');(a=f.email)?a=a.call(c,{hash:{},data:d}):(a=c.email,a=typeof a===k?a.apply(c):a);b+=m(a)+'" class="username"/></td>\n </tr>\n <tr>\n <td><strong>';a={hash:{},data:d};b+=m((l=f.L10n,l?l.call(c,"form.field.name",a):j.call(c,"L10n","form.field.name",a)))+':</strong></td>\n <td><input type="text" name="name" size="50" value="';
(a=f.name)?a=a.call(c,{hash:{},data:d}):(a=c.name,a=typeof a===k?a.apply(c):a);b+=m(a)+'" class="username"/></td>\n </tr>\n ';if((a=f["if"].call(c,c.groups,{hash:{},inverse:n.noop,fn:n.program(4,function(e,b){var a,c,d;d={hash:{},data:b};a='\n <tr>\n <td class="text"><strong>'+(m((c=f.L10n,c?c.call(e,"form.field.department",d):j.call(e,"L10n","form.field.department",d)))+'</strong></td>\n <td>\n <select name="group" style="min-width:200px;">\n ');
if((d=f.each.call(e,e.groups,{hash:{},inverse:n.noop,fn:n.program(5,q,b),data:b}))||0===d)a+=d;a+='\n </select>\n </td>\n </tr>\n <tr>\n <td class="text"><strong>';d={hash:{},data:b};a+=m((c=f.L10n,c?c.call(e,"form.field.department.description",d):j.call(e,"L10n","form.field.department.description",d)))+'</strong></td>\n <td class="text" id="groupDescription">\n ';if((d=f.each.call(e,e.groups,{hash:{},inverse:n.noop,fn:n.program(8,
r,b),data:b}))||0===d)a+=d;return a+="\n </td>\n </tr>\n "},d),data:d}))||0===a)b+=a;b+="\n <tr>\n <td><strong>";a={hash:{},data:d};b+=m((l=f.L10n,l?l.call(c,"form.field.message",a):j.call(c,"L10n","form.field.message",a)))+':</strong></td>\n <td valign="top">\n <textarea name="message" tabindex="0" cols="40" rows="5">';(a=f.message)?a=a.call(c,{hash:{},data:d}):(a=c.message,a=typeof a===k?a.apply(c):a);b+=m(a)+"</textarea>\n </td>\n </tr>\n ";
if((a=f["if"].call(c,c.showCaptcha,{hash:{},inverse:n.noop,fn:n.program(11,function(){return'\n <tr>\n <td><img id="captcha-img" src="captcha.php"/></td>\n <td><input type="text" name="captcha" size="50" maxlength="15" value="" class="username"/></td>\n </tr>\n '},d),data:d}))||0===a)b+=a;b+='\n </table>\n <a href="javascript:void(0);" class="but" id="send-message">';a={hash:{},data:d};return b+=m((l=f.L10n,l?l.call(c,"mailthread.perform",a):j.call(c,"L10n",
"mailthread.perform",a)))+'</a>\n <div class="clear">&nbsp;</div>\n</form>'});s.leave_message_layout=r(function(b,c,f,a,d){function g(b){var a;return b=""+('\n <img src="'+k((a=(a=(a=b.page,null==a||!1===a?a:a.company),null==a||!1===a?a:a.chatLogoURL),typeof a===l?a.apply(b):a))+'" alt=""/>\n ')}function q(b){var a;return b=""+("\n <a onclick=\"window.open('"+k((a=(a=b.page,null==a||!1===a?a:a.webimHost),typeof a===l?a.apply(b):a))+'\');return false;" href="'+
k((a=(a=b.page,null==a||!1===a?a:a.webimHost),typeof a===l?a.apply(b):a))+'">\n <img src="'+k((a=(a=(a=b.page,null==a||!1===a?a:a.company),null==a||!1===a?a:a.chatLogoURL),typeof a===l?a.apply(b):a))+'" alt=""/>\n </a>\n ')}function p(a){var b;return a=""+("\n <a onclick=\"window.open('"+k((b=(b=a.page,null==b||!1===b?b:b.webimHost),typeof b===l?b.apply(a):b))+'\');return false;" href="'+k((b=(b=a.page,null==b||!1===b?b:b.webimHost),typeof b===
l?b.apply(a):b))+'">\n <img src="'+k((b=(b=a.page,null==b||!1===b?b:b.tplRoot),typeof b===l?b.apply(a):b))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function r(b){var a;return b=""+('\n <img src="'+k((a=(a=b.page,null==a||!1===a?a:a.tplRoot),typeof a===l?a.apply(b):a))+'/images/default-logo.gif" alt=""/>\n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var h,l="function",k=this.escapeExpression,m=this;b=
'\n<div id="top2">\n <div id="logo">\n ';if((d=f["if"].call(c,(h=(h=c.page,null==h||!1===h?h:h.company),null==h||!1===h?h:h.chatLogoURL),{hash:{},inverse:m.program(6,function(a,b){var e,c,d;e="\n ";if((d=f["if"].call(a,(c=a.page,null==c||!1===c?c:c.webimHost),{hash:{},inverse:m.program(9,r,b),fn:m.program(7,p,b),data:b}))||0===d)e+=d;return e+"\n "},d),fn:m.program(1,function(a,b){var e,c,d;e="\n \n ";if((d=f.unless.call(a,(c=a.page,null==c||!1===
c?c:c.webimHost),{hash:{},inverse:m.program(4,q,b),fn:m.program(2,g,b),data:b}))||0===d)e+=d;return e+"\n "},d),data:d}))||0===d)b+=d;return b+='\n &nbsp;\n <div id="page-title">'+k((h=(h=c.page,null==h||!1===h?h:h.title),typeof h===l?h.apply(c):h))+'</div>\n <div class="clear">&nbsp;</div>\n </div>\n</div>\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr" id="description-region">\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'});
s.leave_message_sent_description=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g,q=f.helperMissing,p=this.escapeExpression;a={hash:{},data:d};b='<div class="buttons">\n <a href="javascript:window.close();" title="'+(p((g=f.L10n,g?g.call(c,"chat.mailthread.sent.close",a):q.call(c,"L10n","chat.mailthread.sent.close",a)))+'">\n <img class="tpl-image iclosewin" src="'+p((g=(g=c.page,null==g||!1===g?g:g.webimRoot),"function"===typeof g?g.apply(c):
g))+'/images/free.gif" alt="');a={hash:{},data:d};b+=p((g=f.L10n,g?g.call(c,"chat.mailthread.sent.close",a):q.call(c,"L10n","chat.mailthread.sent.close",a)))+'" />\n </a>\n</div>\n<div class="messagetxt">';a={hash:{},data:d};return b+=p((g=f.L10n,g?g.call(c,"leavemessage.sent.message",a):q.call(c,"L10n","leavemessage.sent.message",a)))+"</div>"});s.survey_form=r(function(b,c,f,a,d){function g(b,a){var e,c;e='<input type="hidden" name="group" value="';(c=f.groupId)?c=c.call(b,{hash:{},data:a}):
(c=b.groupId,c=typeof c===m?c.apply(b):c);return e+=n(c)+'"/>'}function q(b,a){var e,c,d;e=""+('\n <option value="'+n((c=b.id,typeof c===m?c.apply(b):c))+'" ');if((d=f["if"].call(b,b.selected,{hash:{},inverse:j.noop,fn:j.program(10,p,a),data:a}))||0===d)e+=d;e+=">"+n((c=b.name,typeof c===m?c.apply(b):c));if((d=f.unless.call(b,b.online,{hash:{},inverse:j.noop,fn:j.program(12,r,a),data:a}))||0===d)e+=d;return e+"</option>\n "}function p(){return'selected="selected"'}
function r(){return" (offline)"}function h(b,a){var e;return(e=f["if"].call(b,b.selected,{hash:{},inverse:j.noop,fn:j.program(15,l,a),data:a}))||0===e?e:""}function l(b){var a;return n((a=b.description,typeof a===m?a.apply(b):a))}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var k,m="function",n=this.escapeExpression,j=this,e=f.helperMissing;b=""+('<form name="surveyForm" method="post" action="">\n <input type="hidden" name="style" value="'+n((k=(k=c.page,null==k||!1===k?k:k.style),
typeof k===m?k.apply(c):k))+'"/>\n <input type="hidden" name="info" value="');(a=f.info)?a=a.call(c,{hash:{},data:d}):(a=c.info,a=typeof a===m?a.apply(c):a);b+=n(a)+'"/>\n <input type="hidden" name="referrer" value="';(a=f.referrer)?a=a.call(c,{hash:{},data:d}):(a=c.referrer,a=typeof a===m?a.apply(c):a);b+=n(a)+'"/>\n <input type="hidden" name="survey" value="on"/>\n ';if((a=f.unless.call(c,c.showEmail,{hash:{},inverse:j.noop,fn:j.program(1,function(b,a){var e,c;e='<input type="hidden" name="email" value="';
(c=f.email)?c=c.call(b,{hash:{},data:a}):(c=b.email,c=typeof c===m?c.apply(b):c);return e+=n(c)+'"/>'},d),data:d}))||0===a)b+=a;b+="\n ";if((a=f.unless.call(c,c.groups,{hash:{},inverse:j.noop,fn:j.program(3,function(b,a){var e;return(e=f["if"].call(b,b.groupId,{hash:{},inverse:j.noop,fn:j.program(4,g,a),data:a}))||0===e?e:""},d),data:d}))||0===a)b+=a;b+="\n ";if((a=f.unless.call(c,c.showMessage,{hash:{},inverse:j.noop,fn:j.program(6,function(b,a){var e,c;e='<input type="hidden" name="message" value="';
(c=f.message)?c=c.call(b,{hash:{},data:a}):(c=b.message,c=typeof c===m?c.apply(b):c);return e+=n(c)+'"/>'},d),data:d}))||0===a)b+=a;b+='\n\n <div class="errors"></div>\n\n <table class="form">\n ';if((a=f["if"].call(c,c.groups,{hash:{},inverse:j.noop,fn:j.program(8,function(b,a){var c,d,g;g={hash:{},data:a};c="\n <tr>\n <td><strong>"+(n((d=f.L10n,d?d.call(b,"form.field.department",g):e.call(b,"L10n","form.field.department",g)))+'</strong></td>\n <td>\n <select name="group">\n ');
if((g=f.each.call(b,b.groups,{hash:{},inverse:j.noop,fn:j.program(9,q,a),data:a}))||0===g)c+=g;c+="\n </select>\n </td>\n </tr>\n <tr>\n <td><strong>";g={hash:{},data:a};c+=n((d=f.L10n,d?d.call(b,"form.field.department.description",g):e.call(b,"L10n","form.field.department.description",g)))+'</strong></td>\n <td id="groupDescription">';if((g=f.each.call(b,b.groups,{hash:{},inverse:j.noop,fn:j.program(14,h,a),data:a}))||0===g)c+=g;return c+=
"</td>\n </tr>\n "},d),data:d}))||0===a)b+=a;a={hash:{},data:d};b=b+"\n <tr>\n <td><strong>"+(n((k=f.L10n,k?k.call(c,"presurvey.name",a):e.call(c,"L10n","presurvey.name",a)))+'</strong></td>\n <td><input type="text" name="name" size="50" value="');(a=f.name)?a=a.call(c,{hash:{},data:d}):(a=c.name,a=typeof a===m?a.apply(c):a);b+=n(a)+'" class="username" ';if((a=f.unless.call(c,c.canChangeName,{hash:{},inverse:j.noop,fn:j.program(17,function(){return'disabled="disabled"'},
d),data:d}))||0===a)b+=a;b+="/></td>\n </tr>\n ";if((a=f["if"].call(c,c.showEmail,{hash:{},inverse:j.noop,fn:j.program(19,function(b,a){var c,d;c={hash:{},data:a};c="\n <tr>\n <td><strong>"+(n((d=f.L10n,d?d.call(b,"presurvey.mail",c):e.call(b,"L10n","presurvey.mail",c)))+'</strong></td>\n <td><input type="text" name="email" size="50" value="');(d=f.email)?d=d.call(b,{hash:{},data:a}):(d=b.email,d=typeof d===m?d.apply(b):d);return c+=n(d)+'" class="username"/></td>\n </tr>\n '},
d),data:d}))||0===a)b+=a;b+="\n ";if((a=f["if"].call(c,c.showMessage,{hash:{},inverse:j.noop,fn:j.program(21,function(b,a){var c,d;c={hash:{},data:a};c="\n <tr>\n <td><strong>"+(n((d=f.L10n,d?d.call(b,"presurvey.question",c):e.call(b,"L10n","presurvey.question",c)))+'</strong></td>\n <td valign="top"><textarea name="message" tabindex="0" cols="45" rows="2">');(d=f.message)?d=d.call(b,{hash:{},data:a}):(d=b.message,d=typeof d===m?d.apply(b):d);return c+=n(d)+"</textarea></td>\n </tr>\n "},
d),data:d}))||0===a)b+=a;b+='\n </table>\n <a href="javascript:void(0);" class="but" id="submit-survey">';a={hash:{},data:d};return b+=n((k=f.L10n,k?k.call(c,"presurvey.submit",a):e.call(c,"L10n","presurvey.submit",a)))+'</a>\n <div class="clear">&nbsp;</div>\n</form>'});s.survey_layout=r(function(b,c,f,a,d){function g(b){var a;return b=""+('\n <img src="'+m((a=(a=(a=b.page,null==a||!1===a?a:a.company),null==a||!1===a?a:a.chatLogoURL),typeof a===k?a.apply(b):a))+'" alt=""/>\n ')}
function q(b){var a;return b=""+("\n <a onclick=\"window.open('"+m((a=(a=b.page,null==a||!1===a?a:a.webimHost),typeof a===k?a.apply(b):a))+'\');return false;" href="'+m((a=(a=b.page,null==a||!1===a?a:a.webimHost),typeof a===k?a.apply(b):a))+'">\n <img src="'+m((a=(a=(a=b.page,null==a||!1===a?a:a.company),null==a||!1===a?a:a.chatLogoURL),typeof a===k?a.apply(b):a))+'" alt=""/>\n </a>\n ')}function p(a){var b;return a=""+("\n <a onclick=\"window.open('"+
m((b=(b=a.page,null==b||!1===b?b:b.webimHost),typeof b===k?b.apply(a):b))+'\');return false;" href="'+m((b=(b=a.page,null==b||!1===b?b:b.webimHost),typeof b===k?b.apply(a):b))+'">\n <img src="'+m((b=(b=a.page,null==b||!1===b?b:b.tplRoot),typeof b===k?b.apply(a):b))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function r(b){var a;return b=""+('\n <img src="'+m((a=(a=b.page,null==a||!1===a?a:a.tplRoot),typeof a===k?a.apply(b):a))+'/images/default-logo.gif" alt=""/>\n ')}
this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var h,l,k="function",m=this.escapeExpression,n=this;a=f.helperMissing;b='\n<div id="top2">\n <div id="logo">\n ';if((l=f["if"].call(c,(h=(h=c.page,null==h||!1===h?h:h.company),null==h||!1===h?h:h.chatLogoURL),{hash:{},inverse:n.program(6,function(a,b){var c,d,g;c="\n ";if((g=f["if"].call(a,(d=a.page,null==d||!1===d?d:d.webimHost),{hash:{},inverse:n.program(9,r,b),fn:n.program(7,p,b),data:b}))||0===g)c+=g;return c+"\n "},
d),fn:n.program(1,function(a,b){var c,d,h;c="\n \n ";if((h=f.unless.call(a,(d=a.page,null==d||!1===d?d:d.webimHost),{hash:{},inverse:n.program(4,q,b),fn:n.program(2,g,b),data:b}))||0===h)c+=h;return c+"\n "},d),data:d}))||0===l)b+=l;b+='\n &nbsp;\n <div id="page-title">'+m((h=(h=c.page,null==h||!1===h?h:h.title),typeof h===k?h.apply(c):h))+'</div>\n <div class="clear">&nbsp;</div>\n </div>\n</div>\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr">\n <div class="buttons">\n <a href="javascript:window.close();" title="';
l={hash:{},data:d};b+=m((h=f.L10n,h?h.call(c,"leavemessage.close",l):a.call(c,"L10n","leavemessage.close",l)))+'"><img class="tpl-image iclosewin" src="'+m((h=(h=c.page,null==h||!1===h?h:h.webimRoot),typeof h===k?h.apply(c):h))+'/images/free.gif" alt="';l={hash:{},data:d};b+=m((h=f.L10n,h?h.call(c,"leavemessage.close",l):a.call(c,"L10n","leavemessage.close",l)))+'" /></a>\n </div>\n <div class="messagetxt">';l={hash:{},data:d};return b+=m((h=f.L10n,h?h.call(c,"presurvey.intro",l):a.call(c,
"L10n","presurvey.intro",l)))+'</div>\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'})})();