/* @filename localtools.js @programmer Sothea Nim, info@sotheanim.com @date August 2009 @description This file is used to control share tools or local tools: print, share, and email */ var icon_path = 'https://hvg.ece.concordia.ca/custom/globalmk.concordia.ca/images/icons/'; var icon_dim = ' width="16px" height="16px" '; var share = false; var img_style = ' style="margin:0;padding:0;border:0;"'; var request_uri = document.location.href; var delicio_link = 'http://del.icio.us/post?url='+ request_uri; var friendfeed_link = 'http://friendfeed.com/share?url='+ request_uri; var twitter_link = 'https://twitter.com/concordia'; var fb_link = 'http://www.facebook.com/share.php?u='+ request_uri; var googlebookmark_link ='http://www.google.com/bookmarks/mark?op=edit&bkmk='+ request_uri; var linkedin_link = 'http://www.linkedin.com/shareArticle?mini=true&url='+request_uri+'&summary=&source='; var live_link = 'https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url='+request_uri+'&top=1'; var myspace_link = 'http://www.myspace.com/Modules/PostTo/Pages/?l=3&u='+request_uri+'&c=%3Cp%3EPowered+by+%3Ca+href%3D%22http%3A%2F%2Fsharethis.com%22%3EShareThis%3C%2Fa%3E%3C%2Fp%3E'; var buzzup_link = 'http://buzz.yahoo.com/buzz?targetUrl='+request_uri+'&src=sharethis'; function localTools(arg, pagetitle) { if( arg === 'print' ) { localPrint(); } else if( arg === 'share' ) { localShare(arg, pagetitle); } else if( arg === 'email' ) { localEmail(); } else if( arg === 'printLegacy' ) { return localPrintLegacy(arg); } return false; } function localPrint() { closeShare(); } function localPrintLegacy(arg) { closeShare(); return "?print=1"; } function localShare(arg, pagetitle) { box = document.getElementById('toolbox'); if( share === false ) { box.style.display="block"; share = true; } else if( share === true ) { box.style.display="none"; share = false; } pagetitle = "Concordia University » "+pagetitle; box.innerHTML = '
 
'; icons = '
'; icons += '
'; icons += ' Delicious
'; icons += ' Friendfeed
'; icons += ' Twitter
'; icons += ' Facebook
'; icons += ' Buzz Up!
'; icons += '
'; icons += '
'; icons += ' Google Bookmark
'; icons += ' LinkedIn
'; icons += ' Live!
'; icons += ' MySpace
'; icons += '
'; icons += '
 
'; icons += '
'; icons += '
 
'; box.innerHTML += icons; return false; } function localEmail() { closeShare(); } function closeShare() { share = false; box = document.getElementById('toolbox'); box.style.display="none"; } function closePanel() { closeShare(); return false; }