// NebuCart - The JavaScript Shopping Cart
// by Nebulus Designs
//
// Copyright 1999-2001 all rights reserved.

// None of this script may be redistributed or sold
// without the authors express consent.
// Violations of copyright will be prosecuted.

// If you would like to use NebuCart,
// email us at nebucart@nebulus.org
// or visit http://nebucart.nebulus.org

// ********************************************
// NebuCart Mini Cart Plus View               *
// This script req	uires that you            *
// source NC_formatting.js on the same        *
// page to work                               *
// ********************************************
// DO NOT CHANGE ANYTHING BELOW THIS LINE!    *
// ********************************************

var itemCount     = 0;
var cartTotal     = 0;
var refresh       = 1000;
var timer         = null;

function showCartStats(){

	itemCount = 0;
	cartTotal = 0;

	for(tmpCount = 0; tmpCount < Cart.length; tmpCount++){
		itemCount += Number(Cart[tmpCount].qty);
		cartTotal += Number(Cart[tmpCount].qty) * Number(Cart[tmpCount].price);
	}

	if(Number(cartTotal)){
		document.NC_CartStatus.cartVal.value = currency + formatDecimal(cartTotal);
	} else {
		document.NC_CartStatus.cartVal.value = currency + formatDecimal('0');
	}
	document.NC_CartStatus.itemVal.value = itemCount;

	if(timer != '' && timer != null){
		clearTimeout(timer);
	}

	timer = setTimeout('showCartStats()',refresh);

}

document.write('<form name="NC_CartStatus">');
document.write('<table cellpadding=0 cellspacing=0 border=0>');
document.write('<tr><td colspan=1 align=left>');
document.write('<font face=' + myFont + ' size=1 color = #000000>&nbsp;&nbsp;Items:&nbsp;</font>');
document.write('<font face=' + myFont + ' size=1><input type="text" size="3" name="itemVal"></font>');
document.write('<align="left"><font face=' + myFont + ' size=1 color = #000000>&nbsp;Total:&nbsp;</font>');
document.write('<font face=' + myFont + ' size=-3><input type="text" size="6" name="cartVal"></font>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</form>');
document.onLoad = setTimeout('showCartStats()',100);