

/*  --------------------------------------------------------------------------------------------------------------	*
 *											FONCTION PRELOAD GLOBAL													*
 *																													*
 *	preload global des images >>>> onLoad="preloadcommun(); SwitchRub (rub);"										*	
 *  --------------------------------------------------------------------------------------------------------------	*/
/*  ------------------------------------------------*
 *			    Javascript test navigateurs         *
 *  ------------------------------------------------*/
 
// Version de navigateur
var browser = navigator.appName;
var version = parseInt(navigator.appVersion);
var version2 = navigator.appVersion;

// Javascript enable
var jvsenable = false;
if ( browser == "Microsoft Internet Explorer" && version > 3 ) jvsenable = true;
if ( browser == "Netscape" && version >= 3 ) jvsenable = true;

// print enable
var printenable = false;
if ( browser == "Microsoft Internet Explorer" && version > 3 && version2.indexOf("MSIE 4") < 0 ) printenable = true;
if ( browser == "Netscape" && version >= 3 ) printenable = true;

// detecte IE
var iedetect = true;
if ( browser == "Netscape") iedetect = false;




	function SwitchImg (im,sr)
	{
		if (jvsenable)
		{
			if ( document.getElementById([im]) != null ) document.getElementById([im]).src = sr;
		}
	}




/*  --------------------------------------------------------------------------------------------------------------	*
 *											FONCTION AFFECTER CLASS													*
 *		<script language="JavaScript">																				*
 *		affecter_class("a01","LienMenuOn");																			*
 *		</script>																									*
 *																													*
 *		<A HREF="#" CLASS="LienMenu" ID="a01">TITRE</A>																*	
 *																													*		
 *  --------------------------------------------------------------------------------------------------------------	*/
			
		function affecter_class(obj_name,class_name)
		{
		var obj;
		
			obj = document.getElementById(obj_name);
			if (obj) 
				obj.className = class_name;
		}

	
/*  --------------------------------------------------------------------------------------------------------------	*
 *											FONCTION AJOUTER À VOS FAVORIS											*
 *		<a href="url" title="titre"																					*
 *		onClick="javascript:bookmarksite('titre', 'url'); return(false);">											*
 *		Ajouter à vos favoris</a>																					*
 *																													*
 *  --------------------------------------------------------------------------------------------------------------	*/

function bookmarksite(title,url){
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
	else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all)// ie
		window.external.AddFavorite(url, title);
	}


	
	/*  --------------------------------------------------------------------------------------------------------------	*
 *											FONCTION AFFICHER DIV													*
 *		onclick="	javascript:showDiv('aff01');																	*
 *					javascript:hideDiv('aff02');																	*
 *					affecter_class('l01','current');																*
 *					affecter_class('l02','nor');																	*
 *																													*		
 *  --------------------------------------------------------------------------------------------------------------	*/

	function  showDiv(objid)
	{
	document.getElementById(objid).style.display="block";
	}
	function  hideDiv(objid)
	{
	document.getElementById(objid).style.display="none";
	}



/*  ----------------------------------------------------------------------------------------------------------	*
 *	popupall																									*
 *	se redimensione par raport a l'ecran																		*
 *	<a href="xxxxx" onclick="popupall(this.href,'popupall','no','yes','60','80','10','40'); return(false);">	*
 *  <a href="fichier.htm" onclick="window.open(this.href);return false;">										*
 *  ----------------------------------------------------------------------------------------------------------	*/

	function popupall(URL,FRAME,SCROLLBARS,RESIZABLE,WIDTH,HEIGHT,TOP,LEFT)
	{
		var param = "menubar=no,location=yes,directories=yes,status=yes,toolbar=yes,scrollbars="+SCROLLBARS+",resizable="+RESIZABLE+",width="+((screen.width)-WIDTH)+",height="+((screen.height)-HEIGHT)+",top="+TOP+",left="+LEFT;
		window.open(URL,FRAME,param); 
	}


/*  ----------------------------------------------------------------------------------------------------------	*
 *	Popup fenêtre javascript																					*
 *	<A HREF="xxxxx" onclick="popupwin('xxxxx','Popupwin','yes','yes','550','370','20','40');return(false);">	*
 *	<A HREF="xxxxx" onClick="popupwin(this.href,'popupwin','no','yes','100','100','20','60'); return(false);"	*
 *  ----------------------------------------------------------------------------------------------------------	*/

	function popupwin(URL,FRAME,SCROLLBARS,RESIZABLE,WIDTH,HEIGHT,TOP,LEFT)
	{
		var param = "menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars="+SCROLLBARS+",resizable="+RESIZABLE+",width="+WIDTH+",height="+HEIGHT+",top="+TOP+",left="+LEFT;
		window.open(URL,FRAME,param); 
	}


/*  --------------------------------------------------------------------------------------------------------------	*
 *	retaille fenetre																								*
 *	<body onload="window.focus(); RetaillerFenetre();">																*
 *	<a href="javascript:window.close();"><IMG SRC="xxx" name="i" border=0 alt="Cliquer pour fermer la fenêtre"></a>	*
 *	valeur defaut IE : document.i.width+12,document.i.height+30														*
 *	valeur defaut FIREFOX : document.i.width+8,document.i.height+48													*
 *  --------------------------------------------------------------------------------------------------------------	*/
	

		function retaillerfenetre()
			{
				if (iedetect == true)
					window.resizeTo(document.i.width+60,document.i.height+200);
				else 
					window.resizeTo(document.i.width+60,document.i.height+180);
					
			window.focus();
			}


/*  ------------------------------------------------
 *  Kyxar Dhtml Lib                                *
 *    Librairie de manipulation d'objets DHTML     *
 *  [C] Kyxar / RS - 2001,2002,2003                *
 *  Contact, Info : http://www.kyxar.fr            *
 *                                                 *
 *  Basé sur Next Generation cross-browser DHTML   *
 *  de http://devedge.netscape.com                 *
 *  Compatibilité : IE5+ NS6+ Opera6+              *
 *  ---------------------------------------------- */