//Verifica los datos que van a ser enviados a la base de datos
function checkForm(frm){		
		var send = 1;
		var errorColor = '#ac3c3f';
		var defaultColor = '#ffffff';
		var warningColor = '#f9f28f';
		
		if (frm == 'login') {
			
			unHide('formError', false);
			document.getElementById(frm).username.style.backgroundColor = defaultColor;
			document.getElementById(frm).password.style.backgroundColor = defaultColor;
			
			if (document.getElementById(frm).username.value == "") {
				document.getElementById(frm).username.style.backgroundColor = errorColor;
				send = 0;
			}
			if (document.getElementById(frm).password.value == "") {
				document.getElementById(frm).password.style.backgroundColor = errorColor;
				send = 0;
			}
		}
		if (frm == 'addUser') {
			unHide('formError', false);
			unHide('passMatch', false);
			
			document.getElementById(frm).username.style.backgroundColor = defaultColor;
			/*document.getElementById(frm).password.style.backgroundColor = defaultColor;
			document.getElementById(frm).checkPassword.style.backgroundColor = defaultColor;*/
			document.getElementById(frm).fullname.style.backgroundColor = defaultColor;
			document.getElementById(frm).email.style.backgroundColor = defaultColor;
						
			if (document.getElementById(frm).username.value == "") {
				document.getElementById(frm).username.style.backgroundColor = errorColor;
				send = 0;
			}
			/*if (document.getElementById(frm).password.value == "") {
				document.getElementById(frm).password.style.backgroundColor = errorColor;
				send = 0;
			}
			if (document.getElementById(frm).checkPassword.value == "") {
				document.getElementById(frm).checkPassword.style.backgroundColor = errorColor;
				send = 0;
			}
			if (document.getElementById(frm).checkPassword.value != document.getElementById(frm).password.value) {
				document.getElementById(frm).checkPassword.style.backgroundColor = warningColor;
				document.getElementById(frm).password.style.backgroundColor = warningColor;
				send = 2;
			}*/
			if (document.getElementById(frm).fullname.value == "") {
				document.getElementById(frm).fullname.style.backgroundColor = errorColor;
				send = 0;
			}
			if (document.getElementById(frm).email.value == "") {
				document.getElementById(frm).email.style.backgroundColor = errorColor;
				send = 0;
			}
		}
		if(send == 1){
			document.getElementById(frm).submit();
	}else{
		if(send == 0){
			unHide('formError',true);	
		}
		if(send == 2){
			unHide('passMatch',true);
		}
		
		return false;
	}
}



