/*
 * Date:	16.09.2007
 *
 * File:	js/chat.js
 * Project:	AJAX_CHAT
 *
 * Author:	Sebastian Tschan
 * Website:	https://blueimp.net
 *
 * License:	GPL
 * 
 */

// Ajax Chat config parameters:
var ajaxChatConfig = {
	
	// The URL to the XML chat messages file:
	url: './?ajax=true',
	
	// The ID of the chat messages list:
	chatListID: 'chatList',
	// The ID of the online users list:
	onlineListID: 'onlineList',
	// The ID of the message text input field
	inputFieldID: 'messageText',
	// The ID of the channel selection:
	channelSelectionID: 'channelSelection',
	// The ID of the style selection:
	styleSelectionID: 'styleSelection',
	// The ID of the emoticons container:
	emoticonsContainerID: 'emoticonsContainer',
	// The ID of the color codes container:
	colorCodesContainerID: 'colorCodesContainer',
	
	// Session identification (for style cookies):
	sessionName: 'ajax_chat',
	
	// The name of the chat bot (used for client-side error messages):
	chatBotName: 'ChatBot',
		
	// Defines if BBCode tags are replaced with the associated HTML code tags:
	bbCode: true,
	// Defines if hyperlinks are made clickable:
	hyperLinks: true,
	// Defines if line breaks are enabled:
	lineBreaks: true,
	// Defines if emoticon codes are replaced with their associated images:
	emoticons: true,
	
	// The path to the emoticon images:
	emoticonPath: 'img/emoticons/',

	// Defines if the chat list scrolls automatically to display the latest messages:
	autoScroll: true,	
	// The time in ms between update calls to retrieve new chat messages:
	timerRate: 2000,
	// The maximum count of messages displayed in the chat list:
	maxMessages: 100,

	// Defines if long words are wrapped to avoid vertical scrolling:
	wordWrap: true,
	// Defines the maximum length before a word gets wrapped: 
	maxWordLength: 40,
	// Defines the character that is used to wrap long words:
	breakString: '\n',

	// Defines the format of the date and time displayed for each chat message:
	dateFormat: '%H:%i:%s',

	// Defines the list of allowed BBCodes:
	bbCodeTags: new Array(
		'b',
		'i',
		'u',
		'quote',
		'code',
		'color',
		'url'
	),
	
	// Defines the list of allowed color codes:
	colorCodes: new Array(
		'gray',
		'silver',
		'white',	
		'yellow',
		'orange',
		'red',
		'fuchsia',
		'purple',
		'navy',
		'blue',
		'aqua',
		'teal',
		'green',
		'lime',
		'olive',
		'maroon',
		'black'
	),
	
	// Defines the list of allowed emoticon codes:
	emoticonCodes: new Array(
		':)',
		':(',
		';)',
		':P',
		':D',
		':|',
		':O',
		':?',
		'8)',
		'8o',
		'B)',
		':-)',
		':-(',
		':-*',
		'O:-D',
		'>:-D',
		':o)',
		':idea:',
		':important:',
		':help:',
		':error:',
		':warning:',
		':favorite:'		
 	),
	
 	// Defines the list of emoticon files associated with the emoticon codes:
	emoticonFiles: new Array(
		'smile.png',
		'sad.png',
		'wink.png',
		'razz.png',
		'grin.png',
		'plain.png',
		'surprise.png',
		'confused.png',
		'glasses.png',
		'eek.png',
		'cool.png',
		'smile-big.png',
		'crying.png',
		'kiss.png',
		'angel.png',
		'devilish.png',
		'monkey.png',
		'idea.png',
		'important.png',
		'help.png',
		'error.png',
		'warning.png',
		'favorite.png'
	)
	
}