function complyCheck()
{
	var categoryID = document.createLot.categoryID.value;
	var returnValue = false;

	if (categoryID == 0)
		alert('You must select the category for this item.');
	else if ((categoryID == 27 || categoryID == 28) && document.createLot.complyWithLaw.checked == false) // Ammunition or Arms & Armour
		alert('You need to confirm this sale complies with all laws.');
	else if ((categoryID == 71 || categoryID == 93) && document.createLot.lotSummary.value == "") // Orders, Medals & Plaques or Civilian Medals
		alert('You need to select the medal condition of this item.');
	else if ((categoryID == 29 || categoryID == 89 || categoryID == 91 || categoryID == 92) && document.createLot.lotSummary_badges.value == "") // Badges (Civilian or Military)
		alert('You need to select the badge condition of this item.');
	else if (document.createLot.lotDescription.value == "")
		alert('You must enter a description of this item.');
	else if (document.createLot.lotPaymentOption[0].checked == false && document.createLot.lotPaymentOption[1].checked == false && document.createLot.lotPaymentOption[2].checked == false && document.createLot.lotPaymentOption[3].checked == false && document.createLot.lotPaymentOption[4].checked == false && document.createLot.lotPaymentOption[5].checked == false && document.createLot.lotPaymentOption[6].checked == false && document.createLot.lotPaymentOption[7].checked == false && document.createLot.lotPaymentOption[8].checked == false)
		alert('You must select at least one payment type.');
	else if (document.createLot.lotIsOffer[0].checked == true) // auction
	{
		if (parseFloat(document.createLot.lotReservePrice.value) > 0 && parseFloat(document.createLot.lotReservePrice.value) <= parseFloat(document.createLot.lotOpeningBid.value))
			alert('The reserve price must be greater than the starting bid.');
		else if (document.createLot.lotSellPrice.value != "" && parseFloat(document.createLot.lotSellPrice.value) <= parseFloat(document.createLot.lotOpeningBid.value))
			alert('The buy-it-now price must be greater than the starting bid.');
		else if (document.createLot.lotSellPrice.value != "" && document.createLot.lotReservePrice.value != "" && parseFloat(document.createLot.lotSellPrice.value) <= parseFloat(document.createLot.lotReservePrice.value))
			alert('The buy-it-now price must be greater than the reserve price.');
		else
			returnValue = true;
	}
	else // offer facility
	{
		if (document.createLot.lotSellPrice_offer.value != parseFloat(document.createLot.lotSellPrice_offer.value) || parseFloat(document.createLot.lotSellPrice_offer.value) <= 0)
			alert('You must enter the displayed buy-it-now price.');
		else if (document.createLot.lotOfferAutoAccept.value != "" && (parseFloat(document.createLot.lotOfferAutoAccept.value) <= 0 || parseFloat(document.createLot.lotOfferAutoAccept.value) > parseFloat(document.createLot.lotSellPrice_offer.value)))
			alert('The optional auto-accept price must be less than the buy-it-now price.');
		else if (document.createLot.lotOfferAutoReject.value != "" && (parseFloat(document.createLot.lotOfferAutoReject.value) < 0 || parseFloat(document.createLot.lotOfferAutoReject.value) > parseFloat(document.createLot.lotSellPrice_offer.value)))
			alert('The optional auto-reject price must be less than the buy-it-now price.');
		else if (document.createLot.lotOfferAutoAccept.value != "" && document.createLot.lotOfferAutoReject.value != "" && parseFloat(document.createLot.lotOfferAutoAccept.value) <= parseFloat(document.createLot.lotOfferAutoReject.value))
			alert('The optional auto-reject price must be less than the optional auto-accept price.');
		else
			returnValue = true;
	}

	return returnValue;
}

function paypalFeeCheck()
{
	alert('If you accept PayPal, please state in your description any additional processing fees you may charge.');
	return true;
}

function toggleCategoryWarning ()
{
	var categoryID = document.createLot.categoryID.value;

	document.getElementById("ordersMedalsPlaguesDiv").style.display = "none";
	document.getElementById("badgesDiv").style.display = "none";
	document.getElementById("ammunitionDiv").style.display = "none";

	if (categoryID == 71 || categoryID == 93) // Orders, Medals & Plaques or Civilian Medals
		document.getElementById("ordersMedalsPlaguesDiv").style.display = "inline";
	else if (categoryID == 29 || categoryID == 89 || categoryID == 91 || categoryID == 92) // Badges (Civilian or Military)
		document.getElementById("badgesDiv").style.display = "inline";
	else if (categoryID == 27 || categoryID == 28) // Ammunition or Arms & Armour
		document.getElementById("ammunitionDiv").style.display = "inline";
}

function toggleOffer ()
{
	document.getElementById("auctionDiv").style.display = "none";
	document.getElementById("offerDiv").style.display = "none";

	if (document.createLot.lotIsOffer[0].checked == true)
		document.getElementById("auctionDiv").style.display = "block";
	else
		document.getElementById("offerDiv").style.display = "block";
}
