// Scripts comunes
//

document.write("<style type='text/css'>#imagen {visibility:hidden;}<\/style>");

function fadeImage() {
imageId = 'imagen';
image = document.getElementById(imageId);
setOpacity(image, 0);
image.style.visibility = "visible";
fadeIn(imageId,0);
}

function fadeIn(objId,opacity) {
if (document.getElementById) {
	obj = document.getElementById(objId);
	if (opacity <= 100) {
	setOpacity(obj, opacity);
	opacity += 10;
	window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 50);
	}
}
}

function setOpacity(obj, opacity) {
opacity = (opacity == 100)?99.999:opacity;
obj.style.filter = "alpha(opacity:"+opacity+")";
obj.style.KHTMLOpacity = opacity/100;
obj.style.MozOpacity = opacity/100;
obj.style.opacity = opacity/100;
}
window.onload = function() {fadeImage()}

//
//Verificador de direccion email valida
//Advanced Email Check credit-
//By JavaScript Kit (http://www.javascriptkit.com)
//Over 200+ free scripts here!
//

var testresults

function checkemail(){
var str=document.datos.email.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("El formato del E-Mail suministrado no es el correcto. Por favor, intenta de nuevo.")
testresults=false
}
return (testresults)
}

function verificar(){
if (document.layers||document.getElementById||document.all)
return checkemail()
else
return true
}
