<!-- funciones de tirada -->
var baraja = new Array("major0.jpg","major1.jpg","major2.jpg","major3.jpg","major4.jpg","major5.jpg","major6.jpg","major7.jpg","major8.jpg","major9.jpg","major10.jpg","major11.jpg","major12.jpg","major13.jpg","major14.jpg","major15.jpg","major16.jpg","major17.jpg","major18.jpg","major19.jpg","major20.jpg","major21.jpg");
var estadoCartas = new Array("","","");
//funcion para obtener una carta01
function darCarta(posicionCarta,id){
	estadoCartas[posicionCarta] = id;
	/*$("#carta" + posicionCarta).css("opacity", 0.00);
	$("#carta" + posicionCarta).html("<div id=\"loading" + posicionCarta +"\" style=\"background:url(/img/cartas/backCard.jpg) center center no-repeat;\">Cargando...</div>");
	$("#loading" + posicionCarta).css("color", "#000");
	$("#loading" + posicionCarta).css("text-align", "center");
	$("#loading" + posicionCarta).css("height", "159px");
	$("#loading" + posicionCarta).css("line-height", "159px");
	$("#carta" + posicionCarta).css("visibility", "visible");
	$("#carta" + posicionCarta).fadeTo(500, 0.99);*/
	var imagensrc = "/img/cartas/" + baraja[id];
	/*var imagen = new Image();
	imagen.onload = function (evt) {		
		$("#carta" + posicionCarta).css("opacity", 0.00);
		$("#carta" + posicionCarta).css("visibility", "visible");*/
		$("#carta" + posicionCarta).html("<img src=\"" + imagensrc + "\" width=\"85\" height=\"159\" alt=\"tirada de tarot gratis\"/>");
		/*$("#carta" + posicionCarta).fadeTo(500, 0.99);
	}
	imagen.src = imagensrc;*/

}
<!-- funcion para hacer aparecer el revalite mail  -->
function calcularAltura(){
	altura = $(window).height()/2 + $(window).scrollTop() - 120;
	return altura;
}
//funcion fadeToIn
function fadeIn(){
	//para #supercapa
	$("#superCapa").css("opacity", 0.00);
	$("#superCapa").css("visibility", "visible");
	$("#superCapa").fadeTo(500, 0.85);
	//para #cajaRevalidate
	calcularAltura
	$("#cajaRevalidate").css("top", calcularAltura()+"px");
	$("#cajaRevalidate").css("opacity", 0.00);
	$("#cajaRevalidate").css("visibility", "visible");
	$("#cajaRevalidate").fadeTo(500, 1.00);
}
//funcion fadeToOut
function fadeOut(){
	//para #supercapa
	$("#superCapa").fadeTo(500, 0.00, function ocultar() { $("#superCapa").css("visibility", "hidden"); });
	//para #cajaRevalidate
	$("#cajaRevalidate").fadeTo(500, 0.00, function ocultar() { $("#cajaRevalidate").css("visibility", "hidden"); });
	
}

<!-- Funciones de comprobacion de que las cartas se han tirado -->
function vld(){
	if(estadoCartas[0] == "" || estadoCartas[1] == "" || estadoCartas[2] == ""){
		alert("Choose three cards");
		return false;
	}else{
		$("#contenido_servicio").val(estadoCartas.join(";"));
	}
	return valid();
}
<!-- envío del mail -->
//******************************
function NumTel(evt)
{
	if(navigator.appName == "Netscape")
	{
		
		if (evt.which == 32 || evt.which == 0  || evt.which == 8)  evt.preventDefault= true; 
		else if (evt.which < 48 || evt.which > 57) evt.preventDefault()// les nombre de 48 -> 57
	}

	if (navigator.appName=="Microsoft Internet Explorer")
	{ 
		 if (evt.keyCode == 32 || evt.keyCode == 8) evt.returnValue = true; // l'espace & précédent
		 else if (evt.keyCode < 48 || evt.keyCode > 57) evt.returnValue = false;
	}
}

			
function choisir(nom_fichier,id)
{
	
	document.getElementById('image_'+id).value=nom_fichier;
}



//*************test Nejem*********************
function ajx()
{
	var ajax;
	
	if(window.XMLHttpRequest) 
          ajax = new XMLHttpRequest();
     else if(window.ActiveXObject) 
          ajax = new ActiveXObject("Microsoft.XMLHTTP");
     else
          return(false);
          
    return ajax;      
	
}


function valid(){
	
	var nom=document.getElementById('nom'); 
	var prenom=document.getElementById('prenom');
	var tel=document.getElementById('tel_portable');
	var email=document.getElementById('email');
	var message=document.getElementById('message');
	var sex=document.getElementById('sex');
	var jour=document.getElementById('jour').options[document.getElementById('jour').selectedIndex].value;
	var mois=document.getElementById('mois').options[document.getElementById('mois').selectedIndex].value;
	var annee=document.getElementById('annee').options[document.getElementById('annee').selectedIndex].value;
	var pays=document.getElementById('pays').options[document.getElementById('pays').selectedIndex].value;
	var validform= new ajx();
	var chaine="";
	
	initcntr();
	
	if(nom.value==""){
		
		document.getElementById('nom').style.backgroundColor="#FFC";	
		document.getElementById("erreur").innerHTML="Name's Field is empty";
		nom.focus();
		return false;		
	}
	
	if(prenom.value==""){
		document.getElementById('prenom').style.backgroundColor="#FFC";	
		document.getElementById("erreur").innerHTML="Last Name's Field is empty";
		prenom.focus();
		return false;		
	}
	
	if(tel.value=="")
	{
		format_tel();
		tel.focus();
		return false;		
	}

	if(email.value=="")
	{
		mail_format(1);
		email.focus();
		return false;		
	}
	
	if(pays=="")
	{
		document.getElementById("erreur").innerHTML="Country's Field is empty";
		document.getElementById("pays").focus();
		return false;		
	}
	
	
	if(isNaN(tel.value))
	{
		format_tel();
		tel.focus();
		return false;		
	}


		

	if(sex.selectedIndex==0)
	{
		document.getElementById("erreur").innerHTML="Sex's Field is empty";
		sex.focus();
		return false;		
	}
	
	if(message.value=="")
	{
		document.getElementById('message').style.backgroundColor="#FFC";	
		document.getElementById("erreur").innerHTML="Question's Field is empty";
		message.focus();
		return false;		
	}
	
	if ($('#terms:checked').val() != "on") {
  		alert("You must accept the privacy police");
		return false;	
	}
	
	chaine="?nom="+nom.value+"&prenom="+prenom.value+"&tel="+tel.value+"&email="+email.value+"&sex="+sex.value+"&pays="+pays+"&jour="+jour+"&mois="+mois+"&annee="+annee;
	
	//alert(chaine);
	
	 validform.open("GET", "library/php/verif_form.php"+chaine, false);
     validform.send(null);
	
     if(validform.readyState == 4) 
     {
	     
     		if(validform.responseText!='')
     		{
	     		
	     		
	     		eval(validform.responseText);
	     		return false;
	     		
     		}else{
	     		fadeIn();
	     		
				document.getElementById('email_vrf').focus();

     		}
		 }else return(false);
		 
	
return false;
}

function format_tel()
{
	document.getElementById('erreur').innerHTML="Mobile's Field is empty";
	document.getElementById('tel_portable').focus();
	document.getElementById('tel_portable').style.backgroundColor="#FFC";
}

function anniv()
{
	document.getElementById('erreur').innerHTML="Over 18s only";
	document.getElementById('annee').focus();
	document.getElementById('annee').style.backgroundColor="#FFC";
	
}

function mail_format(i)
{
	
	
	if(i==1) {
		document.getElementById('erreur').innerHTML="Emails's Field is empty";
	}else if(i==2){
		 document.getElementById('erreur').innerHTML="Emails's Field is empty";
	 }else
	 document.getElementById('erreur').innerHTML="Error on the E-mail Confirmation";
	 
	document.getElementById('email').focus();
	document.getElementById('email').style.backgroundColor="#FFC";	
}

function initcntr()
{
	document.getElementById('erreur').className='cacher';
	
	var ln=document.form.length;
	
	for(i=0;i<ln;i++)
	document.form.elements[i].style.backgroundColor="";
	
}


function verifmail()
{
	if(document.getElementById('email').value!=document.getElementById('email_vrf').value)
		{
			fadeOut();
			mail_format(3);
		}else{
			
		document.form.submit();	
			
		}
}
