﻿function isDescription(objValue)
{
      var alphaExp = /[^-_#()"!*&.@$+?:'\\\/,a-zA-Z0-9\s]/;        
      if(objValue.match(alphaExp))
           return false;
      return true;
}

function isName(objValue)
{
      var alphaExp = /[^a-zA-Z\s]/;      
      if(objValue.match(alphaExp))
           return false;
      return true;
}
function isSubject(objValue)
{
      var alphaExp = /[^-.,a-zA-Z0-9\s]/;      
      if(objValue.match(alphaExp))
           return false;
      return true;
}
function isMessage(objValue)
{
      var alphaExp = /[^-_.'",a-zA-Z0-9\s]/;      
      if(objValue.match(alphaExp))
           return false;
      return true;
}
function isEmail(objValue)
{
    var emailRegex=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(2([0-4]\d|5[0-5])|1?\d{1,2})(\.(2([0-4]\d|5[0-5])|1?\d{1,2})){3} \])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    if(!emailRegex.test(objValue))
        return false;
	return true;
}
function getreq()
{ // returns false if exists
	if(window.ActiveXObject)
	 { // if IE
		try
		 {
		    return new ActiveXObject("Msxml2.XMLHTTP");
	    }
	    catch(e)
	    {
		    try
		    {
		        return new ActiveXObject("Microsoft.XMLHTTP");
		    }
		    catch(e)
		    {
		        return;
		    }
		}
	}
	else if(window.XMLHttpRequest)
	{ // if Mozilla, Safari, etc.
		return new XMLHttpRequest();
	}
}
