// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


function portal_search() {

if (document.getElementById("searchtext").value.length>2) {
 params=document.getElementById("searchtext").value;
 params+="?authenticity_token=" + document.getElementsByName("authenticity_token")[0].value;
 au=new Ajax.Updater("target", "/portal/do_person_search/" + params, {asynchronous:true, method:'post', evalScripts:true});
}
}


function activity_search() {

params=document.getElementById("searchtext").value;

if (params.length>2) {
au=new Ajax.Updater("target", "/portal/do_activity_search/" + params, {asynchronous:true, method:'post', evalScripts:true});
}

}



function submitForm() {


 document.getElementById("submitbutton").disabled=true;
 document.getElementById("submitbutton").value="Please wait...";
 document.forms[0].submit();

}
