function replace (texto, s1, s2) {
	return texto.split(s1).join(s2);
}


function checkEmail (campo) {
	
	Strmail = campo.value.toUpperCase ();
	return (Strmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z]{2,5}$/i) != -1);
		
}

function checkSelect (campo) {
	if (campo.options.selectedIndex < 1) {
		if (campo.value==-1 || campo.value==0 || campo.value=="") {
			return false;
		}
	}
	return true;
}

function checkPhone (campo) {
	
	var txt = replace (campo.value, ' ', '');
	var txt = replace (txt, '-', '');
	campo.value = txt;
	
	longitud = campo.value.length;
	
	var regexp = /^(\+{0,1}[0-9]+)$/;
	
	if (regexp.test(campo.value) == false || longitud > 15) {
		return false;
	}
	
	return true;
}  



