// Universal Group Javascript

//DATA COMMUNICATION CLASS
//@url:  URL to be contacted
//@vars: Variables to be sent
//@method: method used to contact the url and send variables (GET, POST, PUT, etc)
function UNIVERSAL_COMM(url,vars,method,ongood)
{
	this.url = url;
	this.vars = vars;
	this.method = method;
	this.ongood = ongood;
	this.docall = docall;
}
function docall()
{
	with(this)
	{
		var bind = dojo.io.bind({
									 url 		: 	url,
									 mimetype 	: 	"text/javascript",
									 method		:	method,
									 content	:	vars,
									 error		:	function(type, errObj){
										alert("Your request was not successful.  Please try again.\n\n"+errObj.message);
									 			},
									 load		:	function(type, data, evt){
										eval(data);
										eval(ongood);
									 }									 
									 });
		var bind =  null;
	}
}