function check_text(who,display)
{
	if(who.value == "")
	{
		alert(display);
		who.focus();
		return (false);
	}
	return (true);
}

function check_radio(curForm,who,display)
{
	if(!AnySelected(curForm, who))
	{
		alert(display);
		return (false);
	}
	return (true);
}

function check_select(who,nullval,display)
{
	if(who.value == nullval)
	{
		alert(display);
		who.focus();
		return (false);
	}
	return (true);
}

function check_num(val,display)
{
	var i,word;
	for(i=0;i<val.length;i++)
	{
		word=str.substring(i,i+1);
		c=word.charCodeAt(0);
    if(c<48 || c>57)
		{
			alert(display);
			return false;
			break;
		}
	}
	return (true);
}

String.prototype.Trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
	return this.replace(/(^\s*)/g, "");
}
String.prototype.Rtrim = function()
{
	return this.replace(/(\s*$)/g, "");
}

