function changecss(num)
{
	 var old = document.getElementById('current_link').value;
	 var news = num;
	 var num_css = document.getElementById('css_' + num);
	 var num_td = document.getElementById('td_' + num);
	 var old_css = document.getElementById('css_' + old);
	 var old_td = document.getElementById('td_' + old);
	 old_css.style.color = "#504849";
	 old_css.style.fontWeight = "normal";
	 old_td.style.backgroundColor = "#c4d049";
	 num_css.style.color = "#eaf578";
	 num_css.style.fontWeight = "bold";
	 num_td.style.backgroundColor = "#778302";
	 document.getElementById('current_link').value = news;
	 
	donnees();
}

function donnees(e)
{
  if (window.event)
    window.event.returnValue=false;
  else
    if (e)
      e.preventDefault();
  page();
}
function nodata()
{
  var cad='';
  return cad;
}
var conexion1;
function page() 
{
  conexion1=crearXMLHttpRequest();
  conexion1.onreadystatechange = after_chargement;
  var num = document.getElementById('current_link').value;
  if(num == 1)
  {
	conexion1.open('POST','/wp-content/themes/WP_Premium/recette.php', true);
  }
  if(num == 2)
  {
	conexion1.open('POST','/wp-content/themes/WP_Premium/chef.php', true);
  }
  if(num == 3)
  {
	conexion1.open('POST','/wp-content/themes/WP_Premium/guide.php', true);
  }
    if(num == 4)
  {
	conexion1.open('POST','/wp-content/themes/WP_Premium/cout.php', true);
  }
  conexion1.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  conexion1.send(nodata());  
}
function after_chargement()
{
  var details = document.getElementById("page");
  if(conexion1.readyState == 4)
  {
	cadena= conexion1.responseText;	
	details.innerHTML = cadena; //"ERROR: la mot de passe est incorrecte";
  } 
  else 
  {
    details.innerHTML = 'Telechargement...';
  }
}

function AbrirCentrado(Url,NombreVentana,width,height,extras) {
var largo = width;
var altura = height;
var adicionales= extras;
var top = (screen.height-altura)/2;
var izquierda = (screen.width-largo)/2; nuevaVentana=window.open(''+ Url + '',''+ NombreVentana + '','width=' + largo + ',height=' + altura + ',top=' + top + ',left=' + izquierda + ',features=' + adicionales + '');
nuevaVentana.focus();
}


//***************************************
//Funciones comunes a todos los problemas
//***************************************
function addEvent(elemento,nomevento,funcion,captura)
{
  if (elemento.attachEvent)
  {
    elemento.attachEvent('on'+nomevento,funcion);
    return true;
  }
  else  
    if (elemento.addEventListener)
    {
      elemento.addEventListener(nomevento,funcion,captura);
      return true;
    }
    else
      return false;
}

function crearXMLHttpRequest() 
{
  var xmlHttp=null;
  if (window.ActiveXObject) 
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  else 
    if (window.XMLHttpRequest) 
      xmlHttp = new XMLHttpRequest();
  return xmlHttp;
}



