/* Document Javascript | Zone Haute Vitesse 2007 */function _link_externe(anchor) { 	_linkexterne = window.open(anchor.href,'_blank');	setTimeout('_linkexterne.focus();',250);	return false;}function _play_video(anchor){	document.getElementById('c_player').className = anchor.video_size;	document.getElementById('player').style.display = 'none';		/* IE Refresh bug */	new playerWinMedia({ 		url:    anchor.href,		width:  (anchor.video_size == 'wide') ? 480 : 400,          /* video width (not player) */		height: (anchor.video_size == 'wide') ? 270 : 300,          /* video height (not player) */		uimode: 'full',       										/* none | mini | full */		id: 'playerjpr'	}).generate(		{		output:{			type:     'object',			id:       'player',			property: 'innerHTML'		}	});	document.getElementById('player').style.display = 'block';		/* IE Refresh bug */	return false;}/* Script pour le menu videotron */function swap(id,isOn,lang) {	if (isOn == "on") return;	state = (document["n" + id].src.indexOf("_on") == -1) ? "_on" : "_off" ;	document["n" + id].src = "images/header_videotron/nav" +  state + "_" + id  +".gif"}/* 	RÉCUPÉRATION DU CODE DE L'ACCUEIL ACTUELLE*/function NewPostedecoute(mypage, myname, w, h, scroll) {// clicktag ajout MV 13-jan-06var clicktag = "http://ads5.canoe.ca/event.ng/Type=click&FlightID=24662&AdID=46030&TargetID=3063&Segments=2371,4176,4540,6649&Targets=439,4447,3063&Values=25,31,43,51,60,72,83,90,100,110,150,152,213,224,266,332,334,347,379,380,396,490,493,1086,1287,1315,1333,1444,1467,1482,1545,1551,1570,1620,1837,1946,2235,2236,2293,2307,2553,2670,2686,2698,2700,2702,2703,2704,2787,2932,3070,3079,3120,3562,3671,3718,3733&RawValues=USERID%2Cc0a8dce0-3807-1125439407-1&Redirect=";var winl = (screen.width - w) / 2;var wint = (screen.height - h) / 2;winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no';win = window.open(clicktag+mypage, myname, winprops);if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }}function OpenPostedecoute (mode, id, site) {switch(mode)	{	case 'album': NewPostedecoute('http://www.postedecoute.ca/'+site+'/postedecoute/?album_id='+id,'postedecoute','726','560','no'); break	case 'nouveautes': NewPostedecoute('http://www.postedecoute.ca/'+site+'/postedecoute/?page='+id,'postedecoute','726','560','no'); break	case 'recherche': NewPostedecoute('http://www.postedecoute.ca/'+site+'/postedecoute/?words='+id,'postedecoute','726','560','no'); break	default: NewPostedecoute('http://www.postedecoute.ca/'+site,'postedecoute','726','560','no');         	}	}function popupWin(popupName,url,popupWidth,popupHeight){	win = window.open(url, popupName,"width=" + popupWidth + ",height=" + popupHeight + ",left=200,top=200,resizable=no,scrollbars=no,toolbar=no,status=no,location=no,directories=no");	//bug de NN4 quand focus trop vite, attend 0,25 sec	setTimeout('win.focus();',250);}function popupWinScroll(popupName,url,popupWidth,popupHeight){	win = window.open(url, popupName,"width=" + popupWidth + ",height=" + popupHeight + ",left=200,top=200,resizable=yes,scrollbars=yes,toolbar=no,status=no,location=no,directories=no");	//bug de NN4 quand focus trop vite, attend 0,25 sec	setTimeout('win.focus();',250);	return false;}function affVideoZHV(url) {	popupWin("Video",url,350,490);}function displayURL(selectObj) {	if (selectObj[selectObj.selectedIndex].value != '') {		window.open(selectObj[selectObj.selectedIndex].value);	}}function affVideoHELICO(anchor) {	popupWin("Video",anchor.href,350,500); /* ancienne grandeur 350, 505 */	return false;}function affPlayerVJ(popupName,url,popupWidth,popupHeight){	win = window.open(url, popupName,"width=" + popupWidth + ",height=" + popupHeight + ",left=200,top=200,resizable=no,scrollbars=no,toolbar=no,status=no,location=no,directories=no");	//bug de NN4 quand focus trop vite, attend 0,25 sec	setTimeout('win.focus();',250);}/*Function vieux players*/function popjungle(laquelle,itemid,old) { 	url = "/cgi-bin/evenement_hv/" + laquelle + "/tmpl/player_unicast.html";	if (itemid) {		url += "?id="+itemid	}		if(old){		/*patate peut être remplacer par autre artiste		var height;		if (laquelle == 'catherinedurand' || laquelle == 'mariemai' || laquelle == 'arianemoffatt' || laquelle == 'djelem') {			height = 606;		} else {			height = 475;		}*/		newwindow = window.open(url,"","width=348,height=470,scrollbars=no,resizable=no,toolbar=no"); 		delay = setTimeout("newwindow.location = url",1000); 	} else {		newwindow = window.open(url,"","width=375,height=433,scrollbars=no,resizable=no,toolbar=no"); 		delay = setTimeout("newwindow.location = url",1000); 	}} function pop(drop) {	if (drop.selectedIndex) {		var elements = drop.options[drop.selectedIndex].value.toString().split(',');		var old = (elements.length == 3) ? elements[2] : 0;		popjungle(elements[0],elements[1],old);	} else {		alert ('Veuillez choisir une vidéo');	} 	return false;}function popupPlayer(popupName,url,popupWidth,popupHeight) {		popupDef = window.open(url, popupName,"width=" + popupWidth + ",height=" + popupHeight + ",resizable=no,scrollbars=no,toolbar=no,status=no,location=no,directories=no");		return false;	}/* ----- retourne la valeur du parametre demand? dans le url ----- */function grabParameterInUrl( name ) {	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");	var regexS = "[\\?&]"+name+"=([^&#]*)";	var regex = new RegExp( regexS );	var results = regex.exec( window.location.href );	if( results == null ) {		return "";	}else {		return results[1];	}}/* --------- switch les onglets et contenu pour les 3 blocs de l'accueil de divertissement ----- */function switchTabAccueil(pobject) { var vid = pobject.id; var vmenu= $(pobject).parent().parent(); // pour aller au div du menu var vclassIdCurrentMenu = vid.toString() + "_on"; var vcontentIdCurrentMenu = '#' + vid.toString() + "_bloc";	// enlever tout onglet déjà 'on' et on va cacher le contenu 	$(vmenu).find('a').each( function() {			var vclass = $(this).attr('id').toString() + "_on";			$(vmenu).removeClass(vclass);			var vcontent = '#' + $(this).attr('id').toString() + "_bloc";			$(vcontent).css('display', 'none');		}	)	$(vmenu).addClass(vclassIdCurrentMenu); // mettre l'onglet demandé 'on'	$(vcontentIdCurrentMenu).css('display', 'block'); // mettre le contenu dmeandé 'on'}/* ---- tous les liens qui ont rel='external' vont ouvrir comme un target _blank ---- */function initLinks() {  for (i in document.links) {    link = document.links[i];    if (link.rel && link.rel.indexOf('external')!=-1) {      link.onclick = onExternalLinkActivate;      link.onkeypress = onExternalLinkActivate;    }  }}function onExternalLinkActivate() {  window.open(this.href);  return false;}window.onload = initLinks;