function registre(id){
  // Ajax Form Demo
  $('boto'+id).observe('click', function(event) {
  	
    event.stop();
	Lightview.show({
	  href: url_amic,
	  rel: 'ajax',
	  title: '',
	  options: {
	    width: 400,
	    height: 300,
		ajax: {
		  onComplete: function(){		  	
		    // once the request is complete we observe the submit button
			$('enviar').observe('click', function (event) {
				submitAjaxForm(event, id);
			});
		  } 
	    }
	  }
	});
  });
  
}

function submitAjaxForm(event, id) {
  // block default form submit  
  event.stop();
	  
  Lightview.show({
    href: url_amic2 + "?id=" + id,
    rel: 'ajax',
    options: {
      title: 'results',
	  menubar: false,
	  topclose: true,
	  width: 400,
	  height: 100,
      ajax: {
        parameters: Form.serialize('amic') // the parameters from the form
      }
    }
  });
}
