function validate_quantity_form_eng(theForm) 
  {  
  
		if (theForm.qty.value.length == 0)
		{
			alert("Fields of the quantity are obligatory!");
			theForm.qty.focus();
			return false;
		}  
		if ( !isInteger(theForm.qty.value) )
		{
			alert("The quantity must be numeric!");
			theForm.qty.focus();
			return false;
		}
		if (theForm.qty.value == 0)
		{
			alert("The quantity must be numeric > 0!");
			theForm.qty.focus();
			return false;
		}

    return true;
  }

function checkNumber(obj)
{
	for(var i=0; i<obj.elements.length; i++)
	{
		if((obj.elements[i].type == "text") && (obj.elements[i].id != "promotion_code_txt"))
		{
			if (obj.elements[i].value.length == 0)
			{
				alert("Fields of the quantity are obligatory!");
				obj.elements[i].focus();
				return false;
			}  
			if ( !isInteger(obj.elements[i].value) )
			{
				alert("The quantity must be integer!");
				obj.elements[i].focus();
				return false;
			}
			if (obj.elements[i].value == 0)
			{
				alert("The quantity must be numeric > 0!");
				obj.elements[i].focus();
				return false;
			}
		}
	}

    return true;
}

function submitPromotionCode(){
    var txtValue = document.getElementById("promotion_code_txt");
    var formPromotion = document.getElementById("promotionform");
    var inputForm = document.getElementById("promotion_code");
    inputForm.value = txtValue.value;
    formPromotion.submit();
}
