<!-- Hide
function AddItemToCartEx(Qty, Price, Description, ID, Link, ProductData)
{
	if(Qty < 1)
	{
		alert("Please enter a numeric quantity");
	}
	else
	{
		DateObj = new Date(); // do this to keep it from using a cached copy
		top.cart_frame.document.location.replace("/cgi-bin/cec_shop/additem.cgi?cart_id="+top.cart_frame.document.cart_form.cart_id.value+"&Qty="+Qty+"&Price="+Price+"&Description="+Description+"&ID="+ID+"&Link="+Link+"&ProductData="+ProductData+"&Time="+DateObj.getTime());
	}
	return 1;
}

function AddItemToCart(Qty, Price, Description, ID, Link)
{
	AddItemToCartEx(Qty, Price, Description, ID, Link, 0);
}

function DeleteCartItem(ItemID)
{
	//alert("got DeleteCartItem for item "+ItemID+" cart #"+top.cart_frame.document.cart_form.cart_id.value);
	DateObj = new Date(); // do this to keep it from using a cached copy
	top.cart_frame.document.location.replace("/cgi-bin/cec_shop/deleteitem.cgi?cart_id="+top.cart_frame.document.cart_form.cart_id.value+"&ItemID="+ItemID+"&Time="+DateObj.getTime());
	//top.cart_frame.document.location.replace("/cgi-bin/cec_shop/showcart.cgi?cart_id="+top.cart_frame.document.cart_form.cart_id.value);
	return 1;
}

function PurchaseItems()
{
	//alert("got checkout command");
	
	//if(confirm(msgText))
	//top.location.replace("/cgi-local/order2new.cgi?cart_id="+top.frame6.document.cart_form.cart_id.value);
	DateObj = new Date(); // do this to keep it from using a cached copy
	//top.location.href = "https://secure25.securewebsession.com/flagdist.com/cgi-bin/cec_shop/order.cgi?cart_id="+top.cart_frame.document.cart_form.cart_id.value+"&Time="+DateObj.getTime();
	top.location.href = "https://secure25.securewebsession.com/flagdist.com/cgi-bin/cec_shop/order.cgi?cart_id="+top.cart_frame.document.cart_form.cart_id.value+"&Time="+DateObj.getTime();
	//top.location.href = "/cgi-bin/cec_shop/order.cgi?cart_id="+top.cart_frame.document.cart_form.cart_id.value+"&Time="+DateObj.getTime();

	//else
	//return;
}

function PrepForCGI(value)
{
	re = / /gi;
	return value.replace(re, "%20");
}

function dollarize(val)
{
	dollars = Math.floor(val);
	cents = val - dollars;
	cents = Math.round(100 * cents);

	if(cents<10)
		cents = "0" + cents;

	if(dollars==val)
		cents="00";

	return dollars+"."+cents;
}

// -->





