/* * @filename replace_localtools.js * @programmer Sothea Nim, info@sotheanim.com; snim@alcor.concordia.ca * @date August 27, 2009 * @description replacing the sharethis and printing tool */ function replace_localtools(hostname, uri, pagetitle, theSiteRoot, printLegacy) { hostname = (typeof hostname!=='undefined') ? hostname : window.location.host; uri = (typeof uri!=='undefined') ? uri : window.location.pathname; pagetitle = (typeof pagetitle!=='undefined') ? pagetitle : document.getElementsByTagName('title')[0].innerHTML; var sroot = (typeof theSiteRoot!=='undefined') ? theSiteRoot : '/'; sroot = sroot[0]==='/'?sroot:'/'+sroot; printLegacy = (typeof printLegacy!=='undefined') ? printLegacy : false; var reqHost = window.location.href.split('?'); if( reqHost[1] ) print_link = reqHost[0]+'?'+reqHost[1]+'&print=1'; else print_link = reqHost[0]+'?print=1'; var tools = '
 
'; //var tools = ''; if(document.getElementById("localtools_wrapper")) { document.getElementById('localtools_wrapper').innerHTML=tools; } else if(document.getElementById("localtools_wrapper-fr")) { document.getElementById('localtools_wrapper-fr').innerHTML=tools; } } function replace_localtools_fr(hostname, uri, pagetitle, theSiteRoot, printLegacy) { hostname = (typeof hostname!=='undefined') ? hostname : window.location.host; uri = (typeof uri!=='undefined') ? uri : window.location.pathname; pagetitle = (typeof pagetitle!=='undefined') ? pagetitle : document.getElementsByTagName('title')[0].innerHTML; var sroot = (typeof theSiteRoot!=='undefined') ? theSiteRoot : '/'; sroot = sroot[0]==='/'?sroot:'/'+sroot; printLegacy = (typeof printLegacy!=='undefined') ? printLegacy : false; var reqHost = window.location.href.split('?'); if( reqHost[1] ) print_link = reqHost[0]+'?'+reqHost[1]+'&print=1'; else print_link = reqHost[0]+'?print=1'; var tools = '
 
'; //var tools = ''; if(document.getElementById("localtools_wrapper")) { document.getElementById('localtools_wrapper').innerHTML=tools; } else if(document.getElementById("localtools_wrapper-fr")) { document.getElementById('localtools_wrapper-fr').innerHTML=tools; } }