function VRE(codepostal,type){
    if(type=='VCP'){
        var regex = new RegExp(/^[0-9]{5}$/);
    }
    if(type=='VEM'){
        regex = new RegExp(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/);
    }
    if(type=='VNT'){
        regex = new RegExp(/^0[1-9][0-9]{8}$/);
    }
    var match = false;
    // Test sur le motif
    if(regex.test(codepostal))
    {
        match = true;
    }
    else
    {
        match = false;
    }
    // On renvoie match
    return match;
}
