
function isblank(s){
	for(var i = 0; i < s.length; i++)  {
		var c = s.charAt(i);
			if ( (c != ' ') && (c != '\n') && (c != '\t')  )  
			{  return false;  
			}
     }
	return true;
}
function submitCheck(){
	var m = "";
	var msg = "";
	var empty_fields = "";
		// set var radio_choice to false
	var radio_choice = false;
	if(document.post.email.value==""){
		m="Please type Your Email";
		empty_fields+="\n\n  "+m;
	}	
	if(document.post.password.value==""){
		m="Please type Your Password";
		empty_fields+="\n\n  "+m;
	}	
	if(document.post.password.value != document.post.password2.value){
		m="Your password do NOT match, please type again";
		empty_fields+="\n\n  "+m;
	}	
	if(document.post.nickname.value==""){
		m="Please type Your Nickname";
		empty_fields+="\n\n  "+m;
	}
	if(document.post.native.value==""){
		m="Please type Native Language";
		empty_fields+="\n\n  "+m;
	}
	
	


	// Loop from zero to the one minus the number of radio button selections
/*	for (counter = 0; counter < post.place.length; counter++)
		{
		// If a radio button has been selected it will return true
		// (If not it will return false)
		if (post.place[counter].checked)
		radio_choice = true; 
	}

	if (!radio_choice)
		m="Please select  Desired Location to Meet";
		empty_fields+="\n\n  "+m;
	} */

	var str=document.post.email.value
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(str)){
		}
	else{
		m="Please check Your Email Address!";
		empty_fields+="\n\n  "+m;
	}		
	if(empty_fields!=""){
		msg+="- - . - - . - - . - - . - - . - - . - - . - - . - - . \n\n";
		msg+=" Error!! \n";
		msg+="";
		msg+=empty_fields+"\n\n";
		msg+="- - . - - . - - . - - . - - . - - . - - . - - . - - . \n\n";
		alert(msg);
		return false;
	}
}


