// We like ugly fixes.
is_ie				= false;  // Important!
is_pro				= '1';
var forum_url		= 'http://www.pascal-kipushi.be/';
var correct			= '0';  // Display the sound (0) or correct minutes for new messages (1)
var sound			= 'new/effect34.swf';  // The sound for new messages
var error_sound		= 'error/alarme2.swf';  // The sound for errors
var del_sound		= 'del/cartoon1.swf';  // The sound for delete messages
var rules_ok		= '0';  // To display the rules
var sort_shout		= 'normal';  // To enable sort shoutbox
var delete_url		= './ajax.php?m=delete';  // delete url
var edit_url		= './ajax.php?m=edit';  // Edit url
var version_url		= './ajax.php?m=version';  // Version url
var lang_direction	= 'left';  // To write the shoutbox with ltr or rtl languages
var see_buttons		= '0';  // To see top buttons when no permissions to use it
var see_buttonsleft	= '0';  // To see left buttons when no permissions to use it
var bar_haute		= '1';  // 1 to see the post bar in the top, 0 on bottom
var sort_pagin		= '1';  // 1 to see the pagination in the post bar, 0 on bottom
var post_ok			= '0';  // Is able to post?
var smilies_ok		= '0';  // Is able to use smilies?
var image_ok		= '0';  // Is able to post images?
var color_ok		= '0';  // Is able to use color?
var bbcode_ok		= '0';  // Is able to use bbcodes?
var chars_ok		= '0';  // Is able to use special chars?
var popup_ok		= '0';  // Is able to use popup?
var purge_ok		= '0';  // Is able to use purge?
var priv_ok			= '0';  // Is able to enter in private shoutbox?
var print_ver		= 'Breizh Shoutbox v1.3.0';
var print_ver_alt	= 'Breizh Shoutbox v1.3.0 © 2010';
var print_perm		= '...Vous devez être enregistré pour poster des messages...';  // Message to display when not able to post


function shout_popup(pop_url, larg, haut)
{
	popup(pop_url, larg, haut, '_blank', "toolbar=0,menubar=0,scrollbars=0,statusbar=0,copyhistory=0,directories=0");
	return false;
}

function shout_priv(url)
{
	window.open(url); 
	return false;
}

function more_smilies()
{
	popup('./ajax.php?m=smilies_popup', '600', '450', '_phpbbsmilies');
	return false;
}

function load_shout()
{
	try
	{
		var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
		if (display_shoutbox == false)
		{
			return;
		}
		
		if (document.getElementById('shoutbox') == null)
		{
		
			var ev = err_msg('La div shoutbox ne peut pas être trouvée.', true);
			ev.name = 'E_CORE_ERROR';
			throw ev; 
			return;
		}
		else
		{
			div = document.getElementById('shoutbox');
			div.innerHTML = '';

			// Display message ;)
			message('Chargement...');
			// HTTP vars, required to relead/post things.
			hin = http();
			if (!hin){return;}
			hin2 = http();
			huit = http();	
			hsmilies = http();
			hnr = http();
						// Div exists in the html, write it.
			write_main();
		}
	}
	catch (e)
	{
		handle(e);
		return;
	}
}

function write_main()
{
	try
	{
		// Write the base.

		var base = ce('ul');
		base.className = 'topiclist forums';
		base.id = 'base_ul'
		base.style.height = '97%';

		if(is_pro == true){var li = ce('li')}else{var li = ce('table')};
		li.style.display = 'none';
		li.className = 'button_background button_background_transparent';
		if(is_pro == true){var dl = ce('dl')}else{var dl = ce('tr')};
		dl.style.width = '100%';
		if(is_pro == true){var posting_form = ce('dt')}else{var posting_form = ce('td')};
		posting_form.id = 'post_message';
		posting_form.className = 'row';
		posting_form.style.display = 'block';
		posting_form.style.paddingTop = '3px';
		posting_form.style.paddingBottom = '3px';
		posting_form.style.verticalAlign = 'middle';
		posting_form.height = '20px';
		if(post_ok == false && sort_pagin == false){posting_form.style.cssFloat = posting_form.style.styleFloat = 'none';}else{posting_form.style.cssFloat = posting_form.style.styleFloat = lang_direction;}
		if(bar_haute == false && sort_pagin == false && post_ok == true){posting_form.style.width = '100%';}else if(post_ok == false && sort_pagin == false){posting_form.style.width = '100%';}else{posting_form.style.width = 'auto';}
		if(post_ok == false && sort_pagin == true){posting_form.style.paddingLeft = '60px';}
		
		var posting_box = ce('form');
		posting_box.id = 'chat_form';
		posting_box.style.height = 'auto';
		if (sort_pagin == true){posting_box.style.cssFloat = posting_box.style.styleFloat = lang_direction;posting_form.style.marginTop = '1px';posting_form.style.width = 'auto';}
		
					li.style.display = 'block';li.style.textAlign = 'center';li.style.padding = '3px';li.style.borderBottom = '1px solid #00608F';
			if (sort_pagin == true)
			{
				if(is_pro == true){var pagin = ce('dd');}
				else{var pagin = ce('td');pagin.align = 'right';};
				pagin.id = 'nr';pagin.className = 'pagination gensmall';pagin.style.marginTop = '0px';pagin.style.paddingTop = '1px';pagin.style.paddingBottom = '1px';
				pagin.style.height = 'auto';pagin.style.width = 'auto';pagin.style.cssFloat = pagin.style.styleFloat = 'right';pagin.style.borderLeft = '0';
				dl.appendChild(pagin);
			}
			posting_form.appendChild(posting_box);
			dl.appendChild(posting_form);
			li.appendChild(dl);
			base.appendChild(li);
			posting_box.appendChild(tn(print_perm));
			posting_box.appendChild(tn(' '));
				
		// The div for infos and error message
		var msg_txt = ce('div');
		msg_txt.id = 'msg_txt';
		msg_txt.appendChild(tn(''));
		base.appendChild(msg_txt);
		
		var d_shout = document.getElementById('shout1');
		var t_shout = document.getElementById('shout2');
		if (lang_direction == 'right'){t_shout.style.styleFloat = t_shout.style.cssFloat = 'left';t_shout.style.paddingLeft = '10px';}else{t_shout.style.styleFloat = t_shout.style.cssFloat = 'right';t_shout.style.paddingRight = '10px';}
		if (!t_shout || !d_shout){throw err_msg(lang['MISSING_DIV']);}
		d_shout.innerHTML='<a href="http://breizh-portal.com/index.html">Insertion rapide: commentaires, suggestions...</a>';t_shout.innerHTML = '<a href="http://breizh-portal.com/mod-breizh-shoutbox-f21.html">© Breizh Shoutbox v1.3.0</a>';

		//In this div, the chats will be placed ;)
		var post = ce('div');
		post.style.display = 'block';post.id = 'msg';post.style.width = '99.5%';post.style.overflowX = 'hidden';
		post.style.height = '200px';post.style.overflowY = 'auto';		post.appendChild(tn('Chargement...'));
		base.appendChild(post);

		if (bar_haute == false && post_ok == true)
		{
			posting_form.appendChild(posting_box);
			if (sort_pagin == true)
			{
				var pagin = ce('form');
				pagin.id = 'nr';pagin.className = 'pagination';
				pagin.style.marginTop = '0px';pagin.style.padding = '4px';pagin.style.height = 'auto';pagin.style.width = 'auto';
				pagin.style.backgroundImage = 'none';pagin.style.marginRight = '3px';pagin.style.cssFloat = pagin.style.styleFloat = 'right';pagin.style.borderLeft = '0';
				posting_form.appendChild(pagin);
			}
			
			dl.style.borderTop = '3px';
			dl.appendChild(posting_form);
			li.appendChild(dl);
			base.appendChild(li);
			
		}
		if (sort_pagin == false || post_ok == false && sort_pagin == false)
		{
			var pagindiv = ce('div');
			var pagin = ce('li');
			pagin.id = 'nr';pagin.className = 'button_background button_background_transparent pagination';
			pagin.style.textAlign = lang_direction;pagin.style.marginTop = '0px';pagin.style.paddingTop = '2px';pagin.style.paddingBottom = '2px';pagin.style.height = '16px';pagin.style.width = '100%';
			pagindiv.appendChild(pagin);
			base.appendChild(pagindiv);
		}
		
		div.innerHTML = '';
		div.appendChild(base);
		if (!t_shout || !d_shout){throw err_msg(lang['MISSING_DIV']);}
		// Everyting loaded, lets select posts :)
		reload_post();
		reload_page();
	}
	catch (e)
	{
		handle(e);
		return;
	}
}

function reload_page()
{
	if (hnr.readyState == 4 || hnr.readyState == 0)
	{
	    if (error_number > 8)
	    {
	        return;
		}

		// Lets got some nice things :D
		hnr.open('GET','./ajax.php?m=number&rand='+Math.floor(Math.random() * 1000000),true);
		var d_shout = document.getElementById('shout1');
		var t_shout = document.getElementById('shout2');

		hnr.onreadystatechange = function()
		{
			try
			{
				if (hnr.readyState != 4)
				{
					return;
				}
				if (hnr.readyState == 4)
				{
					xml = hnr.responseXML;
					
					if (xml.getElementsByTagName('error') && xml.getElementsByTagName('error').length != 0)
					{
						err = xml.getElementsByTagName('error')[0].childNodes[0].nodeValue;
						message(err, true);
						return;
					}

					if (typeof xml != 'object' || xml.getElementsByTagName('nr').length <= 0)
					{
						play_sound(error_sound, 2);
						throw err_msg(lang['SERVER_ERR']);
						return;
					}
					if (!t_shout || !d_shout){throw err_msg(lang['MISSING_DIV']);}

					var nr = xml.getElementsByTagName('nr')[0].childNodes[0].nodeValue;
					var f = document.getElementById('nr');f.innerHTML = '';
					var d = ce('div');

					if (nr < 20){return;}

					var per_page = 20;
					var total_pages = Math.ceil(nr / per_page);
					var is_page = 'Page N° ';
					if (total_pages == 1 || !nr){return;}
					on_page = Math.floor(count / per_page) + 1;

					var p = ce('span');
					var a = ce('a');
					var b = ce('strong');
					p.style.display = 'inline';p.style.verticalAlign = 'middle';p.style.paddingLeft = '8px';

					if (on_page == 1)
					{
						b.appendChild(tn('1'));b.title = is_page+'1';
						p.appendChild(b);
						b = ce('strong');
					}
					else
					{
						a.c = ((on_page - 2) * per_page);a.href = 'javascript:;';a.title = 'Précédente';
						a.onclick = function(){count = this.c;last = 0;clearTimeout(timer_in);reload_post();reload_page();}
						a.appendChild(tn('Précédente'));
						p.appendChild(a);p.appendChild(tn(' '));

						a = ce('a');a.c = 0;a.href = 'javascript:;';a.title = is_page+'1';
						a.onclick = function(){count = this.c;last = 0;clearTimeout(timer_in);reload_post();reload_page();}
						a.appendChild(tn('1'));
						p.appendChild(a);
						a = ce('a');
					}

					if (total_pages > 5)
					{
						var start_cnt = Math.min(Math.max(1, on_page - 4), total_pages - 5);
						var end_cnt = Math.max(Math.min(total_pages, on_page + 4), 6);

						p.appendChild((start_cnt > 1) ? tn(' ... ') : cp());

						for (var i = start_cnt + 1; i < end_cnt; i++)
						{
							if (i == on_page)
							{
								b.appendChild(tn(i));b.title = is_page+on_page;
								p.appendChild(b);
								b = ce('strong');
							}
							else
							{
								a.c = (i - 1) * per_page;a.href = 'javascript:;';a.title = is_page+i;
								a.onclick = function(){count = this.c;last = 0;clearTimeout(timer_in);reload_post();reload_page();}
								a.appendChild(tn(i));
								p.appendChild(a);
								a = ce('a');
							}
							if (i < end_cnt - 1)
							{
								p.appendChild(cp());
							}
						}
						p.appendChild((end_cnt < total_pages) ? tn(' ... ') : cp());
					}
					else
					{
						p.appendChild(cp());
						for (var i = 2; i < total_pages; i++)
						{
							if (i == on_page)
							{
								b.appendChild(tn(i));b.title = is_page+on_page;
								p.appendChild(b);
								b = ce('strong');
							}
							else
							{
								a.c = (i - 1) * per_page;a.href = 'javascript:;';a.title = is_page+i;
								a.onclick = function(){count = this.c;last = 0;clearTimeout(timer_in);reload_post();reload_page();}
								a.appendChild(tn(i));
								p.appendChild(a);
								a = ce('a');
							}
							if (i < total_pages)
							{
								p.appendChild(cp());
							}
						}
					}

					if (on_page == total_pages)
					{
						b.appendChild(tn(total_pages));b.title = is_page+on_page;
						p.appendChild(b);
						b = ce('strong');
					}
					else
					{
						a = ce('a');a.c = ((total_pages - 1) * per_page);a.href = 'javascript:;';a.title = is_page+total_pages;
						a.onclick = function(){count = this.c;last = 0;clearTimeout(timer_in);reload_post();reload_page();}
						a.appendChild(tn(total_pages));

						p.appendChild(a);
						a = ce('a');a.c = ((on_page) * per_page);a.href = 'javascript:;';a.title = 'Suivante';
						a.onclick = function(){count = this.c;last = 0;clearTimeout(timer_in);reload_post();reload_page();}
						a.appendChild(tn('Suivante'));
						p.appendChild(tn(' '));p.appendChild(a);
					}
					f.appendChild(p);
				}
			}
			catch (e)
			{
				handle(e);
				clearTimeout(timer_in);
				return;
			}
		}
		hnr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');

		hnr.send(null);
	}
}

function reload_post()
{
	// If there is a open edit field, we dont reload.
	// If we reload, this edit field will be closed, and data lost.
	if (one_open)
	{
	    timer_in = setTimeout('reload_post();',3000);
		return;
	}
	
    if (error_number > 8)
    {
        return;
	}
	
	// First check if there new posts.
	if (hin2.readyState == 4 || hin2.readyState == 0)
	{
		hin2.open('GET','./ajax.php?m=check&last='+last+'&rand='+Math.floor(Math.random() * 1000000),true);
		hin2.onreadystatechange = function()
		{
			try
			{
				if (hin2.readyState != 4)
				{
					return;
				}
				if (hin2.readyState == 4)
				{
					if (!hin2.responseXML)
					{
						throw err_msg('Erreur XML, rafraichissez la page...');
					}
					var xml = hin2.responseXML;		
					
					if (typeof xml != 'object')
					{
						play_sound(error_sound, 2);
						throw err_msg(lang['SERVER_ERR']);
						return;
					}
					
					if (xml.getElementsByTagName('error') && xml.getElementsByTagName('error').length != 0)
					{
						err = xml.getElementsByTagName('error')[0].childNodes[0].nodeValue;
						throw err_msg(err, true);
						return;
					}
					
					if (xml.getElementsByTagName('time').length <= 0 || xml.getElementsByTagName('time')[0].childNodes.length <= 0)
					{
						play_sound(error_sound, 2);
						throw err_msg(lang['SERVER_ERR']);
						return;
					}
					
					var t = xml.getElementsByTagName('time')[0].childNodes[0].nodeValue;
					if (t == '0')
					{
						// If start is true, we let notice that there are no messages
						if (start == true)
						{
							if (post_ok == true && first)
							{
								document.getElementById('post_message').style.display = 'inline';
								first = false;
							}
							
							var posts = document.getElementById('msg');
							posts.innerHTML = '';
							posts.appendChild(tn('Il n’y a aucun message'));
						}
					}
					else
					{
						if (hin.readyState == 4 || hin.readyState == 0)
						{
							last = xml.getElementsByTagName('last')[0].childNodes[0].nodeValue;
							// Lets got some nice things :D
							hin.open('GET','./ajax.php?m=view&start='+count+'&rand='+Math.floor(Math.random() * 1000000),true);
							hin.onreadystatechange = function()
							{
								try
								{
									if (hin.readyState != 4)
									{
										return;
									}
									if (hin.readyState == 4)
									{
										if (!hin.responseXML)
										{
											throw err_msg('Erreur XML, rafraichissez la page...');
											return;
										}
										var xml = hin.responseXML;
										
										if (typeof xml != 'object')
										{
											play_sound(error_sound, 2);
											throw err_msg(lang['SERVER_ERR']);
											return;
										}
										
										if (xml.getElementsByTagName('error') && xml.getElementsByTagName('error').length != 0)
										{
											var msg = xml.getElementsByTagName('error')[0].childNodes[0].nodeValue;
											throw err_msg(msg, true);
											return;
										}
										else
										{
											start = false;
											var tmp = xml.getElementsByTagName('posts');
											if (tmp.length == 0)
											{
												if (post_ok == true)
												{
													if (first)
													{
														document.getElementById('post_message').style.display = 'inline';
														first = false;
													}
												}
												
												var posts = document.getElementById('msg');
												posts.innerHTML = '';
												posts.appendChild(tn('Il n’y a aucun message'));
												timer_in = setTimeout('reload_post();',4000);
												return;
											} 
											var posts = document.getElementById('msg');
											posts.innerHTML = '';
											
											if (last != 0 && correct == false)
											{
												play_sound(sound, 1);
											}
											
											var row = false;
											for (var i = 0; i < tmp.length; i++)
											{
												var li = ce('li');
												li.className = (!row) ? 'row row1' : 'row row2';li.style.width = '100%';li.style.padding = '0';
												if(is_pro == false){li.style.borderBottom = '1px solid #b0c4de';}
												row = !row;
												
												var dl = ce('dl');
												var dd = ce('dt');
												var dt = ce('dd');
												var inh = tmp[i];
												
												dd.className = 'button_background button_background_transparent';
												dd.style.width = 'auto';dd.style.styleFloat = dd.style.cssFloat = lang_direction;
												dt.style.width = 'auto';dt.id = 'ddshout' + i;dt.style.display = 'inline';dt.style.styleFloat = dt.style.cssFloat = lang_direction;
												
												if (lang_direction == 'left')
												{
													dt.style.paddingLeft = '3px';
													dt.style.paddingRight = '5px';
												}else{
													dt.style.paddingLeft = '5px';
													dt.style.paddingRight = '3px';
												}
												dt.style.bottom = '0';

												var s = ce('span');
												var msg = parse_xml_to_html(inh.getElementsByTagName('shout_text')[0]);
												
												if (lang_direction == 'left')
												{
													dt.appendChild(parse_xml_to_html(inh.getElementsByTagName('shout_time')[0]));
													if (inh.getElementsByTagName('avatar').length != 0 &&  inh.getElementsByTagName('avatar')[0].childNodes.length != 0){dt.appendChild(tn(' ¦ '));dt.appendChild(parse_xml_to_html(inh.getElementsByTagName('avatar')[0]));dt.appendChild(tn(' ¦ '));}
													else{dt.appendChild(tn(' ¦ '));}
													dt.appendChild(parse_xml_to_html(inh.getElementsByTagName('username')[0]));
													dt.appendChild(tn(':'));
												}else{
													dt.appendChild(parse_xml_to_html(inh.getElementsByTagName('shout_time')[0]));
													if (inh.getElementsByTagName('avatar').length != 0 &&  inh.getElementsByTagName('avatar')[0].childNodes.length != 0){dt.appendChild(tn(' ¦ '));dt.appendChild(parse_xml_to_html(inh.getElementsByTagName('avatar')[0]));dt.appendChild(tn(' ¦ '));}
													else{dt.appendChild(tn(' ¦ '));}
													dt.appendChild(parse_xml_to_html(inh.getElementsByTagName('username')[0]));
													dt.appendChild(tn(':'));
												}
												
												if (inh.getElementsByTagName('delete').length >= 1 && inh.getElementsByTagName('delete')[0].childNodes.length >= 1 && inh.getElementsByTagName('delete')[0].childNodes[0].nodeValue == 1){var ok_delete = true;}else{var ok_delete = false;}
												if (inh.getElementsByTagName('edit').length >= 1 && inh.getElementsByTagName('edit')[0].childNodes.length >= 1 && inh.getElementsByTagName('edit')[0].childNodes[0].nodeValue == 1){var ok_edit = true;}else{var ok_edit = false;}
												if (inh.getElementsByTagName('show_ip').length >= 1 && inh.getElementsByTagName('show_ip')[0].childNodes.length >= 1 && inh.getElementsByTagName('show_ip')[0].childNodes[0].nodeValue == 1){var ok_info = true;}else{var ok_info = false;}
												delete_button = ce('input');delete_button.post_id = inh.getElementsByTagName('shout_id')[0].childNodes[0].nodeValue;delete_button.type = 'button';
												if (ok_delete == true)
												{
													delete_button.className = 'button_shout_del button_shout_l';delete_button.style.display = 'inline';delete_button.title = 'Supprimer le message';
													delete_button.onclick = function(){this.style.display = 'none';if (confirm('Êtes vous sûr de vouloir supprimer ce message?')){delete_message(this.post_id);}else{this.style.display = 'inline';}}
													dd.appendChild(delete_button);
												}else{
													if (see_buttonsleft == true)
													{
														delete_button.className = 'button_shout_del_no button_shout_l';delete_button.style.display = 'inline';delete_button.title = 'Vous n’êtes pas autorisé à supprimer le message...';
														delete_button.onclick = function(){alert('Vous n’êtes pas autorisé à supprimer le message...');}
														dd.appendChild(delete_button);
													}else{ delete_button.style.display = 'none';}
												}
												
												edit_button = ce('input');edit_button.post_id = inh.getElementsByTagName('shout_id')[0].childNodes[0].nodeValue;edit_button.type = 'button';
												if (ok_edit == true)
												{
													edit_button.style.display = 'inline';edit_button.className = 'button_shout_edit button_shout_l';edit_button.title = 'Éditer le message';
													dd.appendChild(edit_button);
												}else{
													if (see_buttonsleft == true)
													{
														edit_button.style.display = 'inline';edit_button.className = 'button_shout_edit_no button_shout_l';edit_button.title = 'Vous n’êtes pas autorisé à éditer le message...';edit_button.onclick = function(){alert('Vous n’êtes pas autorisé à éditer le message...');}
														dd.appendChild(edit_button);
													}else{ edit_button.style.display = 'none';}
												}
												
												info_button = ce('input');info_button.post_id = inh.getElementsByTagName('shout_id')[0].childNodes[0].nodeValue;info_button.type = 'button';
												if (ok_info == true)
												{
													var textalerte = 'IP de l’auteur du message:';
													info_button.style.display = 'inline';info_button.className = 'button_shout_ip button_shout_l';info_button.title = 'Voir l’ip du posteur';info_button.ip = inh.getElementsByTagName('shout_ip')[0].childNodes[0].nodeValue;info_button.onclick = function(){alert(textalerte + '\n' + this.ip);}
													dd.appendChild(info_button);
												}else{
													if (see_buttonsleft == true)
													{
														var noiptextalerte = 'Vous n’êtes pas autorisé à voir les ip des posteurs, par contre nous voyons la vôtre...';
														info_button.style.display = 'inline';info_button.className = 'button_shout_ip_no button_shout_l';info_button.title = noiptextalerte;info_button.is_ip = inh.getElementsByTagName('is_ip')[0].childNodes[0].nodeValue;info_button.onclick = function(){alert(noiptextalerte + '\n IP: ' + this.is_ip);}
														dd.appendChild(info_button);
													}else{ info_button.style.display = 'none';}
												}
												if (ok_info == false && ok_edit == false && ok_delete == false && see_buttonsleft == false)
												{
													var dg = ce('dt');
													dg.style.styleFloat = dg.style.cssFloat = lang_direction;dg.style.paddingLeft = '0px';dg.style.paddingRight = '0px';dg.style.display = 'inline';
													dg.appendChild(tn(''));
													dl.appendChild(dg);
												}else{
													dl.appendChild(dd);
												}
												dd = ce('dd');
												if (lang_direction == 'left'){dd.style.paddingLeft = '3px';}else{dd.style.paddingRight = '3px';}

												dl.appendChild(dt);
												var msg2 = ce('span');
												msg2.style.display = 'inline';msg2.style.padding = '3px';msg2.id = 'shout' + i;msg2.i = i;
												msg2.appendChild(msg);
												edit_form = ce('span');
												var spa = ce('dd');
												spa.id = 'spa' + i;
												dd.appendChild(msg2);
												
												if (ok_edit == true)
												{
													dd = handle_edit(dd, inh, i);
													edit_form.appendChild(spa);
													dd.appendChild(edit_form);
												}
												
												dd.id = 'msgbody' + i;dd.style.width = 'auto';dd.style.styleFloat = dd.style.cssFloat = 'none';dd.style.borderLeft = 'none';
												if (lang_direction == 'left')
												{
													dd.style.paddingLeft = '3px';
													dd.style.paddingRight = '5px';
												}else{
													dd.style.paddingLeft = '5px';
													dd.style.paddingRight = '3px';
												}

												dl.appendChild(dd);
												li.appendChild(dl);
												posts.appendChild(li);

											}

											if (post_ok == true)
											{
												// Only do this when user is able to post?
												if (first)
												{
													document.getElementById('post_message').style.display = 'inline';
													first = false;
												}
											}
										}
									}
								}
								catch (e)
								{
									timer_in = setTimeout('reload_post();',3000);
									handle(e);
									return;
								}
							}
							hin.send(null);
						}
					}
					timer_in = setTimeout('reload_post();',3000);
				}
			}
			catch (e)
			{
				handle(e);
				return;
			}
		}
		hin2.send(null);
	}
}

lang['COMMA_SEPARATOR'] = ', ';
lang['NO_AJAX'] = 'Non ajax';
lang['SERVER_ERR'] = 'Quelque chose s’est mal déroulé après avoir envoyé une requête au serveur, veuillez rafraichir la page...';
lang['JS_ERR'] = 'Il y a eu une erreur JavaScript. Erreur: ';
lang['LINE'] = 'Ligne';
lang['FILE'] = 'Fichier';
lang['MSG_DEL_DONE'] = 'Message en cours de suppression...';
lang['ONLY_ONE_OPEN'] = 'Vous ne pouvez avoir qu’une seule boite d’édition ouverte';
lang['EDIT'] = 'Éditer';
lang['SHOUT_EDIT'] = 'Éditer le message';
lang['SENDING_EDIT'] = 'Publication après édition...';
lang['EDIT_DONE'] = 'Le message a été édité';
lang['CANCEL'] = 'Abandonner';
lang['PURGE_PROCESS'] = 'Purge de la shoutbox en cours...';
lang['MISSING_DIV'] = 'La div shoutbox ne peut pas être trouvée.';
lang['BOARD_PATH'] = 'http://www.pascal-kipushi.be/';
lang['IMAGE'] = '<img src="http://www.pascal-kipushi.be/images/shoutbox/loading.gif" />';

