	var flag_ie=(navigator.appName=="Microsoft Internet Explorer") ;
	var chars = new Array (
			'&','à','á','â','ã','ä','å','æ','ç','è','é',
			'ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô',
			'õ','ö','ø','ù','ú','û','ü','ý','þ','ÿ','À',
			'Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë',
			'Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö',
			'Ø','Ù','Ú','Û','Ü','Ý','Þ','€','ß','<',
			'>','¢','£','¤','¥','¦','§','¨','©','ª','«',
			'¬','­','®','¯','°','±','²','³','´','µ','¶',
			'·','¸','¹','º','»','¼','½','¾'
			//,'\"'
			);
	var entities = new Array (
  			'amp','agrave','aacute','acirc','atilde','auml','aring',
			'aelig','ccedil','egrave','eacute','ecirc','euml','igrave',
			'iacute','icirc','iuml','eth','ntilde','ograve','oacute',
			'ocirc','otilde','ouml','oslash','ugrave','uacute','ucirc',
			'uuml','yacute','thorn','yuml','Agrave','Aacute','Acirc',
			'Atilde','Auml','Aring','AElig','Ccedil','Egrave','Eacute',
			'Ecirc','Euml','Igrave','Iacute','Icirc','Iuml','ETH','Ntilde',
			'Ograve','Oacute','Ocirc','Otilde','Ouml','Oslash','Ugrave',
			'Uacute','Ucirc','Uuml','Yacute','THORN','euro','szlig',
			'lt','gt','cent','pound','curren','yen','brvbar','sect','uml',
			'copy','ordf','laquo','not','shy','reg','macr','deg','plusmn',
			'sup2','sup3','acute','micro','para','middot','cedil','sup1',
			'ordm','raquo','frac14','frac12','frac34'
			//,'quot'
			);

String.prototype.replaceAll = function(a,b)
{
	var s=this ;
	var k=0 ;
	while (s.indexOf(a)>=0 && k++<1000)	s=s.replace(a,b) ;
	return s ;
}
function fct_code(s,sens)
{
  for (var i = 0; i < chars.length; i++)
  {
	var c=chars[i] ;
  	var e=entities[i] ;
  	if (e.substr(0,1) != "<")	var e="&" + e + ";" ;
	
	if (sens)		s=s.replaceAll(c,e) ;
	else				s=s.replaceAll(e,c) ;
  }
  return s ;
}
function fct_decode(s)
{
  return fct_code(s,false) ;
}
function fct_htmlentities(s)
{
  return fct_code(s,true) ;
}

function get_screenHeight()
{
    var windowHeight=0;

    if (! flag_ie)			
    		windowHeight=window.innerHeight;
    else if (typeof(window.innerHeight)=='number')
    		windowHeight=window.innerHeight;
    else if (document.documentElement && document.documentElement.clientHeight) 
    		windowHeight = document.documentElement.clientHeight;
    else	 if (document.body&&document.body.clientHeight)
    		windowHeight=document.body.clientHeight;

    return windowHeight - 10;
}
function get_screenWidth()
{
    var windowWidth=0;

    if (! flag_ie)			
    		windowWidth=window.innerWidth;
    else if (typeof(window.innerWidth)=='number')
    		windowWidth=window.innerWidth;
    else if (document.documentElement && document.documentElement.clientWidth) 
    		windowWidth = document.documentElement.clientWidth;
    else	 if (document.body&&document.body.clientWidth)
    		windowWidth=document.body.clientWidth;

    return windowWidth - 10;
}
function fct_lire_cookie(nom) 
{
    var mon_cookie = document.cookie;
    var debut = mon_cookie.indexOf(nom+"=");
    var taille = debut + nom.length + 1;
    var r = "" ;
    if (	(	!debut	) && (nom != mon_cookie.substring(0,nom.length)	)	)	r="" ;
    else
    {
    	if (debut == -1) r="" ;
    	else
    	{
    		var fin = mon_cookie.indexOf(";",taille) ;
    		if (fin == -1) 	fin = mon_cookie.length;
    		r	=	unescape(mon_cookie.substring(taille, fin));
    	}
    }
    return r ;
}
function	fct_del_cookie	(name,value)
{
    setcookie(name);
}
function	fct_ecrire_cookie	(nom,valeur)
{
    var NbJours = 7
    var expdate = new Date ();
    expdate.setTime (expdate.getTime() + (NbJours * 24 * 60 * 60 * 1000)); 

    document.cookie = nom + "=" + valeur + "; expires=" + expdate.toGMTString() ;
}
function fctOnLoad()
{
}
