function previ() {
page= "php/visu.php";
nom = "Prévisualisation";
window.open (page, nom, config='height=500, width=800, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no')

var outForm = document.createElement("form");
outForm.setAttribute("method", "post");
outForm.setAttribute("target", "_blank");
outForm.setAttribute("action", "php/visu.php");

var titre = document.createElement("input");
titre.setAttribute("name", "titre");
titre.setAttribute("type", "hidden"); 
titre.setAttribute("value", document.form.titre.value);
outForm.appendChild(titre);

var texte = document.createElement("input");
texte.setAttribute("name", "texte");
texte.setAttribute("type", "hidden"); 
texte.setAttribute("value", document.form.texte.value);
outForm.appendChild(texte); 

var auteur = document.createElement("input");
auteur.setAttribute("name", "auteur");
auteur.setAttribute("type", "hidden"); 
auteur.setAttribute("value", document.form.auteur.value);
outForm.appendChild(auteur); 

var date = document.createElement("input");
date.setAttribute("name", "date");
date.setAttribute("type", "hidden"); 
date.setAttribute("value", document.form.date.value);
outForm.appendChild(date); 

outForm.target = "Prévisualisation";
document.body.appendChild(outForm); 
outForm.submit();

};

function previ2() {
page= "php/visu.php";
nom = "Prévisualisation";
window.open (page, nom, config='height=500, width=800, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no')

var outForm = document.createElement("form");
outForm.setAttribute("method", "post");
outForm.setAttribute("target", "_blank");
outForm.setAttribute("action", "php/visu.php");

var titre = document.createElement("input");
titre.setAttribute("name", "titre");
titre.setAttribute("type", "hidden"); 
titre.setAttribute("value", document.form.titre.value);
outForm.appendChild(titre);

var texte = document.createElement("input");
texte.setAttribute("name", "texte");
texte.setAttribute("type", "hidden"); 
texte.setAttribute("value", document.form.texte.value);
outForm.appendChild(texte);

var categorie = document.createElement("input");
categorie.setAttribute("name", "categorie");
categorie.setAttribute("type", "hidden"); 
categorie.setAttribute("value", document.form.categorie.value);
outForm.appendChild(categorie);

outForm.target = "Prévisualisation";
document.body.appendChild(outForm); 
outForm.submit();

};

function previ3() {
page= "php/visu.php";
nom = "Prévisualisation";
window.open (page, nom, config='height=500, width=800, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no')

var outForm = document.createElement("form");
outForm.setAttribute("method", "post");
outForm.setAttribute("target", "_blank");
outForm.setAttribute("action", "php/visu.php");

var texte = document.createElement("input");
texte.setAttribute("name", "texte");
texte.setAttribute("type", "hidden"); 
texte.setAttribute("value", document.form.texte.value);
outForm.appendChild(texte);

var nom = document.createElement("input");
nom.setAttribute("name", "nom");
nom.setAttribute("type", "hidden"); 
nom.setAttribute("value", document.form.nom.value);
outForm.appendChild(nom); 

outForm.target = "Prévisualisation";
document.body.appendChild(outForm); 
outForm.submit();

};

function previ4() {
page= "php/visu.php";
nom = "Prévisualisation";
window.open (page, nom, config='height=500, width=800, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no')

var outForm = document.createElement("form");
outForm.setAttribute("method", "post");
outForm.setAttribute("target", "_blank");
outForm.setAttribute("action", "php/visu.php");

var texte = document.createElement("input");
texte.setAttribute("name", "texte");
texte.setAttribute("type", "hidden"); 
texte.setAttribute("value", document.form.texte.value);
outForm.appendChild(texte);

outForm.target = "Prévisualisation";
document.body.appendChild(outForm); 
outForm.submit();

};

function balise(baliseOn,baliseOff) {
  var mess = document.form.texte;
  //Pour Internet Explorer
  if (document.selection) {
    var str = document.selection.createRange().text;
    mess.focus();
    sel = document.selection.createRange();
    sel.text = baliseOn + str + baliseOff;
    document.form.focus();
  }
  //Pour Firefox, Netscape et consors
  //(je n'ai pas testé avec Opera)
  else if (mess.selectionStart || mess.selectionStart == "0") {
    var startPos = mess.selectionStart;
    var endPos = mess.selectionEnd;
    var chaine = mess.value;
    var str = chaine.substring( mess.selectionStart, mess.selectionEnd );

    mess.value = chaine.substring(0, startPos) + baliseOn + str
                        + baliseOff + chaine.substring(endPos, chaine.length);

    mess.selectionStart = startPos + instext.length;
    mess.selectionEnd = endPos + instext.length;
    mess.focus();
  } else {
    mess.value += instext;
    mess.focus();
  }
};

div = {
	show: function(elem) {
		document.getElementById(elem).style.visibility = 'visible';
	},
	hide: function(elem) {
		document.getElementById(elem).style.visibility = 'hidden';
	}
};

function recherchen(n) {

var outForm = document.createElement("form");
outForm.setAttribute("method", "post");
outForm.setAttribute("target", "_self");
outForm.setAttribute("action", "?cate=news&mode=modi");

var idmodif = document.createElement("input");
idmodif.setAttribute("name", "idmodif");
idmodif.setAttribute("type", "hidden"); 
idmodif.setAttribute("value", n);
outForm.appendChild(idmodif);

outForm.target = "[ Telino ] Admin";
document.body.appendChild(outForm); 
outForm.submit();

};

function recherchea(n) {

var outForm = document.createElement("form");
outForm.setAttribute("method", "post");
outForm.setAttribute("target", "_self");
outForm.setAttribute("action", "?cate=pages&mode=modi");

var idmodif = document.createElement("input");
idmodif.setAttribute("name", "idmodif");
idmodif.setAttribute("type", "hidden"); 
idmodif.setAttribute("value", n);
outForm.appendChild(idmodif);

outForm.target = "[ Telino ] Admin";
document.body.appendChild(outForm); 
outForm.submit();

};

