
function testObligatorio(campo, nombre){
	
	if (campo.value==''){
		alert('Debe introducir el campo '+nombre );
		return false;
	}
	else return true;
}

function testMax(campo, nombre, maxValue){
	if (campo.value.length >maxValue){
		alert('El campo ' +nombre+ ' debe tener como m'+String.fromCharCode(193).toLowerCase()+'ximo '+maxValue+ ' caracteres' );
		return false;
	}
	else return true;
}

function testMin(campo, nombre, minValue){

	if (campo.value.length <minValue){
		alert('El campo ' +nombre+ ' debe tener como m'+String.fromCharCode(205).toLowerCase()+'nimo '+minValue+ ' caratecteres' );
		return false;
	}
	else return true;
}

function testEmail(campo,nombre){
	return true
}


function testObligatorios (obligatorios, form){

	for (i=0;i<obligatorios.length;i++){
		alert(obligatorios[i]);
		campo = eval("form."+obligatorios[i]);
		if (campo.value==''){
			alert("Faltan campos obligatorios" );
			return false;
		}
	}
	return true;
}


function formateaIframe(iframe) {
	var nombre = iframe.name;
	alert(econozco.document.body.scrollHeight);
	iframe.style.height=econozco.document.body.scrollHeight;
	//eval("iframe.style.height="+ nombre+".document.body.scrollHeight");
}


