function checkSEditEmailForm(){
	email = document.getElementById('emailaddress');
	psw = document.getElementById('password');
	old_psw = document.getElementById('old_password');
	psw_again = document.getElementById('confirmpassword');
	
	if (!email.value) {
		alert("Please enter email address.");
		email.focus();
		return false;
	}
	if (!checkEmailID(email.value)) {
		alert("Please enter valid email address.");
		email.focus();
		return false;
	}
	
	if (psw.value || old_psw.value || psw_again.value) {
		if (!old_psw.value) {
			alert("Please enter old password.");
			old_psw.focus();
			return false;
		}
		if (!psw.value) {
			alert("Please enter password.");
			psw.focus();
			return false;
		}
		if (!psw_again.value) {
			alert("Please confirm your password.");
			psw_again.focus();
			return false;
		}
		if (psw.value.length < 6) {
			alert("Password must have at least 6 characters. Please Re-enter.");
			psw.focus();
			return false;
		}
		if (psw.value.indexOf(" ") != -1) {
			alert("Space is not allowed for password. Please Re-enter.");
			psw.focus();
			return false;
		}
		if (psw.value != psw_again.value) {
			alert("Password and confirm password does not match");
			psw_again.focus();
			return false;
		}
	}

	return true;
}

function popitup(url) {
	window.location		=	url;
}

function changeLanguage(lang, url){
	if(lang=="fre"){
		language	 =	"French";
	}else{
		language	 =	"English";
	}
	var reply	=	confirm("Feedback zone will be changed into "+language);
	if(reply==true){
		window.location	=	"/users/changeLanguage/"+lang+"/"+url;
	}
}