function SubmitForm( ID )
{
	var mFlag = true;

	var ctrl = "";

	var count = 0;
	
	if ( ID == "all" )
	{
		var len = document.Form1.chk_id.length;
		for ( var i=0; i < len; i++ )
		{
			if ( document.Form1.chk_id[i].checked )
			{
				count++;
				var chk_value = document.Form1.chk_id[i].value;				//  gets the Value of Checkbox.  The value is corresponding Product ID
				eval ("ctrl = document.Form1.txt_quantity" + chk_value );
				if ( mFlag && ! ValidateNumeric(ctrl) )
				{
					mFlag = false;
				}
				if ( mFlag && IfContainsDecimal(ctrl.value) )
				{
					alert("Quantity Can Not Be In Fraction");
					ctrl.focus();
					mFlag = false;
				}
			}
		}
		if ( count == 0 )
		{
			alert("Please select a checkbox and procced");
			mFlag = false;
		}
	}
	else
	{
		eval ("ctrl = document.Form1.txt_quantity" + ID );
		if ( ! ValidateNumeric(ctrl) )
		{
			mFlag = false;
		}
		if ( mFlag && IfContainsDecimal(ctrl.value) )
		{
			alert("Quantity Can Not Be In Fraction");
			ctrl.focus();
			mFlag = false;
		}
	}

	if ( mFlag )
	{
		document.Form1.txt_submitted_product.value = ID
		document.Form1.submit()
	}
}