		if(typeof(sajax_request_type)=='undefined') sajax_request_type = 'POST';
		if(typeof(sajax_debug_mode)=='undefined') sajax_debug_mode = false;
		function sajax_debug(text) {
			if (sajax_debug_mode)	alert("RSD: " + text)
		}
		/**
		*   send data to server by jquery $.ajax() 
		*   @param string func_name server use the function  to deal with the client sended data;
		*   @param array args Information to be sended to server,including callBack function in args[args.length - 1];
		*/
		function sajax_do_call(func_name, args) {
			var i, n;
			var uri;
			var post_data;
			
			uri = uri_in_sajax;
			if (sajax_request_type == "GET") {
				if (uri.indexOf("?") == -1) 
					uri = uri + "?rs=" + escape(func_name);
				else
					uri = uri + "&rs=" + escape(func_name);
				for (i = 0; i < args.length-1; i++) 
					uri = uri + "&rsargs[]=" + escape(args[i]);
				uri = uri + "&rsrnd=" + new Date().getTime();
				post_data = null;
			} else {
				post_data = "rs=" + escape(func_name);
				for (i = 0; i < args.length-1; i++) 
					post_data = post_data + "&rsargs[]=" + escape(args[i]);
			}


			var process_data="false";			
                        if (sajax_request_type == "POST") {
				process_data="true";
                        }

			$.ajax({
				type:	sajax_request_type,
				url:	uri,
				processData:	process_data,
				data:	post_data,
				beforeSend: function(XMLHttpRequest){
                                        sajax_debug("before send");
				},
				success: function(data,textStatus){
					if(textStatus!="success")	return;
	                                sajax_debug("received " + data);

	                                var status;
	                                var p_data;
        	                        var mark;
                	                status = data.charAt(0);
                        	        p_data = data.substring(2);
                                	if (status == "-")
                                        	alert("Error: " + p_data);
                                	else if(status== "+"){
                                        	args[args.length-1](p_data);
                                	}
                                	else if(status=="="){
                                        	args[args.length-1](p_data);
                                	}
                                	else {
                                        	if(data.replace(/(^[\s]*)|([\s]*$)/g,"")=='') return;
                                        	args[args.length-1](data);
                                	}
				},
				complete: function(XMLHttpRequest, textStatus){
                                        sajax_debug("complete send");
				},
				error: function(XMLHttpRequest, textStatus, errorThrown){
					sajax_debug("ajax error");
				}
			});
			sajax_debug(func_name + " uri = " + uri + "/post = " + post_data);
			sajax_debug(func_name + " waiting..");
		}
