
    function CheckNumeric(e) {
        var k;
        document.all ? k = e.keyCode : k = e.which;
        return ((k >= 48 && k <= 57) || k == 46 || k == 8);
    }

    function ValidateEmail(Element)
    {
	    var RegExpString  = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/i;
	    if(!RegExpString.test(Element.value))
	    {
		    return false;
	    }
	    else
	    {
		    return true;
	    }
    }

    function RequiredAlert(val)
    { 
     return val + ' is required. \n';
    }
    
    function checkImage(img)
    {
        if(img!='' && img.substring(img.length-3,img.length).toLowerCase() !='jpg' && img.substring(img.length-3,img.length).toLowerCase() !='gif' && img.substring(img.length-3,img.length).toLowerCase() !='bmp' && img.substring(img.length-3,img.length).toLowerCase() !='png')
            return true
        else
            return false
    }
    
    function setMsg(str,type)
    {
        if(document.getElementById('divSuccess')!=null) document.getElementById('divSuccess').style.display='none';
        if(document.getElementById('divError')!=null) document.getElementById('divError').style.display='none';
        if(document.getElementById('divInfo')!=null) document.getElementById('divInfo').style.display='none';
        if(type=='S')
        {
            document.getElementById('divSuccess').style.display='';
            document.getElementById('lblMsg').innerHTML=str;
        }
        else if(type=='E')
        {
            document.getElementById('divError').style.display='';
            document.getElementById('lblErrMsg').innerHTML=str;
        }
        else if(type=='I')
        {
            document.getElementById('divInfo').style.display='';
            document.getElementById('lblInfoMsg').innerHTML=str;
        }
    }

