<!--  

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  } else {
    return document[movieName]
  }
}

function pulse(movieName, xValue, yValue) {
	var xPosIndex = 0;
	var yPosIndex = 1;

	movie = thisMovie(movieName);

	/*
		1) Extraire N E S W des valeurs
		2) Trouver les correspondances entre les pixels et les lat/long
		3) envoyer les valeurs au film via xValue et yValue
	*/

	test1 = xValue;
	test2 = yValue;

    // {{{ Config 
	// 0 . 0 (top left) = 76°,16' - 28°,01' => 76,267 - 28,001
	// N/S: 1° = 5.546875px
	// E/W: 1° = 3.807692306px
	
	// new 
	// top = 75.838 - 26.25
	// 5.546875
	// 4.038461538
	var top_x, top_x, var_x, var_y;

	top_x = 75.38;
	top_y = 26.25;
	var_x = 5.546875;
	var_y = 4.038461538;
	// }}}
	// {{{ N position 
	var array_Y;

	test1 = test1.replace(/N/, "");
	array_y = test1.split(/\./);
	// check if we have ' coded with 2 characters
	if (array_y[1].length == 1) {
		array_y[1] = Number(array_y[1]) * 10;
	}
	// convert on ° only
	array_y[1] = Number(array_y[1]) / 60;
	test1 = Number(array_y[0]) + Number(array_y[1]);
	// West, "0 position" - West position
	test1 = Number(top_x) - test1;
	test1 = test1 * Number(var_x);
	// }}}
	// {{{ E or W position 
	var patt1 = /W/;
	var array_x;

	var result = test2.search(patt1);

	if(result != -1) {
		// W
		test2 = test2.replace(/W/, "");
		array_x = test2.split(/\./);
		// check if we have ' coded with 2 characters
		if (array_x[1].length == 1) {
			array_x[1] = Number(array_x[1]) * 10;
		}
			// convert on ° only
			array_x[1] = Number(array_x[1]) / 60;
			test2 = Number(array_x[0]) + Number(array_x[1]);
			// West, "0 position" - West position
			test2 = Number(top_y) - test2;
			test2 = test2 * Number(var_y);
	} else {
		// E
		test2 = test2.replace(/E/, "");
		array_x = test2.split(/\./);
		// check if we have ' coded with 2 characters
		if (array_x[1].length == 1) {
			array_x[1] = Number(array_x[1]) * 10;
		}
			// convert on ° only
			array_x[1] = Number(array_x[1]) / 60;
			test2 = Number(array_x[0]) + Number(array_x[1]);
			// West, "0 position" - West position
			test2 = Number(top_y) + test2;
			test2 = test2 * Number(var_y);
	}
	// }}}

	yValue = test1;
	xValue = test2;

	movie.TSetProperty("/mc_pulsar", xPosIndex, xValue);
	movie.TSetProperty("/mc_pulsar", yPosIndex, yValue); 			
}

-->

