function checkCompletedFormFields(fieldsId){
	for(var i=0;i<fieldsId.length;i++)
		if(document.getElementById(fieldsId[i]).value==''){
			alert('Va rugam sa completati toate campurile');
			return false;	
		}	
	return true;		
}

function checkForumRegister(){
	var fields=new Array('forum-name','forum-email','forum-username','forum-password');
	return checkCompletedFormFields(fields);
}

function checkAccountForm(){
	var fields=new Array('forum-name','forum-email','forum-username','forum-password','forum-confirm-password');
	if(!checkCompletedFormFields(fields))
		return false;
	if(document.getElementById('forum-confirm-password').value!=document.getElementById('forum-password').value){	
		alert('Campul de confirmare parola este incorect completat');
		return false;
	}	
	return true;
}

function checkForumLogin(){
	var fields=new Array('forum-username','forum-password');
	return checkCompletedFormFields(fields);
}