/*------------------------------------------------
|             Clair et Net. © 2007                |
--------------------------------------------------*/


function getCouleurH1(){
	if (!document.styleSheets) return;
	var regles=new Array();
	if (document.styleSheets[1].cssRules){
		regles=document.styleSheets[1].cssRules;
	}
	else if (document.styleSheets[1].rules){
		regles = document.styleSheets[1].rules;
	}
	return regles[0].style.color;
}

function getClassProp(feuille,position,propriete){
	if (!document.styleSheets) return;
	var regles=new Array();
	if (document.styleSheets[feuille].cssRules){
		regles=document.styleSheets[feuille].cssRules;
	}
	else if (document.styleSheets[feuille].rules){
		regles = document.styleSheets[feuille].rules;
	}
	return regles[position].style[propriete];
}


function generateFlashH1(){
	if(h1 = document.getElementsByTagName("h1")[0]){
		texte = h1.innerHTML.split("%").join("%25");	
		texte = texte.split("'").join("%27").split('"').join("%22");
		texte = texte.split("+").join("[plus]");
		
		h1.id = "h1";
		
		h = h1.offsetHeight;		
		l = h1.offsetWidth;
		
		var so = new SWFObject("/_swf/h1.swf", "flashH1", l, h-5, "8");	
		so.addParam("wmode", "transparent");
		so.addVariable("couleur",getClassProp(1,0,'color'));
		so.addVariable("titre",texte);
		so.addVariable("largeur",l);
		so.write("h1");
	}
}


function generateFlashH3(){
	if(menu = document.getElementById("menuLateral")){
		h3 = menu.getElementsByTagName("h3")[0];
		texte = h3.innerHTML.split('"').join("&quot;");
		h3.id = "h3";
				
		var so = new SWFObject("/_swf/h3.swf", "flashH1", "100%", "100%", "8");	
		//so.addParam("wmode", "transparent");
		so.addVariable("couleur",getClassProp(1,1,'backgroundColor'));
		so.addVariable("titre",texte);
		so.write("h3");
	}
}



