/***
Fichier javascript général
***/


/***
Message scrollant
***/
var defile;// l'element a deplacer
var psinit = 580; // position horizontale de depart
var pscrnt = psinit;       
var pause=false;

function texteDefile() {
	if(pause) return;
   if (!defile) defile = document.getElementById('defile');
   if (defile) {
      if(pscrnt < ( - defile.offsetWidth) ){
         pscrnt = psinit;
                } else {
         pscrnt+= -2; // pixel par deplacement
      }
      defile.style.left = pscrnt+"px";
   }
}
/***
Fin des fonctions de scrolling
***/


/***
Lancement de la radio
***/
var windowHandle = null;
var windowHandle_closed = false;

function lance_radio(source) {
			windowHandle=window.open('http://www.radioslm.fr/player/?source='+source, 'player', 'height=180, width=380, top=0, left=0, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=no, status=no'); 
			setObjRadio();
}

function setObjRadio() {
	var img=new Image();
	img.src='trt_pol.php?opt=objRadio';

}

/***
Lancement du chat
***/
function lance_chat() {
			window.open('chat_popup.php', 'chat', 'height=750, width=870, top=0, left=0, toolbar=no, menubar=no, location=no, resizable=yes, scrollbars=yes, status=no'); 

}

/***
fermeture popup objectifs
***/
function  hidePopupObj() {
	document.getElementById('objectifPopup').style.display='none';
	var img=new Image();
	img.src='/jeu/trt_pol.php?opt=closePopupOnj';
}

