var W3CDOM = document.createElement && document.getElementsByTagName; var browser; var browser_version; var IE; window.domready = function(){ } window.onload = function(){ browserDetect(); dipatchSearch(); hideSearch(); activeReseauxSociaux(); hideReseauxSociaux(); // activeFavoris(); hideOthersSites(); SiteRating(); historyback(); } // FF le 20/01/10 ajout fonctionalités reseaux sociaux // function activeReseauxSociaux(){ var elm_Partager = document.getElementById('Partager'); elm_Partager.innerHTML = "Partager"; } function hideReseauxSociaux(){ var elm_RS = document.getElementById('blocReseauxSociaux'); elm_RS.style.display = "none"; } function montreReseauxSociaux(){ var elm_RS = document.getElementById('blocReseauxSociaux'); elm_RS.style.display = "block"; } function hideReseauxSociauxDoc(){ var elm_RS = document.getElementById('blocReseauxSociauxDoc'); elm_RS.style.display = "none"; var elm_tools = document.getElementById('tools'); elm_tools.style.display = "block"; } function montreReseauxSociauxDoc(){ var elm_RS = document.getElementById('blocReseauxSociauxDoc'); elm_RS.style.display = "block"; var elm_tools = document.getElementById('tools'); elm_tools.style.display = "none"; } function hideOthersSites(){ //hide nav other sites UL var box_other_sites = document.getElementById('nav_autres-sites'); if(box_other_sites){ var content = ""; content+= "\"OK\""; box_other_sites.innerHTML = content; var elm_select_other_sites = document.getElementById('select_nav_autres-sites'); var elm_a_nav_autres_sites = document.getElementById('btn_nav_autres-sites'); elm_a_nav_autres_sites.onclick = function(){ var url = elm_select_other_sites.value; this.href = url; if(url == 0) { alert("Vous devez choisir un site."); return false; } } } } function hideSearch(){ // hide label search var elm_label_search = document.getElementById('l_recherche'); elm_label_search.style.position = "absolute"; elm_label_search.style.left = "-10000px"; } function addFavoris() { dbname = document.location.toString().split(".nsf"); dbname = dbname[0] + ".nsf"; if (!IE) window.sidebar.addPanel("Les cles de la banque - Professionnels", dbname, ""); else window.external.AddFavorite(dbname, "Les cles de la banque - Professionnels"); } function activeFavoris(){ var elm_favoris = document.getElementById('favoris'); elm_favoris.innerHTML = "Favoris"; } function dipatchSearch(){ var elm_search = document.getElementById('query'); elm_search.value = "RECHERCHER"; elm_search.onclick = function(elm){ this.value = ""; } var img = '/keys_imgpro/btn_rechercher.gif'; var img_hover = '/keys_imgpro/btn_rechercher_h.gif'; var btn_search = document.getElementById('c_recherche_s'); btn_search.onclick = function(){ if(elm_search.value == "" || elm_search.value == 'RECHERCHER') alert("Vous devez saisir un mot cle."); } btn_search.onmouseover = function(){ this.src = img_hover; } btn_search.onmouseout = function(){ this.src = img; } } function historyback() { var elm_historyback = document.getElementById('historyback'); if (elm_historyback) elm_historyback.innerHTML = "\"PagePrécédent     
"; } function SiteRating(){ valeuractuelle = 3; new Starbox("rating", valeuractuelle, {onRate:mafonction, overlay: 'blank.png'}); function mafonction(event, info) { window.open('/Web/cles/Incoming.nsf/siterate2?CreateDocument&from=pro¬e='+info.average.toFixed(0), 'popup','scrollbars=no,resizable=no,width=400,height=120'); } } function browserDetect(){ var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i