﻿
         // Conversion Name: Page Devis Auto
         // INSTRUCTIONS 
         // The Conversion Tags should be placed at the top of the <BODY> section of the HTML page. 
         // In case you want to ensure that the full page loads as a prerequisite for a conversion 
         // being recorded, place the tag at the bottom of the page. Note, however, that this may 
         // skew the data in the case of slow-loading pages and in general not recommended. 
         //
         // NOTE: It is possible to test if the tags are working correctly before campaign launch 
         // as follows:  Browse to http://bs.serving-sys.com/BurstingPipe/testmode.asp, which is 
         // a page that lets you set your local machine to 'testing' mode.  In this mode, when 
         // visiting a page that includes an conversion tag, a new window will open, showing you 
         // the data sent by the conversion tag to the Eyeblaster servers. 
         // 
         // END of instructions (These instruction lines can be deleted from the actual HTML)
         //var ebRand = Math.random() + '';
         //ebRand = ebRand * 1000000;
         //<![CDATA[ 
         //document.write('<scr' + 'ipt src="HTTP://bs.serving-sys.com/BurstingPipe/ActivityServer.bs?cn=as&amp;ActivityID=63116&amp;rnd=' + ebRand + '"></scr' + 'ipt>');
         //]]>
 


var resultOfTheCallBack;

function VerifCP(sender,args)
{
   
    var txt_CP = document.getElementById("ctl00_ContentPlaceHolder1_txb_cp");
    var ddl_Ville = document.getElementById("ctl00_ContentPlaceHolder1_ddl_ville");
  
    args.IsValid = false;
    
    if(txt_CP.value != '')
    {
        if (ddl_Ville!= null)
        {
            if ((ddl_Ville.selectedIndex == 0 || ddl_Ville.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
        else
        {
            args.IsValid = true; 
        }
    }
   
}

// *************** VILLE *************************************************************
function VerifVille(sender,args)
{
    var ddl_Ville = document.getElementById("ctl00_ContentPlaceHolder1_ddl_ville");
    args.IsValid = false;
    
   if (ddl_Ville!= null)
        {
            if ((ddl_Ville.selectedIndex == 0 || ddl_Ville.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
}
 
// *************** MARQUE *************************************************************
function VerifMarque(sender,args)
{
    var ddl_Marque = document.getElementById("ctl00_ContentPlaceHolder1_ddl_marque");
    args.IsValid = false;
    
   if (ddl_Marque!= null)
        {
            if ((ddl_Marque.selectedIndex == 0 || ddl_Marque.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
}
// *************** MODELE *************************************************************
function VerifModele(sender,args)
{
    var ddl_Modele = document.getElementById("ctl00_ContentPlaceHolder1_ddl_modele");
    args.IsValid = false;
    
   if (ddl_Modele!= null)
        {
            if ((ddl_Modele.selectedIndex == 0 || ddl_Modele.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
    }

    // *************** CHASSIS *************************************************************
    function VerifChassis(sender, args)
    {
        var ddl_Chassis = document.getElementById("ctl00_ContentPlaceHolder1_ddl_chassis");
        args.IsValid = false;

        if (ddl_Chassis != null) {
            if ((ddl_Chassis.selectedIndex == 0 || ddl_Chassis.selectedIndex == -1)) {
                args.IsValid = false;
            }
            else {
                args.IsValid = true;
            }
        }
    }  
    
// *************** ENERGIE *************************************************************
function VerifEnergie(sender,args)
{
    var ddl_Energie = document.getElementById("ctl00_ContentPlaceHolder1_ddl_energie");
    args.IsValid = false;
    
   if (ddl_Energie!= null)
        {
            if ((ddl_Energie.selectedIndex == 0 || ddl_Energie.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 
// *************** VERSION *************************************************************
function VerifVersion(sender,args)
{
    var ddl_Version = document.getElementById("ctl00_ContentPlaceHolder1_ddl_version");
    args.IsValid = false;
    
   if (ddl_Version!= null)
        {
            if ((ddl_Version.selectedIndex == 0 || ddl_Version.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 
// *************** UTILISATION *************************************************************
function VerifUtilisation(sender,args)
{
    var ddl_Utilisation = document.getElementById("ctl00_ContentPlaceHolder1_ddl_utilisation");
    args.IsValid = false;
    
   if (ddl_Utilisation!= null)
        {
            if ((ddl_Utilisation.selectedIndex == 0 || ddl_Utilisation.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 
// *************** PROPRIETAIRE *************************************************************
function VerifProprietaire(sender,args)
{
    var ddl_Proprietaire = document.getElementById("ctl00_ContentPlaceHolder1_ddl_proprietaire");
    args.IsValid = false;
    
   if (ddl_Proprietaire!= null)
        {
            if ((ddl_Proprietaire.selectedIndex == 0 || ddl_Proprietaire.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 
// *************** TITULAIRE *************************************************************
function VerifTitulaire(sender,args)
{
    var ddl_Titulaire = document.getElementById("ctl00_ContentPlaceHolder1_ddl_titulaire");
    args.IsValid = false;
    
   if (ddl_Titulaire!= null)
        {
            if ((ddl_Titulaire.selectedIndex == 0 || ddl_Titulaire.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 
// *************** RECHERCHE *************************************************************
function VerifRecherche(sender,args)
{
    var ddl_Recherche = document.getElementById("ctl00_ContentPlaceHolder1_ddl_recherche");
    args.IsValid = false;
    
   if (ddl_Recherche!= null)
        {
            if ((ddl_Recherche.selectedIndex == 0 || ddl_Recherche.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 
// *************** ASSURE *************************************************************
function VerifAssure(sender,args)
{
    var ddl_Assure = document.getElementById("ctl00_ContentPlaceHolder1_ddl_assure");
    args.IsValid = false;
    
   if (ddl_Assure!= null)
        {
            if ((ddl_Assure.selectedIndex == 0 || ddl_Assure.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 
// *************** INTERRUPTION *************************************************************
function VerifInterruption(sender,args)
{
    var ddl_Interruption = document.getElementById("ctl00_ContentPlaceHolder1_ddl_interruption");
    args.IsValid = false;
    
   if (ddl_Interruption!= null)
        {
            if ((ddl_Interruption.selectedIndex == 0 || ddl_Interruption.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
} 

// *************** CYLINDREE *************************************************************
function VerifCylindre(sender,args)
{
    var ddl_cylindre = document.getElementById("ctl00_ContentPlaceHolder1_ddl_cylindre");
    args.IsValid = false;
    
   if (ddl_cylindre!= null)
        {
            if ((ddl_cylindre.selectedIndex == 0 || ddl_cylindre.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
}

function VerifMtt1(sender,args)
{   
    var ddl_mtt1 = document.getElementById("ctl00_ContentPlaceHolder1_ddl_mtt1");
    args.IsValid = false;
    
   if (ddl_mtt1!= null)
        {
            if ((ddl_mtt1.selectedIndex == 0 || ddl_mtt1.selectedIndex ==-1))
            {
                args.IsValid = false;
            }
            else
            {    
                args.IsValid = true;
            }
        }
}

function CallBackEventReference(result, context) 
{
    resultOfTheCallBack = result;
} 


//jQuery(function($)
// jQuery().ready(function() {

//   $("#ctl00_ContentPlaceHolder1_txb_date_circu").mask("99/9999");
//});

//var DCo = null;
// DCoInit = function()
//    {
// // On instancie un DateControl
// DCo = new DateControl();
// DCo.Add("D_FinAide", document.getElementById('ctl00_PageBody_txb_dateFinAide'));
// DCo.SetDateFormat("D_FinAide", "dd/mm/yyyy");
// DCo.SetErrMsg("D_FinAide", "Veuillez v\351rifier la date de fin d'aide.");
//};

//document.body.onload = DCoInit;
//onChange="DCo.IsValidDate('D_FinATT');" 

function ShowModalErrors()
{
  $object('ctl00_ContentPlaceHolder1_mpe_Infos')._show();
}


/**********************************************************************************************************/



$(document).ajaxStop($.unblockUI);

$(document).ready(function() {
    $('#ctl00_ContentPlaceHolder1_Button_Suivant').click(function() {
        if (Page_IsValid == true) {

            $.blockUI({
                message: '<table><tr><td><img src="/img/IMAGES/ECOMMERCE/ajax-loader.gif" /></td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Traitement en cours...</td></tr></table>',
                css: {
                    border: '2px solid #F39900',
                    textAlign: 'center',
                    width: '300px'
                }
            });
        }

    });

});


