function resetTRForm()
{
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('FirstName').focus();
	}
	else if (document.layers) { // Netscape 4
		document.FirstName.focus();
	}
	else { // IE 4
		document.all.FirstName.focus();
	}
}

function resetOtherTextBox(ctrl, resetDDL)
{
	var prompt = "Enter here if not in list";
	
	switch (ctrl.name)
	{
		case ("DDL_FirmType"):
			if (ctrl.value != "")
			{
				if (document.getElementById) { // DOM3 = IE5, NS6
					document.getElementById('FirmType').value = prompt;
				}
				else if (document.layers) { // Netscape 4
					document.FirmType.value = prompt;
				}
				else { // IE 4
					document.all.FirmType.value = prompt;
				}
			}
			break;
		case ("DDL_Source"):
			if (ctrl.value != "")
			{
				if (document.getElementById) { // DOM3 = IE5, NS6
					document.getElementById('Source').value = prompt;
				}
				else if (document.layers) { // Netscape 4
					document.Source.value = prompt;
				}
				else { // IE 4
					document.all.Source.value = prompt;
				}
			}
			break;
		default:
			if (ctrl.value == prompt)
			{
				ctrl.value = "";
				if (resetDDL == "true")
				{
					switch (ctrl.name)
					{
						case ("FirmType"):
							if (document.getElementById) { // DOM3 = IE5, NS6
								document.getElementById('DDL_FirmType').selectedIndex = 0;
							}
							else if (document.layers) { // Netscape 4
								document.DDL_FirmType.selectedIndex = 0;
							}
							else { // IE 4
								document.all.DDL_FirmType.selectedIndex = 0;
							}
							break;
						case ("Source"):
							if (document.getElementById) { // DOM3 = IE5, NS6
								document.getElementById('DDL_Source').selectedIndex = 0;
							}
							else if (document.layers) { // Netscape 4
								document.DDL_Source.selectedIndex = 0;
							}
							else { // IE 4
								document.all.DDL_Source.selectedIndex = 0;
							}
							break;
						default: break;
					}
				}
			}
			else if (ctrl.value == "")
			{
				ctrl.value = prompt;
			}
			else
			{
				switch (ctrl.name)
				{
					case ("FirmType"):
						if (document.getElementById) { // DOM3 = IE5, NS6
							document.getElementById('DDL_FirmType').selectedIndex = 0;
						}
						else if (document.layers) { // Netscape 4
							document.DDL_FirmType.selectedIndex = 0;
						}
						else { // IE 4
							document.all.DDL_FirmType.selectedIndex = 0;
						}
						break;
					case ("Source"):
						if (document.getElementById) { // DOM3 = IE5, NS6
							document.getElementById('DDL_Source').selectedIndex = 0;
						}
						else if (document.layers) { // Netscape 4
							document.DDL_Source.selectedIndex = 0;
						}
						else { // IE 4
							document.all.DDL_Source.selectedIndex = 0;
						}
						break;
					default: break;
				}
			}
			break;
	}
}

function limitText(field, maxlimit)
{
	if (field.value.length > maxlimit) // if too long...trim it!
	{
		field.value = field.value.substring(0, maxlimit);
		alert('You have reached a maximum of 255 characters that we can accept as an input to this field!');
	}
}