YAHOO.namespace("example.container"); 
   
function notification(){ 

   

 YAHOO.example.container.wait4 =  
            new YAHOO.widget.Panel("wait4",   
                { width:"400px",  
                height:"105px",
                  fixedcenter:true,  
                  close:true,  
                  draggable:false,  
                  zindex:4, 
                  modal:true, 
                  visible:false 
                }  
            ); 
     
    YAHOO.example.container.wait4.render(document.body);
    YAHOO.example.container.wait4.setHeader('Se connecter'); 
  
  message="Utilisez votre identifiant et mot de passe pour se connecter.";
  
  YAHOO.example.container.wait4.setBody('<div class="profil_text">'+message+'</div><br><br><div class="right"><a onclick="YAHOO.example.container.wait4.hide()" class="boutton" >Ok</a></div><div class="clear"></div>'); 
    
   YAHOO.example.container.wait4.show();

   
   

}   








//Recherche de profil via ajax


window.setTimeout(function() {

YAHOO.example.ACFlatData = new function(){
   
    this.fnCustomFormatter = function(oResultItem, sQuery) {
        
//alert(oResultItem[0]);
        var sKey = oResultItem[0];
        var nQuantity = oResultItem[1];
        var sKeyQuery = sKey.substr(0, sQuery.length);
        var sKeyRemainder = sKey.substr(sQuery.length);
        var aMarkup = ["<div class='left'>",
            sKey,
            "</div><div class=\"clear\"></div>"];
        return (aMarkup.join(""));
    };

    

    // Instantiate one XHR DataSource and define schema as an array:
    //     ["Record Delimiter",
    //     "Field Delimiter"]
    this.oACDS = new YAHOO.widget.DS_XHR("http://bbrencontre.com/php_perso/recherche/rechercheProfilAjax.php", ["\n", "\t"]);
    this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
    this.oACDS.maxCacheEntries = 60;
    this.oACDS.queryMatchSubset = true;

    // Instantiate third AutoComplete
    this.oAutoComp2 = new YAHOO.widget.AutoComplete('ysearchinput2','ysearchcontainer2', this.oACDS);
    this.oAutoComp2.queryDelay = 0;
    this.oAutoComp2.delimChar = "";
    this.oAutoComp2.prehighlightClassName = "yui-ac-prehighlight";
    this.oAutoComp2.formatResult = this.fnCustomFormatter;

};


}, 1000);

