function loadCategory(idSection)
{

	iframe = document.getElementById("ifr");
	iframe.src = "ajax.php?s=4000&idSection="+idSection;
}
function formDocumentsValidation()
{
	var valid = true;
	
	valid = controlAsterisco('idSection',"Seleccionar",valid);
	valid = controlAsterisco('title',"",valid);

	if(!valid) 
	{
		document.getElementById("error").innerHTML = "Compelte los campos obligatorios marcados con el * rojo";
	}	
	return valid;
	
}
function validLoginForm()
{
	var valid = true;
	valid = controlAsterisco('user',"",valid);
	valid = controlAsterisco('password',"",valid);
	valid = controlAsterisco('code',"",valid);
	
	if(!valid) 
	{
		document.getElementById("error").innerHTML = "Compelte los campos obligatorios marcados con el *";
	}	
	return valid;
	
}

function controlAsterisco(name,notset,valid)
{
	var secction = document.getElementById(name).value;
	
	if(secction==notset)
	{
		document.getElementById("error"+name).innerHTML = "*";
		valid = false;
	}
	else
		document.getElementById("error"+name).innerHTML = "";
	return valid;
}
