<!--

							//                   check to make sure all fields do not have a ' which will not insert into the database - messes up the ASP-SQL query statement
	function trimchar(){
		document.frmCollaboration.txtfname.value=filterNum(document.frmCollaboration.txtfname.value);
		document.frmCollaboration.txtlname.value=filterNum(document.frmCollaboration.txtlname.value);
		document.frmCollaboration.txtemail.value=filterNum(document.frmCollaboration.txtemail.value);
		document.frmCollaboration.txtinstitution.value=filterNum(document.frmCollaboration.txtinstitution.value);
		document.frmCollaboration.txtidea.value=filterNum(document.frmCollaboration.txtidea.value);

		function filterNum(str) {
			re = /\'|/g;
			return str.replace(re, "");
		}
	}



							//                   check to make sure email is valid
	function EmailCheck(){
		if (document.frmCollaboration.txtemail.value.length >0) {
			 i=document.frmCollaboration.txtemail.value.indexOf("@")
			 j=document.frmCollaboration.txtemail.value.indexOf(".",i)
			 k=document.frmCollaboration.txtemail.value.indexOf(",")
			 kk=document.frmCollaboration.txtemail.value.indexOf(" ")
			 jj=document.frmCollaboration.txtemail.value.lastIndexOf(".")+1
			 len=document.frmCollaboration.txtemail.value.length

			if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) && (len-jj >=2) && (len-jj<=3)) {
			}
			else {
				alert("Please enter an exact email address.\n" +
				document.frmCollaboration.txtemail.value + " is invalid.");
				return false;
			}
		 }
	}

							//                   check to make sure all fields have something in them
	function validate() {
		var themessage = "You are required to complete the following fields: ";
		if (document.frmCollaboration.txtfname.value=="") {
			themessage = themessage + " - First Name";
		}
		if (document.frmCollaboration.txtlname.value=="") {
			themessage = themessage + " -  Last Name";
		}
		if (document.frmCollaboration.txtemail.value=="") {
			themessage = themessage + " -  E-mail";
		}
		if (document.frmCollaboration.txtinstitution.value=="") {
			themessage = themessage + " -  I";
		}
		if (document.frmCollaboration.txtidea.value=="") {
			themessage = themessage + " -  Idea";
		}
		//alert if fields are empty and cancel form submit
		if (themessage == "You are required to complete the following fields: ") {
			document.frmCollaboration.submit();
		}
		else {
			alert(themessage);
			return false;
		}
	}
//-->