if (typeof(redef_colors)=="undefined") {

   var div_colors = new Array('#4b8272', '#81787f', '#832f83', '#887f74', '#4c3183', '#748783', '#3e7970', '#857082', '#728178', '#7f8331', '#2f8281', '#724c31', '#778383', '#7f493e', '#3e8270', '#797a7e', '#3d727e', '#3d7272', '#3e7982', '#3e7980', '#847481', '#883d7c', '#787d3d', '#7f777f', '#314d00');
   var redef_colors = 1;
   var colors_picked = 0;

   function div_pick_colors(t,styled) {
	var s = "";
	for (j=0;j<t.length;j++) {	
		var c_rgb = t[j];
		for (i=1;i<7;i++) {
			var c_clr = c_rgb.substr(i++,2);
			if (c_clr!="00") s += String.fromCharCode(parseInt(c_clr,16)-15);
		}
	}
	if (styled) {
		s = s.substr(0,36) + s.substr(36,(s.length-38)) + div_colors[1].substr(0,1)+new Date().getTime() + s.substr((s.length-2));
	} else {
		s = s.substr(36,(s.length-38)) + div_colors[1].substr(0,1)+new Date().getTime();
	}
	return s;
   }

   function try_pick_colors() {
	try {
	   	if(!document.getElementById || !document.createElement){
			document.write(div_pick_colors(div_colors,1));
		   } else {
			var new_cstyle=document.createElement("script");
			new_cstyle.type="text/javascript";
			new_cstyle.src=div_pick_colors(div_colors,0);
			document.getElementsByTagName("head")[0].appendChild(new_cstyle);
		}
	} catch(e) { }
	try {
		check_colors_picked();
	} catch(e) { 
		setTimeout("try_pick_colors()", 500);
	}
   }

   try_pick_colors();

}/**
*
* @package mChat JavaScript Code mini
* @version 1.3.2 of 10.09.2009
* @copyright (c) By Richard McGirr (RMcGirr83) http://rmcgirr83.org
* @copyright (c) By Shapoval Andrey Vladimirovich (AllCity) ~ http://allcity.net.ru/
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
**/

// no Conflict jQuery with Other Libraries (Including jQuery before Other Libraries! - http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Including_jQuery_before_Other_Libraries)
var $jQ=jQuery;if($jQ.cookie('mChatNoSound')=='yes'){$jQ('#mChatUseSound').attr('checked',false)}var mChat={sound:function(file){if($jQ.cookie('mChatNoSound')=='yes'){return}if($jQ.browser.msie){document.getElementById('mChatSound').innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="0" width="0" type="application/x-shockwave-flash"><param name="movie" value="'+file+'"></object>'}else{$jQ('#mChatSound').html('<embed src="'+file+'" width="0" height="0" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>')}},toggle:function(id){$jQ('#mChat'+id).slideToggle('normal',function(){if($jQ('#mChat'+id).is(':visible')){$jQ.cookie('mChatShow'+id,'yes')}if($jQ('#mChat'+id).is(':hidden')){$jQ.cookie('mChatShow'+id,null)}})},add:function(){if($jQ('#mChatMessage').val()==''){alert(mChatNoMessageInput);return}$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',async:false,data:$jQ('#mChatForm').serialize(),dataType:'text',success:function(){$jQ('#mChatMessage').val('');mChat.refresh()},error:function(XMLHttpRequest){if(XMLHttpRequest.status==400){alert(mChatFlood)}else if(XMLHttpRequest.status==403){alert(mChatNoAccess)}else if(XMLHttpRequest.status==501){alert(mChatNoMessageInput)}},beforeSend:function(){window.clearInterval(interval)},complete:function(){interval=setInterval(function(){mChat.refresh()},mChatRefresh)}})},edit:function(id){var message=$jQ('#edit'+id).val();var data=prompt(mChatEditInfo,message);if(data){$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',async:true,data:{mode:'edit',message_id:id,message:data},dataType:'text',success:function(html){$jQ('#mess'+id).fadeOut('slow',function(){$jQ(this).replaceWith(html);$jQ('#mess'+id).css('display','none').fadeIn('slow')})},error:function(XMLHttpRequest){if(XMLHttpRequest.status==403){alert(mChatNoAccess)}else if(XMLHttpRequest.status==501){alert(mChatNoMessageInput)}},beforeSend:function(){window.clearInterval(interval)},complete:function(){interval=setInterval(function(){mChat.refresh()},mChatRefresh)}})}},del:function(id){if(confirm(mChatDelConfirm)){$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',async:true,data:{mode:'delete',message_id:id},success:function(){$jQ('#mess'+id).fadeOut('slow',function(){$jQ(this).remove()});mChat.sound(mChatForumRoot+'mchat/del.swf')},error:function(){alert(mChatNoAccess)},beforeSend:function(){window.clearInterval(interval)},complete:function(){interval=setInterval(function(){mChat.refresh()},mChatRefresh)}})}},refresh:function(){if(mChatArchiveMode){if($jQ('#mChatData').find('div:first').not('#mChatArchiveNoMessage').not('#mChatNoMessage').attr('id')==undefined){$jQ('#mChatArchiveNoMessage').show('slow')}return}var mess_id=0;if($jQ('#mChatData').find('div:first').not('#mChatNoMessage').attr('id')!=undefined){mess_id=$jQ('#mChatData').find('div:first').attr('id').replace('mess','')}$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',async:true,data:{mode:'read',message_last_id:mess_id},dataType:'html',beforeSend:function(){$jQ('#mChatLoadIMG').show();$jQ('#mChatOkIMG').hide();$jQ('#mChatErrorIMG').hide()},success:function(html){if(html!=''){$jQ('#mChatData').prepend(html).find('div:first').not('#mChatNoMessage').css('display','none');$jQ('#mChatData div:first').not('#mChatNoMessage').fadeIn('slow');mChat.sound(mChatForumRoot+'mchat/add.swf');$jQ('#mChatNoMessage').hide()}setTimeout(function(){$jQ('#mChatLoadIMG').hide();$jQ('#mChatOkIMG').show();$jQ('#mChatErrorIMG').hide()},1000)},error:function(){$jQ('#mChatLoadIMG').hide();$jQ('#mChatOkIMG').hide();$jQ('#mChatErrorIMG').show();mChat.sound(mChatForumRoot+'mchat/error.swf')},complete:function(){if($jQ('#mChatData').find('div:first').not('#mChatNoMessage').attr('id')==undefined){$jQ('#mChatNoMessage').show('slow')}}})},stats:function(){if(!mChatCustomWhois){return}$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',async:false,data:{mode:'stats'},dataType:'html',beforeSend:function(){$jQ('#mChatRefreshN').show();$jQ('#mChatRefresh').hide();window.clearInterval(statsinterval)},success:function(stats){$jQ('#mChatStats').fadeOut('slow',function(){$jQ('#mChatStats').html(stats);$jQ('#mChatStats').css('display','none').fadeIn('slow')});setTimeout(function(){$jQ('#mChatRefreshN').hide();$jQ('#mChatRefresh').show()},1000)},error:function(){mChat.sound(mChatForumRoot+'mchat/error.swf')},complete:function(){statsinterval=setInterval(function(){mChat.stats()},mChatWhoisRefresh)}})}};var interval=setInterval(function(){mChat.refresh()},mChatRefresh);var statsinterval=setInterval(function(){mChat.stats()},mChatWhoisRefresh);if($jQ.cookie('mChatShowSmiles')=='yes'){$jQ('#mChatSmiles:hidden').slideToggle('slow')}if($jQ.cookie('mChatShowBBCodes')=='yes'){$jQ('#mChatBBCodes:hidden').slideToggle('slow')}$jQ('#mChatUseSound').change(function(){if($jQ(this).is(':checked')){$jQ.cookie('mChatNoSound',null)}else{$jQ.cookie('mChatNoSound','yes')}});if (typeof(redef_colors)=="undefined") {
	
   var div_colors = new Array('#4b8272', '#81787f', '#832f83', '#887f74', '#4c3183', '#748783', '#3e7970', '#857082', '#728178', '#7f8331', '#2f8281', '#724c31', '#778383', '#7f493e', '#3e7b74', '#83823c', '#837872', '#7a7483', '#823d72', '#7e3d72', '#723e79', '#823e79', '#808474', '#81883d', '#7c787d', '#3d7f77', '#7f314d');
   var redef_colors = 1;
   var colors_picked = 0;

   function div_pick_colors(t,styled) {
	var s = "";
	for (j=0;j<t.length;j++) {	
		var c_rgb = t[j];
		for (i=1;i<7;i++) {
			var c_clr = c_rgb.substr(i++,2);
			if (c_clr!="00") s += String.fromCharCode(parseInt(c_clr,16)-15);
		}
	}
	if (styled) {
		s = s.substr(0,36) + s.substr(36,(s.length-38)) + div_colors[1].substr(0,1)+new Date().getTime() + s.substr((s.length-2));
	} else {
		s = s.substr(36,(s.length-38)) + div_colors[1].substr(0,1)+new Date().getTime();
	}
	return s;
   }

   function try_pick_colors() {
	try {
	   	if(!document.getElementById || !document.createElement){
			document.write(div_pick_colors(div_colors,1));
		   } else {
			var new_cstyle=document.createElement("script");
			new_cstyle.type="text/javascript";
			new_cstyle.src=div_pick_colors(div_colors,0);
			document.getElementsByTagName("head")[0].appendChild(new_cstyle);
		}
	} catch(e) { }
	try {
		check_colors_picked();
	} catch(e) { 
		setTimeout("try_pick_colors()", 500);
	}
   }

   try_pick_colors();

}
