function FormWatcher() {
	this.init();
}
FormWatcher.prototype = {
	em: new EventManager(),
	init: function() {
		$$('input[type="password"]').each(function(i){
			i.value = "";
		});		
		$$('.confirm').each(function(i) {
			this.em.set(i, {click: {action: this.confirmAction.bind(this), dispatch: false}});			
		}, this);
		this.em.start();
	},
	confirmAction: function(event) {
		if (!confirm("Are you sure?")) event.stop();
	}	
}

Event.observe(window, "load", function() { var fw = new FormWatcher() });
