﻿<!--
// This is the code to auto-populate the re-enter email field, when the "fill in re-enter email" box is checked

// Here is the list of field names we want to auto-populate
var field_list = new Array('email');

// This funtion gets called when the user checks the "fill in re-enter email" checkbox
// Calling it copies the email value over to re-enter email
function copyEmail()
	{
	if (document.mainform.emailfill.checked == true)
		{
		 copyField(field_list, field_list + '2');
		}
	}

// Copies value from email field into re-enter field
function copyField(field_name_src, field_name_dest)
	{
	document.mainform[field_name_dest].value = document.mainform[field_name_src].value;
	}

// Unchecks the "fill in re-enter email" checkbox. Called when the re-enter email field is typed into.
function uncheckEmail()
	{
	if (document.mainform.emailfill.checked == true)
		document.mainform.emailfill.checked = false;
	}

// Copies value from admin price list titlename ddl into titlename field
//function ddlTitle()
//{
//	document.forms[0].titlename.value = document.forms[0].ddltitlename.value;
//	document.forms[0].titlename.value = document.forms[0].ddltitlenameshort.value;
//}

function populate(form)
{
	var f = form.aList;
	var selectedOption = f.options[f.selectedIndex].value;
	var strElm = selectedOption.split(",");

	form.titlename.value = strElm [0];
	form.titlenameshort.value = strElm [1];
}
// -->
