<!--***********FONCTIONS DIVERSES**************-->
function restrict(evt)
{
	//textBox.Attributes.Add("onKeypress", "return restrict(event);");

	var keyCode = evt.which ? evt.which : evt.keyCode;

	if (keyCode > 125)
		return false;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


<!--***********FONCTIONS POUR LA RECHERCHE**************-->
function RechercheSimple() { 
	try
	{
		window.location.href = "recherche_simple.aspx?val=" + GetCriteres();
	}
	catch(Exception)
	{
	}
}

function RechercheAvancee() { 
	try
	{
		window.location.href = "recherche_avancee.aspx?val=" + GetCriteres();
	}
	catch(Exception)
	{
	}
}

// Renvoie les critères de recherche
function GetCriteres()
{
	var tmp = document.getElementById('txtCriteres');
	if(tmp && tmp.value.length > 0)
	{
		return tmp.value;
	}
	return "";
}
<!--***********FONCTION POUR GERER LA LANGUE EN CLIQUANT SUR LE DRAPEAU**************-->
function setLangage(lang)
{
	//document.langForm.LANGUE.value = lang;
	//document.langForm.submit();
	var url = document.URL; 

	if(url.indexOf("#") == -1)
	{
		if(url.indexOf("?") != -1)
		{
			if(url.indexOf("LANGUE") != -1)
			{
				var ind = url.indexOf("LANGUE") + 7;
				var urldeb = url.substr(0, ind);
				var urlfin = url.substr(ind+2, url.length - ind);
				
				window.location.href = urldeb + lang + urlfin;
			}
			else
			{
				window.location.href = url + "&LANGUE=" + lang;
			}
		}
		else
		{
			window.location.href = url + "?LANGUE=" + lang;
		}
	}
	else
	{
		if(url.indexOf("?") != -1)
		{
			var ind1 = url.indexOf("LANGUE") + 7;
			var urldeb1 = url.substr(0, ind1);
			var urlfin1 = url.substr(ind1+2, url.length - ind1);
				
			window.location.href = urldeb1 + lang + urlfin1;
		}
		else
		{
			var ind2 = url.indexOf("#");
			var urldeb2 = url.substr(0, ind2);
			var urlfin2 = url.substr(ind2, url.length - ind2);
		
			window.location.href = urldeb2 + "?LANGUE=" +lang + urlfin2;
		}
	}
}

<!--***********FONCTIONS SECRETE POUR AFFICHER LA VERSION**************-->
function controlEvent()
{
	if (event.shiftKey==true && event.altKey==true && event.ctrlKey==true)
	{
		alert("Version 1.1 VolontaryRegistries");
	}
}

var codPage = '';
function process_key()
{
	if (window.event.shiftKey && window.event.ctrlKey)
	{
		codPage += window.event.keyCode;

		/*if(codPage == '808269')
			location.href = './HiddenDoc/presentation.htm';*/
	}

    return true;
}
document.onkeyup = process_key;

<!--***********FONCTIONS POUR AFFICHER LA SCROLLBAR**************-->
// Saïd : Correction du bug 564 rajout des fonctions d'affichage de la scrollbar
function onLoadFunction()
{
	//document.getElementById('divScroll').scrollTop = document.getElementById('scrollTop').value;
	//document.getElementById('divScroll').style.setAttribute('width', document.getElementById('body').clientWidth-190);
	//onResizeFunction();
}

function onClickFunction()
{
	if(document.getElementById('scrollTop') && document.getElementById('divScroll'))
	{
		document.getElementById('scrollTop').value = document.getElementById('divScroll').scrollTop;
	}
}

function onResizeFunction()
{
	//document.getElementById('divScroll').style.setAttribute('width', document.getElementById('body').clientWidth-190);
}


<!--**************FONCTIONS POSBACK *******--->
function onPostBackFunction(textb)
{
	var tb1 = document.getElementById(textb);
	tb1.value = "";
}

// afficher ou masquer un tooltip (infobulle) du contrôle web : dropdownlist
 function FindXY(obj){
	var x=0,y=0;
	while (obj!=null){
		x+=obj.offsetLeft;//-obj.scrollLeft;
		y+=obj.offsetTop;//-obj.scrollTop;
		obj=obj.offsetParent;
	}
	return {x:x,y:y};
}
function showTooltip(obj,time)
{				
	var xTop = FindXY(obj).y+ obj.offsetHeight;
	var yLeft =FindXY(obj).x;//+ obj.offsetWidth; 	
	/*if (document.all)
	{ 
		xTop = xTop-170;
		yLeft = yLeft-385;
	}*/
	document.getElementById("tooltipTxt").innerHTML = obj.options[obj.selectedIndex].text;

	if(obj.options[obj.selectedIndex].text != '')
	{
		document.getElementById("tooltip").style.display = "inline";
		document.getElementById("tooltip").style.top = xTop+1;
		document.getElementById("tooltip").style.left = yLeft+1;	
		document.getElementById("tooltip").style.width = obj.offsetWidth;	
		document.getElementById("IframeToolTip").style.height = document.getElementById("tooltipTxt").offsetHeight  ;
	}
	if (time)
		setTimeout("hideTooltip()", 5000);
}
function showTooltipWithText(obj,time, text)
{				
	var xTop = FindXY(obj).y+ obj.offsetHeight;
	var yLeft =FindXY(obj).x;//+ obj.offsetWidth; 	
	/*if (document.all)
	{ 
		xTop = xTop-170;
		yLeft = yLeft-385;
	}*/
	document.getElementById("tooltipTxt").innerHTML = text;

	if(text != '')
	{
		document.getElementById("tooltip").style.display = "inline";
		document.getElementById("tooltip").style.top = xTop+1;
		document.getElementById("tooltip").style.left = yLeft+1;	
		document.getElementById("tooltip").style.width = obj.offsetWidth;	
		document.getElementById("IframeToolTip").style.height = document.getElementById("tooltipTxt").offsetHeight  ;
	}
	if (time)
		setTimeout("hideTooltip()", 5000);
}
function hideTooltip()
{
	document.getElementById("tooltip").style.display = "none";				
	
}
function popupCalendar(txtBoxName)
{
	var top = (screen.height - 200) / 2;
	var left = (screen.width - 200) / 2;

	var settings = 'top=' + top + ',left=' + left + ', width=150, height=170, location=no, directories=no, menubar=no, toolbar=no, status=no, scrollbars=no, resizable=no, dependent=no';

	var win = win = window.open('DatePicker.aspx?txtBoxName' + txtBoxName, 'myCalendar', settings);

	win.focus();
}