/**
 * @author TehCrow bogdan.wrona@tehnet.uk.com
 * @copyright TEHNET IT Solutions
 * @version 1.0
 */

var FormController = Class.create();
FormController.prototype = {
	
	initialize: function(objID, recipientHolderID)
	{
		this.obj = $(objID);
		this.recipientHolder = $(recipientHolderID);
		$(this.recipientHolder).value = $(this.obj).value;
		Event.observe(this.obj.id, 'change', this.action.bindAsEventListener(this));
	},
	action: function(evt)
	{
		$(this.recipientHolder).value = Event.element(evt).value;
	}
};

Event.observe(window, "load", function() {
	new FormController('site.....', 'recipient');
});
