function injectListeVideo(){
		jQuery.noConflict();
		jQuery(".scrollStd").show();
		jQuery(".scrollNE").hide();

			setTimeout(function() {
 				TSR.scrollers.init();
			}, 1000);
}
function injectListeVideoNE(){
		jQuery.noConflict();
		//jQuery(".navVideosNe").show();
		jQuery(".scrollStd").hide();
		jQuery(".scrollNE").show();
		jQuery(".navVideosNe").show();
			setTimeout(function() {
 				TSR.scrollers.init();
			}, 1000);		
}
function afficheThemes(themeId){
	loadVideos({'xobix_program_id': 26,'keyword_cheat': ''+themeId+''},'play');
	jQuery(".menu-theme .detail-themes div").hide();
	jQuery(".menu-theme .detail-themes .theme-"+themeId+"").show();
}



var urlMap = "http://info.tsr.ch/cartes/index.php?";
var srcMap = "http://info.tsr.ch/cartes/xobix.php?";
var nbDay = "10";
function zoomSur(zoomLoc){
	if(document.getElementById('mapContainer').innerHTML != '<iframe src="http://info.tsr.ch/cartes/xobix.php?lat=46.534303&lng=7.234497&z=8&v=10" width="556" height="335" frameborder="0" id="iframeGoogleMap"></iframe>'){
		document.getElementById('mapContainer').innerHTML = '<iframe src="http://info.tsr.ch/cartes/xobix.php?lat=46.534303&lng=7.234497&z=8&v=10" width="556" height="335" frameborder="0" id="iframeGoogleMap"></iframe>';		
	}

	var valeurs = zoomLoc.split("|");
	var canton = valeurs[0];
	var loc = valeurs[1];

	var v = getURLParam("v");

	if(v != ''){
		var vOk = "&v="+v;
	}
	document.getElementById('fakeMap').href= urlMap+""+loc+""+vOk;
	document.getElementById('iframeGoogleMap').src= srcMap+""+loc+""+vOk;
	
	if(canton == "ne"){
		injectListeVideoNE();
		TSR.scrollers.init();
	}
	else if(canton == "all"){
		loadVideos({'xobix_program_id': 26});
		TSR.scrollers.init();
	}
	else {
		loadVideos({'xobix_program_id': 26,'category': ''+canton+''});
		TSR.scrollers.init();
	}
}
function afficheNbDay(nbDay){

	if(document.getElementById('mapContainer').innerHTML != '<iframe src="http://info.tsr.ch/cartes/xobix.php?lat=46.534303&lng=7.234497&z=8&v=10" width="556" height="335" frameborder="0" id="iframeGoogleMap"></iframe>'){
		document.getElementById('mapContainer').innerHTML = '<iframe src="http://info.tsr.ch/cartes/xobix.php?lat=46.534303&lng=7.234497&z=8&v=10" width="556" height="335" frameborder="0" id="iframeGoogleMap"></iframe>';		
	}

	var lat = getURLParam("lat");
	var lng = getURLParam("lng");
	var z = getURLParam("z");

	var nbDayOk = "&v="+nbDay;
	if(lat != ''){
		var latOk = "lat="+lat;
	}
	if(lng != ''){
		var lngOk = "&lng="+lng;
	}
	if(z != ''){
		var zOk = "&z="+z;
	}
	
	document.getElementById('fakeMap').href= urlMap+""+latOk+""+lngOk+""+zOk+""+nbDayOk;
	document.getElementById('iframeGoogleMap').src= srcMap+""+latOk+""+lngOk+""+zOk+""+nbDayOk;
}

function getURLParam(strParamName){
  var strReturn = "";
  var strHref = document.getElementById('fakeMap').href;
  if ( strHref.indexOf("?") > -1 ){
    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return unescape(strReturn);
} 
function hideMap() {
	jQuery("#fakeMap").hide();
	jQuery("#mapContainer").hide();
	jQuery("#playerDynamicContent").show();
	jQuery(".tsrplayer-parent").show();
}


/* JE SUIS UN BOURRIN*/

TSR.scrollers = {
		scroller: [],
		init: function() {
			var me = this;
			jQuery('.scroll').each(function() {
				me.add(this);
			});
		},
		add: function(s) {
			var me = this;
			if (!s) return;
			s = jQuery(s);
			var m = s.children('.scroll-move');
			if (!m) return;
			var first = m.children(':first');
			if (!first) return;
	
			var id = s.attr('id');
	
			var arrows = [
				s.prev('.left'),
				s.next('.right')
			];
	
			if (!arrows[0] || !arrows[1]) return;
	
			var n = (id) ? id : me.scroller.length;

//alert(first.css('width')+" ; "+first.css('margin-right')+" ; "+first.css('margin-left'));
			var scroll = {
				items: {
					width: (parseInt(first.css('width'))+parseInt(first.css('margin-right'))+parseInt(first.css('margin-left'))),
					margin: (parseInt(first.css('margin-right'))+parseInt(first.css('margin-left'))),
					marginLeft: +parseInt(first.css('margin-left')),
					marginRight: +parseInt(first.css('margin-right')),
					widthWithoutMargin: parseInt(first.css('width')),
					length: m.children().size()
				},
				general: {
					id: n,
					container: s,
					mover: m,
					elements: null,
					width: parseInt(s.css('width')),
					infinity: true,
					isAlreadyScrolling: false,
					autoMove: false,
					mouseOver: false
				},
				move: {
					step: 55,
					delay: 40,
					speed: null,
					autoDelay: 10000,
					autoCpt: 0,
					isMoving: false
				},
				arrows: {
					left: arrows[0],
					right: arrows[1]
				}
			};
			scroll.move.items = Math.round(scroll.general.width/scroll.items.width);
			scroll.move.width = scroll.move.items * scroll.items.width;
			scroll.general.mover.css('left',0);

			me.scroller[n] = scroll;
//alert(2)
			me.hideOverflowedItems(scroll);
//alert(1)
			scroll.general.mover.css('width',(scroll.general.width+(scroll.items.width*4)));
//alert(2)
			scroll.general.mover.css('position','relative');
			//cInfo(scroll);
//alert(5)
			/* Initialise les vnements sur les flches */
			jQuery.each(scroll.arrows, function(e) {
				this.css('font-size','0');
				this.bind('click',function() {
					TSR.scrollers.move(this,n);
					return false;
				});
			});
//alert(4)
			// S'il n'y a pas assez d'lments pour dfiler, on disable les flches.
			if (scroll.items.length<=scroll.move.items) {
				jQuery.each(scroll.arrows, function() {
					me.arrows.disable(this);
				});
			}
			//alert("ok");
		},
		autoMove: function(s, c) {
			var me = this;
			
			if (tsr.browser.iPhone) return;

			if (typeof(s)!='object') s = me.scroller[s];
			if (!s) return;
			if (s.general.mouseOver) return;
			if (!s.general.autoMove) return;

			if (c && c == s.move.autoCpt) {
				s.move.autoCpt++;
				me.move(null, s, function() {
					me.autoMove(s);
				});
			}
			if (typeof(c)=='undefined') {
				s.move.autoCpt++;
				var tmp = s.move.autoCpt;
				setTimeout(function() {
					me.autoMove(s, tmp);
				},s.move.autoDelay);
				return;
			}
		},
		move: function(e, n, callback) {
			var me = this;
			if (typeof(n)=='undefined') return;

			if (e) {
				e = jQuery(e);
				if (e.attr('class').indexOf('disable')!=-1) return;
				var dir = trim(e.attr('class').replace('arrow',''));
			} else var dir = 'right';

			var s = (typeof(n)=='object') ? n : me.scroller[n];
			if (!s) return;

			if (s.move.isMoving) return;
			s.move.isMoving = true;

			dir = (dir=='left') ? 1 : -1;
			me.getDistancesAndMove(s, s.move.width, dir, callback);
		},
		movement: function(s, start, end, dir, callback, mov) {
			var me = this;
			if (typeof(start)=='undefined' || typeof(end)=='undefined' || typeof(dir)=='undefined') return;
			if (typeof(mov)=='undefined') mov = start;
			if (!s) return;
	
			if (!s.general.isAlreadyScrolling)
				me.firstScroll(s);
	
			var speed = me.checkSpeed(s, end, mov, dir);
			mov += speed*dir;
			if ((mov*dir) > end) mov = end*dir;
			if (s.general.infinity) {
				var hide = me.hideAndDisplayInMovement(s, mov, dir);
				if (hide>0) {
					end -= (hide*s.items.width);
					mov -= (hide*s.items.width*dir);
				}
			}
			s.general.mover.css('left', mov+'px');
	
			if (mov*dir < end)
				setTimeout(function() {
					TSR.scrollers.movement(s,start,end,dir,callback,mov);
				},s.move.delay);
			else {
				if (s.general.infinity) {
					setTimeout(function() { // settimeout pour bug de "lag"
						me.rebuildForZero(s);
						s.move.isMoving = false;
					},100);
				} else s.move.isMoving = false;
				
				if (typeof(callback)=='function') callback();
			}
		},
		goToItem: function(n, target, callback) {
			var me = this;
			if(typeof(n)=='undefined' || typeof(target)=='undefined') return;
			var s = TSR.scrollers.scroller[n];
			if (!s) return;
			if (s.move.isMoving) return;
			s.move.isMoving = true;
			var dir = -1;
			if (s.items.length-target<target) {
				target = s.items.length-target;
				dir = 1;
			}
	
			me.getDistancesAndMove(s, (target*s.items.width), dir, callback);
		},
		getDistancesAndMove: function(s, target, dir, callback) {
			var me = this;
			if (!s || !target || !dir) return;

			var l = parseInt(s.general.mover.css('left'));
			var i = l*dir+target;
			if (s.general.infinity) {
				me.buildForMovement(s, l, i, dir);
				l = parseInt(s.general.mover.css('left'));
				i = l+target;
			} else {
				me.arrows.enable(s.arrows.left);
				me.arrows.enable(s.arrows.right);
				var max = (s.items.length-s.move.items)*s.items.width;
				if (i>=max) {
					i = max;
					me.arrows.disable(s.arrows.right);
				} else if (i>=0 && dir==1) {
					i = 0;
					me.arrows.disable(s.arrows.left);
				}
			}
			s.move.speed = s.move.step;
			s.general.elements = s.general.mover.children();
			me.movement(s, l, i, dir, callback);
		},
		hideOverflowedItems: function(s) {
			//return;
			var me = this;
			if (!s) return;
	//alert(s.items.width+" ; "+s.items.marginRight);
			var cpt = 0;
			s.general.mover.children().each(function() {
				var margin = cpt*s.items.width-s.items.marginRight;
				//if (cpt<5) alert(margin+" ;"+s.general.width);
				cpt++;
				if (margin<s.general.width) {
					this.style.display='block';
				} else {
					this.style.display='none';
				}
			 });
		},
		hideAndDisplayInMovement: function(s, mov, dir) {
			var me = this;
			if (!s || typeof(mov)=='undefined' || typeof(dir)=='undefined') return;

			var l = parseInt(s.general.mover.css('left'));
			if (l<0) l*=-1;
			if (mov<0) mov*=-1;
			var diff = mov - l;
			if (diff<0) diff*=-1;
			var nbDisp = Math.floor(diff/s.items.width);
	
			var items = {
				first: Math.floor(l/s.items.width),
				last: Math.floor(mov/s.items.width) + s.move.items,
				toDisp: Math.ceil(mov/s.items.width),
				firstVisible: 0
			};
			s.general.elements.each(function() {
				if (this.style.display=='block') return false;
				items.firstVisible++;
			});

			var cpt = cptHide = 0;
			s.general.elements.each(function() {
				if (dir==-1) {
					if (this.style.display!='none' || cpt>0) {
						if (cpt<items.first) {
							if (this.style.display=='block') {
								this.style.display='none';
								cptHide++;
							}
						} else if (cpt>items.last) {
							if (this.style.display=='none') return false;
							else this.style.display='none';
						} else
							this.style.display='block';
						cpt++;
					}
				} else {
					if (cpt>=items.firstVisible-items.toDisp && cpt<items.firstVisible) {
						this.style.display='block';
						cptHide++;
					} else if (cpt>items.firstVisible+s.move.items)
						this.style.display='none';
					cpt++;
				}
			});
			return cptHide;
		},
		buildForMovement: function(s, l, i, dir) {
			var me = this;
			if (!s || !s.general.infinity || typeof(l)=='undefined' || typeof(i)=='undefined' || dir!=1) return;
	
			var m = s.general.mover;
			var child;
	
			var items = {
				nb: Math.ceil((i - l)/s.items.width),
				cpt: 0
			};

			for (var i = items.nb-1 ; i>=0 ; i--) {
				if (items.cpt < items.nb) {
					child = m.children(':last');
					child.remove().prependTo(m);
					items.cpt++;
				}
			}
		},
		rebuildForZero: function(s) {
			var me = this;
			if (!s) return;
			var m = jQuery(s.general.mover);
			if (!m) return;
			if (!s.general.infinity) return;
	
			s.general.mover.children().each(function() {
				if (this.style.display=='none') {
					child = m.children(':first');
					child.remove().appendTo(m);
				} else return false;
			});
	
			var l = parseInt(s.general.mover.css('left'));
			if (l<0) {
				l *= -1;
				var nb = Math.ceil(l/s.items.width);
	
				var child;
				for (var i=0 ; i<nb ; i++) {
					child = m.children(':first');
					child.remove().appendTo(m);
					child.css('display','none');
					s.general.mover.css('left', parseInt(s.general.mover.css('left'))+s.items.width);
				}
			} else s.general.mover.css('left','0');
		},
		checkSpeed: function(s, end, mov, dir) {
			var me = this;
			var defaultValue = 40;
			var marginOfError = 10;
			if (typeof(end)=='undefined' || typeof(mov)=='undefined') return defaultValue;
			if (!s) return defaultValue;
	
			if (end<0) end*=-1;
			if (mov<0) mov*=-1;
			var diff = (dir==-1) ? end - mov : end + mov;
			if (diff<0) diff*=-1;
			var diffInv =  s.general.width - diff;
			var limit = {
				start: Math.round(s.general.width*0.85),
				startInv: s.general.width- Math.round(s.general.width*0.85),
				end: Math.round(s.general.width*0.15)
			};
			var tween = {
				deceleration: function(x){ return Math.abs(Math.round( (1.5^(x)-1.5 )/1.5   ));},
				test: function(x){ return Math.abs(Math.round(  1.5 * 2^(x*0.35-x)));}
			}
			var speed = {
				max: Math.round(s.move.width/Math.round(limit.start/s.move.step)),
				deceleration: tween.deceleration(diff)
			};
			// Corrects the deceleration (not bigger than the maximum speed && diff)
			speed.deceleration = (speed.deceleration > diff || diff<marginOfError)?diff:speed.deceleration;
			speed.deceleration = (speed.deceleration > speed.max)?speed.max:speed.deceleration;
			
			// We move our object with the same speed, when it is not in the area. (0/85%)		
			if((diffInv < limit.startInv)) {
				return speed.max;
			}
			// The object is in the area (85/100%),.. we use deceleration
			return speed.deceleration;
		},
		arrows: {
			disable: function(a) {
				a.css('cursor','default');
				a.addClass('disable');
			},
			enable: function(a) {
				a.css('cursor','pointer');
				a.removeClass('disable');
			}
		},
		setInfinity: function(s, b) {
			var me = this;
			if (typeof(b) != 'boolean') return;
			if (typeof(s)!='object')
				s = TSR.scrollers.scroller[s];
			if (!s) return;

			s.general.infinity = b;
			if (!b) {
				me.arrows.disable(s.arrows.left);
				s.general.mover.css('width',(s.items.length)*s.items.width);
			}
	
			s.general.mover.children().each(function() {
				jQuery(this).css('display','block');
			});
		},
		setAutoMove: function(s, b) {
			var me = this;
			if (typeof(b) != 'boolean') return;
			if (typeof(s)!='object')
				s = TSR.scrollers.scroller[s];
			if (!s) return;

			s.general.autoMove = b;

			s.general.container.mouseover(function() {
				me.mouseOver(s);
			}).mouseout(function() {
				me.mouseOut(s);
			});
			
			jQuery.each(s.arrows, function() {
				this.mouseover(function() {
					me.mouseOver(s);
				}).mouseout(function() {
					me.mouseOut(s);
				});
			});

			if (b)
				me.autoMove(s);
		},
		mouseOver: function(s) {
			s.general.mouseOver = true;
		},
		mouseOut: function(s) {
			var me = this;
			s.general.mouseOver = false;
			me.autoMove(s);
		},
		firstScroll: function(s) {
			var me = this;
			if (!s) return;
	
			if (s.general.infinity && s.items.length<s.move.items*2) {
				var child;
				s.general.mover.children().each(function() {
					s.general.mover.append(jQuery(this).clone());
				});
			}
			s.general.isAlreadyScrolling = true;
		}
	};
	
	

// Create a calendar
function createCalendar(progId, displayFirstDayVideos) {

	if (! $('calendar')) return;
	else $('calendar').className = 'active';

	facetCal = new tsrCalendar;
	facetCal.cTarget = 'calendar';
	facetCal.progId = progId
	facetCal.dateClick = function(d) {
		loadVideosForDay(d);
		return false;
	}

	// Highlight some cells with different values
	facetCal.onRender = function(kill) {

		if (kill) return;

		// Display the videos if needed
		if (displayFirstDayVideos) {
			loadLastBroadcast(progId);
			displayFirstDayVideos = false;
		}
		mainPlayer.loadDateFacet(progId);
		this.removeHighlight();
	}
	facetCal.render();
}

function loadVideosForDay(dt) {

	// First, pad with 0
	dt.day = strpad(dt.day, 2, 0);
	dt.month = strpad(dt.month, 2, 0);

	// Create dateRange
	var templateDateSolr = '["$year-$month-$dayT00:00:00Z" TO "$year-$month-$dayT23:59:59Z"]';
	var dr = parseTemplate(templateDateSolr, dt);

	// Display all the results for that day.
	var param = {}
	param.broadcast_date = dr;
	if (facetCal.progId) param.xobix_program_id = facetCal.progId;

	var newRequest = mainPlayer.searchOnSolr(param, 'broadcast_date desc, xobix_broadcast_position asc', 50);

	newRequest.rTarget = 'programPlayList';
	newRequest.rPaginationTarget = 'programPaging';
	newRequest.rTemplate = templateVideoListProgramWithRollover;

	newRequest.launch();
}

tsrkit.prototype.loadDateFacet = function(programId) {

	// Create a new empty request object
	var newRequest = this.getNewSearch();

	var tmpDateM = facetCal.cYear + '-' + strpad(facetCal.cMonth,2,0);

	newRequest.rSource = 'http://search2.tsr.ch/solr/select?q=role:video%20AND%20xobix_program_id:'+programId+'%20AND%20broadcast_date:%5B%22'+tmpDateM+'-01T00:00:00Z%22%20TO%20%22'+tmpDateM+'-31T23:59:59Z%22%5D'
		+'&rows=0&facet=true&facet.field=broadcast_date&wt=json&json.wrf=' + newRequest.setJSONCallbackFunctionName();

	// The function that will finally handle the results
	newRequest.handleResult = handleSolrDateFacetResult;

	newRequest.launch();
}

var handleSolrDateFacetResult = function(result) {

	// First, cancel the timeout warning, this is the answer !
	this.handleRequestTimeout = function(){};

	// Get two "parallel" objects, one with the ids, one with the names
	var dateFacets = result.facet_counts.facet_fields.broadcast_date;

	// Get the max value of the facets, to draw pretty colors on the calendar
	var maxFacetCount = 0;
	for (var i in dateFacets) if (dateFacets[i] > maxFacetCount) maxFacetCount = dateFacets[i];

	for (var i in dateFacets) {

		var k = dateFacets[i];

		if (k) {

			// Get date of this facet
			var d = parseDateSolrToHuman(i, 'dateobj');

			// Create a factor between 1 an 9 according to the count of items for this date
			var highlight = Math.round(9 * (k / maxFacetCount));

			// Highlight the day, and set the title !
			var d = d.getDate() + '-' + (d.getMonth() + 1) + '-' + d.getFullYear();
			facetCal.highLightDay(d, 'tj-' + highlight);

			facetCal.setDayTitle(d, k + ' videos');
		}
	}

	// Finally, render the calendar.
	facetCal.render(1);
}
// Pad the "str" string until "pLength" with the "padder" character
// for example: strpad ('ab', 5, 'c') => 'cccab'
function strpad (str, pLength, padder) {
	str = String(str);
	while (str.length < pLength) {str = padder + str;}
	return str;
}

// This function get the last broadcast for a given program, and displays it.
function loadLastBroadcast(programId) {

	// Create a new empty request object
	var newRequest = mainPlayer.getNewSearch();

	// Create the URL
	newRequest.rSource = 'http://search2.tsr.ch/solr/select?q=role:video%20AND%20xobix_program_id:'+programId
		+';broadcast_date%20desc&rows=1&wt=json&json.wrf=' + newRequest.setJSONCallbackFunctionName();

	// The function that will finally handle the results
	newRequest.handleResult = function(r) {loadProgramPlaylist(r.response.docs[0].xobix_broadcast_id, 'xobix_broadcast_id')};

	newRequest.launch();
}

function loadProgramPlaylist(searchId, field) {

	if (typeof searchId == 'object') {
		var param = searchId;

		// when the search is not on the whole program, display the "back to program" link
		if (searchId.title){
			//$('backToProgram').style.display = 'none';
			//$('searchInProgramInput').value = searchId.title;
		}
		//else $('backToProgram').style.display = 'block';

	} else {

		// by default: search by xobix_program_id
		if (!field) field = 'xobix_program_id';

		// when the search is not on the whole program, display the "back to program" link
		//if (field == 'xobix_program_id') $('backToProgram').style.display = 'none';
		//else $('backToProgram').style.display = 'block';

		// Build the request for Solr
		var param = {};
		param[field] = searchId;

		//K_UPDATE, 14.02.2008 load only current video in the program list if video come from video TSR other
		/*if (searchId == 74) {
			param['xobix_video_id'] = mainPlayer.currentVideoID;
			trace("special program("+searchId+"), list only currentVideo => " + mainPlayer.currentVideoID, 'info');
		}*/
	}

	// Ignore the broadcasts in the future if there's no other field than xobix_program_id
	// if (field == 'xobix_program_id') param['broadcast_date:' + createSolrDateRangePast()] = null;

	var count = (field == 'xobix_program_id') ? 20 : 50;

	var newRequest = mainPlayer.searchOnSolr(param, 'broadcast_date desc, xobix_broadcast_position asc', count);

	newRequest.rTarget = 'programPlayList';
	newRequest.rPaginationTarget = 'programPaging';
	newRequest.rTemplate = templateVideoListProgramWithRollover;

	// display the detail of the first video
	newRequest.rCallback = function(){

		var v = mainPlayer.videos[newRequest.firstVideoId];

		var progId = (field == 'xobix_program_id' ? searchId : '')

		if (v) {

			// Display the detail of the first video
			displayVideoDetail(v);

			// Save the current program ID
			currentProgramId = v.xobix_program_id;

			// Play first video if there's no video playing yet
			if (mainPlayer.currentVideoID < 2) mainPlayer.playVideo(newRequest.firstVideoId);

			progId = v.xobix_program_id;

		} else trace('The request did not return any video ?', 'warning');

		// in order to display the program info even if there's no result, the xobix_program_id is required
		// use the original search field if we can't find the first result
		var progData = mainPlayer.programs[progId];

		if (progData) {

			var programDetail = $('programDetail');
			programDetail.innerHTML = '<span>' + progData.programUrl + '</span>';
			programDetail.style.backgroundImage = 'url(' + progData.programIcon + ')';
			programDetail.href = progData.programUrl;

			//$('backToProgram').innerHTML = 'Voir toutes les vid&eacute;os de ' + progData.programName;
			//$('backToProgram').href = '#program=' + progData.programVideoSource;

			// Add the program name in the "searchInProgram" label
			//$('searchInProgramLabel').innerHTML = progData.programName;

		} else trace('Error: no data loaded for this program', 'error');

	};

	newRequest.launch();
}
/*
	var playerCodeFlashVideo = 
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="557" height="335" id="flv_tsr_player" align="middle">'
	+'<param name="allowScriptAccess" value="sameDomain" />'
	+'<param name="movie" value="/flash/player.swf" />'
	+'<param name="flashVars" value="controlsPosition=below&amp;bigPlay=false&amp;autoStart=true&amp;file=$file" />'
	+'<param name="allowFullScreen" value="true" />'
	+'<param name="quality" value="high" />'
	+'<param name="wmode" value="transparent" />'
	+'<param name="scale" value="noborder" />'
	+'<param name="salign" value="lt" />'
	+'<embed pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" '
	+ 'allowscriptaccess="sameDomain" name="flv_tsr_player" scale="noborder" salign="lt" align="middle" wmode="transparent" allowFullScreen="true" '
	+ 'quality="high" src="/flash/player.swf" flashVars="controlsPosition=below&amp;bigPlay=false&amp;autoStart=true&amp;file=$file" '
	+ 'swliveconnect="true" height="335" width="557">'
	+ '</object>';
*/
	var templateVideoListProgramWithRollover = '$broadcast_separator<li class="line2">\n'
	+ '<a href="#" name="$id" rel="video" onclick="$player.playVideo(this.name);return false;" '
	//+ 'onmouseover="displayVideoDetail($player.videos[this.name]);">'
	+ '<span class="main">$title <em>$parsed_duration</em>\n'
	+ '</span></a></li>\n';  

