//Created 25th May 2007.
//Amended 30th May 2007.

function checkBasket(frm)
//Checks the basket for items that may cause problems. frm is the form that is passed into here.
{
	var blnNoFinish = false;
	var blnFinishListBox = false;
	var numElement = frm.elements.length;
	var strPrompt = "Please enter a finish for all of the basket items and press update.";

	for (var numLoop = 0; numLoop < numElement; numLoop++)
	{
		objElement = frm.elements[numLoop];	

		with (objElement)
		{
			strElement = name;
			blnFinishListBox = strElement.indexOf("lstFinish") >= 0;
	
			if (blnFinishListBox) 
			{
				var numOption = selectedIndex;
				var strOption = options[numOption].text;
				blnNoFinish = strOption == "Please Choose";
			}
		}
	}

	if (blnNoFinish) window.alert(strPrompt);

	//Cancel the event.
	return !blnNoFinish;
}

function freeDelivery()
//
{
	objFree = document.getElementById("free");
	var strAttribute = "";

	if (objFree != null)
	{
		strAttribute = objFree.style.visibility;
		strAttribute = (strAttribute == "hidden") ? "visible" : "hidden";
		objFree.style.visibility = strAttribute;
	}
}


window.setInterval(freeDelivery, 1100);