///////////////////////////////////////////////////////////////////////////////
//	Standard client-side scripts
//		by <steve@egsystems.co.uk>
///////////////////////////////////////////////////////////////////////////////

function validate_paypal_form(form, min, max, msg)
{
	if (form.amount.value < min || form.amount.value > max)
	{
		alert(msg);
		return false;
	}
	return true;
}

// Open a new window in the center of the screen for a given URI and with the given dimensions
function OpenNewWindow(strURI, intWidth, intHeight) {
alert('new fixed');
	intTop = (screen.availHeight - intHeight - 50) / 2;
	intLeft = (screen.availWidth - intWidth) / 2;
	window.open(strURI, "",
		"toolbar=no," + 
		"location=no, " + 
		"directories=no," + 
		"status=yes," + 
		"menubar=no," + 
		"scrollbars=yes," + 
		"resizable=yes," + 
		"width=" + intWidth + "," +  
		"height=" + intHeight + "," + 
		"left=" + intLeft + "," + 
		"top=" + intTop
	);
}

// Open a new fixed window
function OpenNewFixedWindow(strURI, intWidth, intHeight) {
	intTop = (screen.availHeight - intHeight - 50) / 2;
	intLeft = (screen.availWidth - intWidth) / 2;
	window.open(strURI, "",
		"toolbar=no," + 
		"location=no, " + 
		"directories=no," + 
		"status=no," + 
		"menubar=no," + 
		"scrollbars=no," + 
		"resizable=no," + 
		"width=" + intWidth + "," +  
		"height=" + intHeight + "," + 
		"left=" + intLeft + "," + 
		"top=" + intTop
	);
}