String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };

function changeAllerRetour(){
	var isChecked = document.Search.allerRetour[0].checked;
	if(isChecked){
		document.getElementById("retour").style.visibility='visible';
	}
	else {
		document.getElementById("retour").style.visibility='hidden';
	}
}
function hideReturn(){
	document.getElementById("retour").style.visibility='hidden';
}

if (typeof(checkDate)=="undefined") {
	function checkDate(date) {

	if (date.length == 10) {
			var day = date.substring(0,2);
			var firstS = date.substring(2,3);
			var month = date.substring(3,5);
			var lastS = date.substring(5,6);
			var year = date.substring(6);
			if (firstS == "/" && lastS == "/" && !isNaN(day) && !isNaN(month) && !isNaN(year)) // 
			return new Date(Number(year),Number(month)-1,Number(day));
		}
		return false;
	}
}
