// create a proxy in sync mode
var syncProxy = new prod();
// create a proxy in async mode
var asyncProxy = new prod(new callback());



// run a sync call, callback class will handle its results
function asyncCall() {
	asyncProxy.echo_string("I'm a async call");
}

// run a sync call, callback class will handle its results
// the purpose of this slow call is to show off the built in loading messaging
function slowAsyncCall() {
	asyncProxy.slow_echo_string($putthisin);
}
// same thing, notice how it locks up your browser in Firefox you can't switch to another tab
function slowSyncCall() {
	document.getElementById('cart_show').innerHTML = syncProxy.slow_echo_string("I'm a slow sync call");
}

// run a sync call, callback class will handle its results
function serverErrorExample() {
	asyncProxy.error_test("I'm an error generated by trigger error in test.class.php");
}
// same as above, shown for completeness
function serverErrorSyncExample() { 
	document.getElementById('cart_show').innerHTML = syncProxy.error_test("I'm an error generated by trigger error in test.class.php");
}
