function cleanTabsServices() {

    var currTabElem = ""
    
    currTabElem = document.getElementById("li_summary");
    if(currTabElem){
        currTabElem.setAttribute("class", "");
        currTabElem.setAttribute("className", "");
    }

    currTabElem = document.getElementById("li_action");
    if(currTabElem){
        currTabElem.setAttribute("class", "");
        currTabElem.setAttribute("className", "");
    }
    
    currTabElem = document.getElementById("li_coach");
    if(currTabElem){
        currTabElem.setAttribute("class", "");
        currTabElem.setAttribute("className", "");
    }
    
    currTabElem = document.getElementById("li_contact");
    if(currTabElem){
        currTabElem.setAttribute("class", "");
        currTabElem.setAttribute("className", "");
    }    

    currTabElem = document.getElementById("li_faq");
    if(currTabElem){
        currTabElem.setAttribute("class", "");
        currTabElem.setAttribute("className", "");
    }

    currTabElem = document.getElementById("li_projects");
    if(currTabElem){
        currTabElem.setAttribute("class", "");
        currTabElem.setAttribute("className", "");
    }


    currTabElem = document.getElementById("li_documents");
    if(currTabElem){
        currTabElem.setAttribute("class", "");
        currTabElem.setAttribute("className", "");
    }
    
    return true;
}



function hideDivsServices() {

    var currTabElem = "";
    
    
    currTabElem = document.getElementById("div_summary");
    if(currTabElem){
        currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_action");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_coach");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_contact");
    if(currTabElem){
    currTabElem.style.display = "none";
    }    
    
    currTabElem = document.getElementById("div_faq");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_projects");
    if(currTabElem){
    currTabElem.style.display = "none";
    }

    currTabElem = document.getElementById("div_documents");
    if(currTabElem){
    currTabElem.style.display = "none";
    }


    return true;/**/
}


function cleanTabs() {

    var currTabElem = ""
    
    currTabElem = document.getElementById("li_summary");
    if(currTabElem){
    currTabElem.setAttribute("class", "");
    currTabElem.setAttribute("className", "");
    }
    
    currTabElem = document.getElementById("li_prestations");
    if(currTabElem){
    currTabElem.setAttribute("class", "");
    currTabElem.setAttribute("className", "");
    }
    
    currTabElem = document.getElementById("li_coach");
    if(currTabElem){
    currTabElem.setAttribute("class", "");
    currTabElem.setAttribute("className", "");
    }
    
    currTabElem = document.getElementById("li_partenaires");
    if(currTabElem){
    currTabElem.setAttribute("class", "");
    currTabElem.setAttribute("className", "");
    }
    
    
    currTabElem = document.getElementById("li_foundings");
    if(currTabElem){
    currTabElem.setAttribute("class", "");
    currTabElem.setAttribute("className", "");
    }
    
    currTabElem = document.getElementById("li_publications");
    if(currTabElem){
    currTabElem.setAttribute("class", "");
    currTabElem.setAttribute("className", "");
    }

    currTabElem = document.getElementById("li_see_also");
    if(currTabElem){
    currTabElem.setAttribute("class", "");
    currTabElem.setAttribute("className", "");     /**/
    }
    
    return true;
}

function selectTab(str) {

    var currTabElem = ""
    
    currTabElem = document.getElementById(str);
    if(currTabElem){
    currTabElem.setAttribute("class", "actif");
    currTabElem.setAttribute("className", "actif");
    }
    
    return true;   /**/ 
}

function hideDivs() {

    var currTabElem = "";
    
    
    currTabElem = document.getElementById("div_summary");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_prestations");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_coach");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_partenaires");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    
    currTabElem = document.getElementById("div_foundings");
    if(currTabElem){
    currTabElem.style.display = "none";
    }
    
    currTabElem = document.getElementById("div_publications");
    if(currTabElem){
    currTabElem.style.display = "none";
    }

    currTabElem = document.getElementById("div_see_also");
    if(currTabElem){
    currTabElem.style.display = "none";
    }

    return true;/**/
}

function selectDiv(str) {

    var currTabElem = "";
    
    currTabElem = document.getElementById(str);
    currTabElem.style.display = "block";
    return true;/**/
}

function hideDiv(str) {

    var currTabElem = "";
    
    currTabElem = document.getElementById(str);
    currTabElem.style.display = "none";
    return true;/**/
}



function getValueSelected(id){
    var x = document.getElementById(id).selectedIndex;
    return document.getElementById(id).options[document.getElementById(id).selectedIndex].value;
}

function changePrintPdfLinkToPrintSearchProject(location,activity,size,service,offset_search){
    //var url="location="+location+"&service="+service+"&activity="+activity+"&taille="+size+"&offset="+offset_search;
    var url="/(location)/"+location+"/(service)/"+service+"/(activity)/"+activity+"/(taille)/"+size+"/(offset)/"+offset_search;
    document.getElementById('toolbox_print_link').href=print_url.replace(/query_print/, url);
    //document.getElementById('toolbox_pdf_link').href=print_pdf.replace(/query_print/, url);
}

function gup(name)
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

// FAQ AREA
function CloseAllFaq(open){
    var len = faqs_array.length;
    for (var i = 0; i <len; i++)
    {
      document.getElementById("question_"+faqs_array[i]).style.display = "none";
      document.getElementById("a_"+faqs_array[i]).innerHTML=open;
    }
    
    len = contacts_array.length;
    for (var i = 0; i < len; i++)
    {
      document.getElementById(contacts_array[i]).style.display = "none";
      document.getElementById("a_"+contacts_array[i]).innerHTML=open;
    }    
    
}

function ToggleView(elem,elem_a,open,close){
    var status = elem.style.display; 
    CloseAllFaq(open);
    if (status == "none"){
        elem.style.display = "block";
        elem_a.innerHTML=close;
    }
    else{
        elem.style.display = "none";
        elem_a.innerHTML=open;
    }
        
    return true;
}
//END FAQ AREA

function doRedirect(url){
    window.location=url;
}

// Global variables:

var faqs_array = [];
var contacts_array = [];


