
util.bind = function(object, fnc) {
  return function() {
    fnc.apply(object, arguments);
  }
}


//COMPAT functions: prototype
util.pos = function(elem){
	var arr = Position.cumulativeOffset(elem);
	return {x:arr[0],y:arr[1]};
}

util.formToQuery = function(form){
	return Form.serialize(form);
}
util.ajax = function(url,cfg,callback){
//	new Ajax.Request(url, {method: "get", parameters: pars, onComplete: showResults.bind(elem)});
	cfg.onComplete = function(resp){
		callback(resp.responseText);
	}
	cfg.method=cfg.method == null ? "get":cfg.method.toLowerCase();
	new Ajax.Request(url,cfg);
}

//FX
util.fadeInFromZero = function(node,time){ node.style.display = ""; util.fadeIn(node);}

