	var tarot={
		maxCarte : 22,
		nbreCarte : 5,
		paquet : new Array(this.nbreCarte),
		clic : 0,
		click:function(carte){
			carteId=carte.id;
			if (this.clic<this.nbreCarte){
				$(carteId).style.visibility="hidden";
				$("cartef"+(this.clic+1)).src="images/cartes/"+this.paquet[this.clic]+".jpg";
				this.clic++;
				if (this.clic==this.nbreCarte) {
					$('DATAS').value=tarot.paquet.join(",");
					$('paquet').style.display="none";
					$('allopass').style.display="block";
					theme = tarot.getTheme();
					question = tarot.getQuestion();
					$('DATAS').value+=","+theme+","+question;
				}
			}else{
				$('DATAS').value=tarot.paquet.join(",");
				$('paquet').style.display="none";
				$('allopass').style.display="block";
			}
		},
		getRandom : function(){
			temp=Math.random();
			temp=temp*1000;
			temp=Math.floor(temp);
			temp=temp%this.maxCarte;
			temp=temp+1;
			return temp;
		},
		getTheme :function(){
		  	themes=document.getElementsByName("theme");
      		for(i=0;i<themes.length;i++){
				if(themes[i].checked) return themes[i].value;
			}
		},
		getQuestion :function(){
			return $('question').value;
		},
		GetUnique : function(){
	    var Count=0;
			for (i=0;Count<this.nbreCarte;Count++){
	      Found=false
	      var rndValue = this.getRandom()
	      var j=0
	      for (j=0;j<this.paquet.length;j++){
	        if (this.paquet[j] == rndValue){
	          Found=true
	          break
	        }
	      }
	      if (Found){
	        Count--
	      } else {
	        this.paquet[Count]=rndValue
	      }
	    }
	  }
	}
	tarot.GetUnique();
