function validate_signup(){
	var username = document.getElementById('txtUsername');
	var password1 = document.getElementById('txtPassword1');
	var password2 = document.getElementById('txtPassword2');
	var email = document.getElementById('txtEmail');
	var checkbox = document.getElementById('checkbox');
	var error = 0;
	var msg = "";
	
	if(!checkbox.checked){
		error = 1;
		msg = "Error! Your must accept our term and condition";
	}
	if(email.value==""){
		email.setAttribute('className', 'inputError');
		error = 1;
		msg = "Error! Please enter your email";
	}
	if(password1.value!=password2.value){
		password1.setAttribute('className', 'inputError');
		error = 1;
		msg = "Error! Your password must be same";
	}
	if(password2.value==""){
		password2.setAttribute('className', 'inputError');
		error = 1;
		msg = "Error! Please enter your confirm password";
	}
	if(password1.value==""){
		password1.setAttribute('className', 'inputError');
		error = 1;
		msg = "Error! Please enter your password";
	}
	if(username.value.length<6 || username.value.length>20){
		username.setAttribute('className', 'inputError');
		error = 1;
		msg = "Error! Your username must 6-20 character";
	}
	if(username.value==""){
		username.setAttribute('className', 'inputError');
		error = 1;
		msg = "Error! Please enter your username";
	}
	if(error == 0){
		if(confirm("Do you want to confirm registration?")){
			return true;
		}else{
			return false;
		}
	}else{
		alert(msg);
		return false;
	}
}