function favoris() {
    if ( navigator.appName != 'Microsoft Internet Explorer' )
    {
        window.sidebar.addPanel("Aquatique Vacances | 6 campings pour vos vacances en 85, 34, 33, 40","http://www.aquatique-vacances.com","");
    } else {
        window.external.AddFavorite("http://www.aquatique-vacances.com","Aquatique Vacances | 6 campings pour vos vacances en 85, 34, 33, 40");
    }
}

$(function() {
    $('#formulaireAmi').validate({
        submitHandler: function(form) {
            // do other stuff for a valid form
            if ($(form).valid())
            {
                $(form).ajaxSubmit(function(responseText, statusText) {
                    if (responseText!="")
                        alert('probleme'+responseText);
                    else {
                        $(form).clearForm();
                        jQuery.facebox(function() {
                            jQuery.get('resultat.php', function(data) {
                                jQuery.facebox( data )
                            })
                        })
                    }
                })
            }
        },
        rules: {
            monemail: {
                required: true,
                email:true
            },
            emailami: {
                required: true,
                email:true
            }
        },
        messages: {
        },
        // the errorPlacement has to take the table layout into account
        errorPlacement: function(error, element) {
            if ( element.is(":radio") ) {
                error.appendTo( element.parent());
            }
            else if ( element.is(":checkbox") )
                error.appendTo ( element.next() );
            else
                error.appendTo( element.next() );
        }
    });



   
});