function PlusTxt(Nb) {
    for (i=1;i<=Nb;i++)
    {
        taille = parseInt(document.getElementById('Art' + i).style.fontSize);
        taille ++;
        taillex = taille + 'px';
        document.getElementById('Art' + i).style.fontSize = taillex;
    }
    return false;
}
function MoinsTxt(Nb) {
    for (i=1;i<=Nb;i++)
    {
        taille = parseInt(document.getElementById('Art' + i).style.fontSize);
        taille --;
        taillex = taille + 'px';
        document.getElementById('Art' + i).style.fontSize = taillex;
    }
    return false;
}

function validFicher2(texte) 
{
    ext = texte.substring(texte.length - 3 , texte.length )
    if (ext != 'txt' && ext != 'TXT' && ext != 'csv' && ext != 'CSV') 
        {
        alert("Vous ne pouvez importer que des fichier .txt ou .csv");
        document.getElementById('attach1').focus();
        return false;
        }
    return true;
}

function validFicher(texte) 
{
    ext = texte.substring(texte.length - 3 , texte.length )
    if (ext != 'jpg' && ext != 'JPG' && ext != 'gif' && ext != 'GIF') 
        {
        alert("Vous ne pouvez importer que des fichier images .jpj ou .gif");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("é",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("è",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("à",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("ç",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("ù",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("ê",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("î",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    if (texte.indexOf("ï",0) > 0)
        {
        alert("Le nom de fichier ne doit pas comporter de lettre accentuée : é, à, ç, etc. ");
        document.getElementById('attach1').focus();
        return false;
        }

    return true;
}


function validInscription() 
{
    if (document.getElementById('User').value == '') 
        {
        alert("Veuillez saisir votre nom d'utilisateur");
        document.getElementById('User').focus();
        return false;
        }

    var Mail = document.getElementById('Email').value
    var regexp = new RegExp("^[a-zA-Z0-9_\\-\\.]{3,}@[a-zA-Z0-9\\-_]{2,}\\.[a-zA-Z]{2,4}$", "g");
    if (!regexp.test(Mail)) 
        {
        alert("L'adresse e-mail n'est pas valide !");
        document.getElementById('Email').focus();
        return false;
        }
    if (document.getElementById('Mdp').value == '') 
        {
        alert("Veuillez saisir votre mot de passe");
        document.getElementById('Mdp').focus();
        return false;
        }

    if (document.getElementById('Mdp2').value == '') 
        {
        alert("Veuillez répéter le mot de passe");
        document.getElementById('User').focus();
        return false;
        }

    if (document.getElementById('Mdp').value != document.getElementById('Mdp2').value) 
        {
        alert("Les mots de passent ne sont pas identique");
        document.getElementById('Mdp').focus();
        return false;
        }
    if (document.getElementById('Prenom').value == '') 
        {
        alert("Veuillez saisir votre prenom");
        document.getElementById('Prenom').focus();
        return false;
        }

    if (document.getElementById('Nom').value == '') 
        {
        alert("Veuillez saisir votre nom");
        document.getElementById('Nom').focus();
        return false;
        }

    if (document.getElementById('AdL1').value == '') 
        {
        alert("Veuillez saisir votre adresse");
        document.getElementById('AdL1').focus();
        return false;
        }

    if (document.getElementById('LibCP').value == '') 
        {
        alert("Veuillez saisir votre code postal");
        return false;
        }

    return true;
}

function validInscription2() 
{

    var Mail = document.getElementById('Email').value
    var regexp = new RegExp("^[a-zA-Z0-9_\\-\\.]{3,}@[a-zA-Z0-9\\-_]{2,}\\.[a-zA-Z]{2,4}$", "g");
    if (!regexp.test(Mail)) 
        {
        alert("L'adresse e-mail n'est pas valide !");
        document.getElementById('Email').focus();
        return false;
        }
    if (document.getElementById('Prenom').value == '') 
        {
        alert("Veuillez saisir votre prenom");
        document.getElementById('Prenom').focus();
        return false;
        }

    return true;
}



function validMaj() 
{
    if (document.getElementById('Mdp').value != document.getElementById('Mdp2').value) 
        {
        alert("Les mots de passent ne sont pas identique");
        document.getElementById('Mdp').focus();
        return false;
        }
    if (document.getElementById('Prenom').value == '') 
        {
        alert("Veuillez saisir votre prenom");
        document.getElementById('Prenom').focus();
        return false;
        }

    if (document.getElementById('Nom').value == '') 
        {
        alert("Veuillez saisir votre nom");
        document.getElementById('Nom').focus();
        return false;
        }

    if (document.getElementById('AdL1').value == '') 
        {
        alert("Veuillez saisir votre adresse");
        document.getElementById('AdL1').focus();
        return false;
        }

    if (document.getElementById('LibCP').value == '') 
        {
        alert("Veuillez saisir votre code postal");
        return false;
        }

    return true;
}




function validPublier() 
{
    if (document.getElementById('Titre').value == '') 
        {
        alert("Veuillez saisir votre un titre");
        document.getElementById('Titre').focus();
        return false;
        }

    if (document.getElementById('cat').value == '') 
        {
        alert("Veuillez sélectionner une catégorie");
        document.getElementById('Cat').focus();
        return false;
        }

    if (document.getElementById('AnnonceDet').value == '') 
        {
        alert("Veuillez saisir votre une description");
        document.getElementById('AnnonceDet').focus();
        return false;
        }


    return true;
}

