function flash (url,largeur,hauteur,couleur) { 
	var codeflash = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000#version=6,0,0,0"' 
		+ ' WIDTH="' + largeur +' " HEIGHT="' + hauteur + '"' 
		+ ' CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">' 
		+ '<PARAM NAME="MOVIE" VALUE="' + url + '">' 
		+ '<PARAM NAME="PLAY" VALUE="true">' 
		+ '<PARAM NAME="LOOP" VALUE="true">';
	if(couleur == "transparent")
		{codeflash += '<param name="WMODE" value="Transparent">';}
	else
		{codeflash += '<PARAM name=bgcolor value = ' + couleur + '>' ;}
		
	codeflash +=
		'<PARAM NAME="QUALITY" VALUE="high">' 
		+ '<PARAM NAME="MENU" VALUE="false">' 
		+ '<EMBED SRC="' + url + '"' 
		+ ' WIDTH="' + largeur +' " HEIGHT="' + hauteur + '"' 
		+ ' PLAY="true"' 
		+ ' LOOP="true"' 
		+ ' QUALITY="high"';
		
	if(couleur == "transparent")
		{codeflash += ' WMODE="transparent"';}
	else
		{codeflash += ' bgcolor=' + couleur;}
		
	codeflash +=
		' MENU="false"' 
		+ ' TYPE="application/x-shockwave-flash"' 
		+ ' PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">' 
		+ '</EMBED>' 
		+ '</OBJECT>' ; 
	document.write(codeflash);  // ecrire l'animation flash 
}

$(document).ready(function()
{
	setFormEffect("textarea");
	setFormEffect("input[@type='text']");
	setFormEffect("select");
	
	tel=$("#teleconsultations");
	if(tel.lenght==0)
		return;
	tel.hide().css("top","-"+tel.height()+"px");
});

function setFormEffect(jq)
{
	$(jq)
	.hover(function()
	{
		if(!$(this).hasClass("elements_focus"))
			$(this).addClass("elements_hover");
	},
	function()
	{
		$(this).removeClass("elements_hover");
	})
	.focus(function()
	{
		$(this).addClass("elements_focus");
		$(this).removeClass("elements_hover");
	})
	.blur(function()
	{
		$(this).removeClass("elements_focus");
	});
}

function teleconsultation()
{
	tel=$("#teleconsultations");
	if(tel.lenght==0)
		return;
	tel.show().animate({"top":"0px"},"normal");
}
function teleconsultation_close()
{
	tel=$("#teleconsultations");
	if(tel.lenght==0)
		return;
	tel.show().animate({"top":"-"+tel.height()+"px"},"normal");
}
