function setWeakTight(id) {
	for (var i = 0; i < 3; i++) {
		if (i == id)
			$('wtDescription_' + i).show();
		else
			$('wtDescription_' + i).hide();
	}

	if (id == 2) {
		$('passwordType').hide();
		$('passwordRetype').hide();
	} else {
		$('passwordType').show();
		$('passwordRetype').show();
	}
}

document.observe("dom:loaded",
	function() {
		try {
			Event.observe($('weaktight_0'), 'click', setWeakTight.bind(this, 0));
			Event.observe($('weaktight_1'), 'click', setWeakTight.bind(this, 1));
			Event.observe($('weaktight_2'), 'click', setWeakTight.bind(this, 2));

			var c = $('joinForm').getInputs('radio','weaktight').find(function(e) { return e.checked; }).value;
			setWeakTight(c);
		} catch(err) { }
	}
);
