/* Update by Mymik
   April 15, 2008: Created universal function for protection email from spam
   July 5, 2009: Update function. All anti-spider elements should be in <span class='anti-spider'></span> element
*/
function writeMyEmail() {
    /// <summary>
    var anti_spider = document.getElementsByTagName("span");
    
    var reg = /LOADEMAIL\[([^\]]*)\]DOMAIN\[([^\]]*)\]/;
    for (var index = 0; index < anti_spider.length; index++) {
        if (anti_spider[index].className == 'anti-spider') {
            var theHTML = anti_spider[index].innerHTML;
            while (reg.test(theHTML)) {
                theHTML = theHTML.replace(reg, EmailShow);
            }
            anti_spider[index].innerHTML = theHTML;
            
        }
    }
}
function EmailShow(temp, login, domain) {
    /// <summary>
    /// Convert our pattern to real email address
    /// </summary>
   
   return "<a " + "href=\'mai" + "lto:" + login + "@" + domain + "\'>" + login + "@" + domain + "</a>";
}
