// JavaScript Document
function show_contenue (id)
{
if (document.getElementById(id).style.display == 'none')
	{
	document.getElementById(id).style.display = "block";
    }
}

function cache (id)
{

if (document.getElementById(id).style.display == 'block')
	{
	document.getElementById(id).style.display = "none";
    }
}
function show_details (id)
{
if (document.getElementById(id).style.display == 'none')
document.getElementById(id).style.display = "block";
else
document.getElementById(id).style.display = "none";
}

function show_cache(id,num_id,nbr_id)
{
if(document.getElementById(id+'-'+num_id).style.display == 'none')
{var i=0;

for(i=1;i<=nbr_id;i++)
	if(i!=num_id)
		cache (id+'-'+i);

show_contenue(id+'-'+num_id);}
else
document.getElementById(id+'-'+num_id).style.display = 'none'
}


function change_coul(id,col)
{
Titre=document.getElementById(id).style.color=col;

//document.write(id.fontcolor(col));
//Titre.style.color=col;
}

function Lien(url) {
	/*i = document.Choix.Liste.selectedIndex;
	if (i == 0) return;
	url = document.Choix.Liste.options[i].value;*/
	parent.location.href = url;
//parent.location.href='lien.php?id='S1'';
}



function recherche(id){
var type_secteur= new Array[12];
var type_mission=new Array[10];
var mission=new Array[142];


}

function PopupImage(formation,action) {

	w=open("../fr/contact_formation.php?idformation="+formation+"&idaction="+action,'popup','top=100,left=300,width=450,height=350,toolbar=yes,scrollbars=no,resizable=yes');	
	/*w.document.write("<HTML><HEAD><TITLE> Contact "+formation+"</TITLE></HEAD>");
	//w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+50,document.images[0].height+100); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<body bgcolor='#F4F4F4'><form name='fomulaire' method='post' ><table border='0' align='center' cellpadding='0' cellspacing='2' style='color:#000000; font-family:Tahoma; font-size:12px ;'>");
									
									  	w.document.write("<tr><td align='center'  colspan='2' style='color:#FFFFFF; background:#335F8B;font-size:14px;font-weight:bold;padding:2px;  '>Pour plus de renseignement veuillez remplir ce formulaire </td></tr>");
									  	w.document.write("<tr><td >&nbsp;</td><td >&nbsp;</td></tr>");
									  	w.document.write("<tr><td >Nom et Pr&eacute;nom*</td><td class='td_champ_form'><input name='nom_prenom'  value='' onClick='this.value='';'  ></td></tr>");
									  	w.document.write("<tr><td >Soci&eacute;t&eacute;*</td><td class='td_champ_form'><input name='societe' id='societe' value='' onClick='this.value='';'  ></td></tr>");
									  	w.document.write("<tr><td >Activit&eacute;*</td><td class='td_champ_form'><input name='activite' id='activite' value='' onClick='this.value='';'  ></td></tr>");
									  	w.document.write("<tr><td  >T&eacute;l&eacute;phone*</td><td class='td_champ_form'><input name='tel' id='tel' value='' onClick='this.value='';'  ></td></tr>");
									  	w.document.write("<tr><td  >Fax*</td><td class='td_champ_form'><input name='fax' type='text' id='fax' value='' onClick='this.value='';'  ></td></tr>");
									  	w.document.write("<tr><td >E-mail*</td><td class='td_champ_form'><input  type='text' name='email' id='email' value='' onClick='this.value='';'  ></td></tr>");
									 
									  	w.document.write("<tr><td> Formation*</td><td><select name='select' size='1'>");
							           	w.document.write("<option "+activ1+">S&eacute;curit&eacute; des aliments et Bonnes pratiques agricoles</option>");
							           	w.document.write("<option "+activ2+">Environnement, Sant&eacute; et S&eacute;curit&eacute; &amp; Syst&egrave;me int&eacute;gr&eacute;</option>");
							           	w.document.write("<option "+activ3+">Ressources Humaines et Responsabilit&eacute; Sociale</option>");
							           	w.document.write("<option "+activ4+">Management de la Qualit&eacute;</option>");
							           	w.document.write("<option "+activ5+">Secteur hospitalier</option>");
							           	w.document.write("<option "+activ6+">Reporting et Syst&egrave;mes d'information</option>");
							           	w.document.write("<option "+activ7+">Transport et Logistique</option>");
							           	w.document.write("<option "+activ8+">BTP &amp; Ing&eacute;nierie</option>");
							           	w.document.write("</select></td></tr>");
									 
									 		w.document.write("<tr><td >Votre message * </td><td class='td_champ_form'><textarea name=message rows=3 value='' onClick='this.value='';' ></textarea ></td></tr>");
									  
											w.document.write("<tr><td valign='bottom' class='td_remarque'> * champs obligatoires </td><td valign='top' class='td_bouton_contact' align='right'><input name='TO' type='hidden' id='TO3' value='info@keypartners-consulting.com'>");
											w.document.write("<input name='PROJET' type='hidden' id='PROJET' value='Key partners'><input name='SUBMIT' type='submit' class='bouton_reserv'  id='SUBMIT' value='Envoyer'  onClick='validForm();'></td></tr>");


	w.document.write("</table></form>");		+
	w.document.write("</BODY></HTML>");*/
	w.document.close();
}




function swap_bottom(id,id_num,img){
if(document.getElementById('formation-'+id_num).style.display == 'block'){
var i=0;
for(i=1;i<=6;i++)
	if(i!=id_num)
document.getElementById(id+'-'+i).src='../image/'+img+'.gif';

document.getElementById(id+'-'+id_num).src='../image/'+img+'_2.gif';}
else
document.getElementById(id+'-'+id_num).src='../image/icone_formation.gif';
}

function changer(id,img) {
	document.getElementById(id).style.backgroundImage= 'url('+img+')';
document.getElementById(id).getStyle('texte').color="#00FF00";

//document.getElementById(id).setAttribute("style","background:url(img);");
//document.getElementById("td_id").style.backgroundImage = 'url("over.gif")';
} 


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function toolTip(msg, fg, bg)
{
  if(toolTip.arguments.length < 1) // hide
  {
    if(ns4) toolTipSTYLE.visibility = "hidden";
    else toolTipSTYLE.display = "none";
  }
  else // show
  {
    if(!fg) fg = "#6E7588";
    if(!bg) bg = "#FFFFFF";
    var content =
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
    '"><td align="center"><font face="sans-serif" color="' + fg +
    '" size="-2">&nbsp\;' + msg +
    '&nbsp\;</font></td></table></td></table>';
    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
    }
  }
}
