// JavaScript Document
function callRemote(command,arguments,onCompleteFunc) {	
	new Request.JSON({
		url: "jsonRequest.php",	
		data: {json: JSON.encode({
				type:command,
				arguments:arguments
			})},		
		onComplete: function(response){			
			if(response.status=="OK") {
				if(onCompleteFunc) {
					onCompleteFunc(response.data);
				}
			} else {
				alert(response.data);
			}
		}
	}).send();	
}