// form submit function
function MPValidateForm()
{
	with (document.uploadForm)
	{
		var alertMsg = "Please complete the following field(s):";
		var alertSep = "\n---------------------------------\n";
		var reqErr = new Array();
		if (company.value == "") reqErr.push('* Company Name (or to whose attention)');
		if (contact_name.value == "") reqErr.push('* Contact Name');
		if (email.value == "") reqErr.push('* Email Address');
		if (file.value == "") reqErr.push('* File to Upload');
		if (reqErr.length > 0)
		{
			alertMsg = alertMsg + alertSep + reqErr.join("\n") + alertSep;
			alert(alertMsg);
			return false;
		} else {
			MPShowHide('ulOverlay', 'show');
			return true;
		}
	}
}

// change visibility of specified div id
function MPShowHide(thisLayer, thisAction)
{
	var thisVis = (thisAction == 'show') ? 'visible' : 'hidden';
	if (document.layers)
	{
		var NS4Layer = eval('document.'+thisLayer);
		NS4Layer.visibility = thisVis;
	} else if (document.all) {
		var IE4Layer = eval('document.all.'+thisLayer);
		IE4Layer.style.visibility = thisVis;
	} else if (document.getElementById) {
		document.getElementById(thisLayer).style.visibility = thisVis;
	}
}
