function submitbutton()
{

	if (chkinfo())
	{
		document.sectionform.mode.value = "S"  //SEND EMAIL
	
		document.sectionform.submit()

		return true
	}
}

function chkinfo()
{

//REQUIRED FIELDS NOT EMPTY	

	if(trim(document.sectionform.customername.value) == "")
	{	
		alert("Please enter your name.")
		document.sectionform.customername.focus()
		return false
	}


//PHONE digits - at least 10 digits but allow more for extentions

	i=0
	phoneval = trim(document.sectionform.customerphone.value)
	for (x=0;x<phoneval.length;x++)
	{
		if (!isNaN(phoneval.charAt(x))) i++
	}
	if (i < 10)
	{
		alert("Please provide a valid telephone number of at least 10 digits - may include extention.")
		document.sectionform.customerphone.focus()
		return false
	}
	

	if(trim(document.sectionform.position.value) == "")
	{	
		alert("Please enter your position or job title.")
		document.sectionform.position.focus()
		return false
	}


	if(trim(document.sectionform.customeremail.value) == "")
	{	
		alert("Please enter your email address.")
		document.sectionform.customeremail.focus()
		return false
	}

//VALID EMAIL
	tmpval = trim(document.sectionform.customeremail.value)
	atsign = tmpval.indexOf("@")
	dot = tmpval.indexOf(".")
	if (atsign <= 0 || dot <= 0)
	{
		alert("Please provide a valid email address including the '@' sign and period.")
		document.sectionform.customeremail.focus()
		return false
	}


	if(trim(document.sectionform.sitename.value) == "")
	{	
		alert("Please enter your company name.")
		document.sectionform.sitename.focus()
		return false
	}



	if(document.sectionform.issuetype.value == "empty")
	{	
		alert("Please select a message type.")
		document.sectionform.issuetype.focus()
		return false
	}

	
	return true
}

