<!--
	var url_ajax = "/ajax.php";
	var bg = new Array();
	var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i

	$().ajaxStart(function(){ $.blockUI('...',{"border":"0px"});});
	$().ajaxStop(function(){ $.unblockUI()})


	/**
	*	Show the main menu
	*
	**/
	function showMainMenu(){
		var action = $("#action").val()
		if (action=='univers'){$("#main_univers").slideUp("fast")}
		$("#news_li").removeClass("a_hover");	
		$(".menu").fadeIn("slow");
	}
	
	
	function showCollection(nr){
		var active = $("#active").val();
		if (nr!=active){
			
			//$("#item_"+nr).attr("src",$("#item_"+nr+"_img").val());
			$("#span_"+nr).attr("class","title_over");
			//$("#item_"+active).attr("src",$("#item_"+active+"_over").val());
			$("#span_"+active).attr("class","title");

			$(".main_univers").fadeOut('slow',
									   function (){
										  $(".main_univers").html($("#univers"+nr).html())
										  $(".main_univers").fadeIn('slow');
										})
		  $("#active").val(nr);
		}
	}
	
	
	function hideMenu(){
		var action = $("#action").val()
		var menu_active = $("#menu_active").val();
		
		if (menu_active=='0')	{
			if (action=='univers'){$("#main_univers").slideDown("slow")}
			if (action!='menu'){$(".menu").fadeOut("slow");}
			$(".smenu").hide();
		}
	}
	
	function showCollectionDetails(){
		$("#details1").animate({
			  width:"460px"
		}, 200);
		$("#details2").fadeIn(500);
	}
	
	function rollIt(id,path,if_over){
		var if_over = (if_over == null) ? false : true;	

		var active_status = $("#active_id_status").val();
		var active_id = $("#active_id").val();
		var active_img = $("#active_img").val();

		if (if_over && active_status==1){
			//$('#item_'+active_id).attr('src',active_img);
			$("#span"+active_id).css("color","#BF0904");
			$("#span"+active_id).removeAttr("style")
			$("#span"+active_id).attr("class","titre");
			$("#active_id_status").val(0);
		}
		//$('#'+id).attr('src',path);
	}

	function rollIt1(nr,path){
		var active = $("#active").val();
		//alert(nr+'|'+active)
		if (nr!=active) {
			$('#item_'+nr).attr('src',path)
		};
	}

	function SendContact(){
		
		var RE = /ok/;
		var email 	= $("#email").val()
		var fname 	= $("#fname").val()
		var lname 	= $("#lname").val()
		var phone 	= $("#phone").val()
		var message	= $("#message").val()
		
		var error = '';
		if (fname=='')							{error='empty_fname';}
		if (error=='' && lname=='')				{error='empty_lname';}
		if (error=='' && email=='')				{error='empty_email';}
		if (error=='' && !checkmail(email))		{error='inc_email';}
		if (error=='' && message=='')			{error='empty_message';}
		if (error==''){
			$.post(url_ajax,
				  {
					action : "contact_us",
					email  : email,
					fname  : fname,
					lname  : lname,
					phone  : phone,
					message: message
				  },
				  function(data){
					  var arr=data.split('|');
						if (arr[0].match(RE)) {
							$("input[@type=text],input[@type=password],textarea").val("");
							alert($("#"+arr[1]).val());
						}else{
							alert($("#"+arr[1]).val());
						}
				  }
				);
		}else{
			alert($('#'+error).val());
		}
	}
	
	/**
	*	check mail
	**/
	function checkmail(email){
		var returnval=emailfilter.test(email)
		return returnval
	}
	
	function PopupNews(id,height){
		var w = 480, h = 340;
		var lng = $("#lng").val();
		
		if(jQuery.browser.msie){
			
				w = document.documentElement.offsetWidth,
				h = document.documentElement.offsetHeight
			
		}else{
			w = window.innerWidth;
			h = window.innerHeight
		}
		var popW = 750, popH = height+50;
		
		var leftPos = (w-popW)/2, topPos = (h-popH)/2+30;
		
		window.open('/'+ lng + '/popup/news/'+id+'/','popup','width=' + popW + ',height='+popH+',top='+topPos+',left='+leftPos);
		
	}
	
	function changeBg(id){
		
		var image = bg[id];
		if (typeof image!=undefined){
			$("#collection_bg").css("background","url("+image+") no-repeat");
		}
	}
-->