function validate(){
	var realname=document.getElementById("realname").value
	var email=document.getElementById("email").value
	var nameIsGood = 'no';
	var emailIsGood = 'no';
	var typeIsGood = 'no';
	var approxIsGood = 'no';
	var contentIsGood = 'no';
	var timeframeIsGood = 'no';
//Name field is validated first
	var myNameRegex = /^[a-z\s'-]*$/i;
	var matchPos1 = realname.search(myNameRegex);
	if (realname !== ''){
		if (matchPos1 !== -1) {
			document.getElementById("name-status").style.color = '#66cc66';
			nameIsGood = 'yes';
		}else{
			document.getElementById("name-status").style.color = '#ff0000';
			nameIsGood = 'no';
		}
	}else{
		document.getElementById("name-status").style.color = '#ff0000';
		nameIsGood = 'no';
	}
//Email is validated second
	var myEmailRegex = /^(?:^[A-Z0-9._%-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|biz|info|name|aero|gov|mobi|tv|biz|info|jobs|museum|edu)$)$/i;
	var matchPos2 = email.search(myEmailRegex);
	if (email !== ''){
		if (matchPos2 !== -1) {
			document.getElementById("email-status").style.color = '#66cc66';
			emailIsGood = 'yes';
		}else{
			document.getElementById("email-status").style.color = '#ff0000';
			emailIsGood = 'no';
		}
	}else{
		document.getElementById("email-status").style.color = '#ff0000';
		emailIsGood = 'no';
	}
//The form var is set to be used in the next 4 validations
	var form = document.getElementById('formatron');
//"Type of Request" is validated third
	var radios = form.elements['work_type'];
	var nocheck = 0;
	for(var i=0;i<radios.length;i++) {
		radios[i].onkeyup=radios[i].onclick=function(){
			if(!this.checked){
				nocheck++;
			}else{
				var el = document.getElementById('work-type-status');
				el.style.color = '#66cc66';
				typeIsGood = 'yes';
			}
		}
		radios[i].onclick();
	}
//Approx pages is validated fourth
	var selectbox = form.elements['approxpages'];
	var noselect = 0;
	for(var i=0;i<selectbox.length;i++) {
		selectbox[i].onkeyup=selectbox[i].onclick=function(){
			if(!this.selected || this.value == ''){
				noselect++;
			}
		}
		selectbox[i].onclick();
	}
	if(noselect != 10){
		approxIsGood = 'yes';
		var el = document.getElementById('pages-status');
		el.style.color = '#66cc66';
	}else{
		approxIsGood = 'no';
		var el = document.getElementById('pages-status');
		el.style.color = '#ff0000';
	}
//Content Ready field is validated fifth
	var radios2 = form.elements['content_ready'];
	var nocheck2 = 0;
	for(var i=0;i<radios2.length;i++) {
		radios2[i].onkeyup=radios2[i].onclick=function(){
			if(!this.checked){
				nocheck2++;
			}else{
				var el = document.getElementById('content-status');
				el.style.color = '#66cc66';
				contentIsGood = 'yes';
			}
		}
		radios2[i].onclick();
	}
//Timeframe is validated last
	var selectbox2 = form.elements['timeframe'];
	var noselect2 = 0;
	for(var i=0;i<selectbox2.length;i++) {
		selectbox2[i].onkeyup=selectbox2[i].onclick=function(){
			if(!this.selected || this.value == ''){
				noselect2++;
			}
		}
		selectbox2[i].onclick();
	}
	if(noselect2 != 10){
		timeframeIsGood = 'yes';
		var el = document.getElementById('time-status');
		el.style.color = '#66cc66';
	}else{
		timeframeIsGood = 'no';
		var el = document.getElementById('time-status');
		el.style.color = '#ff0000';
	}
//Determine if the form should be allowed to submit
	if (nameIsGood == 'yes' && emailIsGood == 'yes' && typeIsGood == 'yes' && contentIsGood == 'yes' && approxIsGood == 'yes' && timeframeIsGood == 'yes'){
		document.getElementById("button").disabled = '';
		document.getElementById("notags").innerHTML = '<span>&nbsp;</span>';
	}else{
		document.getElementById("button").disabled = 'disabled';
		document.getElementById("notags").innerHTML = '<span>*</span> Marked Fields Are Required !';
	}

}