function tellafriend(url) {
 newwindow = window.open(url + ';template=tipAFriend', '_blank', 'width=400,height=400,status=no,location=no,toolbar=no');
}

function facebook_click() {
  u=location.href;
  t=document.title;
  window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
  return false;
}

function twitter_click() {
  u=location.href;
  t=document.title;
  window.open('http://twitter.com/home?status='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=810,height=436');
  return false;
}

function printpreview(url) {
 newwindow = window.open(url + ';template=print', '_blank', 'width=600,height=600,status=no,location=no,toolbar=no,scrollbars=yes');
}

function goFigure(url) {
  /*  psfile://    */
  if (url.indexOf('psfile://') != -1) {
    url = url.replace('psfile://','./?module=Files;action=File.getFile;ID=');
  }

  /*  psm://    */
  if (url.indexOf('psm://') != -1) {
    url = url.replace('psm://','mailto:');
  }

  /*  psf://    */
  if (url.indexOf('psf://') != -1) {
    url = url.replace('psf://','./?module=Articles;action=ArticleFolder.publicOpenFolder;ID=');
  }

  /*  ps://    */
  if (url.indexOf('ps://') != -1) {
    url = url.replace('ps://','');
    if (url.indexOf(';')) {
      url = url.substring(url.indexOf(';')+1,url.length);
    }
    url = './?module=Articles;action=Article.publicShow;ID=' + url;
  }

  /*  psff://    */
  if (url.indexOf('psff://') != -1) {
    url = url.replace('psff://','./?module=Files;action=FileFolder.publicDisplay;ID=');
  }
  window.open(url);
}