// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function ajaxPromptRequest(url,message,element,default_text,position) {
	var name = prompt(message,default_text);
  if(name) name = name.strip();

  if(name && name.length > 1) {
		if (position) {
    	new Ajax.Updater(element, url, {asynchronous:true, evalScripts:true,insertion:position,parameters:'name=' + encodeURIComponent(name)});
		} else {
			new Ajax.Updater(element, url, {asynchronous:true, evalScripts:true,parameters:'name=' + encodeURIComponent(name)});
		}
  }
}