// JavaScript Document

function check_form() {
	var comm = "";
	if (document.getElementById('company').value == "" || document.getElementById('company').value == "first name") {
		comm += 'Your company name\n';
	}
	if (document.getElementById('name').value == "" || document.getElementById('name').value == "surname") {
		comm += 'Your name\n';
	}
	if (document.getElementById('positionheld').value == "" || document.getElementById('positionheld').value == "your phone") {
		comm += 'Your company postion\n';
	}
	if (document.getElementById('email').value == "" || document.getElementById('email').value == "email") {
		comm += 'Email address\n';
	} else {
		var str = document.getElementById('email').value;
		if ((str.lastIndexOf(".") > str.indexOf("@") && str.indexOf("@") > 0) == false) {
			comm += 'Email address\n';
		}
	}
	if (document.getElementById('phone').value == "" || document.getElementById('phone').value == "your URL") {
		comm += 'Your phone number\n';
	}
	
	if (comm.length == 0) {
		document.myform.submit();
	} 
else {
  alert('Please complete following fields!\n\n'+comm);
  document.myform.company.focus();
 }
}