//fonction de vérification de l'email et des champs page contact.
function verif(email) 
{
	var arobase = email.indexOf("@")
	var point = email.lastIndexOf(".")
	if (document.contact.sender_name.value=="" || document.contact.sender_surname.value=="" || document.contact.message.value=="")
		{
			alert("Veuillez remplir tous les champs marqués d'une étoile");
			return false;
		}
	else 
	{ 
		if((arobase < 2)||(point + 2 > email.length)||(point < arobase+2)) 
		{ 
		alert("Cet Email est erroné !");
		return false; 
		}
		else
		{
			return true;
		}
	}
}
//fonction de vérification de la mailing liste.
function verifmailing(email) {
	var arobase = email.indexOf("@");
	var point = email.lastIndexOf(".");
	if((arobase < 2)||(point + 2 > email.length)||(point < arobase+2)) 
	{
		alert('Email Incorrect !');
		return false;
	}
	else
	{
		return true;
	}
}


// Fonction qui ouvre une popup
function ouvre_popup(page,taille)
{
	window.open(page,'info','top=200,left=200,' + taille + ',resizable=no,scrollbars=yes,fullscreen=no');
}

function addFav()
{
	if (document.all)
	{
		window.external.AddFavorite(location.href, document.title);
	}
	else
	{
		alert('Vous pouvez faire CTRL + D pour ajouter cette page dans vos signets, ou favoris.')
	}
}

<!-- fonction pour verif moteur de recherche
function verif_moteur()
{
	if (document.moteurrecherche.moteur_recherche.value=="")
	{
		alert("Veuillez préciser votre recherche");
		return false;
	}
	else
	{
		return true;
	}
}

<!-- fonction retournant un tableau contenant tous les éléments html ayant la classe donnée en param -->
function getElementsByClassName(classname){
        var rl = new Array();
        var re = new RegExp('(^| )'+classname+'( |$)');
        var ael = document.getElementsByTagName('*');
        var op = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
        if (document.all && !op) ael = document.all;
        for(i=0, j=0 ; i<ael.length ; i++) {
                if(re.test(ael[i].className)) {
                        rl[j]=ael[i];
                        j++;
                }
        }
        return rl;
}

<!-- Fonction de vérification formulaire
function verif_devis(email)
{
	var arobase = email.indexOf("@")
	var point = email.lastIndexOf(".")
	if((arobase < 2)||(point + 2 > email.length)||(point < arobase+2)) 
	{ 
		alert("Cet Email est erroné !");
		return false; 
	}
	else 
	{ 
		if (document.devis.nom.value=="" || document.devis.prenom.value=="" || document.devis.adresse.value=="" || document.devis.ville.value=="" || document.devis.code_postal.value=="")
		{
			alert("Veuillez remplir tous les champs marqués d'une étoile");
			return false;
		}
		else
		{
			return true;
		}
	}
}


$(document).ready(function(){
	$('.clic').hover(function() {
		$(this).css({
			'cursor':'pointer'
		});
		if(!jQuery.support.opacity) {
			$(this).css({
					'overflow':'visible'
			});
			
			$(this).fadeTo(200,0.6);
		}
		else {
			$(this).stop().animate({ 
				'opacity':0.6
			}, 200);
		}
	
	}, function() {
		if(!jQuery.support.opacity) {
			$(this).fadeTo(200,1);
		}
		else {
			$(this).stop().animate({ 
				'opacity':1
			}, 200);
		}
	});
	
	$("#champ_recherche").click(function(){
		if($(this).val()=="Recherche..."){
			$(this).val('');
		}
	});
	
	
	function effect(id, var1){
		if(var1==1){
			var lgth=$("#ss-menu"+ id+" .inside").height();
			/*var lgth = $("#sous_test"+id+" ul > li").length*30;*/
			$("#ss-menu"+id).stop(true).animate({'height':lgth+'px'},200);
		}
		else{
			$("#ss-menu"+id).stop(true).animate({'height':0+'px'},100);
		}
	}
	
	/*$(".MenuHorizontal1 li").hover(
      function () {
	  	var id=$(this).attr('id');
		effect(	id.substr(4,2),1)
      }, function () {
        var id=$(this).attr('id');
		effect(id.substr(4,2),0)
      }
    );	
	$(".sous_menu").hover(
      function () {
	  	var id=$(this).attr('id');
		effect(id.substr(7,2),1)
        
      }, function () {
		var id=$(this).attr('id');
		effect(id.substr(7,2),0)
      }
    );*/

	$('.bx-prev ').text('&laquo;');
	$('.col-pict1 .bx-wrapper.bx-next ').text('&raquo;');
});
