// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function buttonRefresh(period,regCode, URL)
{
//new Ajax.Request('/purchase/buttonupdate?period=' + period); 
new Ajax.Updater('button', URL + '?period=' + period + '&reg=' + regCode, {asynchronous:true});
return true;

}