
domok = document.getElementById;

if (domok) {
	skn = document.getElementById("topdecklink").style;
	if(navigator.appName.substring(0,3) == "Net")
		document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = get_mouse;
}

function poplink(msg,bgcolor,tdcolor) {

var content = "<table border=\"0\" cellspacing=\"1\" bgcolor=\"#"+bgcolor+"\"><tr><td bgcolor=\"#"+tdcolor+"\"><span class=\"textewin taille2\">"+msg+"<span></td></tr></table>";

	if (domok) {
	  	document.getElementById("topdecklink").innerHTML = content;	
	  	skn.visibility = "visible";
  	}
}

function get_mouse(e) {
	var x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
	var y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
	skn.left = x-20;
	skn.top  = y+20;
}

function killlink() {
	if (domok)
  		skn.visibility = "hidden";
  		document.getElementById("topdecklink").innerHTML = '';
}


function cache1(id,forum,comment,motdepasse,nbposts,nbtopicsreels,dateheure,lastposteur,last_post,last_topic,cookie_pseudo,phpex,config,flags_topic,flags_idpost,initialise_img,image,nb_sous_groupe,page,dossier,dossierpriv,dossier_r,dossierpriv_r) {

document.write('<tr class=\"color1\">');
if ( initialise_img == 1 ) {
	document.write('<td class=\"padding left top right padding entete\" align=\"center\" rowspan=\"'+nb_sous_groupe+'\" width=\"200\">');
	if ( image ) {
		document.write('<img src=\"'+image+'\" border=\"0\" alt=\"\">');
	} else {
		document.write('<img src=\"images/trans.gif\" width=\"25\" height=\"1\" alt=\"\" title=\"\" />');
	}
	document.write('</td>');
}

document.write('<td width=\"22\" class=\"right top padding\">');
document.write('<img border=\"0\" src=\"');
//alert(flags_idpost < last_post);
//alert(flags_idpost+' < '+last_post+' mot de passe : '+motdepasse);
if ( motdepasse == 1 ) {
	if ( ( flags_idpost < last_post ) && nbtopicsreels > 0) {
		document.write(dossierpriv_r+'\" alt=\"\" title=\"Il y a des nouveaux messages\" />');
	} else {
		document.write(dossierpriv+'\" alt=\"\" title=\"Il n\'y a pas de nouveaux messages depuis votre dernière visite\">');
	}
} else {
	if ( ( flags_idpost < last_post ) && nbtopicsreels > 0) {
		document.write(dossier_r+'\" alt=\"\" title=\"Il y a des nouveaux messages\" />');
	} else {
		document.write(dossier+'\" alt=\"\" title=\"Il n\'y a pas de nouveaux messages depuis votre dernière visite\">');
	}
}
document.write('</td>');
document.write('<td class=\"right top padding\" valign=\"middle\" width=\"60%\"><b><a href=\"'+config+','+id+',liste_sujets,1,.html\" class=\"liensujet taille2\">'+forum+'</a></b><br /><span class=\"textesujet taille1\">'+comment+'</span></td>');
document.write('<td class=\"right top padding color2\" align=\"center\" width=\"10%\"><span class=\"textesujet taille1\">'+nbtopicsreels+'</span></td>');
document.write('<td class=\"right top padding color2\" align=\"center\" width=\"10%\"><span class=\"textesujet taille1\">'+nbposts+'</span></td>');
document.write('<td class=\"right top padding\" align=\"center\" width=\"20%\">');
	if ( nbposts > 0 ) {
		document.write('<a href=\"'+config+','+id+',sujet,,'+last_topic+','+page+',.html#bas\" class=\"liensujet taille1\" title=\"Accéder au dernier message du dernier sujet\">'+dateheure+'<br /><b>par '+lastposteur+'</b></a></td></tr>');
	} else {
		document.write('<span class=\"textesujet taille1\">-</span></td></tr>');
    
	}
}











function cache2(close,flags_idpost,lastidpost,replys,sond,postit,icone,phpex,config,cat,topic,trash,nbpagetopic,titre,flags_ispresence,flags_page,posteur,views,dateheure,lastposteur,preview,usr_level,realcat,j,dossier,dossierimp,dossier_r,dossierimp_r,flag_vert,flag_rouge) {

document.write('<tr class=\"color1\"><td align=\"center\" width=\"2%\" class=\"padding left right top\">');

	if ( postit == 1 ) {
		document.write('<img src=\"images/punaise.gif\" alt=\"Sujet important à lire\" title=\"Sujet important à lire\"></td>');		
	}	
	else if ( close == 1 ) {	
		document.write('<img src=\"images/cadenas.gif\" alt=\"Ce sujet a été fermé\" title=\"Ce sujet a été fermé\"></td>');
        } else if ( close == 2 ) {                              	
                document.write('<img src="images/cadenasr.gif" alt="Ce sujet a été fermé définitivement" title="Ce sujet a été fermé définitivement"></td>');
	} else {
		if ( flags_idpost < lastidpost ) {
			document.write('<img alt=\"Nouveau message\" title=\"Nouveau message\" border=\"0\" src=\"');
			if ( replys > 20 ) {
				document.write(dossierimp_r);
			} else {
				document.write(dossier_r);
			}
			document.write('\"></td>');
		} else {
			document.write('<img alt=\"Pas de nouveaux messages\" title=\"Pas de nouveaux messages\" border=\"0\" src=\"');
			if ( replys > 20 ) {
				document.write(dossierimp);
			} else {
				document.write(dossier);
			}
		document.write('\"></td>');
	}
}

document.write('<td width=\"2%\" align=\"center\" class=\"padding top\"><img border=\"0\" src=\"images/trans.gif\" width=\"2\" height=\"1\" alt=\"\">');
if ( sond == 1 ) {
	document.write('<img border=\"0\" src=\"images/sondage1.gif\" title=\"Ce sujet est un sondage\" width=\"15\" alt=\"\"></td>');
} else {
	document.write('<img border=\"0\" height=\"15\" src=\"images/icon'+icone+'.gif\" title=\"Sujet\" width=\"15\" alt=\"\" /></td>');
}
if (usr_level > 2  && cat != "prive" ) {
	document.write('<td width=\"2%\" align=\"center\" class=\"padding left top color2\"><input class=\"topic color1\" type=\"checkbox\" value=\"'+topic+'\" name=\"id_'+j+'\"></td>');
}
document.write('<td width=\"43%\" class=\"padding top left right\"><img border=\"0\" src=\"images/trans.gif\" width=\"2\" height=\"1\" alt=\"\">');
if (postit == 1)
document.write('<img src=\"images/flechesticky.gif\" alt=\"\"> <b>');
	if (cat == "fav")
		document.write('<a title=\"'+preview+'\" href=\"'+config+','+realcat+',sujet,1,'+topic+',1,'+trash+'.html');
	else
		document.write('<a title=\"'+preview+'\" href=\"'+config+','+cat+',sujet,,'+topic+',1,'+trash+'.html');
	
	document.write('\" class=\"liensujet taille2\">');


document.write(titre);
if (postit == 1)
document.write('</b>');

document.write('</a></td>');
document.write('<td align=\"center\" width=\"5%\" class=\"padding top color2\">');

if ( nbpagetopic > 1 ) {
	if (cat == "fav")
		document.write('<a title=\"Aller à la page '+nbpagetopic+'\" href=\"'+config+','+realcat+',sujet,1,'+topic+','+nbpagetopic+','+trash+'.html');
	else
		document.write('<a title=\"Aller à la page '+nbpagetopic+'\" href=\"'+config+','+cat+',sujet,,'+topic+','+nbpagetopic+','+trash+'.html');
	
	document.write('\" title=\"Aller à la page '+nbpagetopic+'\" class=\"liensujet taille2\">'+nbpagetopic+'</a>');
} else {
	document.write('<span class="textesujet taille2">&nbsp;</span>');
}
document.write('</td>');
	document.write('<td width=\"2%\" align=\"center\" class=\"padding top left\">');
if ( ( flags_idpost < lastidpost ) && flags_idpost > 0 ) {
	document.write('<a ');
	if (cat == "fav")
		document.write('href=\"'+config+','+realcat+',sujet,1,'+topic+','+flags_page+','+trash+'.html');
	else
		document.write('href=\"'+config+','+cat+',sujet,,'+topic+','+flags_page+','+trash+'.html');
	
	document.write('#'+flags_idpost+'\"><img src=\"');

	if (flags_ispresence == 1) {
    		document.write(flag_vert);
    	} else {
    		document.write(flag_rouge);
    	}
    	
	document.write('\" border=\"0\" alt=\"Aller au dernier message que vous avez lu\" title=\"Aller au dernier message que vous avez lu\"></a>');
} else {
	document.write('<img src=\"images/trans.gif\" width=\"1\" height=\"1\" alt=\"\" title=\"\" />');
}

document.write('</td>');
document.write('<td align=\"center\" width=\"10%\" class=\"padding top left\">');
document.write('<a href=\"'+config+',profil,'+posteur+'.html\" target=\"_blank\" class=\"liensujet taille1\" title=\"Voir le profil de '+posteur+'\"><b>'+posteur+'</b></a></td>');
document.write('<td align=\"center\" width=\"5%\" class=\"padding top left color2\">');
document.write('<span class=\"textesujet taille1\">'+replys+' / '+views+'</span></td>');
document.write('<td align=\"center\" width=\"13%\" class=\"padding top left right\">');
document.write('<a title=\"Aller à la dernière réponse\" ');
	if (cat == "fav")
		document.write('href=\"'+config+','+realcat+',sujet,1,'+topic+','+nbpagetopic+','+trash+'.html');
	else
		document.write('href=\"'+config+','+cat+',sujet,,'+topic+','+nbpagetopic+','+trash+'.html');
	
	document.write('#bas\" class=\"liensujet taille1\">'+dateheure+'<br /><b>par '+lastposteur+'</b></a></td>');
document.write ('</tr>');
}









function cache3(postid,posteur,phpex,config,citation,img_perso,dateheure,cat,topic,page,usr_level,ip,texte,cookie_id,user_id,first,level,blokpost,ligne,hauteurbetweenposts,navigateur,profil,online,bouton_edit,bouton_quote,bouton_mp,comp,nbpage,deformation,ignore,ignore_enabled) {

document.write('<a name=\"'+postid+'\"></a>');
document.write('<table border=\"0\" class=\"left right ');
if ( hauteurbetweenposts > 0 || (comp == 1 && nbpage < 2 ) ) {
	document.write('top ');
}
document.write('bottom bgcolor\" cellpadding=\"1\" cellspacing=\"0\" width=\"95%\">');
document.write('<tr>');
document.write('<td rowspan=\"2\" valign=\"top\" width=\"200\" class=\"padding color4\">');
document.write('<table border=\"0\" cellpadding=\"3\" width=\"200\"><tr>');
document.write('<td align=\"left\"><b class=\"textesujet taille5\">');
if ( online == 1 ) {
	document.write('<img src="images/contact_online.gif" alt="Online" title="'+posteur+' est en ligne actuellement" />&nbsp;');
} else {
	document.write('<img src="images/contact_offline.gif" alt="Offline" title="'+posteur+' n\'est pas en ligne actuellement" />&nbsp;');
}
document.write(posteur+'</b></td>');
document.write('<td align=\"right\">');
document.write('<a href=\"'+config+',profil,'+posteur+'.html\" target=\"_blank\"><img alt=\"Voir le profil de '+posteur+'\" title=\"Voir le profil de '+posteur+'\" border=\"0\" src=\"images/profil.gif\" /></a></td>');
document.write('</tr></table>');
document.write('<span class=\"textesujet taille1\">');
if ( profil ) {
	document.write('<b>'+profil+'</b><br />');
}
document.write(citation+'<br />'+img_perso+'</span></td>');
document.write('<td height=\"100%\" valign=\"top\" class=\"textesujet taille5 left color3\">');
document.write('<table cellspacing=\"0\" height=\"0\" cellpadding=\"0\" width=\"100%\"><tr class=\"color4\">');
document.write('<td class=\"bottom\"><span class=\"textesujet taille1\">');
document.write('<img src=\"images/trans.gif\" width=\"1\" height=\"1\" alt=\"\" title=\"\" />');
document.write('<br />');
document.write('<img src=\"images/trans.gif\" width=\"2\" height=\"1\" alt=\"\" title=\"\" />');
document.write('<a href=\"'+config+','+cat+',sujet,,'+topic+','+page+',.html#'+postid+'\"><img src=\"images/page.gif\" alt=\"Lien direct du message '+postid+'\" title=\"Lien direct du message '+postid+'\" border=\"0\" /></a> <b>Posté le '+dateheure+'</b>');
document.write('<img src=\"images/trans.gif\" width=\"10\" height=\"1\" alt=\"\" title=\"\" />');
document.write('<a href=\"'+config+','+cat+',editer,'+topic+','+postid+','+page+'.html#formulaire\"><img alt=\"Editer le message\" title=\"Editer le message\" border=\"0\" vspace=\"0\" src=\"'+bouton_edit+'\" /></a>');
document.write('<img src=\"images/trans.gif\" width=\"10\" height=\"1\" alt=\"\" title=\"\" />');
document.write('<a href=\"'+config+','+cat+',citer,'+topic+','+postid+','+page+'.html#formulaire\"><img alt=\"Répondre à ce message\" title=\"Répondre à ce message\" border=\"0\" vspace=\"0\" src=\"'+bouton_quote+'\" /></a>');
if ( cat != "prive" && cookie_id != user_id) {
	document.write('<img src=\"images/trans.gif\" width=\"10\" height=\"1\" alt=\"\" title=\"\" />'); 
	document.write('<a href="'+config+',prive,mess_prive,'+posteur+'.html#formulaire" target="_blank"><img alt="Message privé" title="Envoyer un message privé à '+posteur+'" border="0" vspace="0" src="'+bouton_mp+'" /></a></span>');
}
if ( navigateur == "Internet Explorer" ) {
	document.write('<img src=\"images/trans.gif\" width=\"10\" height=\"1\" alt=\"\" title=\"\" />');
	document.write('<a href=\"javascript:copier(document.getElementById(\'post' + postid + '\'));\"><img src=\"images/dp.gif\" border=\"0\" alt=\"\" title=\"Copier ce message dans le presse-papiers\"></a>');
}
document.write('</td><td align=\"right\" class=\"bottom\">');

	if ( ( usr_level < 3 && cookie_id == user_id )  && cat != "prive") {
 		document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
		document.write('<a href=\"delpost.'+phpex+'?config='+config+'&amp;cat='+cat+'&amp;topic='+topic+'&amp;post='+postid+'&amp;page='+page+'&amp;action=delete\"><img src=\"images/croix.gif\" title=\"Supprimer ce message\" alt=\"\" border=\"0\"/></a>');
		document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
 	} else if ( usr_level > 2  && cat != "prive")  {
 		document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
		document.write('<a href=\"action.'+phpex+'?config='+config+'&amp;cat='+cat+'&amp;topic='+topic+'&amp;post='+postid+'&amp;page='+page+'&amp;action=delete\"><img src=\"images/croix.gif\" title=\"Supprimer ce message\" alt=\"\" border=\"0\"/></a>');
		document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
		document.write('<a href=\"action.'+phpex+'?config='+config+'&amp;cat='+cat+'&amp;topic='+topic+'&amp;post='+postid+'&amp;page='+page+'&amp;action=kenny\"><img src=\"images/kenny.gif\" title=\"Kennyser ce message\" alt=\"\" border=\"0\"/></a>');
		document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
		document.write('<a href=\"action.'+phpex+'?config='+config+'&amp;cat='+cat+'&amp;topic='+topic+'&amp;page='+page+'&amp;post='+postid+'&amp;action=blok\" title=\"\"><img title=\"');	
		if ( blokpost == 1 ) {
			document.write('Rend ce message à nouveau disponible\" src=\"images/');
		} else {
			document.write('Ne permet plus la lecture de ce message aux membres\" src=\"images/o');
		}
		document.write('lock.gif\" border=\"0\" alt=\"\"></a>');
		document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
		if ( ip != '' ) {
			document.write('<a href=\"http://www.ripe.net/perl/whois?query='+ip+'&amp;.submit=Soumettre+la+requ%EAte&amp;searchtext='+ip+'" target=\"_blank\"><img src=\"images/planete2.gif\" border="0" alt=\"\" title=\"'+posteur+' a posté avec l\'IP : '+ip+'\. Cliquez pour plus d\'informations à propos de cette IP" /></a>');
			document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
		}
		document.write('<a href=\"useradmin.'+phpex+'?config='+config+'&amp;cat='+cat+'&amp;pseudo='+posteur+'&amp;ip='+ip+'\" target=\"_blank\" title=\"Modération de '+posteur+'\" class=\"textesujet taille1\">Modération</a>');
            	document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
	}
	blockpost = 0;
      	document.write('</td></tr></table>');
      	document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
      	document.write('<br /><div style=\"margin:5px;\" id=\"post'+postid+'\">'+texte+'</div></td></tr></table>');
	if ( ligne == 1 && hauteurbetweenposts > 0 ) {
		document.write('<img src=\"images/trans.gif\" border=\"0\" height=\"'+hauteurbetweenposts+'\" width=\"1\" alt=\"\" /><br />');
	}	
}



function cacheimprim(postid,posteur,phpex,config,citation,img_perso,dateheure,cat,topic,page,usr_level,ip,texte,cookie_id,user_id,first,level,blokpost,ligne,hauteurbetweenposts,navigateur,profil,online,bouton_edit,bouton_quote,bouton_mp,comp,nbpage,deformation) {

document.write('<a name=\"'+postid+'\"></a>');
document.write('<table border=\"0\" class=\"left right ');
if ( hauteurbetweenposts > 0 || (comp == 1 && nbpage < 2 ) ) {
	document.write('top ');
}
document.write('bottom bgcolor\" cellpadding=\"1\" cellspacing=\"0\" width=\"98%\">');
document.write('<tr>');
document.write('<td rowspan=\"2\" valign=\"top\" width=\"200\" class=\"padding color4\">');
document.write('<table border=\"0\" cellpadding=\"3\" width=\"200\"><tr>');
document.write('<td align=\"left\"><b class=\"textesujet taille5\">');
document.write(posteur+'</b></td>');
document.write('<td align=\"right\"> </td>');
document.write('</tr></table>');
document.write('<span class=\"textesujet taille1\"></span></td>');
document.write('<td height=\"100%\" valign=\"top\" class=\"textesujet taille5 left color3\">');
document.write('<table cellspacing=\"0\" height=\"0\" cellpadding=\"0\" width=\"100%\"><tr class=\"color4\">');
document.write('<td class=\"bottom\" width=\"70%\"><span class=\"textesujet taille1\">');
document.write('<img src=\"images/trans.gif\" width=\"1\" height=\"1\" alt=\"\" title=\"\" />');
document.write('<br />');
document.write('<img src=\"images/trans.gif\" width=\"2\" height=\"1\" alt=\"\" title=\"\" />');
document.write('<b>Posté le '+dateheure+'</b>');
document.write('</td><td width=\"30%\" align=\"right\" class=\"bottom\"><img src=\"images/trans.gif\" width=\"2\" height=\"1\" alt=\"\" title=\"\" />');
	blockpost = 0;
      	document.write('</td></tr></table>');
      	document.write('<img src=\"images/trans.gif\" width=\"5\" height=\"1\" alt=\"\" title=\"\" />');
      	document.write('<br /><div style=\"margin:5px;\" id=\"post'+postid+'\">'+texte+'</div></td></tr></table>');
	if ( ligne == 1 && hauteurbetweenposts > 0 ) {
		document.write('<img src=\"images/trans.gif\" border=\"0\" height=\"'+hauteurbetweenposts+'\" width=\"1\" alt=\"\" /><br />');
	}	
}

