<!--
// Hawai ¤ Coding [Rezone Part]
// Je ne protège pas ces codes, ils sont libres de droit
// mais un petit crédit ça fait toujours plaisir ;)
// #Thanks to Nob :)

var ns4 = (document.layers)? true:false;
var ie4 = (document.all)? true:false;   
var dom = (document.getElementById)? true:false;
function verif() { 
  var erreur = ""
   if(document.forms[0].name.value == "")
     {
      erreur += "Tu oublies ton pseudo\n"
     }
   if(document.forms[0].pass.value == "")
     {
      erreur += "Tu oublies ton pass\n"
     }

   if(document.forms[0].msg.value == "")
     {
      erreur += "Tu mets pas de message ???\n"
     }

   if(erreur == "")
     {
     document.forms[0].msg.value = show("showtxt").innerHTML;
     document.forms[0].submit();
     }
   else
     {
     alert (erreur + "Allez, Corrige moi ca...")
     }
 }

function refresh(){
   window.location=('forumz.php');
  }

function comite(){
   window.location=('forumcomite.php');
  }

function show(id) {
	if (dom) obj = document.getElementById(id);
	else if (ie4) obj = document.all[id];
	else if (ns4) obj = document.anchors[id];
	return obj;
}
function ajout(letxt)	{document.forms[0].msg.value=document.forms[0].msg.value + letxt;}
function addImg(){document.forms[0].msg.value=document.forms[0].msg.value + "[img][/img]";}
function addUrl(){document.forms[0].msg.value=document.forms[0].msg.value + "[url][/url]";}
function Change(txt,car,by){
var j=0
while (j!=-1) {
	j=txt.indexOf(car,j);
	if (j>=0) {
		txt=txt.substring(0,j)+by+txt.substring(j+car.length);
		j+=by.length;
	}
}
return txt
}
function prev(form){
	
	var txt = document.forms[0].msg.value;
	txt=Change(txt, "&", "&amp;");
	/*txt=Change(txt, " ", "&nbsp;");	*/
	txt=Change(txt, "<", "&lt;");
	txt=Change(txt, ">", "&gt;");
	txt=Change(txt, "[img]", "<img src='");
	txt=Change(txt, "[/img]", "' alt='Zof Rulez'>");
	txt=Change(txt, "[url]", "<a href='");
	txt=Change(txt, "[/url]", "'>lien</a>");
	txt=Change(txt, "\n", "<br>");
	txt=Change(txt, ":jeu:","<img src='http://www.atelier23.be/zof/ppc/joue.php' width='50'>");
	txt=Change(txt, ":D","<img src='images/smiley/-big.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":-D","<img src='images/smiley/-big.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":d","<img src='images/smiley/-big.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ";)","<img src='images/smiley/-eye.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ";-)","<img src='images/smiley/-eye.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":p","<img src='images/smiley/-langue.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":-p","<img src='images/smiley/-langue.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":-(","<img src='images/smiley/-pascont.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":(","<img src='images/smiley/-pc.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":)","<img src='images/smiley/-smile.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":-)","<img src='images/smiley/-smile.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, "-_-","<img src='images/smiley/-_-.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ";o(","<img src='images/smiley/;(.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ";-(","<img src='images/smiley/;(.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":berk:","<img src='images/smiley/berk.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":blah:","<img src='images/smiley/blah.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":blanc:","<img src='images/smiley/blanc.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":boulay:","<img src='images/smiley/boulay.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":s","<img src='images/smiley/dingue.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":tare:","<img src='images/smiley/dinguue.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":oh:","<img src='images/smiley/doh.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":ooh:","<img src='images/smiley/dooh.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":oooh:","<img src='images/smiley/doooh.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":fight:","<img src='images/smiley/fight.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":fou:","<img src='images/smiley/fou.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":freedent:","<img src='images/smiley/freedent.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":hum:","<img src='images/smiley/hum.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":innocent:","<img src='images/smiley/innocent.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":love:","<img src='images/smiley/love.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":macro:","<img src='images/smiley/macro.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":noel:","<img src='images/smiley/noel.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":gloups:","<img src='images/smiley/peur.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":hips:","<img src='images/smiley/saoul.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":chut:","<img src='images/smiley/scotch.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":chant:","<img src='images/smiley/sing.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":miam:","<img src='images/smiley/slurp.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":glass:","<img src='images/smiley/sun.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":timide:","<img src='images/smiley/timide.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":yep:","<img src='images/smiley/yep.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":zipla:","<img src='images/smiley/zipla.gif' alt='trop cool ce zof quand meme'>");
	txt=Change(txt, ":zzz:","<img src='images/smiley/zzz.gif' alt='trop cool ce zof quand meme'>");
	if (txt) show("showtxt").innerHTML = txt;
	
}
function CheckLen(Target) {
	StrLen = Target.value.length
	if (StrLen > 250 ) {
		Target.value = Target.value.substring(0,250);
		CharsLeft = 250;
	}
	else {
		CharsLeft = StrLen;
	}
	document.formulaire.caracteres.value = CharsLeft;
}
function checkname(form){
	StrLen = form.value.length
	if (StrLen > 15 ) {form.value = form.value.substring(0,15);}
}
//-->
