
		  
		function FocusText(BoxName) {
		if (BoxName.value == BoxName.defaultValue) { BoxName.value = '';}
		}
		function BlurText(BoxName) {
		if (BoxName.value == '') { BoxName.value = BoxName.defaultValue;}
		}    
		
		
		// script image mode zoom standard
		var popup   
		function viewimage(page, hauteur, largeur ) 
		{   
		if (popup != null) { popup.close() } 
		var settings = "scrollbars=no,height="+hauteur+",width="+largeur+",innerheight="+hauteur+",innerwidth="+largeur;
		popup = window.open(page,"popup",settings);
		popup.window.focus();
		}
		
		
		// Email Validation. Written by PerlScriptsJavaScripts.com
		
		function check_email(e) {
		ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
		
		for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){   
		return (false);
		}	 
		} 
		
		if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
		return (-1);		
		} 
		
		}
		
		}
		
		function check_empty(fi,lb) 
		{
		
		if(fi.value=='')
		{
		alert(lb+" manquant");
		fi.focus(); 
		if(document.all || document.getElementByID)
		{
		// change the color of text field
		fi.style.background = "yellow";
		}
		return false;  
		}
		else
		{
		return true; 
		}
		}
		
		
		
		
		
		$(function() {
			if($('a[rel^=lightbox]').length != 0){
			$('a[rel^=lightbox]').lightBox({
			imageLoading: '/css/js/jquery.lightbox/en/loading.gif',
			imageBtnClose: '/css/js/jquery.lightbox/en/closelabel.gif',
			imageBtnPrev: '/css/js/jquery.lightbox/en/prevlabel.gif',
			imageBtnNext: '/css/js/jquery.lightbox/en/nextlabel.gif',
			txtImage: 'Image',
			txtOf: 'of',
			keyToClose: 'c',
			keyToPrev: 'p',
			keyToNext: 'n'
		   }); // Select all links that contains lightbox in the attribute rel
		}
		
		});			
		
			$.extend($.validator.messages, {
			required: "This field is required",
			remote: "This field is required",
			email: "Unvalid email address",
			url: "Unvalid URL",
			date: "Unvalid date",
			dateISO: "Unvalid date",
			number: "Unvalid number",
			digits: "Numeric value only",
			creditcard: "Unvalid card number",
			equalTo: "This field value should be the same than the preceding field value",
			accept: "Unvalid extension",
			maxlength: $.validator.format("{0} characters max"),
			minlength: $.validator.format("{0} characters min"),
			rangelength: $.validator.format("Please enter between {0} and {1} characters"),
			range: $.validator.format("Please enter a value between {0} and {1}"),
			max: $.validator.format("Please enter a value below {0}"),
			min: $.validator.format("Please enter a value above {0}")
			});
		

		
		

		
		
		
	
