
function isAlphaNumric(c)
{
	var test =  c;
	//alert(c.charCodeAt(0)+"  charcode");
	if ((c.charCodeAt(0)>=65 && c.charCodeAt(0)<=90 )|| (c.charCodeAt(0)>=97 && c.charCodeAt(0)<=122 ) || (c.charCodeAt(0)>=48 && c.charCodeAt(0)<=57 ) )
	{
		//alert(c);
		return true;
	}
	//alert(c);
	return false;
}
function isAlphaNumricDotUnderscore(c)
{
	var test =  c;
	//alert(c.charCodeAt(0)+"  charcode");
	if ((c.charCodeAt(0)>=65 && c.charCodeAt(0)<=90 )|| (c.charCodeAt(0)>=97 && c.charCodeAt(0)<=122 ) || (c.charCodeAt(0)>=48 && c.charCodeAt(0)<=57 ) || (c.charCodeAt(0)==46 ) || (c.charCodeAt(0)==95 ) )
	{
		//alert(c);
		return true;
	}
	//alert(c);
	return false;
}
function isCharacter(c)
{
	var test =  c;
	//alert(c.charCodeAt(0)+"  charcode");
	if ((c.charCodeAt(0)>=65 && c.charCodeAt(0)<=90 )|| (c.charCodeAt(0)>=97 && c.charCodeAt(0)<=122 ))
	{
		//alert(c);
		return true;
	}
	//alert(c);
	return false;
}

function isNumber(c)
{
	var test =  c;
	//alert(c.charCodeAt(0)+"  charcode");
	if ((c.charCodeAt(0)>=48 && c.charCodeAt(0)<=57 ))
	{
		//alert(c);
		return true;
	}
	//alert(c);
	return false;
}

function IsNumericNew(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;

	for (i = 0; i < sText.length && IsNumber == true; i++) 
    { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
    }
    return IsNumber;
}
function isDigit(c)
{
	var test = "" + c;

	if (test == "0" || test == "1" || test == "2" || test == "3" || test == "4"|| test == "5" || test == "6" || test == "7" || test == "8" || test == "9" )
	{

		return true;
	}

	return false;
}
//****************FUNCTION TO REMOVE WHITESPACES***************************
// Removes leading whitespaces
function LTrim( value ) {
	
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
	
}

// Removes ending whitespaces
function RTrim( value ) {	
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");	
}

// Removes leading and ending whitespaces
function trim( value ) {	
	return LTrim(RTrim(value));	
}

//***********************************************************************
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object