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(); activePrint(); hideOthersSites(); SiteRating(); hideOutils(); } // 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_tit = document.getElementById('titre_articleDoc'); // elm_tit.style.display = "none"; // var elm_tools = document.getElementById('actions1'); // elm_tools.style.display = "block"; } function montreReseauxSociauxDoc(){ var elm_RS = document.getElementById('blocReseauxSociauxDoc'); elm_RS.style.display = "block"; // var elm_tit = document.getElementById('titre_articleDoc'); // elm_tit.style.display = "block"; // var elm_tools = document.getElementById('actions1'); // 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 hideOutils(){ //hide nav outils UL var box_outils = document.getElementById('nav_outils'); if(box_outils){ var content = ""; content+= " \"OK"; box_outils.innerHTML = content; var elm_select_outils = document.getElementById('select_nav_outils'); var elm_a_nav_outils = document.getElementById('btn_nav_outils'); elm_a_nav_outils.onclick = function(){ var url = elm_select_outils.value; this.href = url; } } } 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 - Acteurs Sociaux", dbname, ""); else window.external.AddFavorite(dbname, "Les clés de la banque - Acteurs Sociaux"); } function addPageFavoris() { if (!IE) window.sidebar.addPanel("Les clés de la banque - Acteurs Sociaux > " + document.title, document.location, ""); else window.external.AddFavorite(document.location, "Les clés de la banque - Acteurs Sociaux > " + document.title); } function activeFavoris(){ var elm_favoris = document.getElementById('favoris'); var elm_favoris2 = document.getElementById('action_favoris'); if (eval(elm_favoris2)) elm_favoris2.innerHTML = "\"Ajouter"; elm_favoris.innerHTML = "Favoris"; } function activePrint(){ var elm_print = document.getElementById('action_imprimer'); if (eval(elm_print)) elm_print.innerHTML = "\"Imprimer\""; } function dipatchSearch(){ var elm_search = document.getElementById('query'); 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 HomeOutilsOK() { var outils = document.getElementById('c_outil'); document.location = "/Web/Cles/Incoming.nsf/Redirect_AS?CreateDocument&Category=" + outils.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=as¬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