// mailto.js

function MailTo(DescrTxt, Email1Txt, Email2Txt, SubjectTxt) {
  var htmltxt = "";
  var FindPos = 0;
  FindPos = SubjectTxt.indexOf("\"");
  while ((SubjectTxt.length > 0) && (FindPos != -1)) {
    SubjectTxt = SubjectTxt.substring(0, FindPos) + "'" + SubjectTxt.substr(FindPos + 1, SubjectTxt.length);
    FindPos = SubjectTxt.indexOf("\"");
  }
  htmltxt += '<a href="mailto:' + Email1Txt + '@' + Email2Txt;
  if (SubjectTxt != "" ) htmltxt += '?subject=' + SubjectTxt;
  htmltxt += '">';
  htmltxt += DescrTxt + '</a>';
  return htmltxt;
}
