web/static/res/js/incchoice.js
changeset 124 8d2376eb825c
parent 93 7c37aaa2a8ae
--- a/web/static/res/js/incchoice.js	Thu Feb 07 15:06:40 2013 +0100
+++ b/web/static/res/js/incchoice.js	Fri Feb 08 17:07:34 2013 +0100
@@ -34,7 +34,7 @@
 
 	this.setWordsAndEffect = function(choiceIndex)
 	{
-		if (choiceIndex == 0) {
+		if (choiceIndex === 0) {
 			$("#mot1").html("famille");
 			$("#mot2").html("amour");
 			$("#mot3").html("travail");
@@ -45,7 +45,7 @@
 			// class
 			// by default there is the class blue
 
-		} else if (choiceIndex == 1) {
+		} else if (choiceIndex === 1) {
 			$("#mot1").html("actif");
 			$("#mot2").html("passif");
 			$("#mot3").html("corps");
@@ -102,6 +102,9 @@
 
 		++this.currentWorldIndex;
 
+		// FTV Tag
+		xt_click(this,"F" ,"5", "Creation_Film::Choix_mot_" + this.currentWorldIndex);
+
 		if (this.currentWorldIndex == 3) {
 			// The 3 words get choosen
 			location.href = "film-aleatoire-the-end-etc.html";
@@ -209,7 +212,7 @@
 			}
 		}
 		return false;
-	}
+	};
 
 	this.clearAllVideosChoices = function()
 	{
@@ -271,19 +274,19 @@
 	this.createShareUrl = function(index1, index2, index3)
 	{
 		var index = this.getChosenVideos();
-		var code = 	index[0] + index[2]	
+		var code = 	index[0] + index[2];	
 		var param = (index[0] << 24) | (index[1] << 16) | (index[2] << 8) | code;
 		var urlBase = document.URL;
 		urlBase = urlBase.replace("partage-du-film-aleatoire-the-end-etc", "film-aleatoire-the-end-etc");
 		var url = urlBase + "?" + param;
 		
 		return url;
-	}
+	};
 
 	this.readUrlVideosIndex = function()
 	{
 		var query = window.location.search.substring(1);
-		if (query.length == 0) {
+		if (query.length === 0) {
 			return [];
 		}
 		return this.decodeUrlIndex(query);
@@ -313,7 +316,7 @@
 		}
 
 		return [index1, index2, index3]; 
-	}				
+	};				
 
 	//----------------------------------------------------------------------------------------------------------------------------
 	// Cookies tools