// Validate registration form
function validateUserInfo() {
	var errors="";
    var member=0;		
	var frm = document.getElementById("membershipfrm");
	// At least one box must be checked
	for (var i=0; i < frm.elements.length; i++) {
		if (frm.elements[i].type =='checkbox' && frm.elements[i].checked) {			 
			 member=1;
		} // if
	} // for
 
	if(member == 0)	{
		//alert("Select the number of tournaments");
		errors = "<li>Atleast select one tournament</li>";
		//errors = "error";
	}

	// Return true if no errors else return false
	if(errors=="") {
		return true;
	} else {
		//alert(errors);
		var div=document.getElementById("error");
		div.innerHTML = "<ul>"+errors+"</ul>";
		div.style.display = "block";
		 //calculateHelpHeight();
		return false;
	}
}
 
////
 
 
/////////////////////
// Pop up prizes window
function popitup(id) {
 	//alert("d");
   mywindow = window.open ("/my/prizes.php?id=" + id, "name","height=350,width=1100,,left=400,top=300");
   	//if (window.focus) {mywindow.focus()}
	//return false;
 } 

function popcampinfo(id) {
 	//alert("d");
   mywindow = window.open ("/my/campinfo.php?id=" + id, "name","height=350,width=1100,,left=400,top=300");
   	//if (window.focus) {mywindow.focus()}
	//return false;
 } 

// Pop up entries 
function poplist(tid,eid) {
 	//alert("d");
   mywindow = window.open ("/my/participants.php?tid=" + tid +"&" + "eid=" + eid, "name","height=350,width=700,,left=300,top=300,scrollbars=yes");
   	//if (window.focus) {mywindow.focus()}
	//return false;
}


