function popupSelect(form) {
	var choicenum = form.shortcut.selectedIndex;
	var choicename = form.shortcut[choicenum].value;
	if (choicename != "-----------------") {
		form.shortcut.value=choicename;
		window.location=form.action;
		form.submit();
	}
}

function popupStatus(status) {
	var w = open ('about:blank','_blank','height=100,menubar=no,resizable=no,scrollbars=no,toolbar=no,width=350');
	w.document.write ('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html><head>\n<title>NACM-Seattle</title>\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n</head><body><table><tr><td class="status">'+status+'</td></tr><tr><td class="BodyCopyMed" align="right" colspan="3"><img src="images/trans.gif" width="200" height="1"><a href="javascript:window.close();">Close Window</a></td></tr></table></body></html>');
}

function validateCollectionsSubmissionForm()
{
	// Get value of 'action_type' and check to make sure it is not blank
	//var actiontype = document.collectionssubmit.action_type;
	var actiontype = document.getElementsByName('action_type');
	var actiontypevalid = false;
	for(var i = 0; i < actiontype.length; i++)
	{
		if(actiontype[i].checked)
			actiontypevalid = true;
	}
	
	// Check to make sure a value was placed in the 'required-owed' field
	//var owed = document.collectionssubmit.owed;
	var owed = document.getElementById('owed');
	
	if(!actiontypevalid || owed.value == "")
	{
		var message = "Please make sure to fill in all required fields including the following:\n";
		if(!actiontypevalid)
			message += "\t-Type of Service Requested";
		if(!actiontypevalid && owed.value == "")
			message += "\n";
		if(owed.value == "")
			message += "\t-Amount owed that you are reporting";
			
		alert(message);
		return false;
	} else
		return true;
}
