﻿function convert(text)
{
    var newText = "";

    for (i=0; i<text.length; i++)
        newText += "&#" + text.charCodeAt(i) + ";";

    return newText;
}

function mail2(three, two, one)
{
   one = convert(one);
   two = convert(two);
   three = convert(three);
   var mailto = convert('mailto:');

   document.write('<a href="' + mailto + 
   one + '@' + two + '.' + three + '">' + 
   one + '@' + two + '.' + three + '</a>');
}


