function EmailVerify(email_addr,theForm) {
	var email_pcs;				// array of email pieces
	var post_amp;     			// string following @
	var post_amp_pcs;			// array of pieces after @	
	var sub_it = true;
	var amp_posi = email_addr.indexOf('@');
	var dot_posi = email_addr.indexOf('.');
	if ((amp_posi != -1) && (amp_posi != 0) && (dot_posi != -1) && (dot_posi != 0)) {  	// must be an '@' and '.' present - Neither can be char in string
		email_pcs = email_addr.split('@'); 												// creates an array containing the pieces of the email on either sides of the @
		if(email_pcs.length > 2) {														// verifies that only one @ is present								
			sub_it = false;
		}
		else {
			post_amp = email_pcs[1];
			post_amp_pcs = post_amp.split('.')
			if ((post_amp_pcs.length >= 2) && (post_amp_pcs[0].length > 0)){	// checks to see if there is something on either side of the .
				var last_seg = post_amp_pcs[post_amp_pcs.length - 1];
				if (last_seg.length >=2) {	//checks to see if the length of the string following the . is greater than or equal to two
					sub_it = true;	
				}
				else sub_it = false;
			}
			else sub_it = false;	
		}
	}
	else sub_it = false;
	
// end primary validation
	
	if (sub_it == true) {
		theForm.submit();
	}
	else {
		alert(email_addr + " is not a valid email address.");
	}
}


function popWindow(fileName,winWidth,winHeight){
	var newWin = window.open(fileName,'audio','width='+winWidth+',height='+winHeight);
}
