// JavaScript Document
function ValidateNum(item,type,str)
{
	var returnVal = 0;
	var intVal;
	var strVal = new String(item.val());
	var ch;
	var i;
	var j;
	if(type == "FREQ")//本振频率，下行频率
	{
		for ( i = 0 ; i < strVal.length ; i++ )
		{      
			ch = strVal.charAt(i);
 			if(ch < '0' || ch > '9')
			{
				alert(str+"Please input valid decimal integer!");
				item.focus();
	       		return false;
			}
		}
		intVal= parseInt(item.val(),10);
		if(intVal > 99999999 || intVal <1)
		{
			alert(str+"must be between 1 and 99999999!");
			item.focus();
			return false; 
		}
	}
	else if(type == "SYMBOLRATE")
	{
		for ( i = 0 ; i < strVal.length ; i++ )
		{      
			ch = strVal.charAt(i);
 			if(ch < '0' || ch > '9')
			{
				alert(str+"Please input valid decimal integer!");
				item.focus();
	       		return false;
			}
		}
		intVal= parseInt(item.val(),10);
		if(intVal > 999999000 || intVal <1)
		{
			alert(str+"must be between 1 and 999999000!");
			item.focus();
			return false; 
		}
	}
	  return true;
}
