function show_passwords(val, id1, id2, id3)
{
	var xtype;
	
	if (val)
		xtype = 'text';
	else
		xtype = 'password';

	_show_pw(id1, xtype);
	_show_pw(id2, xtype);
	_show_pw(id3, xtype);
	
	return false;	
}

/* need this to handle IE */
function changeInputType(oldObject, oType) 
{
	var newObject = document.createElement('input');
	newObject.type = oType;
	if(oldObject.size) newObject.size = oldObject.size;
	if(oldObject.value) newObject.value = oldObject.value;
	if(oldObject.name) newObject.name = oldObject.name;
	if(oldObject.id) newObject.id = oldObject.id;
	if(oldObject.className) newObject.className = oldObject.className;
	oldObject.parentNode.replaceChild(newObject,oldObject);
	return newObject;
}

function _show_pw(id, type)
{
	if (id == '')
		return;
	
	var pw = document.getElementById(id);
	if (pw != null)
		changeInputType(pw,type);
/*		pw.setAttribute('type', type);*/
}