function popup(page,tx,ty,nom_fenetre,barre_status,barre_outils,barre_scroll)
{

	if (parseInt(navigator.appVersion) > 3)
	{
		x = parseInt((screen.availWidth - tx) / 2);
		y = parseInt((screen.availHeight - ty) / 2);
	}
	else
	{
		x = 50;
		y = 50;
	}

	if (nom_fenetre == 'close')
	{
		x = 10000;
		y = 10000;
	}

	window.open(page,nom_fenetre,"status=" + barre_status + ",toolbar=" + barre_outils + ",resizable=1,scrollbars=" + barre_scroll + ",width=" + tx + ",height=" + ty + ",left=" + x  + ",top=" + y);
	return false;
}

function imprime()
{
	if (window.print) window.print();
	else alert("Pour imprimer la page, cliquer sur le bouton 'Imprimer' de votre navigateur.");

	return false;
}

function fermer()
{
	window.close();
}

function goTo(url)
{
	Window.location=url;
}

<!--
var nav = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )));

function couleur(obj)
{
	if (nav) obj.style.backgroundColor = "#FFFFFF";
}

function verif_date(input)
{
	var regex = new RegExp("[/-]");
	var date = input.split(regex);
	var nbJours = new Array('',31,28,31,30,31,30,31,31,30,31,30,31);
	var result = true;

	if ( date['2']%4 == 0 && date['2']%100 > 0 || date['2']%400 == 0 )
	nbJours['2'] = 29;

	if( isNaN(date['2']) )
	result=false;

	if ( isNaN(date['1']) || date['1'] > 12 || date['1'] < 1 )
	result=false;

	if ( isNaN(date['0']) || date['0'] > nbJours[Math.round(date['1'])] || date['0'] < 1 )
	result=false;

	return result;
}

function is_numeric(num)
{
	var exp = new RegExp("^[0-9-.]*$","g");
	return exp.test(num);
}

function affiche_multilignes(id1,id2)
{
	for (idval=id1;idval<=id2;idval++)
	{
		if (document.getElementById('ligne'+idval).style.display == "none")
		{
			document.getElementById('ligne'+idval).style.display = '';
		}
		else
		{
			document.getElementById('ligne'+idval).style.display = 'none';
		}
	}
}

function affiche_tab_utilisateur(idutilisateur,maxlignes)
{
	for (idval=idutilisateur;idval<=(idutilisateur+maxlignes);idval++)
	{
		if (document.getElementById('ligne'+idval).style.display == "none")
		{
			document.getElementById('ligne'+idval).style.display = '';
		}
		else
		{
			document.getElementById('ligne'+idval).style.display = 'none';
		}
	}
}

function affiche(id)
{
	if ((document.getElementById) && (document.getElementById(id).style.display=="none")) // n6+ et IE 5+
	{
		document.getElementById(id).style.display="";
	}
	else if ((document.all) && (document.all[id].style.display=="none")) // IE 4
	{
		document.all[id].style.display="";
	}
	else if ((document.layers) && (document.layers[id].display=="none")) // N 4
	{
		document.layers[id].display="";
	}
	else if ((document.getElementById) && (document.getElementById(id).style.display==""))
	{
		document.getElementById(id).style.display="none";
	}
	else if ((document.all) && (document.all[id].style.display==""))
	{
		document.all[id].style.display='none';
	}
	else if ((document.layers) && (document.layers[id].display==""))
	{
		document.layers[id].display="none";
	}
}
function afficheligne(id)
{
	if (id == 1)
	{
		document.getElementById('ligne1').style.display = '';
		document.getElementById('ligne2').style.display = "none";
		document.form1.UtilisateurTypeRapport.value = 1;
	}
	if (id == 2)
	{
		document.getElementById('ligne1').style.display = "none";
		document.getElementById('ligne2').style.display = '';
		document.form1.UtilisateurTypeRapport.value = 2;
	}
}
function check_data2(f)
{ 
var model = /\r\n/g;
var model2 = /\r/g; 
var model3 = /\n/g;
f.Commentaires.value = f.Commentaires.value.replace(model," -br- ");
f.Commentaires.value = f.Commentaires.value.replace(model2," -br- ");
f.Commentaires.value = f.Commentaires.value.replace(model3," -br- ");
return(true); 
}
