+
+
+// Enable or disable the 'check attendee availability' button depending on whether
+// the attendees list is empty
+function EnableOrDisableCheckButton()
+{
+ if ($('attendees_box').value.length == 0) {
+ $('check_button').disabled = true;
+ }
+ else {
+ $('check_button').disabled = false;
+ }
+}
+
+
+
+
+function launchChat(event) {
+window.open('chat', 'ctdl_chat_window', 'toolbar=no,location=no,directories=no,copyhistory=no,status=no,scrollbars=yes,resizable=yes');
+}
+// logger
+function WCLog(msg) {
+ if (!!window.console && !!console.log) {
+ console.log(msg);
+ } else if (!!window.opera && !!opera.postError) {
+ opera.postError(msg);
+ } else {
+ wc_log += msg + "\r\n";
+ }
+}
+
+function RefreshSMTPqueueDisplay() {
+ new Ajax.Updater('smtpqueue_inner_div',
+ 'display_smtpqueue_inner_div', { method: 'get',
+ parameters: Math.random() } );
+}
+
+function DeleteSMTPqueueMsg(msgnum1, msgnum2) {
+ var p = encodeURI('g_cmd=DELE ' + msgnum1 + ',' + msgnum2);
+ new Ajax.Request(
+ 'ajax_servcmd', {
+ method: 'post',
+ parameters: p,
+ onComplete: RefreshSMTPqueueDisplay()
+ }
+ );
+}
+
+
+function ConfirmLogoff() {
+ new Ajax.Updater(
+ 'md-content',
+ 'do_template?template=confirmlogoff',
+ {
+ method: 'get',
+ evalScripts: true,
+ onSuccess: function(cl_success) {
+ toggleModal(1);
+ }
+ }
+ );
+}
+
+
+function switch_to_lang(new_lang) {
+ p = 'push?url=' + encodeURI(window.location);
+ new Ajax.Request(p, { method: 'get' } );
+ window.location = 'switch_language?lang=' + new_lang ;
+}
+
+
+function toggle_roomlist()
+{
+ /* WARNING: VILE, SLEAZY HACK. We determine the state of the box based on the image loaded. */
+ if ( $('expand_roomlist').src.substring($('expand_roomlist').src.length - 12) == "collapse.gif" ) {
+ $('roomlist').style.display = 'none';
+ $('expand_roomlist').src = 'static/webcit_icons/expand.gif';
+ wstate=0;
+ }
+
+ else {
+ $('roomlist').style.display = 'block';
+ $('expand_roomlist').src = 'static/webcit_icons/collapse.gif';
+ $('roomlist').innerHTML = '';
+ FillRooms(IconBarRoomList);
+ wstate=1;
+ }
+
+ // tell the server what I did
+ p = 'toggle_roomlist_expanded_state?wstate=' + wstate + '?rand=' + Math.random() ;
+ new Ajax.Request(p, { method: 'get' } );
+
+ return false; /* this prevents the click from registering as a roomlist button press */
+}
+
+
+function toggle_wholist()
+{
+ /* WARNING: VILE, SLEAZY HACK. We determine the state of the box based on the image loaded. */
+ if ( $('expand_wholist').src.substring($('expand_wholist').src.length - 12) == "collapse.gif" ) {
+ $('online_users').style.display = 'none';
+ $('expand_wholist').src = 'static/webcit_icons/expand.gif';
+ wstate=0;
+ }
+
+ else {
+ $('online_users').style.display = 'block';
+ $('expand_wholist').src = 'static/webcit_icons/collapse.gif';
+ activate_iconbar_wholist_populat0r();
+ wstate=1;
+ }
+
+ // tell the server what I did
+ p = 'toggle_wholist_expanded_state?wstate=' + wstate + '?rand=' + Math.random() ;
+ new Ajax.Request(p, { method: 'get' } );
+
+ return false; /* this prevents the click from registering as a wholist button press */
+}
+
+