/* JAVASCRIPT PARA NIELSEN 
 *
 *    All non-changing parameters (for tagging) are hard coded as shown below
 *                   
 *    Other parameters such as streamname, frequency and url are dynamically assigned using JS
 **/
                    
var scCI = "es-a3tvdav";
var scCG = "0";
//var scTL = "";
var scSI = "";

var scCustom = new Array();
scCustom[0] = "";
scCustom[1] = "";
scCustom[2] = "";
scCustom[3] = "";

var scFreq = "";
var scUrl = "";

//Appropriate media file loaded in this function
function loadFrom(context, url) {

    scUrl = url;	// ruta completa del video
    scSI = "http://www.antena3.com";		// contenedor del video
    
    nomFichero = url.substr(url.lastIndexOf('/')+1); //quitamos ruta
    nomFichero = nomFichero.substr(0, nomFichero.indexOf('.')); // quitamos extension
    
    scTL = nomFichero; // nombre del video

    scFreq = 10; // frecuencia de los ping en segs. (llamadas dav1-...)
    frames['videoFrame'].location.href=context + '/antena3com/secciones/video/iframe-nielsen.jsp';
}

function _nnEventTrack(_nnClickURL)
{
	var _nnCI = "es-antena3tv";
	var _nnCG = "0";
	var _nnCC = "uk"; /* country code */
	var _nnLP = location.protocol.indexOf('https')>-1?'https:':'http:';
	var _nnRP = escape(window.location);
	var _nnND = _nnLP + '//secure-' + _nnCC + '.imrworldwide.com/';
	var _nnPixel = new Image(1,1);
	var _nnParams = "rnd=" + (new Date()).getTime() + "&ci=" + _nnCI + "&cg=" + _nnCG;
	_nnParams += "&si=" + escape(_nnClickURL) + "&rp=" + _nnRP;
	_nnPixel.src = _nnND + "cgi-bin/m?" + _nnParams;
}
