function getCartItem(nIndex)
        {
        var act_cart= getCookie("CART_CONTENT");
        var sTemp =(act_cart != null) ? sTemp=act_cart.split("\t"):0;
        return (sTemp.length > 0) ? sTemp[nIndex] : 0;
        }
function win()
        {
        var sMsg = window.open("paycash1.htm","","height = 507, width = 400, left = 378, top = 40");
        }
function GotoAnchor(sAnchor)
        {
        window.location.hash = sAnchor;
        }
function StockAvailability(pItem,stkmessage)
        {
        var strIDs = '';
        if (stkmessage != '') strIDs = stkmessage;
        if (pItem > 0) strIDs = 'Availability: Normally dispatched in 2-3 business days';
        return strIDs;
	}
function Availability(pItem)
        {
        var strIDs = '';
        if (pItem > 0) strIDs = 'Availability: Normally dispatched in 2-3 business days';
        return strIDs;
	}
function TaxMessage(pItem,qItem)
        {
	var strIDs = '';
	var exempt = '';
	var incvat = '';
	if (qItem == 'YES') exempt = '&nbsp;<a href="http://www.westons.com/vat_exemption.html">qualifies for VAT relief</a><br>*See VAT Exemption declaration form at the Checkout.';
	strIDs = '&nbsp;&nbsp;<span class="actxxsmall">';
        if (pItem != '') 
		{
		incvat = Mid(pItem,0,InStr(pItem,"US")-5);
	        strIDs += incvat + 'inc. VAT (uk/eu) ';
		}
	if (pItem == '')
		{
		strIDs += 'ex. VAT (uk/eu) ';
		}
	strIDs += exempt + '</span>';
        return strIDs;
	}
function VatExemption(pItem)
        {
        var strIDs = '';
        if (pItem == 'YES')
                strIDs = 'qualifies for VAT relief';
        else
                strIDs = '';
        return strIDs;
	}
function createCookie(name,value,days)
	{
	if (days)
	{
	var date = new Date();
	date.setTime(date.getTime()+(days*24*60*60*1000));
	var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	}
function ClearDetails()
	{
	if (confirm('This will clear your order and address details completely.\nClick "View Cart" to change your order.\nDo you wish to proceed?') == true)
	{
	createCookie("ACTINIC_CART","",-2);
	createCookie("CART_CONTENT","",-2);
	createCookie("CART_COUNT","",-2);
	createCookie("CART_TOTAL","",-2);
	createCookie("ACTINIC_BUSINESS","",-2);
	createCookie("ACTINIC_REFERRER","",-2);
	window.location.reload();
	}
	}
