function f_submit() {

   document.formulaire.submit ();
}

function afficheDivRubriqueA (leDiv , lExplore) 
{
  
  
  document.getElementById ('lien1').style.display = "none";
  document.getElementById ('lien2').style.display = "none";
  document.getElementById ('lien3').style.display = "none";
  document.getElementById ('lien4').style.display = "none";
  document.getElementById ('lien5').style.display = "none";
  document.getElementById ('lien6').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur2').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur3').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur4').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur5').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur6').style.backgroundImage='url(\'../images/plus.gif\')';
  
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}

function afficheDivRubriqueB (leDiv , lExplore) 
{
  document.getElementById ('lien1').style.display = "none";
  document.getElementById ('lien2').style.display = "none";
  document.getElementById ('lien3').style.display = "none";
  document.getElementById ('lien4').style.display = "none";
  document.getElementById ('lien5').style.display = "none";
  document.getElementById ('lien6').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur2').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur3').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur4').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur5').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur6').style.backgroundImage='url(\'../images/plus.gif\')';
  
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}

function afficheDivRubriqueC (leDiv , lExplore) 
{
  document.getElementById ('lien2').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur2').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur3').style.backgroundImage='url(\'../images/plus.gif\')';
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}


function afficheDivRubriqueF (leDiv , lExplore) 
{
  document.getElementById ('lien2').style.display = "none";
  document.getElementById ('lien3').style.display = "none";
  document.getElementById ('lien4').style.display = "none";
  document.getElementById ('lien5').style.display = "none";
  document.getElementById ('lien6').style.display = "none";
  document.getElementById ('lien7').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur2').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur3').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur4').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur5').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur6').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur7').style.backgroundImage='url(\'../images/plus.gif\')';
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}

function afficheDivRubriqueI (leDiv , lExplore) 
{
  document.getElementById ('lien1').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}

function afficheDivRubriqueJ (leDiv , lExplore) 
{
  document.getElementById ('lien1').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}

function afficheDivRubriqueU (leDiv , lExplore) 
{
  document.getElementById ('lien1').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}



function afficheDivRubriqueX(leDiv , lExplore) 
{
  document.getElementById ('lien1').style.display = "none";
  document.getElementById ('lien2').style.display = "none";
  document.getElementById ('lien3').style.display = "none";
  
  document.getElementById ('explorateur1').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur2').style.backgroundImage='url(\'../images/plus.gif\')';
  document.getElementById ('explorateur3').style.backgroundImage='url(\'../images/plus.gif\')';
  
  document.getElementById (leDiv).style.display = "block";
  document.getElementById (lExplore).style.backgroundImage='url(\'../images/moins.gif\')';

}

function changeRubrique (leDivOnglet, leDivAAfficher, id)
{

	document.getElementById ('rubrique1').style.background='#123456';
	document.getElementById ('rubrique2').style.background='#123456';
	document.getElementById ('rubrique3').style.background='#123456';
	document.getElementById ('rubrique4').style.background='#123456';
	document.getElementById ('origine').style.display = "none";
	document.getElementById ('resultat').style.display = "none";
	document.getElementById ('saillie').style.display = "none";
	document.getElementById ('production').style.display = "none";

  	document.getElementById (leDivAAfficher).style.display = "block";
	document.getElementById (leDivOnglet).style.background='#654321';
	
	if (document.getElementById ('open') != null)
		document.getElementById ('open').value = leDivAAfficher;

}

function changeRubrique2 (leDivOnglet, leDivAAfficher, id)
{

	document.getElementById ('rubrique1').style.background='#123456';
	document.getElementById ('rubrique2').style.background='#123456';
	document.getElementById ('rubrique3').style.background='#123456';
	document.getElementById ('rubrique4').style.background='#123456';
	document.getElementById ('rubrique1').style.display='none';
	document.getElementById ('rubrique2').style.display='none';
	document.getElementById ('rubrique3').style.display='none';
	document.getElementById ('rubrique4').style.display='none';
	
	
	document.getElementById ('suite1').style.display='none';
	document.getElementById ('suite2').style.display='none';
	document.getElementById ('suite3').style.display='none';
	document.getElementById ('validation').style.display='none';
	
	document.getElementById ('origine').style.display = "none";
	document.getElementById ('resultat').style.display = "none";
	document.getElementById ('saillie').style.display = "none";
	document.getElementById ('production').style.display = "none";

	if (leDivAAfficher == 'resultat') {document.getElementById ('suite2').style.display='block';}
	if (leDivAAfficher == 'production') {document.getElementById ('suite3').style.display='block';}
	if (leDivAAfficher == 'saillie')  {document.getElementById ('validation').style.display='block';}

	document.getElementById (leDivAAfficher).style.height = "1000px";
  	document.getElementById (leDivAAfficher).style.display = "block";
	document.getElementById (leDivOnglet).style.background='#654321';
	document.getElementById (leDivOnglet).style.display='block';
}


function f_OpenFiche (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "fiche.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFicheEtalon (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueA/fiche.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFichePouliniere (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueB/fiche.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFicheAnnonce (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceCheval.php?id="+id+"&table=annoncescheval";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFicheEtalonPromote (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "rubriqueA/fiche.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFichePoulinierePromote (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "rubriqueB/fiche.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFicheAnnoncePromote (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "rubriqueF/infoAnnonceCheval.php?id="+id+"&table=annoncescheval";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}


function f_OpenLocalisation (id)
{
	iWidth  = 450;
	iHeight = 400;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "localisation.php?idLieu="+id;
	window.open (szUrl , "Localisation_g&eacute;ographique", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function ficheEtalonPanier (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "ficheEtalonPanier.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function fichePoulinierePanier (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "fichePoulinierePanier.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function ficheAnnoncePanier (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "ficheAnnoncePanier.php?id="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function changeVignette (id)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;
try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "infoCheval.php?id="+id;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
        var  fiche  = httpReq.responseText;
        document.getElementById ('fichette').innerHTML = fiche;

        }
    }

catch (e)
    {
    }
}

function ouvreAnnonceCheval (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceCheval.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Cheval", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceValorisation (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceValorisation.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Valorisation", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnoncePension (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnoncePension.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Pension", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceMateriel (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceMateriel.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Materiel", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceEmploi (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceEmploi.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Emploi", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceVehicule (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceVehicule.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Vehicule", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceImmobilier (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceImmobilier.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Immobilier", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceEvenement (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceEvenement.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Evenement", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceService (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceService.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Service", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceDivers (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "infoAnnonceDivers.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Divers", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function changePhoto (id, numero)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;
try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "image.php?id="+id+"&num="+numero;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
        var  image  = httpReq.responseText;
        document.getElementById ('image').innerHTML = image;

        }
    }

catch (e)
    {
    }
}

function chargeVideo (id)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;
try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "video.php?id="+id;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
        var  image  = httpReq.responseText;
        document.getElementById ('video').innerHTML = image;

        }
    }

catch (e)
    {
    }
}

function changePhotoAnnonce (id, numero, table)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;
try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "imageAnnonce.php?id="+id+"&num="+numero+"&table="+table;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
        var  image  = httpReq.responseText;
        document.getElementById ('image').innerHTML = image;

        }
    }

catch (e)
    {
    }
}

function chargeVideoAnnonce (id, table)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;
try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "videoAnnonce.php?id="+id+"&table="+table;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
        var  image  = httpReq.responseText;
        document.getElementById ('video').innerHTML = image;

        }
    }

catch (e)
    {
    }
}


function validPanierEtalon (idUser, idEtalon)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;

try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "panierEtalon.php?idUser="+idUser+"&idEtalon="+idEtalon;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
		alert ('Votre panier est rempli');
        }
    }

catch (e)
    {
    }

}

function validPanierPouliniere (idUser,idPouliniere)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;

try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "panierPouliniere.php?idUser="+idUser+"&idPouliniere="+idPouliniere;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
		alert ('Votre panier est rempli');
        }
    }

catch (e)
    {
    }

}

function validPanierAnnonce (idUser, idAnnonce)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;

try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "panierAnnonce.php?idUser="+idUser+"&idAnnonce="+idAnnonce;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
		alert ('Votre panier est rempli');
        }
    }

catch (e)
    {
    }

}


function supprPanierEtalon (idUser, id)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;

try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "panierDeleteEtalon.php?idUser="+idUser+"&id="+id;
    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
		window.opener.location.reload();
		window.opener.location.reload();
		window.close();
        }
    }

catch (e)
    {
    }

}


function supprPanierPouliniere (idUser, id)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;

try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "panierDeletePouliniere.php?idUser="+idUser+"&id="+id;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
		window.opener.location.reload();
		window.opener.location.reload();
		window.close();
        }
    }

catch (e)
    {
    }

}

function supprPanierAnnonce (idUser, id)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;

try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "panierDeleteAnnonce.php?idUser="+idUser+"&id="+id;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
		window.opener.location.reload();
		window.opener.location.reload();
		window.close();
        }
    }

catch (e)
    {
    }

}



function ajouteMail (id, type)
{

var  httpReq         = false;
var  iTimeoutHttpReq = 250;
try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "recupTitle.php?id="+id+"&type="+type;

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
        var  result  = httpReq.responseText;
        }
    }

catch (e)
    {
    }

document.getElementById ("objet").value = "Admin CAVADN : A propos de " + result;
document.getElementById("boutonEnvoiMail").style.display = "block";
document.getElementById("typeChoix").value = type;
document.getElementById("idChoix").value = id;
}

function videChamps () {

var  httpReq         = false;
var  iTimeoutHttpReq = 250;
try
    {
    httpReq = new ActiveXObject ("Microsoft.XMLHTTP");
    }
catch (e)
    {
    try
        {
        httpReq = new XMLHttpRequest ();
        }
    catch (e)
        {
        return;
        }
    }

try
    {
    var url  = "vide.php";

    httpReq.open ("GET", url, false);
    httpReq.send (null);

    if (httpReq.status == 200)
        {
        var  result  = httpReq.responseText;
        document.location.reload ();
        }
    }

catch (e)
    {
    }

}


function f_OpenFicheEtalonToModify (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/ficheEtalon.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFichePouliniereToModify (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/fichePouliniere.php?idCheval="+id;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function ouvreAnnonceChevalToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceCheval.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Cheval", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceValorisationToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceValorisation.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Valorisation", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnoncePensionToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnoncePension.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Pension", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceMaterielToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceMateriel.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Materiel", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceEmploiToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceEmploi.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Emploi", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceVehiculeToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceVehicule.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Vehicule", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceImmobilierToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceImmobilier.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Immobilier", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceEvenementToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceEvenement.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Evenement", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceServiceToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceService.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Service", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function ouvreAnnonceDiversToModify (id, table)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/infoAnnonceDivers.php?id="+id+"&table="+table;
	window.open (szUrl , "Annonce_Divers", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}


function f_wysiwygImage (table, field, type,id,nom)
{
	iWidth  = 700;
	iHeight = 400;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "wysiwyg.php?table="+table+"&field="+field+"&type="+type+"&id="+id+"&nom="+nom;
	window.open (szUrl , "Mise_a_jour", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_wysiwygVideo (table, field, type,id,nom)
{
	iWidth  = 700;
	iHeight = 400;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "wysiwyg.php?table="+table+"&field="+field+"&type="+type+"&id="+id+"&nom="+nom+"&style=video";
	window.open (szUrl , "Mise_a_jour", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_wysiwyg (table, field, type,id)
{
	iWidth  = 700;
	iHeight = 400;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "wysiwyg.php?table="+table+"&field="+field+"&type="+type+"&id="+id;
	window.open (szUrl , "Mise_a_jour", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function validForm () 
{
		document.getElementById ("formWysiwyg").submit();
		var longlet;
		
		if (window.opener.document.getElementById ('origine') != null
			&& window.opener.document.getElementById ('resultat') != null
			&& window.opener.document.getElementById ('production') != null
			&& window.opener.document.getElementById ('saillie') != null)
		{
			longlet = window.opener.document.getElementById ('open').value;
			window.opener.document.getElementById ('form').submit();
		}
		else
		{
			window.opener.document.location.reload ();
			window.opener.document.location.reload ();
			window.opener.document.location.reload ();
			window.opener.document.location.reload ();
		}
		//window.close ();
}

function openFacture (num, selection)
{
	iWidth  = 600;
	iHeight = 600;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueJ/imprimeFacture.php?numFacture="+num+"&idTab="+selection;
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=yes , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);

}

function ouvreAnnuaire (id, table)
{
	iWidth  = 600;
	iHeight = 300;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/ficheAnnuaire.php?id="+id+"&table="+table;
	window.open (szUrl , "Fiche_Annuaire", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function ouvreAnnuaireToModify (id, table)
{
	iWidth  = 600;
	iHeight = 300;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueI/ficheAnnuaireToModify.php?id="+id+"&table="+table;
	window.open (szUrl , "Fiche_Annuaire", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFicheAnnonceDivers (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceDivers.php?id="+id+"&table=annoncesdivers";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}

function f_OpenFicheAnnonceEmploi (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceEmploi.php?id="+id+"&table=annoncesemploi";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function f_OpenFicheAnnonceEvenement (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceEvenement.php?id="+id+"&table=annoncesevenement";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function f_OpenFicheAnnonceImmobilier (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceImmobilier.php?id="+id+"&table=annoncesimmobilier";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function f_OpenFicheAnnonceMateriel (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceMateriel.php?id="+id+"&table=annoncesmateriel";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function f_OpenFicheAnnoncePension (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnoncePension.php?id="+id+"&table=annoncespension";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function f_OpenFicheAnnonceService (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceService.php?id="+id+"&table=annoncesservice";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function f_OpenFicheAnnonceValorisation (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceValorisation.php?id="+id+"&table=annoncesvalorisation";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}
function f_OpenFicheAnnonceVehicule (id)
{
	iWidth  = 700;
	iHeight = 800;
	iPosX   = (screen.width / 2) - (iWidth / 2);
	iPosY   = (screen.height / 2) - (iHeight / 2);
	szUrl   = "../rubriqueF/infoAnnonceVehicule.php?id="+id+"&table=annoncesvehicule";
	window.open (szUrl , "Fiche", " scrollbars=yes , location=no , menubar=no , resizable=no , toolbar=no , width=" + iWidth + ", height=" + iHeight + " , top = " + iPosY + " , left = " + iPosX);
}