// © 2003 Hector Fernandez Pereda, por supuesto
// mio, mio, y solo mio desde el principio. Bueno, tampoco es tan difícil
var cnt
cnt= npag;

// controlan las dimensiones de la tabla
anchot=570;
td1=245;
td2=80;
td3=245;

function avanzar() {
if (pactual<cnt-1) ira (pactual+1) //en realidad, el if sobra
}

function retroceder() {
if (pactual>=1) ira (pactual-1)
}


function ira(npagina){
document.location.href=ur[npagina]
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function escribirjump ()
{
var i;
document.write('<SELECT name=\"menuenergia\" onChange=\"MM_jumpMenu(\'parent\',this,0)\">\n\r');
for (i=0;i<=ur.length-1;i++)
{
if (pactual==i){document.write('<option value="'+ur[i]+'" Selected>'+tx[i]+'</option>');}
else {document.write('<option value="'+ur[i]+'">'+tx[i]+'</option>');}
}
document.write('</SELECT>\n\r');
}


function escribirnav() {
document.write('<TABLE width=\"'+anchot+'\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\r');
document.write('<TR>\n\r');
document.write('<TD width=\"'+td1+'\" align=\"left\">');
if (pactual<=0) document.write('&nbsp;');
if (pactual>0) document.write('<B><A href="javascript:retroceder()">&lt;&lt;- Atras</A>');
if (pactual > 0) document.write('&nbsp;&nbsp;<A href="javascript:retroceder()">'+tx[ pactual-1]+'</A></B>');
document.write('</TD>\n\r');
document.write('<TD width=\"'+td2+'\" align=\"center\">');
document.write('<B> | &nbsp;pag '+(pactual+1)+'/'+(cnt)+'&nbsp; | </B>');
document.write('</TD>\n\r');
document.write('<TD width=\"'+td3+'\" align=\"right\">');
if (pactual<cnt-1) document.write('<B> <A href="javascript:avanzar()">'+tx[ pactual+1]+'</A>&nbsp;&nbsp;</B><A href="javascript:avanzar()">Avanzar -&gt;&gt;</A>');
document.write('</TD>\n\r');
document.write('</TR>\n\r');
document.write('</TABLE>\n\r');

}

