{* Changes the character avatar displayed in a member edit form using a sex radio box and and race drop-down menu *}
{literal}
<SCRIPT type="text/javascript">
function showCharacterImage() {
	if( !document.images ) {
		return false;
	}
	else {
		var race = document.memberedit.race.options[document.memberedit.race.selectedIndex].value;
		var sex = null;
		if(document.memberedit.sex.length) {
			for( var i=0; i < document.memberedit.sex.length; i++) {
				if( document.memberedit.sex[i].checked) {
					sex = document.memberedit.sex[i].value;
				}
			}
		}
		document.images.characterimage.src = "../img/avatars/"+charpics[sex][race];
		return true;
	}
}
</SCRIPT>
{/literal}