var POSITION_SOURIS_X=0;
var POSITION_SOURIS_Y=0;

function getMouseXY(e) {
	if(typeof(e.clientX)=='number' && typeof(e.clientY)=='number')
	{
		POSITION_SOURIS_X = e.clientX + document.body.scrollLeft;
		POSITION_SOURIS_Y = e.clientY + document.body.scrollTop;
	}
	else
	{
		POSITION_SOURIS_X = e.x + document.body.scrollLeft;
		POSITION_SOURIS_Y = e.y + document.body.scrollTop;
	}	
}

//***************************
function au_dessus()
{
window.focus()
}

//***************************
function aleatoire()
{
return Math.floor(Math.random()* 100000000)+1;
}

//***************************
function remplacer_espaces(url_param)
{
url_param = url_param.replace(/ /g,"-") ;
return(url_param) ;
}

//***************************
function fenetre_ouvrir(src,name,w,h)
{
var new_window, param;

param = "height=" + h + ",width=" + w + ",resizable=yes,scrollbars=auto,menubar=no,toolbar=no";
new_window=window.open(src, name, param);
//new_window.focus();
return new_window ;
}

//***************************
function fenetre_fermer()
{
self.close();
}

//***************************
function ouvrir_fiche_new(id_new)
{
var fenetre, url;
url = "../news/news_liste.asp#" + id_new
//fenetre = fenetre_ouvrir(url, "NEW", 520, 240) ;
parent.document.location.href = url;
return ;
}

//***************************
function afficher_titre2(titre)
{
var html;

html='<b>&#155;&#155;&nbsp;</b><span class="pagetextebleu"><b>' + titre.toUpperCase() +'</b></span>';
document.write(html);
}


//***************************
function placer_antislash_devant_apostrophes(chaine)
{
var reg = new RegExp("'","gi");

chaine = chaine.replace(reg, "\\\'");	
return(chaine);
}

//***************************
function imprimer()
{
if (window.print)
	window.print();
else 
	{
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
//    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    
    WebBrowser1.ExecWB(6, 1);
	WebBrowser1.outerHTML = "";  
	return;
  }
return;
}

//***************************
function afficher_imprimer()
{
var html;

html = "<a href='javascript:imprimer();'>" ;
html += "<img src='../images/icones/icone_imprimer_petit.gif' border='0' alt='Imprimer'>" ;
html += "</a>" ;

document.write(html) ;
return;
}


//***********************
function page_onload()
{
layer_init_plateforme();
initialiser_menu_haut();
if (no_imgOn != 0)
	{
	afficher_menu(menu_courant);
	menuOn(no_imgOn);
	}
return;
}

//***********************
function page_onresize()
{
if (ns4)
	{
	var url = window.location ;
	location.replace(url);
	}
else
	{
	reposition_menu_haut();
	window.refresh;
	}
return;
}


//***********************
function au_dessus()
{
window.focus()
}


//***************************
function recharger_formulaire()
{
var formu = document.formulaire ;
formu.action = "" ;
formu.submit() ;

return;
}
