var tdselbotareas = "";
var tdmarcadabotareas = "";

function rolloverbotareas(i){
  if (tdselbotareas != ""){
    if (document.getElementById("td" + tdselbotareas).style.background != "#fffffe"){ // && document.getElementById("td" + tdsel).style.background != "rgb(228, 236, 253) none repeat scroll 0% 0%")
       document.getElementById("td" + tdselbotareas).style.background = "#0066CC";
	   document.getElementById("td" + tdselbotareas).style.color = "#FFFFFF";
    }
  }

  if (document.getElementById("td" + i).style.background != "#fffffe") { // && window.frames.contenido.document.getElementById("filai" + i).style.background != "rgb(228, 236, 253) none repeat scroll 0% 0%")
    document.getElementById("td" + i).style.background="#FFFFFF";
    document.getElementById("td" + i).style.color = "#0066CC";
  }

  tdselbotareas = i;
}

function estadoinicialbotareas(i){
	if (document.getElementById("td" + tdselbotareas).style.background != "#fffffe"){
  	  document.getElementById("td" + i).style.background = "#0066CC";
      document.getElementById("td" + i).style.color = "#ffffff";
	}
}

function marcartdbotareas(i){
  
  //Seleccionamos la fila que ha pinchado
  if (tdmarcadabotareas != ""){
    document.getElementById("td" + tdmarcadabotareas).style.background="#0066CC";
	document.getElementById("td" + tdmarcadabotareas).style.color = "#FFFFFF";
  }
  
  document.getElementById("td" + i).style.background="#FFFFFE";
  document.getElementById("td" + i).style.color = "#0066CC";

  tdmarcadabotareas = i;
}
var tdselsubbot = "";
var tdmarcadasubbot = "";

function rolloversubbot(i){
   if (document.getElementById("td" + i).style.background != "#ede6d0") { //color de fondo marcado(minusculas)
    document.getElementById("td" + i).style.background="#ede6d1"; //color de fondo rollover
    document.getElementById("td" + i).style.color = "#FFFFFF"; // color de texto rollover
  }
  if (document.getElementById("td" + i).style.background != "#ede6d0") { // && window.frames.contenido.document.getElementById("filai" + i).style.background != "rgb(228, 236, 253) none repeat scroll 0% 0%")
    document.getElementById("td" + i).style.background="#ede6d1";
    document.getElementById("td" + i).style.color = "#ede6d1";
  }


  tdselsubbot = i;
}

function estadoinicialsubbot(i){
	if (document.getElementById("td" + tdselsubbot).style.background != "#ede6d1"){ //color de fondo marcado (minusculas)
  	  document.getElementById("td" + i).style.background = "#FFFFFF"; // color de fondo normal
      document.getElementById("td" + i).style.color = "#0066CC"; // color de texto normal
	}
}

function marcartdsubbot(i){
  
  //Seleccionamos la fila que ha pinchado
  if (tdmarcadasubbot != ""){
    document.getElementById("td" + tdmarcadasubbot).style.background="#FFFFFF";//color de fondo estado normal
	document.getElementById("td" + tdmarcadasubbot).style.color = "#0066CC"; // color de texto estado normal
  }
  
  document.getElementById("td" + i).style.background="#ede6d1"; //color de fondo marcado
  document.getElementById("td" + i).style.color = "#FFFFFF"; //color texto marcado

  tdmarcadasubbot = i;
}


function imprSelec(nombre)
{
  var ficha = document.getElementById(nombre);
  var ventimp = window.open(' ', 'popimpr');
  ventimp.document.write( ficha.innerHTML );
  ventimp.document.close();
  ventimp.print( );
  ventimp.close();
} 
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
