function CheckEMail(strName)
{
    var aInputs = document.getElementsByTagName("INPUT");
    var node;
    var eMail = "";
    for (var i = 0; (node = aInputs.item(i)); i++)
    {
        if (node.id.indexOf (strName) >= 0)
        {
            eMail = node.value;    
            break;
        }
    }
    
    if (eMail=="")
    {
        alert("Please enter Email Address");
        return false;
    }

     if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(eMail))
     {
        return true
     }
     else
     {
        alert("Please Enter Valid E-Mail Address!");
        return false;
     }
    
    return true;
}

function GetEMailAddress(strEmail)
{   
    if (strEmail.indexOf('mailto:') >= 0)
    {
        window.location.href = strEmail.replace('##','@');
        //alert(strEmail.replace('mail##to:','mailto:').replace('##','@'));
        return false;  
    }
    else
        return strEmail;  
}
