reWord = /[\W]+/; //No blanks allowed a-zA-Z0-9 allowed
reSym = /["'%]+/;  //No "'% allowed, blanks allowed,all other symbols allowed
reEmail = /[\w]+\@[\w]+\.[\w]/i;

//Check the New Associate ADD form
function chkanew(){	
	
	s=document.addNewAssoc.assoc_id.value
	if (reWord.test(s) || s.length==0)
	{
		alert('The Associate ID entered is blank or is INVALID:' + s);
		return false;
	}

	
	// If the script gets this far through all of your fields
	// without problems, it's ok and you can submit the form

	return true;
}

//Check the Associate criteria form
function chkacrit(){	

	
	s=document.critAssoc.assoc_id.value

	if (reWord.test(s))
	{
		alert('The Associate ID entered is INVALID:' + s);
		return false;
	}

	s=document.critAssoc.assoc_type.value
	if (reSym.test(s))
	{
		alert('The Association Type entered is INVALID:' + s);
		return false;
	}

	s=document.critAssoc.addr.value
	if (reSym.test(s))
	{
		alert('The Address field is INVALID:' + s);
		return false;
	}

	
	// If the script gets this far through all of your fields
	// without problems, it's ok and you can submit the form

	return true;
}

//Check the Associate EDIT form
function chkaedit(){	

	errstr='';

	s=document.editAssoc.fname.value
	if (reSym.test(s) || s.length==0) errstr += '\nThe First Name entered is blank or is INVALID:' + s;
	
	s=document.editAssoc.lname.value
	if (reSym.test(s)) errstr += '\nThe Last Name entered is INVALID:' + s;
		
	s=document.editAssoc.spfn.value
	if (reSym.test(s)) errstr += '\nThe Spouse/Father\'s Name entered is INVALID:' + s;
		
	s=document.editAssoc.haddr.value
	if (reSym.test(s)) errstr += '\nThe Address field is INVALID:' + s;
		
	s=document.editAssoc.hphone.value
	if (reSym.test(s)) errstr += '\nThe Home Phone Number field is INVALID:' + s;
		
	s=document.editAssoc.mobile.value
	if (reSym.test(s)) errstr += '\nThe Mobile Number field is INVALID:' + s;
		
	s=document.editAssoc.email.value
	if (!reEmail.test(s)) errstr += '\nThe Email ID field is INVALID:' + s;
		
	s=document.editAssoc.banknm.value
	if (reSym.test(s)) errstr += '\nThe Bank Name field is INVALID:' + s;
		
	s=document.editAssoc.accnum.value
	if (reSym.test(s)) errstr += '\nThe Account Number field is INVALID:' + s;
		
	s=document.editAssoc.pan.value
	if (reSym.test(s)) errstr += '\nThe PAN field is INVALID:' + s;
		
			
	if (errstr!=''){
		alert(errstr);
		return false;
	}
		
	// If the script gets this far through all of your fields
	// without problems, it's ok and you can submit the form

	return true;
}

//----------------------PROJECT-----------------------

//Check the New Project ADD form
function chkpnew(){	
	
	s=document.addNewProj.pcode.value
	if (reWord.test(s) || s.length==0)
	{
		alert('The Project Code entered is blank or is INVALID:' + s);
		return false;
	}

	return true;
}

//Check the Project criteria form
function chkpcrit(){	

	//Place holder:No checks yet as all are combos
	
	// If the script gets this far through all of your fields
	// without problems, it's ok and you can submit the form

	return true;
}

//Check the Project EDIT form
function chkpedit(){	

	errstr='';
	
	s=document.editProj.ptype.value;
	if (reSym.test(s) || s.length==0) errstr += '\nThe Project Type entered is blank or is INVALID:' + s;
	
	s=document.editProj.pname.value;
	if (reSym.test(s) || s.length==0) errstr += '\nThe Project Name entered is blank or is INVALID:' + s;
		
	if (errstr!=''){
		alert(errstr);
		return false;
	}
		
	// If the script gets this far through all of your fields
	// without problems, it's ok and you can submit the form

	return true;
}

//----------------------PROJECT COST-----------------------

function critProjCost(){	

	return true;
}

function newProjCost(){	

	return true;
}

function newProjComp(){	

	return true;
}
newProjCost