function ouvre(pUrl){
  var top=Math.floor(Math.random()*100);
  var left=Math.floor(Math.random()*100);

	mediaWindow=window.open(pUrl,"","top="+top+",left="+left+",toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=no,width=660,height=500");
}

function ouvreAide(pUrl){
  var top=Math.floor(Math.random()*100);
  var left=Math.floor(Math.random()*100);

	mediaWindow=window.open(pUrl,"","top="+top+",left="+left+",toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=no,width=870,height=580");
}

function ouvreChat(pUrl){
  var top=Math.floor(Math.random()*100);
  var left=Math.floor(Math.random()*100);

	mediaWindow=window.open(pUrl,"","top="+top+",left="+left+",toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=no,width=750,height=555");
}

function ouvretaille(pUrl,largeur,hauteur){
  var top=Math.floor(Math.random()*100);
  var left=Math.floor(Math.random()*100);

	mediaWindow=window.open(pUrl,"","top="+top+",left="+left+",toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=no,width="+largeur+",height="+hauteur);
}

function ouvrechat(pUrl){
  var top=Math.floor(Math.random()*100);
  var left=Math.floor(Math.random()*100);

	mediaWindow=window.open(pUrl,"","top="+top+", left="+left+", width=650, height=490, toolbar=no, directories=no, menubar=no, scrollbars=no, resizable=yes, status=no");
}

function ouvrecourseold(pUrl){
	mediaWindow=window.open(pUrl,"","top=0,left=0,toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=740,height=540");
}


function ouvrecourse(pUrl){
	mediaWindow=window.open(pUrl,"","top=0,left=0,toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=900,height=545");
}

function ouvrepari(pUrl){
	mediaWindow=window.open(pUrl,"","top=0,left=0,toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=500,height=300");
}

function confirmer(url, mess) {
	var rep=confirm(mess)
	if (rep) {
		document.location=url;
	}
}

function confirmerpop(url, mess) {
	var rep=confirm(mess)
	if (rep) {
		ouvre(url);
	}
}

function rafraichir() {
	self.opener.parent.location.reload();
	window.close();
}

function afficherAideVisualisateur(lemode)
{
	var aide = document.getElementById('aide');
	aide.style.left = -250 + 'px';
	aide.style.top = 42 + 'px';
	aide.style.visibility = lemode?"visible":"hidden";  
	SelectVisible(lemode?"hidden":"visible",document.getElementsByTagName('select'));
}

function afficherInfo(lemode) {
	var aide = document.getElementById('info');
	if (mouse_x>450)
		aide.style.left = (mouse_x-455) + 'px';
	else
		aide.style.left = (mouse_x+5) + 'px';
	aide.style.top = (mouse_y+10) + 'px';
	aide.style.visibility = lemode?"visible":"hidden";  
//	SelectVisible(lemode?"hidden":"visible",document.getElementsByTagName('select'));
}
function afficherInfoTele(lemode) {
	var aide = document.getElementById('info');
	if (mouse_x>450)
		aide.style.left = (mouse_x-50) + 'px';
	else
		aide.style.left = (mouse_x+50) + 'px';
	aide.style.top = (mouse_y+10) + 'px';
	aide.style.visibility = lemode?"visible":"hidden";  
//	SelectVisible(lemode?"hidden":"visible",document.getElementsByTagName('select'));
}


function afficher(lemode,elem){
    var aAfficher = document.getElementById(elem)
    if (mouse_x>450)
		aAfficher.style.left = (mouse_x-455) + 'px';
	else
		aAfficher.style.left = (mouse_x+5) + 'px';
	aAfficher.style.top = (mouse_y+10) + 'px';
	aAfficher.style.visibility = lemode?"visible":"hidden"; 
}
function afficherAide(lemode) {
	var aide = document.getElementById('aide');
	if (mouse_x>450)
		aide.style.left = (mouse_x-455) + 'px';
	else
		aide.style.left = (mouse_x+5) + 'px';
	aide.style.top = (mouse_y+10) + 'px';
	aide.style.visibility = lemode?"visible":"hidden";  
	SelectVisible(lemode?"hidden":"visible",document.getElementsByTagName('select'));
}
var mouse_x=0; 
var mouse_y=0;
function mouseMove (evt) {
	if (document.all) {
		if (document.documentElement) {
			mouse_x=event.clientX + document.documentElement.scrollLeft;
            mouse_y=event.clientY + document.documentElement.scrollTop;
        } else {
			mouse_x=event.clientX + document.body.scrollLeft;
			mouse_y=event.clientY + document.body.scrollTop;
        }
    } else if (document.getElementById) {
		mouse_x=evt.clientX + window.pageXOffset;
        mouse_y=evt.clientY + window.pageYOffset;
	} 
}

if (document.layers || document.all)
	document.onmousemove = mouseMove;
if (document.addEventListener)
	document.addEventListener('mousemove', mouseMove, true);
var agt = navigator.userAgent.toLowerCase();
var isMac = (agt.indexOf('mac') != -1);
var isOpera = (agt.indexOf("opera") != -1);
var IEver = parseInt(agt.substring(agt.indexOf('msie ') + 5));
var isIE = ((agt.indexOf('msie')!=-1 && !isOpera && (agt.indexOf('webtv')==-1)) && !isMac);
function SelectVisible(v,elem) {
	if (isIE)
    	for (var i=0;i<elem.length;i++)
			elem[i].style.visibility=v;
}

var lockVerif=0;
function frmVerif() {
	if (lockVerif==0) {
		lockVerif=1;
		return true;
	} else {
		return false;
	}
}

function taghorloge(pParam) {
	var obj='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="145" HEIGHT="129" id="horloge" ALIGN="">';
	obj += '<param name="movie" value="' + pParam +'" />';
	obj += '<param name="quality" value="high" />';
	obj	+= '<param name="bgcolor" value="#ffffff" />';
	obj += '<embed src="' + pParam +'" quality=high bgcolor=#FFFFFF  WIDTH="145" HEIGHT="129" NAME="horloge" ALIGN="" TYPE="application/x-shockwave-flash" />';
	obj += '</object>';
	document.write(obj);
}
