// -----------------------------------------------------------------
// function disableselect(e){
// return false
// }
// 
// function reEnable(){
// return true
// }
// 
// //if IE4+
// document.onselectstart=new Function ("return false")
// 
// //if NS6
// if (window.sidebar){
// document.onmousedown=disableselect
// document.onclick=reEnable
// }
// -----------------------------------------------------------------


// -----------------------------------------------------------------
function overTD(td,clase){
	td.style.cursor='hand';
	td.className=clase;
}
function outTD(td,clase){
	td.style.cursor='default';
	td.className=clase;
}
function clickTD(td){
	td.children.tags('A')[0].click();
}
// -----------------------------------------------------------------


// -----------------------------------------------------------------
function fenetre(page,methode) {

if (methode == "popup") {
var popup = window.open(""+page+"", "popup", "toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width=0, height=0, left=0, top=0");

if(popup.focus){
popup.focus();
}

}
else {
window.open(""+page+"", ""+methode+"");
}

}
// -----------------------------------------------------------------


// -----------------------------------------------------------------
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -----------------------------------------------------------------


// -----------------------------------------------------------------
function TaillePosFenetre(left, top, width, height) { //grandit ou réduit la taille d'une fenêtre
   window.resizeTo(width, height);
   window.moveTo(left, top);
}
// -----------------------------------------------------------------


// -----------------------------------------------------------------
function checkNumber(champ) {
	var valid = "1234567890";
	var ok = "yes";
	var temp;
	for (var i=0; i<10; i++) 
	{	
		temp = "" + champ.value.substring(i, i+1);
		// on test si le caractère saisi est un chiffre
		if (valid.indexOf(temp) == -1) {
			ok = "no";
		}
			//si le caractère saisi est erroné alors on
			//affiche à nouveau la valeur temporaire.
		if (ok == "no") {
			champ.value = champ.value.substring(0, i);
		}
	}

}
// -----------------------------------------------------------------


// -----------------------------------------------------------------
function checkNumber_date(champ) {
	var valid = "1234567890";
	var valid2 = "-";
	var ok = "yes";
	var temp;
	for (var i=0; i<4; i++) 
	{	
		temp = "" + champ.value.substring(i, i+1);
		// on test si le caractère saisi est un chiffre
		if (valid.indexOf(temp) == -1) {
			ok = "no";
		}
			//si le caractère saisi est erroné alors on
			//affiche à nouveau la valeur temporaire.
		if (ok == "no") {
			champ.value = champ.value.substring(0, i);
		}
	}
	for (var i=4; i<5; i++) 
	{	
		temp = "" + champ.value.substring(i, i+1);
		// on test si le caractère saisi est un chiffre
		if (valid2.indexOf(temp) == -1) {
			ok = "no";
		}
			//si le caractère saisi est erroné alors on
			//affiche à nouveau la valeur temporaire.
		if (ok == "no") {
			champ.value = champ.value.substring(0, i);
		}
	}
	for (var i=5; i<7; i++) 
	{	
		temp = "" + champ.value.substring(i, i+1);
		// on test si le caractère saisi est un chiffre
		if (valid.indexOf(temp) == -1) {
			ok = "no";
		}
			//si le caractère saisi est erroné alors on
			//affiche à nouveau la valeur temporaire.
		if (ok == "no") {
			champ.value = champ.value.substring(0, i);
		}
	}
	for (var i=7; i<8; i++) 
	{	
		temp = "" + champ.value.substring(i, i+1);
		// on test si le caractère saisi est un chiffre
		if (valid2.indexOf(temp) == -1) {
			ok = "no";
		}
			//si le caractère saisi est erroné alors on
			//affiche à nouveau la valeur temporaire.
		if (ok == "no") {
			champ.value = champ.value.substring(0, i);
		}
	}
	for (var i=8; i<10; i++) 
	{	
		temp = "" + champ.value.substring(i, i+1);
		// on test si le caractère saisi est un chiffre
		if (valid.indexOf(temp) == -1) {
			ok = "no";
		}
			//si le caractère saisi est erroné alors on
			//affiche à nouveau la valeur temporaire.
		if (ok == "no") {
			champ.value = champ.value.substring(0, i);
		}
	}

}
// -----------------------------------------------------------------