// JavaScript Document
function checkAuction()
{
	var product=document.getElementById("product").value
	var price=document.getElementById("price").value
	var quantity=document.getElementById("quantity").value
	var unitP=document.getElementById("unit").value
	var days=document.getElementById("days").value
	var increment=document.getElementById("increment").value
	
	if (product=='') {
		alert ("You must select one product")
		return false
	}
	if(isNaN(parseInt(price))) {
		alert ("The value of price is incorrect")
		return false
	}
	if (price=='') {
		alert ("Start Price field is empty")
		return false
	}
	if(parseInt(quantity)!=quantity-0) {
		alert ("Quantity must be an integer")
		return false
	}
	if (quantity=='') { // agregar validacion de numero entero
		alert ("Quantity field is empty")
		return false
	}
	if (unitP=='') {
		alert ("Unit field is empty")
		return false
	}
	if (increment=='') {
		alert ("Increment field is empty")
		return false
	}
	if(parseInt(days)!=days-0) {
		alert ("The number of days must be and integer")
		return false
	}	
	if ((days=='') || (days>30) || (days<1)) {
		alert ("Value for days is incorrect")
		return false
	}
}