function markitem(id) {
  	var obj = document.getElementById(id);
	
	var new_id = 'i'+id;
	var obj_input = document.getElementById(new_id);
	var value =obj_input.value;
	
	//window.alert((value));
	//if(value.lenght>0) {
		if(is_numeric(value)) {
			obj.style.color = '#ffffff';
			obj.style.fontWeight= 'bold';
			obj.style.background='navy';
			//window.alert("Value = '"+value+"'");
		}
		else {
			obj.style.color = '#000000';
			obj.style.fontWeight= 'normal';
			obj.style.background='#F4F5FB';
		}
	//}
	//else {
	//	window.alert('Nothing');
	//}

}
function is_numeric(sValue) {
	var expNumber = /^[1-9]+$|^\-[1-9]+$|^[1-9]+\.?[1-9]+$|^\-[1-9]+\.?[1-9]+$/
		//Checking that the value in numeric.
	return expNumber.test(sValue);
			
}


	function IsValidNumber(sValue, iMinValue, iMaxValue, iDecimalPlaces, bCanBeEmpty) {
	var expNumber = /^[0-9]+$|^\-[0-9]+$|^[0-9]+\.?[0-9]+$|^\-[0-9]+\.?[0-9]+$/
	var hReturnInfo = new ReturnInfo(0, '', 0, 1);

		
		//Checking if a value was entered.
		if (IsEmpty(sValue).ReturnCode == 1) {
			hReturnInfo.ReturnCode = 1;
			hReturnInfo.ErrorDescription = 'Please enter a number';
		}

		//Checking that the value in numeric.
		if (hReturnInfo.ReturnCode == 0)
			if (!expNumber.test(sValue)) {
				hReturnInfo.ReturnCode = 2;
				hReturnInfo.ErrorDescription = 'Please enter a valid number';
			}
	
		//Checking that the number is greater or equal to the minimum allowed.
		if (hReturnInfo.ReturnCode == 0)
			if ((iMinValue != null) & (sValue!=''))
				if (sValue < iMinValue) {
					hReturnInfo.ReturnCode = 3;
					hReturnInfo.ErrorDescription = 'Please enter a number grater or equal to ' + iMinValue;
				}
				
	
		//Checking that the number is less or equal to the maximum allowed.
		if (hReturnInfo.ReturnCode == 0)
			if ((iMaxValue != null) & (sValue!=''))
				if (sValue > iMaxValue) {
					hReturnInfo.ReturnCode = 4;
					hReturnInfo.ErrorDescription = 'Please enter a number less than or equal to ' + iMaxValue;
				}
		
				
		//Checking that the number contain the allowed decimal places or less.
		if (hReturnInfo.ReturnCode == 0)
			if (iDecimalPlaces > 0)
				if (sValue.indexOf('.') != -1)
					if (sValue.substring(sValue.indexOf('.')+1, sValue.length).length > iDecimalPlaces) {
						hReturnInfo.ReturnCode = 5;
						hReturnInfo.ErrorDescription = 'Please enter a number with ' + iDecimalPlaces + ' decimal places';
					}
	
		//Canceling the error information if the field can be empty.
		if (bCanBeEmpty && hReturnInfo.ReturnCode == 1) {
			hReturnInfo.ReturnCode = 0;
			hReturnInfo.ErrorDescription = '';
		}
				
		return hReturnInfo;
	}
