// 
//  copyright Bill Arnett, Richmond Phoenix Enterprises
//
//  maillink - formulate an HTML mailto link
//  usage: maillink("user", "subdomain", "domain", "text", "subject text");
//
//  mailaddr - returns the mailto clause for a link
//  usage: mailaddr("user", "subdomain", "domain", "subject text");
//
//  sendto - open an email window
//  usage: sendto("user", "subdomain", "domain", "text", "subject text");


function weblink(url, text)
{  if (text == '')
  {
    text = url;
  }
  document.write('<a href="' + 'http://' + url + '"> ' + text + '</a>');}


function maillink(user, subdomain, domain, text, subject)
{  var addr = user + '@' + subdomain + '.' + domain;

  if (text == '')
  {
    text = addr;
  }
  document.write('<a href="' + 'mailto:' + addr + '?subject=' + subject + '"> ' + text + '</a>');}


function mailaddr(user, subdomain, domain, subject)
{  var addr = user + '@' + subdomain + '.' + domain;
  return('"mailto:' + addr + '?subject=' + subject + '"');}

function sendto(user, subdomain, domain, subject)
{  var addr = user + '@' + subdomain + '.' + domain;
  window.location='mailto:' + addr + '?subject=' + subject + '';}

function company_email()
{ 
  maillink('info','cafeburlington','com','','Website contact:');
}

function company_website()
{ 
  weblink('www.cafeburlington.com','');
}

function br()
{ 
  document.write('<BR>');}
