function checkForm2()
{
	var missing = '';

	var abs_title = document.getElementById("abs_title");
	if(!abs_title.value)
		missing += '- Abstract Title\n';	

	var abs_body = document.getElementById("abstract");
	if(!abs_body.value)
		missing += '- Abstract Body\n';	

	if(missing)
	{
		alert('Please fill out the following fields before proceeding:\n\n'+missing);
		return false;
	}

	// check for category
	var category = document.form2.category;
	if(category.type != 'hidden')
	{
		var category_selected = false;
		for(var i=0; i<category.length; i++)
		{
			if(category[i].checked)
				category_selected = true;
		}

		if(category_selected == false)
		{
			var category_other = document.getElementById('category_other');
			if(category_other.value)
				category_selected = true;
		}
			
		if(!category_selected)
		{
			alert('Please pick a category for your proposal.');
			return false;
		}
	}

	// check that certify box is checked
	var certify = document.getElementById('certify');
	if(!certify.checked)
	{
		alert('Please check the box above to confirm that your submission conforms to the guidelines for its type.');
		return false;
	}
	
// abstract title character and word check
	if(abs_title.value.length > 500) 
	{
		alert('Your abstract title has more than the maximum of 500 characters. Please remove at least '+(abs_title.value.length - 500)+ ' characters.');
		return false;
	}

	var abs_title_split = abs_title.value.split(" ");
	if(abs_title_split.length > 30)
	{
		alert('Your abstract title has more than the maximum of 30 words. Please remove at least '+(abs_title_split.length - 30) +' words.')
		return false
	}

	// abstract body character and word check
	if(abs_body.value.length > 9000) 
	{
		alert('Your abstract body has more than the maximum of 9,000 characters. Please remove at least '+(abs_body.value.length - 9000)+ ' characters.');
		return false;
	}

	var abs_body_split = abs_body.value.split(" ");
	if(abs_body_split.length > 350)
	{
		alert('Your abstract body has more than the maximum number of words. Please remove at least '+(abs_body_split.length - 350) +' words.')
		return false
	}
	*/
	return true;
}


//for 500-word limit abstracts: EP and AF
//------------------------------------------------------------------------
function checkForm2b()
{
	var missing = '';

	var abs_title = document.getElementById("abs_title");
	if(!abs_title.value)
		missing += '- Abstract Title\n';	

	var abs_body = document.getElementById("abstract");
	if(!abs_body.value)
		missing += '- Abstract Body\n';	

	if(missing)
	{
		alert('Please fill out the following fields before proceeding:\n\n'+missing);
		return false;
	}

	// check for category
	var category = document.form2.category;
	if(category.type != 'hidden')
	{
		var category_selected = false;
		for(var i=0; i<category.length; i++)
		{
			if(category[i].checked)
				category_selected = true;
		}

		if(category_selected == false)
		{
			var category_other = document.getElementById('category_other');
			if(category_other.value)
				category_selected = true;
		}
			
		if(!category_selected)
		{
			alert('Please pick a category for your proposal.');
			return false;
		}
	}

	// check that certify box is checked
	var certify = document.getElementById('certify');
	if(!certify.checked)
	{
		alert('Please check the box above to confirm that your submission conforms to the guidelines for its type.');
		return false;
	}
	
// abstract title character and word check
	if(abs_title.value.length > 500) 
	{
		alert('Your abstract title has more than the maximum of 500 characters. Please remove at least '+(abs_title.value.length - 500)+ ' characters.');
		return false;
	}

	var abs_title_split = abs_title.value.split(" ");
	if(abs_title_split.length > 30)
	{
		alert('Your abstract title has more than the maximum of 30 words. Please remove at least '+(abs_title_split.length - 30) +' words.')
		return false
	}

	// abstract body character and word check
	if(abs_body.value.length > 9000) 
	{
		alert('Your abstract body has more than the maximum of 9,000 characters. Please remove at least '+(abs_body.value.length - 9000)+ ' characters.');
		return false;
	}

	var abs_body_split = abs_body.value.split(" ");
	if(abs_body_split.length > 500)
	{
		alert('Your abstract body has more than the maximum number of words. Please remove at least '+(abs_body_split.length - 500) +' words.')
		return false
	}
	*/
	return true;
}
