var W3CDOM = document.createElement && document.getElementsByTagName; var browser; var browser_version; var IE; window.domready = function(){ } window.onload = function(){ browserDetect(); tplFunctions(); dipatchSearch(); hideSearch(); activeReseauxSociaux(); hideReseauxSociaux(); // activeFavoris(); SiteRating(); hideOthersSites(); } // 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"; var elm_popup = document.getElementById('popup'); elm_popup.style.display = "block"; } function montreReseauxSociaux(){ var elm_RS = document.getElementById('blocReseauxSociaux'); elm_RS.style.display = "block"; var elm_popup = document.getElementById('popup'); elm_popup.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 clés de la banque", dbname, ""); else window.external.AddFavorite(dbname, "Les clés de la banque"); } function activeFavoris(){ var elm_favoris = document.getElementById('favoris'); elm_favoris.innerHTML = "Favoris"; } function dipatchSearch(){ var elm_search = document.getElementById('query'); var elm_search_from = document.getElementById('c_from'); elm_search.value = "RECHERCHER"; elm_search.onclick = function(elm){ this.value = ""; } var img = '/Keys_img/btn_rechercher.gif'; var img_hover = '/keys_img/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 search() {//obsolete ?? var elm_search = document.getElementById('query'); var elm_search_from = document.getElementById('c_from'); if(elm_search.value != "" && elm_search.value != 'RECHERCHER') document.location = "/Web/Cles/Incoming.nsf/SearchHUBFF?Openform&query=" + elm_search.value + "&from=" + elm_search_from.value; } 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=hub¬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