﻿function validateEmail(strValue) 
{
    var objRegExp  = /(^[a-z]([a-z_\.]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i;
  
    return objRegExp.test(strValue);
}

function EnterPressed(e) 
{
    if (!e) { e = window.event;}
    var intKeyPressed = 0;
    var b = false;
    try { if (e.keyCode) { intKeyPressed = e.keyCode; b = true; } }
    catch (E) { }
    if (!b) {
        try  { if (e.charCode) { intKeyPressed = e.charCode; } }
        catch(E) {  }
    }
    if (intKeyPressed == 13) 
    {
        e.cancelBubble = true;
        if (e.stopPropagation) 
        {
            e.stopPropagation();
        }
        e.returnValue = true;
        return true;
    }
    return false;
}

