	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	//Theses 2 functions is used when adding items to 
	//the basket via the iframe page - 
	//it is called in the write_article.asp, factfile page and incDisplayProductBoxes.asp  
	
	function BasketMe(lHCode,lOption1,lOption2,lQtyIsFixed)
	{
		
		var myFrame = window.frames[0].document.frmSubForm
		var Qty = 1
		
		if(lQtyIsFixed=="N")
		{Qty = eval("document.Basket.a" + lHCode + ".value")}
		
		myFrame.sfrm_hCode.value = lHCode
		myFrame.sfrm_Qty.value = Qty
		
		if (lOption1=='NoEmpty')
		{
			var jOption1 = eval("document.Basket" + "." + "L1" + lHCode);
			var SelectedOption1 = jOption1.options[jOption1.selectedIndex].value;
			myFrame.sfrm_Option1.value = SelectedOption1
		}
		
		if (lOption2=='NoEmpty')
		{
			var jOption2 =  eval("document.Basket" + "." + "L2" + lHCode);
			var SelectedOption2 = jOption2.options[jOption2.selectedIndex].value;
			myFrame.sfrm_Option2.value = SelectedOption2	
		}
		
		if ((Qty ==0) ||(Qty==""))
		{Qty = 1}
		
		var bOK = confirm(Qty + " item(s) will be added to your basket.\n NB. You will be able to remove this item from the basket.")
		if (bOK)
		{
		myFrame.submit();
		
		//...Firefox handling starts...............Date included: 10/06/08, by George
		
		if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);

			var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number

			if (ffversion>=3)

			window.location.reload(false);

			else if (ffversion>=2)

			window.location.reload(false);

			else if (ffversion>=1)

			window.location.reload(false);

		}
		//...Firefox handling finishes...............
		}
		
	}
		
		
		
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	
	function BasketMe_MinOrder(lHCode,lOption1,lOption2,lMinOrderQty)
	{
		
		var myFrame = window.frames[0].document.frmSubForm
		var Qty = lMinOrderQty
		
		if(lMinOrderQty=="")
		{Qty = eval("document.Basket.a" + lHCode + ".value")}
		
		myFrame.sfrm_hCode.value = lHCode
		myFrame.sfrm_Qty.value = Qty
		
		if (lOption1=='NoEmpty')
		{
			var jOption1 = eval("document.Basket" + "." + "L1" + lHCode);
			var SelectedOption1 = jOption1.options[jOption1.selectedIndex].value;
			myFrame.sfrm_Option1.value = SelectedOption1
		}
		
		if (lOption2=='NoEmpty')
		{
			var jOption2 =  eval("document.Basket" + "." + "L2" + lHCode);
			var SelectedOption2 = jOption2.options[jOption2.selectedIndex].value;
			myFrame.sfrm_Option2.value = SelectedOption2	
		}
		
		if ((Qty ==0) ||(Qty==""))
		{Qty = 1}
		
		var bOK = confirm(Qty + " item(s) will be added to your basket.\n NB. You will be able to remove this item from the basket.")
		if (bOK)
		{
		myFrame.submit();
		
		//...Firefox handling starts...............Date included: 10/06/08, by George
		
		if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);

			var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number

			if (ffversion>=3)

			window.location.reload(false);

			else if (ffversion>=2)

			window.location.reload(false);

			else if (ffversion>=1)

			window.location.reload(false);

		}
		//...Firefox handling finishes...............
		
		}
		
	}
	
		
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	
	function QuantityValidation(lHCode)
	{
		var Qty = eval("document.Basket.a" +  lHCode + ".value");
		var bOK = isInteger(Qty)
		
		if ((Qty > 9999) || (Qty < 1) || (!parseInt(Qty,10)) || (bOK == false))
		{
			alert ("The Quantity must be between 1 and 9999 inclusive.")
			var NewQuantity = "document.Basket.a" + lHCode + ".value = 1"
			eval(NewQuantity)
			return false;
		}
	}
	
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	
	function isInteger(s)
	{   var i;
	    for (i = 0; i < s.length; i++)
	    {   
	        // Check that current character is number.
	        var c = s.charAt(i);
	        if (((c < "0") || (c > "9"))) return false;
	    }
	    // All characters are numbers.
	    return true;
	}
	
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::