function chkForm() {
	var toolChk=0;

	var check=0;

	var sd=document.getElementsByName('list_uid[]');
	for(i=0;i<sd.length;i++) {
		if(sd[i].checked) check++;
	}

	if(!check) {
		alert("Please select list.");
		return false;

	}

	if(!document.getElementById("first_name").value) {
		document.getElementById("first_name").focus();
		alert("Please enter your first name.");
		return false;
	}

	if(document.getElementById("mobile") && document.getElementById("mobile").value) {
		if(document.getElementById("country_code").value=="") {
			alert("Invalid country code. Please select your country.");
			return false;
		}
		if(document.getElementById("mobile").value.match(/[^0-9]/)) {
			alert("Invalid mobile number. Please check your mobile number.");
			document.getElementById("mobile").focus();
			return false;
		}
		
		toolChk++;
	}
	if(document.getElementById("msn") && document.getElementById("msn").value) {
		if(!document.getElementById("msn").value.match(/[_a-zA-Z0-9-\+\.]+@[._a-zA-Z0-9-]+\.[a-zA-Z]+$/)) {
			alert("Invalid screen name. Please check your MSN screen name.");
			document.getElementById("msn").focus();
			return false;
		}
		
		toolChk++;
	}
	if(document.getElementById("aim") && document.getElementById("aim").value) {
		if(document.getElementById("aim").value.match(/[^0-9a-zA-Z\+\-\_]/)) {
			alert("Invalid screen name. Please check your AIM screen name.");
			document.getElementById("aim").focus();
			return false;
		}

		toolChk++;
	}
	if(document.getElementById("email") && document.getElementById("email").value) {
		if(!document.getElementById("email").value.match(/[_a-zA-Z0-9-\+\.]+@[._a-zA-Z0-9-]+\.[a-zA-Z]+$/)) {
			alert("Invalid email address. Please check your email address.");
			document.getElementById("email").focus();
			return false;
		}
		toolChk++;
	}
	
	if(!toolChk) {
		alert("Please enter at least one contact information.");
		return false;
	}
	
	if(document.getElementById("acceptinfo").checked == false) {
		alert( "Sorry. You have to accept the terms & conditions and privacy policy to be able to sign-up.");
		return false;
	}

	return true;

}

function chknumber(e) {
	var obj;

	if(e.target) obj=e.target;
	else obj=e.srcElement;

	obj.value=obj.value.replace(/[^0-9]/g,"");
}

function chklistsize() {
	if(document.getElementById("selectlist") && parseInt(document.getElementById("selectlist").offsetHeight)>100) {
		document.getElementById("selectlist").style.height="100px";
	}
}
mino.event.add(window,"load",chklistsize);