//<![CDATA[

var email = 0;

function validatelog(){
	
	updatefunctionslog();
	
	if (logemail == 1) {
		if (logpassword == 1) {
			return true;
		} else {
			return false;
		}
	} else {
		return false;
	}
					
}

function check_emaillog() {
	
	var txt = document.getElementById('username_2').value;
	if (/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/.test(txt)) {
		document.getElementById('emaillog_invalid').className = "login_valid";
		logemail = 1;
	} else {
		document.getElementById('emaillog_invalid').className = "login_invalid";
		logemail = 0;
	}
}

function check_passwordlog() {
	if (document.getElementById('password_2').value.length >= 6) {
		document.getElementById('passlog_invalid').className = "login_valid";
		logpassword = 1;
	} else {
		document.getElementById('passlog_invalid').className = "login_invalid";
		logpassword = 0;
	}
}

function updatefunctionslog() {
	check_emaillog();
	check_passwordlog();	
}


//]]>
