// JavaScript Document
   function isNumberFloat(inputString)

{

 if((!isNaN(parseFloat(inputString)))){return true;}else{return false;}

}

 function minLength(inputString,inputLength)

{

if(inputString.length <= inputLength){return true;}else{return false;}

}

function onlyNumbers(inputString)

{

  var searchForNumbers = /\D+\_+\W+\s+\S+/

  if(searchForNumbers.test(inputString)) {return false;}else{return true;}

} 

function onlyCharacters(inputString)

{

  var searchForNumbers = /\d+/

  if(searchForNumbers.test(inputString)){return false;}else{ return true;}

}
//return true if a supplied email address is not valid//
function isEmail(obj,comp)
{
	if(comp==1){
	if(obj.length==0){return false;}
	}
    var i,j,k=1,l=1;
	k+=obj.indexOf('@',0);
	l+=obj.indexOf('.',0);
	i=obj.length;
	j=i-l;
	if( obj.indexOf('@',0)<1 || obj.indexOf('.',0)<=k || j<3 )
	{
		return true;
	}
	return false;
}
//alerts the user to fill a valid email address and put the cursor on the text box
function chkEmail(frm,msg,comp)//function to check if email text is empty or not 
{
	if(isEmail(frm.value,comp))
	{
		alert(msg);
		frm.focus();
		return 1;
	}
	return 0;
}//function
//Function to Check if the input is Numeric or not
function is_num(frm,msg)
{
	var obj = frm.value;
	var objint = parseInt(obj);
	if(isNaN(objint))
	{	
		window.alert(msg);
		frm.focus();
		return 1;
	}
	return 0;
}			

//Returns true the text box doesn'rt retain value
function isEmpty(obj)
{
	if(obj=='')
		return true;
	return false;
}

//alerts the user to fill missed required textboxes and put the cursor on the text box
function chkEmpty(frm,msg)
{
	if(isEmpty(frm.value))
	{
		alert(msg);
		frm.focus();
		return 1;
	}
	return 0;
}//function