function valDec(key)
{
    //alert(key)
	if ((key>47&&key<58) || (key==16) || (key>95&&key<106) || (key==110) || (key==190) || (key==13) || (key==8) || (key==9) || (key==46) || (key==37) || (key==38) || (key==39) || (key==40))
	{
	    return true;
	}
	else
	{
		alert('This field accepts only numeric (decimal) values.');
		return false;
	}
}

function replace(entry,out,add) {
	//out = '\s'; // replace this
	//add = ''; // with this
	temp = '' + entry; // temporary holder

	while (temp.indexOf(out)>-1)
	{
		pos= temp.indexOf(out);
		temp = '' + (temp.substring(0, pos) + add + 
		temp.substring((pos + out.length), temp.length));
	}
	return temp;
}

function clearPct(obj)
{
    obj.value = replace(obj.value, "%","");
}