addFunction('refreshCaptcha', "null");

function refresh(){
    var time = new Date();
  	var src = $('#captchaimg').attr('src') + '/' + time.getTime();
  	$('#captchaimg').attr('src', src);
}

/**
 * img element have to have id eq captchaimg
 * "clickable" element have to have id eq refresh-captcha
 *
**/
function refreshCaptcha() {
  $('#refresh-captcha').click( function() {
	refresh();
  	$('#captcha').val('');
  });
  
  $('#refresh-captcha').live( 'click', function() {
	refresh();
	$('#code').val(''); 
  });
  
  return false;
}
