
<!-- Begin

 /// is_blank checks for blank strings
 /// takes 3 args - String, Field Name and Minimum Length of Field
 /// Returns true if string is blank or less than minimum length
 
function is_blank(Str, Name, Num)
{
	
	if(Str=="")
	{
		alert(Name + " cannot be blank")
		return true
	}
	
	if(Num)
	{
		if(Str.length<Num)
		{
			alert(Name + " should have at least " + Num + " characters")
			return true
		}
	}
	return false
}


 /// is_number checks whether a string is a valid number
 /// takes 3 args - String, Field Name and Minimum Length of Field
 /// Returns true if string is a number else false
 
function is_number(Str, Name, Num)
{
	if(isNaN(Str))
	{
		alert(Name + " should have only digits")
		return false
	}
	
	if(Num)
	{
		if(Str.length<Num)
		{
			alert(Name + " should have at least " + Num + " digits")
			return false
		}
	}
	return true
}

 /// is_number checks whether a string has special characters
 /// takes 3 args - String, Field Name 
 /// Returns true if string is a valid else false
 
function str_check (Str, Name) 
{
	var str_pat = /['"\\\[\]()]/

	if (str_pat.test(Str))
	{
		alert(Name + " cannot contain characters - " + "' \" \\ [ ] ( )")
		return false
	}
	return true
}

// End --> 