function Redirection(filename, repositoryPath, bdeFormat)
{
	//validacion de session
var res=Wke.Presentation.WebControls.PageControl.VerifySession(document.location.href);

    if (res.value!="true")
    {
   
       window.location.href=res.value;
    
       return "";

    }
    
    //no volvais a quitar esto!!!!!!!
    
	if(filename.substring(0,2) == 'PD')
	{
		//var urlPdfsIni = 'http://pdfs.wke.es';
		var urlPdfsIni = pdfsRepository;
		var pdfsExt = '.pdf';
		var posPoint = filename.indexOf('.');
		var nomDoc = filename.substring(0, posPoint).toLowerCase();
		//var treeBranch = '/' + nomDoc.substr(8,1) + '/' + nomDoc.substr(9,1) + '/' + nomDoc.substr(10,1) + '/' + nomDoc.substr(11,1) + '/';
		var treeBranch = '/';
		var i = 0;
		var cont = 0;
		for (cont=1,i=posPoint-4;cont<=4;cont++,i++)
		    treeBranch += nomDoc.substr(i,1) + '/';
		var url = urlPdfsIni + treeBranch + nomDoc + pdfsExt;
		window.open(url);
	}
	else
	{
	    document.getElementById("filename").value = filename;
	    
	    if(bdeFormat!=null)
	    {
	        document.getElementById("bdeFormat").value = bdeFormat;
	    }
	    else
	    {
	        document.getElementById("bdeFormat").value  ="";
	    }
	    
	    if(repositoryPath!=null)
	    {
	        document.getElementById("repositoryPath").value = repositoryPath;
	    }
	    else
	    {
	        document.getElementById("repositoryPath").value ="";
	    }
	    
        document.getElementById("btnRedirectDocument").click();		
	}
}

// Esta funcion es una wrapper de Redirection para que desde una tdc cargada en un 
// DocumentControl se pueda saltar a documentos con el formato RedirectionTDC.
//function RedirectionTDC(node, filename, repositoryPath, bdeFormat)
//{
//    Redirection(filename, repositoryPath, bdeFormat);	
//	
//}

// Estas funciones no valen para nada. Pero los documentos las invocan y no se pueden quitar
//  asi k las declamos para que nos nos de error javaScript
function disableLink(a)
{
    return true;
}
function cargar_pdf(a)
{
    return true;
}

function GotoAnchor(id)
{   
    var obj = document.getElementById(id);
    if (obj)
    {
        obj.scrollIntoView(true);
    }
}
//FUNCIONES PARA QUERYLINKS

// ==========================================================
// RCR 04/04/2003
//
// consulta_juris:
//    resuelve los enlaces de tipo consulta a jurisprudencia.
//
//    Ej.: consulta_juris('LE0000011272_art_28_1_ LE0000011272_art_28_4_', 3);
//
//   El primer parametro es la consulta a hacer en el campo f_dispos_aplic.
//   Los valores a consultar vienen separados por espacios en
//   blanco, que se convierten en ";" para llamar a fSGhtml2consulta.
//   El segundo parametro de momento lo ignoramos.
//
//   Para resolver la consulta llama a la funcion fSGhtml2consulta:
//
//   fSGhtml2consulta('JU','DISPOS_APLIC',';LE0000011272_art_28_1_;LE0000011272_art_28_4_;')
// ==========================================================
function consulta_juris(consulta,maxdocs)
{
	/*consulta=consulta.replace(/\s+/g,";");
	consulta = ";" + consulta + ";";
	fSGhtml2consulta('juris','DISPOS_APLIC',consulta);*/
	
	// PVIDAL
	// MAPAEO DIRECTO A LA NUEVA FUNCION DE QUERY LINKS
	
	consulta_bd(consulta, maxdocs, 'JU' );
}


// PVIDAL 07/03/2007.
// Nueva función para gestión de los queryLinks. WRAPPER para la función generateQLink.
// consulta: Valores a consultar.
// maxdocs: Nº de resultados de la consulta. Aquí no se usa.
// database: Tipo documental sobre el que se va a consultar.
function consulta_bd(consulta, maxdocs, database) {
	

	generateQlink(database,'COD_DISPOSICIONES',consulta);	
	/*switch (database)
	{
		case "juris":
			generateQlink("JU",'DISPOS_APLIC',consulta);	
		break;
	}*/
}

// PVIDAL 07/03/2007
// Genera un enlace del tipo 
// ResultsList.aspx?tabs=1&actualDoc=1&activeTab=1&assisData=DISPOS_APLIC$LE0000019668;LE0000013389;LE0000013413
function generateQlink(docType, assist, query) {
	// Los disp a consultar vienen separadas por ";" , ademas incluyen uno al principio y al final.
	// Eliminamos el primer y último ";"
	// tab[] es un vector definido por DocumentBrowser que nos permite conocer el id de pestaña que contiene
	// el tipo documental que nos interesa.
	query = query.replace(/_ /g," ");
	query = query.replace(/ /g,";");
	query = query.replace(/^;/g,"");
	query = query.replace(/;$/g,"");
	query = query.replace(/_$/g,"");
	
	
    // nombre del producto y directorio donde se encuentran los aspx.   
    var myPath = document.location.pathname.replace(/\/[^\/]*$/,"");
    
    var activeTab=tab[docType];
    
    // si contiene mas de una pestaña solo cogemos la primera como activa
    if (activeTab.indexOf("|")>0)
    {
        var arrayTabs = activeTab.split("|");
        activeTab=arrayTabs[0];
    }
	//document.location = "http://" + document.location.hostname + ":" + document.location.port + myPath + "/" + pageQueryLinks + "?tabs="+tab[docType]+"&actualDoc=1&showNavigationBar=true&activeTab="+activeTab+"&assisData=" + assist + "$" + query;
	var params="tabs="+tab[docType]+"&actualDoc=1&showNavigationBar=true&activeTab="+activeTab+"&assisData=" + assist + "$" + query
	var res=Wke.Presentation.WebControls.DocumentControl.EncodeQLink(params);
	document.location="http://" + document.location.hostname + ":" + document.location.port + myPath + "/" + pageQueryLinks +  res.value;
}





function preCargarTDC(tdc, ide)
{
  var tituloLibro = document.getElementById('lTt');
  var tituloDocumento = document.getElementById('cTt');
  var saltoFicha = document.getElementById('sFicha');
  var saltoSeccionFicha = document.getElementById('sFic');
  
  document.getElementById('idx-libro').className="libroOn";
  document.getElementById('idx-capitulo').className="libroOff";

  if (tituloLibro != null)
  { 
    tituloLibro.style.display = 'block';
  }
  if (tituloDocumento != null)
  {
    tituloDocumento.style.display = 'none';
  }
  if (saltoFicha != null)
  {
    saltoFicha.style.display = 'none';
  }
  if (saltoSeccionFicha != null)
  {
    saltoSeccionFicha.style.display = 'none';
  }
  var capa='MenC';
  
  RepositoryPath="";
    
    var hash = new Object();
    hash.Idd= tdc;
    hash.Vigente= "";
    hash.RepositoryPath = repositoryPathForTdc;
    hash.LanguageDependence= new Boolean(false) ;

    var res = Wke.Presentation.WebControls.DocumentControl.LoadInnerHtml(hash);
  
  document.getElementById(capa).innerHTML=res.value;
  document.getElementById(capa).style.display = 'block';
  ControlTDC();
  AbrirTdc(ide);
} 


function AbrirTdc(ide) 
{
  var node = document.getElementById('I'+ide);
  //node.firstChild.nextSibling.className = "indice-seleccionado";
  node.childNodes[0].className= "indice-seleccionado";
  OpenTdcAtNode(node.id);
}

function OpenTdcAtNode(nodeId)
{
    if (nodeId != "")
    {
        var principalDiv = document.getElementById(nodeId);
        if (principalDiv != null)
        {
            if (principalDiv.hasChildNodes())
            // So, first we check if the object is not empty, if the object has child nodes
            {
                var children = principalDiv.childNodes;
                var i = 0;
                var stop = false;
                while ((i < children.length) && (!stop))
                {
                    if (children[i].nodeName == "A")
                    {
                        stop = true;
                        //children[i].className = "isis-b";
                        principalDiv.style.display = 'block';
                    };
                    i++;
                };
            };
            
            var principalDivAuxnew=principalDiv;
            while (principalDiv.parentNode != null)
            {
                principalDiv = principalDiv.parentNode;
                imageFolder = principalDiv.firstChild;
                //
                if ((imageFolder.nodeName == "IMG") && (imageFolder.src.indexOf("abierto") == -1))
                {
                    Toggle(imageFolder);
                };        
            };
            
            //para las nuevas tdcs
            principalDiv=principalDivAuxnew;
            while (principalDiv.parentNode != null)
            {
                principalDiv = principalDiv.parentNode;
                //principalDiv.textContent=principalDiv.innerHTML;
                //imageFolder = principalDiv.firstChild;
                //
                if ((principalDiv.nodeName == "DT"))
                {
                    //Toggle(imageFolder);
                    principalDiv.className='dop';
                };     
                if ((principalDiv.nodeName == "DD"))
                {
                    //Toggle(imageFolder);
                    principalDiv.className='op';
                };    
                if ((principalDiv.nodeName == "DL"))
                {
                    //Toggle(imageFolder);
                    principalDiv.className='op';
                };    
                
                if (principalDiv.hasChildNodes())
            // So, first we check if the object is not empty, if the object has child nodes
            {
                var children = principalDiv.childNodes;
                
                var i = 0;
               
                while ((i < children.length) )
                {
                    if (children[i].nodeName == "DD")
                    {
                       
                        children[i].className = "op";
                        //principalDiv.style.display = 'block';
                    };
                    i++;
                };
            };
                
            };
            //fin nuevas tdcs
        }        
    }
}






function CargarTDC(tdc, ide) 
{
   // El retardo permite que en I.Explorer se cargue la TDC despues del documento.
   if(document.getElementById('MenC'))
   {
        var h=document.createElement('a');
        h.id='indexlink';
        //var link=Wke.Presentation.WebControls.DocumentControl.CreateLinkTDC(tdc,ide);
        //var container=link.value.split("|");
        h.setAttribute("href","javascript:abrirIndice('"+tdc+"','"+ide+"');");
//        if (h.addEventListener)
//        {
//            h.addEventListener('click',abrirIndice,0);
//        }
//        else
//        {
//            h.attachEvent("onclick",abrirIndice);
//        }
        h.innerHTML=showSeeMore;
        h.style.display='block';
        //document.getElementById('MenC').innerHTML=link.value;
        document.getElementById('MenC').appendChild(h);
        var label=document.createElement('div');
        label.innerHTML=showLoadText;
        label.style.display='none';
        label.textContent=showLoadText;
        label.id='loadtdc';
        document.getElementById('MenC').appendChild(label);
        //alert('ju');
        //document.getElementById("MenC").innerHTML="vfvf";
   }
//   setTimeout("CargarTDCImpl('"+tdc+"','"+ide+"');",1);
}





function CargarTDCImpl(tdc, ide) 
{
   // document.getElementById("MenC").innerHTML="vfvf";
//  var hash = new Object();
//    hash.Idd= tdc;
//    hash.Vigente= "";
//    hash.RepositoryPath = repositoryPathForTdc;
//    hash.LanguageDependence= new Boolean(false) ;
    var oldnode=document.getElementById('indexlink');
    var newnode=document.getElementById('loadtdc');
//    alert(oldnode.style.display);
//    alert(newnode.style.display);
    //oldnode.style.display='none';
    newnode.style.display='block';
    
    setTimeout("Loading('"+tdc+"','"+ide+"')",1);
}
function reloj()
{
 //document.getElementById(ide).scrollIntoView(true);
 var posinicio=document.getElementsByTagName('dd');
 var posfin;
 var i=0;
 var encontrado=false;
 while (i<posinicio.length && !encontrado)
 {
    if (posinicio[i].className=="op")
    {
        var j=0;
        var aux=posinicio[i].childNodes;
        while (j<aux.length && !encontrado)
        {
            if (aux[j].className=="op")
            {
                encontrado=true;
                posfin=aux[j];
            }
            j=j+1;
        }
    }
    i=i+1;
 }
 //var posfin=posinicio[0].getElementsByClassName('op');
 posfin.scrollIntoView(false);
 //node.scrollIntoView(true);
}

function OpenTdcNode(nodeId)
{
    if (nodeId != "")
    {
        var principalDiv = document.getElementById(nodeId);
        if (principalDiv != null)
        {
            if (principalDiv.hasChildNodes())
            // So, first we check if the object is not empty, if the object has child nodes
            {
                var children = principalDiv.childNodes;
                var i = 0;
                var stop = false;
                while ((i < children.length) && (!stop))
                {
                    if (children[i].nodeName == "A")
                    {
                        stop = true;
                        //children[i].className = "isis-b";
                        //principalDiv.style.display = 'block';
                        principalDiv.className="op";
                    };
                    i++;
                };
            };
            
            while (principalDiv.parentNode != null)
            {
                principalDiv = principalDiv.parentNode;
                //principalDiv.textContent=principalDiv.innerHTML;
                //imageFolder = principalDiv.firstChild;
                //
                if ((principalDiv.nodeName == "DT"))
                {
                    //Toggle(imageFolder);
                    principalDiv.className='dop';
                };     
                if ((principalDiv.nodeName == "DD"))
                {
                    //Toggle(imageFolder);
                    principalDiv.className='op';
                };    
                if ((principalDiv.nodeName == "DL"))
                {
                    //Toggle(imageFolder);
                    principalDiv.className='op';
                };    
                
            };
        }        
    }
}
function ControlTdc()
{
	if (document.getElementById('tdcBody') ){ 
	    IniciarCodigoTDC('tdcBody','dl');
    }

}
function IniciarCodigoTDC(menuId,tipo) {		
	if (!DOM1 && !DOM2) {return null;}
	var Menu = document.getElementById(menuId);
	var Submenues = Menu.getElementsByTagName(tipo);
	for (var i=0; i < Submenues.length; i++) {
	if (	tipo =='dl'){
		Menux = Submenues[i];
	} else if (tipo =='ul'){
		Menux = Submenues[i].parentNode;
	} else if (tipo =='li'){
		Menux = Submenues[i];
	}
		while (Menux.nodeName=="#text"){
			Menux = Menux.nextSibling;
    		}
		if (DOM2) {
			if (	tipo =='dl'){
				if (	Menux.firstChild.nodeName=="#text"){
					Menux.firstChild.nextSibling.addEventListener('click', OpDLcTDC, 0);
				} else {
					Menux.firstChild.addEventListener('click', OpDLcTDC, 0);	
				} 		
			} else if (tipo =='ul'){
				Menux.addEventListener('click', OpenUL, 0);	
			} else if (tipo =='li'){
				Menux.addEventListener('click', OpenUL, 0);	
			}
		}
		if (DOM1) {
			if (	tipo =='dl'){
				Menux.firstChild['onclick']=new Function('OpDLcTDC(this);');
			} else if (tipo =='ul'){
				Submenues[i].parentNode['onclick']=new Function('OpenUL(this);');
			} else if (tipo =='li'){
				if(Submenues[i].className != "ExISISc" && Submenues[i].className != "ExISISo" ){				
					Submenues[i]['onclick']=new Function('OpenUL(this);');
				}
			}
		}
	}
}
function OpDLcTDC(E) {
	var elmDT = (DOM1) ? E : E.currentTarget;
	if (DOM1) {
		  if (elmObj == null) elmObj = elmDT;
		  if (elmObj.parentNode == elmDT) return elmObj = elmDT;
	}
	if (DOM2) {
		if (elmDT.nodeName!='DT') {
			return null;
		}
	}
	var estiloActual = elmDT.className;
		elmDT.className = (estiloActual=='dcl') ? 'dop' : 'dcl';
	var	estiloDT=elmDT.className
//	var padre = elmDT.parentNode;
//	if 
    if(elmDT.nextSibling!=null)
    {
	while (elmDT.nextSibling.nodeName=="#text")
		{
			elmDT= elmDT.nextSibling;
    		}
    }
    var auxiliary=elmDT.nextSibling;
    if (auxiliary.id!='')
    {
        var i=0;
        for (i;i<auxiliary.childNodes.length;i++)
        {
            if (auxiliary.childNodes[i].nodeName=="DFN")
            {
                //Cargar por ajax la tdc
                var hash = new Object();
                hash.Idd=auxiliary.id;
                hash.Vigente= "";
                hash.RepositoryPath = repositoryPathForTdc;
                hash.LanguageDependence= new Boolean(false);
                var result=Wke.Presentation.WebControls.DocumentControl.LoadInnerHtml(hash);
                auxiliary.innerHTML=result.value;
                ControlTdc();
                break;
            }
        }
    }
//    if (elmDT.id!='')
//    {
//    }
	while(elmDT=elmDT.nextSibling)
		{
			estiloActual = elmDT.className;
			if (elmDT.nodeName=='DD') {
				//elmDT.className = (estiloActual=='cl') ? 'op' : (estiloDT=='dop') ? 'op' : 'cl';
				if (estiloActual=='cl')
				{
				    elmDT.className ='op';
				}
				else{
				    if (estiloDT=='dop')
				    {
				       elmDT.className = 'op';
				    }
				    else{
				        elmDT.className = 'cl'
				    }
				}
			} 
		}
	if (DOM1) elmObj = elmDT;
	if (DOM2) E.stopPropagation();
}

function Loading(tdc,ide)
{
  var hash = new Object();
    hash.Idd= tdc;
    hash.Vigente= "";
    hash.RepositoryPath = repositoryPathForTdc;
    hash.LanguageDependence= new Boolean(false) ;
    var res = Wke.Presentation.WebControls.DocumentControl.LoadInnerHtml(hash);
//     setInterval("reloj()",1000);
    document.getElementById("loadtdc").innerHTML=res.value;
    //document.getElementById("cCx").style.overflow="scroll";
  //document.getElementById("MenC").innerHTML=res.value;
//  ControlTdc();
  var node = document.getElementById('I'+ide);
  if (node.nodeName=="DFN")
  {
    var tdcsecondnode=node.parentNode;
    var tdcsecondid=tdcsecondnode.id;
    hash.Idd=tdcsecondid;
    hash.Vigente= "";
    hash.RepositoryPath = repositoryPathForTdc;
    hash.LanguageDependence= new Boolean(false) ;
    var secondary=Wke.Presentation.WebControls.DocumentControl.LoadInnerHtml(hash);
    tdcsecondnode.innerHTML=secondary.value;
    ControlTdc();
    if (document.all)
        tdcsecondnode.previousSibling.className="dop";
    else
        tdcsecondnode.previousSibling.previousSibling.className="dop";
    var contlinknode=document.getElementById('I'+ide);
    var episodenode=contlinknode.parentNode.parentNode;
    if (document.all)
        episodenode.previousSibling.className="dop";
    else
        episodenode.previousSibling.previousSibling.className="dop";
    for(var i=0;i<contlinknode.childNodes.length;i++)
    {
        if (contlinknode.childNodes[i].nodeName=="A")
            contlinknode.childNodes[i].className= "selected-item";
    }
  }
  else
  {
      ControlTdc();
      //node.txtContent=node.innerHTML;
      //node.firstChild.nextSibling.className = "indice-seleccionado";
      for(var i=0;i<node.childNodes.length;i++)
      {
        if (node.childNodes[i].nodeName=="A")
            node.childNodes[i].className= "selected-item";
      }
  }
  OpenTdcNode(node.id);
  //node=document.getElementsByClassName("indice-seleccionado");
  //alert(node.InnerHTML);
   setTimeout("reloj()",300);
  //document.getElementById("I652").scrollIntoView(true);
  //alert("pr");
  //reloj();
}
var posIndice=false;
function OC_tab()
{
    if(posIndice){ 
        document.getElementById("cCx").style.display = "none"; 
        document.getElementById("open_close").style.right = document.getElementById("cCx").offsetWidth + 18 + "px"; 
        posIndice = false; 
    } 
    else{ 
        document.getElementById("cCx").style.display = "block"; 
        document.getElementById("cCx").style.width = "30%"; 
        document.getElementById("open_close").style.right = document.getElementById("cCx").offsetWidth + 18 + "px"; 
        posIndice = true; 
    } 
}
var abierto = false; 
//abierto = false; 
var clicks = 0;
function abrirIndice(tdc,ide){ 
    if (!abierto)
    { 
        document.getElementById("cCx").style.width = 30 + "%"; 
        document.getElementById("cCn").style.width = 67 + "%"; 
        //document.getElementById("tdcBody").style.display = "block"; 
        document.getElementById("indexlink").innerHTML = closeIndexText; 
        document.getElementById("loadtdc").style.display = 'block';
        abierto = true; 
    } 
    else
    { 
        document.getElementById("cCx").style.width = 94 + "px"; 
        document.getElementById("cCn").style.width = 89 + "%"; 
        document.getElementById("loadtdc").style.display = 'none'; 
        document.getElementById("indexlink").innerHTML = showSeeMore; 
        abierto = false; 
    }
    if (clicks==0)
    {
        clicks+=1;
        CargarTDCImpl(tdc,ide);
//            document.getElementById('loadtdc').style.display='none';
    }
}


///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////


if (document.implementation) {
	if (document.implementation.hasFeature('Events','2.0')) {
		var DOM2 = true;
	} else {
		var DOM1 = true;
		var elmObj = null;
	}
} else {
	if (document.getElementById) {
		var DOM1 = true;
		var elmObj = null;
	}
}
/* */
function IniciarCodigo(menuId,tipo) {		
	if (!DOM1 && !DOM2) {return null;}
	var Menu = document.getElementById(menuId);
	var Submenues = Menu.getElementsByTagName(tipo);
	for (var i=0; i < Submenues.length; i++) {
	if (	tipo =='dl'){
		Menux = Submenues[i];
	} else if (tipo =='ul'){
		Menux = Submenues[i].parentNode;
	} else if (tipo =='li'){
		Menux = Submenues[i];
	}
		while (Menux.nodeName=="#text"){
			Menux = Menux.nextSibling;
    		}
		if (DOM2) {
			if (	tipo =='dl'){
				if (	Menux.firstChild.nodeName=="#text"){
					Menux.firstChild.nextSibling.addEventListener('click', OpDLc, 0);
				} else {
					Menux.firstChild.addEventListener('click', OpDLc, 0);	
				} 		
			} else if (tipo =='ul'){
				Menux.addEventListener('click', OpenUL, 0);	
			} else if (tipo =='li'){
				Menux.addEventListener('click', OpenUL, 0);	
			}
		}
		if (DOM1) {
			if (	tipo =='dl'){
				Menux.firstChild['onclick']=new Function('OpDLc(this);');
			} else if (tipo =='ul'){
				Submenues[i].parentNode['onclick']=new Function('OpenUL(this);');
			} else if (tipo =='li'){
				if(Submenues[i].className != "ExISISc" && Submenues[i].className != "ExISISo" ){				
					Submenues[i]['onclick']=new Function('OpenUL(this);');
				}
			}
		}
	}
}

/*/////////////////////////////////////////////////////////////*/
/*////////////////////////Estilos TDC Abierta /////////////////*/
/*////// Comentar y descomentar Estilos_TDCs.css //////////////*/
/*/////////////////// function OpDLc(E) ///////////////////////*/
/*/////////////////////////////////////////////////////////////*/

function OpDLc(E) {
	var elmDT = (DOM1) ? E : E.currentTarget;
	if (DOM1) {
		  if (elmObj == null) elmObj = elmDT;
		  if (elmObj.parentNode == elmDT) return elmObj = elmDT;
	}
	if (DOM2) {
		if (elmDT.nodeName!='DT') {
			return null;
		}
	}
	var estiloActual = elmDT.className;
		elmDT.className = (estiloActual=='dop') ? 'dcl' : 'dop';
    if(elmDT.nextSibling!=null)
    {
	while (elmDT.nextSibling.nodeName=="#text")
		{
			elmDT= elmDT.nextSibling;
    		}
    }
	while(elmDT=elmDT.nextSibling)
		{
			estiloActual = elmDT.className;
			if (elmDT.nodeName=='DD') {
				elmDT.className = (estiloActual=='op') ? 'cl' : 'op';
			} 
		}
	if (DOM1) elmObj = elmDT;
	if (DOM2) E.stopPropagation();
}


/*/////////////////////////////////////////////////////////////*/
/*////////////////////////Estilos TDC Cerrada /////////////////*/
/*////// Comentar y descomentar Estilos_TDCs.css //////////////*/
/*/////////////////// function OpDLc(E) ///////////////////////*/
/*/////////////////////////////////////////////////////////////*/

/*
function OpDLc(E) {
	var elmDT = (DOM1) ? E : E.currentTarget;
	if (DOM1) {
		  if (elmObj == null) elmObj = elmDT;
		  if (elmObj.parentNode == elmDT) return elmObj = elmDT;
	}
	if (DOM2) {
		if (elmDT.nodeName!='DT') {
			return null;
		}
	}
	var estiloActual = elmDT.className;
		elmDT.className = (estiloActual=='dcl') ? 'dop' : 'dcl';
    if(elmDT.nextSibling!=null)
    {
	while (elmDT.nextSibling.nodeName=="#text")
		{
			elmDT= elmDT.nextSibling;
    		}
    }
	while(elmDT=elmDT.nextSibling)
		{
			estiloActual = elmDT.className;
			if (elmDT.nodeName=='DD') {
				elmDT.className = (estiloActual=='cl') ? 'op' : 'cl';
			} 
		}
	if (DOM1) elmObj = elmDT;
	if (DOM2) E.stopPropagation();
}
*/

function ControlTDC(){
	if (document.getElementById('tdcBody') ){ 
		IniciarCodigo('tdcBody','dl');
	}
}
