// gestion entorno
function ajustar() {
  switch (window.parent.ilang){ 
    case "es": 
    parent.frameleft1.location='Frameleft1page_ES.html'; 
    parent.frameup2.location='Frameup2page_ES.html';
    break; 
    case "ca": 
    parent.frameleft1.location='Frameleft1page_CA.html'; 
    parent.frameup2.location='Frameup2page_CA.html';
    break; 
    case "fr": 
    parent.frameleft1.location='Frameleft1page_FR.html'; 
    parent.frameup2.location='Frameup2page_FR.html';
    break; 
    case "de": 
    parent.frameleft1.location='Frameleft1page_DE.html'; 
    parent.frameup2.location='Frameup2page_DE.html';
    break; 
    case "it": 
    parent.frameleft1.location='Frameleft1page_IT.html'; 
    parent.frameup2.location='Frameup2page_IT.html';
    break; 
    default : 
    parent.frameleft1.location='Frameleft1page_EN.html'; 
    parent.frameup2.location='Frameup2page_EN.html';
    break;
  }
  
  if (window.parent.ictrl == 1){
	ajustar_index();
	} else {
    if (window.parent.ipage!=null){
	   parent.framemain.location=window.parent.ipage;
	   } else {
       ajustar_index();
    }
  } 
  
  if (window.parent.ictrl == 0){
     parent.frameleft2.location='Frameleft2page.html';
	 } else {
	 window.parent.ictrl = 0;
  }
}

function ajustar_index() {
    switch (window.parent.ilang){ 
      case "es": 
      parent.framemain.location='ES_Index.html'; 
      break; 
      case "ca": 
      parent.framemain.location='CA_Index.html'; 
      break; 
      case "fr": 
      parent.framemain.location='FR_Index.html'; 
      break; 
      case "de": 
      parent.framemain.location='DE_Index.html'; 
      break; 
      case "it": 
      parent.framemain.location='IT_Index.html'; 
      break; 
      default : 
      parent.framemain.location='EN_Index.html'; 
    }
}