function fncSubmit(obj,url) {
	var req = obj.required_fields;
	var submitflag = true;
	var notice = "Some of the required fields are blank:\n\n";
	if (req) {
		//Means the required fields are present, let's check for values
		var arrFields = obj.required_fields.value.split("|")
		for(var x=0; x<=arrFields.length-1; x++) {
			var arrName = arrFields[x].split(",");
			
			var str = "if (obj."+arrName[0]+".value == '') { notice += '-->  "+arrName[1]+"\\n'; submitflag = false;}";
			eval(str);
		}
		notice += "\nPlease fill in these fields and resubmit!"
	} else {
		//Means there isn't a required fields parameter; keep going
	}
	if (submitflag) {
		obj.action = url;
		obj.submit();
		
	} else {
		alert(notice);
	}
}

function openNewsSignUp() {
	window.open('/newsletter/signup.php','','scrollbars=yes,menubar=no,height=400,width=425,resizable=no,toolbar=no,location=no,status=no');
}

	function openReg(id) {
		window.open('/events/register.php?eid='+id,'','scrollbars=no,menubar=no,height=325,width=300,resizable=no,toolbar=no,location=no,status=no');
	}
	
	function fncCenteredChildWindow(URL,vHeight,vWidth,vScroll,vStatus) {
	if (screen.width) {
		var winl=(screen.width-vWidth)/2;
		var wint=(screen.height-vHeight)/2;
	} else { 
		winl=0;wint=0;
	}
	if(winl<0)winl=0;
	if(wint<0)wint=0;
	new_window = window.open(URL,'myWin','height='+vHeight+',width='+vWidth+',scrollbars='+vScroll+',status='+vStatus+',top='+wint+',left='+winl+',resizable=no')
	new_window.focus();
}
