/* texte defilant */

Statext= '*** Bienvenue : the direct way, pour naviguer en toute liberté ****';
Lentext = Statext.length-1;
Sright = 1;Sleft=0;
Pos=1;TR=120;TL=50;
function WStatut()
	{
	if (Sright==1 && Pos<=Lentext) {Pos++;Tp=TR;}
        if (Pos>Lentext){Sright=0;}
        if (Sright==0 && Pos>=0)
           {Pos--;Tp=TL;if (Pos<0){Sright=1}}
                
        Sdefil = Statext.substring(Pos,Lentext);     
	tpStat = setTimeout("WStatut()",Tp);
	window.status = Sdefil;
	}
 

/* Pour faire une vérification sans autoriser le point ("."), suivez les instructions qui sont écrites en commentaire 
<form>
<input type="text" name="champ_de_texte" onkeyup="verif_nombre(this);">
</form>

*/

function verif_nombre(champ)
{
var chiffres = new RegExp("[0-9\.]"); /* Modifier pour : var chiffres = new RegExp("[0-9]"); */

var verif;
var points = 0; /* Supprimer cette ligne */

for(x = 0; x < champ.value.length; x++)
{
verif = chiffres.test(champ.value.charAt(x));
if(champ.value.charAt(x) == "."){points++;} /* Supprimer cette ligne */

if(points > 1){verif = false; points = 1;} /* Supprimer cette ligne */

if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1); x--;}
}

}




// ouverture d'une page dans un menu déroulant

function gotonewpage(what) {
  value = what.options[what.selectedIndex].value;
  if (value == "") return;
  window.location.href = value;
} 


// popup communiquant
function Reporter(l) {
	var choix=l.options[l.options.selectedIndex].value;
	window.opener.document.forms["origine"].elements["choix"].value=choix;
}

// script édité GRATUITEMENT sur http://www.akoter.com
// change de couleur les cellule d'un tableau

// mettre a chque ligne :       <TR CLASS="text12" ONMOUSEOUT="changeback('')" ONMOUSEOVER="changeto('#FF0000')"> 

function changeto(highlightcolor){
source=event.srcElement
if (source.tagNAME=="TD"||source.tagNAME=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}


