<!--
function TypeGet(formName,fieldName)
{
if (formName.elements[0].type)
	for (i=0;i < formName.elements.length;i++) 
		if (fieldName == formName.elements[i].name)
			return(formName.elements[i].type);
}

function InsertValue(fieldName,fieldValue)
{

	//var formName = document.bob
	var formItem = formName.elements[fieldName];
	var fieldType = TypeGet(formName,fieldName);

	switch(fieldType)
	{
	case "select-one":
	case "select-multiple":
		for (j=0;j<formItem.length;j++)
			if (formItem.options[j].value==fieldValue || formItem.options[j].text==fieldValue)
				{
				formItem.options[j].selected = true;
				}
		break;
	case "text":
	case "password":
	case "hidden":
	case "textarea":
		formItem.value = fieldValue;
		break;

	case "radio":
	case "checkbox":
		for (var i=0; i < formName.elements.length; i++)
			if (formName.elements[i].name == fieldName && formName.elements[i].value == fieldValue)
				formName.elements[i].checked = true;
		break;
	}

}

function frmValidate()
{
	if ( document.Shopper.A1.value == "")
	{
		alert("Enter Contact Person.  If Unknown, Type: Unknown");
		return false;
	}

	if ( document.Shopper.overall.value == "0")
	{
		alert("Please rate the overall experience");
		document.Shopper.overall.focus();
		return false;
	} 

	if ( document.Shopper.location.value == "")
	{
		alert("Please Enter the Location.  If a Phone Contact, enter the phone number.");
		document.Shopper.location.focus();
		return false;
	} 

	if ( document.Shopper.objective.value == "")
	{
		alert("What Was the Objective of This Call/Visit");
		document.Shopper.objective.focus();
		return false;
	}

	if (document.Shopper.objective.value.length > 255)
	{
		alert("The objective field is too long.  Reduce to under 255 characters.");
		document.Shopper.objective.focus();
		return false;
	}

	if ( document.Shopper.qual.value == "")
	{
		alert("Please Enter the Narrative Report");
		document.Shopper.qual.focus();
		return false;
	}
	return true;
	//Shopper.submit();
}

function frmValidate2()
{

	if ( document.assman.uid.value == "0")
	{
		alert("Please select a shopper.");
		document.assman.uid.focus();
		return false;
	} 

	if ( document.assman.pid.value == "0")
	{
		alert("Please select a project.");
		document.assman.pid.focus();
		return false;
	} 

	if ( document.assman.location.value == "")
	{
		alert("Please Enter the Location.  If a phone contact, enter the phone number.");
		document.assman.location.focus();
		return false;
	} 

	if (document.assman.location.value.length > 100)
	{
		alert("The location field is too long.  Please reduce to under 100 characters.");
		document.assman.location.focus();
		return false;
	}

	if ( document.assman.objective.value == "")
	{
		alert("Please Enter the objective.");
		document.assman.objective.focus();
		return false;
	}

	//if (document.assman.objective.value.length > 255)
	//{
	//	alert("The objective field is too long.  Please reduce to under 255 characters.");
	//	document.assman.objective.focus();
	//	return false;
	//}
	return true;
}

function frmSave()
{
document.Shopper.status.value = 1;
return true;
}


function submitForm(col)
{
//alert("I'm Working");
document.Shopper.col.value = col;
document.Shopper.submit();
}

function check(fieldName)
{
	for (i = 0; i < fieldName.length; i++)
		fieldName[i].checked = true;
}

//-->