// JavaScript Document

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// * Dependencies * 
// this function requires the following snippets:
// JavaScript/readable_MM_functions/findObj
// JavaScript/readable_MM_functions/showHideLayers
// JavaScript/events/getMouseLoc

function popweradio(quelle){
	/*if (quelle=='new'){		window.open('webradio_settings.asp?action=new','webradio','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=250,height=400,top=1,left=1')
}else{			window.open('webradio_settings.asp?style='+quelle,'webradio','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=250,height=400,top=1,left=1')
	}*/
	if(quelle==1){quelle='affichage_rock.html'}
	if(quelle==2){quelle='affichage_postrock_explo.html'}
	if(quelle==3){quelle='affichage_hard.html'}
	if(quelle==4){quelle='affichage_hiphop.html'}
	window.open('http://www.bandeapart.fm/WEBRADIOS/index.asp?webr='+quelle,'webradio','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=792,height=288,top=1,left=1')
}
function popmutek2005(){
	window.open('mutek2005/', 'MUTEK2005', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=800,height=550,top=1,left=1');
}
function pop60(){
	window.open('rockQc/60/index.html', 'ROCKQC', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=800,height=600,top=1,left=1');
}
function pop70(){
	window.open('rockQc/70/index.html', 'ROCKQC', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=800,height=600,top=1,left=1');
}
function pop80(){
	window.open('rockQc/80/index.html', 'ROCKQC', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=800,height=600,top=1,left=1');
}
function pop90(){
	window.open('rockQc/90/index.html', 'ROCKQC', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=800,height=600,top=1,left=1');
}
function pop2000(){
	window.open('rockQc/2000/index.html', 'ROCKQC', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=800,height=600,top=1,left=1');
}
function ouvrevizgroovy(){
	window.open('groovy/visionneuse3.html','groovy','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=670,height=600,top=1,left=1')
}

function fredfortin(){
	window.open('/fredfortin/index.html', 'fredfortinconsortdocuweb', 
'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=800,height=600,top=1,left=1');
}

function ouvrir(lurl, lafenetre, lessettings){
	window.open(lurl, lafenetre, lessettings);
}

function guidedesalles(){
	window.open('/salles/index.html', 'guidedesalles', 
'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,width=900,height=600,top=1,left=1');
}

function mutek2007(){

	var idArtiste = '';
	if(arguments.length>0){
		idArtiste = arguments[0];
	}
	
	window.open('/mutek2007/v2/index.asp?id='+idArtiste, 'mutek2007', 
'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=1004,height=768,top=1,left=1');
}

<!-- ///////////////////////////////////////////////// -->
function moveLayerToMouseLoc(theLayer, offsetH, offsetV)
{

  var obj;
  
  if ((MM_findObj(theLayer))!=null)
  {
    if (!document.all)  //NS
    {
      //document.onMouseMove = getMouseLoc;
      obj = MM_findObj(theLayer)//document.layers[theLayer];
      //obj.left = mLoc.x +offsetH;
      obj.style.top  = mLoc.y + offsetV;
    }
    else //if (document.all)//IE
    {
      //getMouseLoc();
      obj = document.all[theLayer].style;
      //obj.pixelLeft = mLoc.x +offsetH;
      obj.pixelTop  = mLoc.y + offsetV;
    }
   MM_showHideLayers(theLayer,'','show');
  }
}

// get mouse location
function Point(x,y) {  this.x = x; this.y = y; }
mLoc = new Point(-500,-500);

function getMouseLoc(e)
{
  if(!document.all)  //NS
  { 
    mLoc.x = e.pageX;
    mLoc.y = e.pageY;
  }
  else               //IE
  { 
    mLoc.x = event.x + document.body.scrollLeft;
    mLoc.y = event.y + document.body.scrollTop;
  }
  return true;
}

/****************************************************************
//NS init:
if(!document.all){
	document.captureEvents(Event.MOUSEUP); 
	document.onMouseUp = getMouseLoc; 
}
****************************************************************/

// Pour Netscape 4.x, on capture l'événement MouseMove 
if (document.layers) { 
   document.captureEvents(Event.MOUSEMOVE); 
} 
// affectation de la fonction "getMouseLoc" à l'événement onmouseup
document.onmousemove = getMouseLoc; 


<!-- ///////////////////////////////////////////////// -->







/* cette fonction sert a caller une fonction javascript si un parametre particulier est passé a la page html */
function popFenetreDepuisURL()
{
	//Etape 0: on verifie si on passe un parametre a la page
	var urlQueryParameters=location.href.split("?");

	if (urlQueryParameters.length>1) {
	//Un parametre est passe

		// Etape 1: recup du parametre passe a cette page
		// Ce parametre correspond au numero du fichier asx a appeller, apres avoir cliqué
		// sur le picto CAMERA sous une vedette.
	
		var urlQueryParametersTerms=urlQueryParameters[1].split(",");
		var asxTerms = urlQueryParametersTerms[0].split("=");
		var filename = asxTerms[1] + ".asx";
		
		switch(asxTerms[1])
		{
			case 'fredfortin':
				fredfortin();
			break;
		}


	}
	else{
	//Pas de parametre passe
	}
}

/* fonction popup pour parametrer pour différents cas de figures */
function popup(strTypeMedia,strfilePath, strWidth, strHeight){
	
	var racine = "/";
	
	//validation des qq parametres de taille passés en paramètre
	if ( (strWidth == undefined) || (strWidth == 0) || (strWidth == '') ){
		strWidth = window.screen.width-250;
	}
	
	if ( (strHeight == undefined) || (strHeight == 0) || (strHeight == '') ){
		strHeight = window.screen.height-350;
	}
	
	
	var Left=(window.screen.width-parseInt(strWidth,10))/2; 
    var Top=(window.screen.height-parseInt(strHeight,10))/2; 
    
    
		
	switch (strTypeMedia)
	{
	
	  case "playliste":
		window.open(strfilePath,'playliste','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=1,HEIGHT=1,top=1,left=1');
		break;
	
	  case "player":
	  	strHeight = parseInt(strHeight,10)+17;
		window.open('/player.shtml?file='+strfilePath+'&width='+strWidth+'&height='+strHeight+'&media='+strTypeMedia,'player','width='+strWidth+',height='+strHeight+',top='+Top+',left='+Left);
	   break;

		case "html":
		window.open('/'+strfilePath,'page','width='+strWidth+',height='+strHeight+',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=no,top='+Top+',left='+Left);
		
	   break;
	   
 
	  case "externe":
	   Top -= 150;
	   window.open(strfilePath,'externe','width='+strWidth+',height='+strHeight+',toolbar=1,titlebar=1,status=1,location=1,menubar=1,resizable=1,scrollbars=1,top='+Top+',left='+Left);
	   break;

	  case 2:
		 //jouer la vidéo dans un div
		 
		var tempObj = findObj(strIdPlayer);
		var strQktPlr = '';
		
		if (tempObj!=null){
			
			if (strfilePath!=''){
				
				strQktPlr += '<table border="1" style="background-color:red;"><tr><td align=right> <a href="javascript:hidePlayer(\''+strIdPlayer+'\');">X</a> </td><tr><td>';
				
				
				strQktPlr += '<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
				strQktPlr += '<param name="src" value="'+racine+strfilePath+'">';
				strQktPlr += '<param name="autoplay" value="true">';
				strQktPlr += '<param name="loop" value="false">';
				strQktPlr += '<param name="controller" value="true">';
				strQktPlr += '<embed src="'+racine+strfilePath+'" width="320" height="256" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed>';
				strQktPlr += '</object>';
				//<!--param name="qtsrc" value="rtsp://realmedia.uic.edu/itl/ecampb5/demo_broad.mov"--> <!-- pour streaming, parametre a ajouter aussi dans la derniere ligne embed, si requise -->
				
				strQktPlr += '</td><tr></table>';
			}
			
				tempObj.style.display = '';		
				tempObj.innerHTML = strQktPlr;
				tempObj.top = window.screen.height/2-tempObj.height;		
				tempObj.left = window.screen.width/2-tempObj.width;
					
		}
		
		break;
		
	  default:
		window.open(racine+strfilePath);
	   break;
	} 

	void('');
	
}

///////////////////////////////////////////////////////////////////////////
// UTILITAIRES
///////////////////////////////////////////////////////////////////////////

//Pour Ie Mac
if(typeof Array.prototype.push=='undefined'){

	// on simule alors la fonction push
	// car elle n existe pas sous ie mac
	Array.prototype.push=function(){
		var i=0;
		b=this.length,a=arguments;
		for(i;i<a.length;i++)this[b+i]=a[i];
		return this.length;
    }	

}


//retourne l objet dont on fournit l id
function $id(str_id){
	if(document.getElementById(str_id)!='undefined'){
		return document.getElementById(str_id)
	}else{
		return null;
	}
}


popFenetreDepuisURL();


function popfrancosonik(){
	var win = window.open('http://francosonik.gmt2.com/fluxrfp.php','francosonik','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=500,height=410');
	win.focus();
}

function popsirius(){
	var win = window.open('http://www.bandeapart.fm/sirius','sirius','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,history=no,resizable=yes,width=400,height=180');
	win.focus();
}