// validation.js version 1.0 2007-12-11
//
// javascript client-side functions for SimpleCart PHP system
//
// copyright © 2007 WebAware Pty Ltd
//---------------------------------------------------------------------


function SimpleCart() {
}

// class methods

SimpleCart.clearCart = function() {
	return confirm("Clear shopping cart of all items - are you sure?");
}

SimpleCart.onSubmitPayPal = function(frm) {
	var errmsg = SimpleCart.validatePayPal();
	var waiting = document.getElementById("waiting");

	if (errmsg.length > 0)
	{
		alert(errmsg);
		return false;
	}

	if (waiting)
		waiting.style.visibility = "visible";

	return true;
}

// default validation function for PayPal form
// to replace with own instance if required, simply implement the method again in page head
SimpleCart.validatePayPal = function(frm) {
	return '';
}

// instance public methods

