

  function abrirsector( queY, queX ) {
    arriba_izquierda.src = "/mapaimages/map_L"+ (queY-1) +"_C" +(queX-1) +".gif" ;
    arriba_centro.src    = "/mapaimages/map_L"+ (queY-1) +"_C" +(queX+0) +".gif" ;
    arriba_derecha.src   = "/mapaimages/map_L"+ (queY-1) +"_C" +(queX+1) +".gif" ;
    centro_izquierda.src = "/mapaimages/map_L"+ (queY+0) +"_C" +(queX-1) +".gif" ;
    centro_centro.src    = "/mapaimages/map_L"+ (queY+0) +"_C" +(queX+0) +".gif" ;
    centro_derecha.src   = "/mapaimages/map_L"+ (queY+0) +"_C" +(queX+1) +".gif" ;
    abajo_izquierda.src  = "/mapaimages/map_L"+ (queY+1) +"_C" +(queX-1) +".gif" ;
    abajo_centro.src     = "/mapaimages/map_L"+ (queY+1) +"_C" +(queX+0) +".gif" ;
    abajo_derecha.src    = "/mapaimages/map_L"+ (queY+1) +"_C" +(queX+1) +".gif" ;
  }


  function muestra( xx, yy, cax, cay  ) {
    casa=window.open("","","left=10,top=10,width=510,height=420");
    casa.document.writeln('<HTML>');
    casa.document.writeln('<'+'SC'+'RIPT src=/mapaimages/mover.js ><'+'/SC'+'RIPT>');
    casa.document.writeln('<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >');
    casa.document.writeln('<TABLE id="tabla" BORDER=0 CELLPADDING=0 CELLSPACING=0 >');
    casa.document.writeln('<TR>');
    casa.document.writeln('<TD><IMG id="arriba_izquierda" SRC="/mapaimages/map_L'+(xx-1)+ '_C' +(yy-1)+ '.gif"    WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="arriba_centro"    SRC="/mapaimages/map_L'   +(xx-1)+ '_C' +(yy+0)+ '.gif" WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="arriba_derecha"   SRC="/mapaimages/map_L'  +(xx-1)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('</TR><TR>');
    casa.document.writeln('<TD><IMG id="centro_izquierda" SRC="/mapaimages/map_L'+(xx+0)+ '_C' +(yy-1)+ '.gif"    WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="centro_centro"    SRC="/mapaimages/map_L'   +(xx+0)+ '_C' +(yy+0)+ '.gif" WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="centro_derecha"   SRC="/mapaimages/map_L'  +(xx+0)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('</TR><TR>');
    casa.document.writeln('<TD><IMG id="abajo_izquierda"  SRC="/mapaimages/map_L'+(xx+1)+ '_C' +(yy-1)+ '.gif"    WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="abajo_centro"     SRC="/mapaimages/map_L'   +(xx+1)+ '_C' +(yy+0)+ '.gif" WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="abajo_derecha"    SRC="/mapaimages/map_L'  +(xx+1)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('</TR>');
    casa.document.writeln('</TABLE>');
    casa.document.writeln('<DIV id="casita" style="position:absolute;left:'+cax+';top:'+cay+'"><IMG SRC="/mapaimages/casita.gif" width=016></DIV>');
    casa.document.writeln('<'+'SC'+'RIPT>init();<'+'/SC'+'RIPT>');
    casa.document.writeln('</BODY>');
    casa.document.writeln('</HTML>');
  }


  function mostrar( cual  ) {
    xx=parseInt(document.all[  'eje'+cual+'_a' ].value);
    yy=parseInt(document.all[  'eje'+cual+'_b' ].value);
    cax=parseInt(document.all[ 'eje'+cual+'_c' ].value);
    cay=parseInt(document.all[ 'eje'+cual+'_d' ].value);
    casa=window.open("","","left=10,top=10,width=510,height=420");
    casa.document.writeln('<HTML>');
    casa.document.writeln('<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >');
    casa.document.writeln('<TABLE id="tabla" BORDER=0 CELLPADDING=0 CELLSPACING=0 >');
    casa.document.writeln('<TR>');
    casa.document.writeln('<TD><IMG id="arriba_izquierda" SRC="/mapaimages/map_L' +(xx-1)+ '_C' +(yy-1)+ '.gif"  WIDTH=170 HEIGHT=140 ></TD>');
    casa.document.writeln('<TD><IMG id="arriba_centro"    SRC="/mapaimages/map_L' +(xx-1)+ '_C' +(yy+0)+ '.gif"  WIDTH=170 HEIGHT=140 ></TD>');
    casa.document.writeln('<TD><IMG id="arriba_derecha"   SRC="/mapaimages/map_L' +(xx-1)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140 ></TD>');
    casa.document.writeln('</TR><TR>');
    casa.document.writeln('<TD><IMG id="centro_izquierda" SRC="/mapaimages/map_L' +(xx+0)+ '_C' +(yy-1)+ '.gif"  WIDTH=170 HEIGHT=140 ></TD>');
    casa.document.writeln('<TD><IMG id="centro_centro"    SRC="/mapaimages/map_L' +(xx+0)+ '_C' +(yy+0)+ '.gif"  WIDTH=170 HEIGHT=140 ></TD>');
    casa.document.writeln('<TD><IMG id="centro_derecha"   SRC="/mapaimages/map_L' +(xx+0)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140 ></TD>');
    casa.document.writeln('</TR><TR>');
    casa.document.writeln('<TD><IMG id="abajo_izquierda"  SRC="/mapaimages/map_L' +(xx+1)+ '_C' +(yy-1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="abajo_centro"     SRC="/mapaimages/map_L' +(xx+1)+ '_C' +(yy+0)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="abajo_derecha"    SRC="/mapaimages/map_L' +(xx+1)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('</TR>');
    casa.document.writeln('</TABLE>');
    casa.document.writeln('<DIV id="casita" style="position:absolute;left:'+cax+';top:'+cay+'"><IMG SRC="/mapaimages/casita.gif" width=016></DIV>');
    casa.document.writeln('</BODY>');
    casa.document.writeln('</HTML>');
  }


  function ingreso( ) {
    xx=3;
    yy=3;
    cax=286;
    cay=422;
    cual=1
    document.all['eje'+cual+'_a'].value=yy;
    document.all['eje'+cual+'_b'].value=xx;
    document.all['eje'+cual+'_c'].value=cax;
    document.all['eje'+cual+'_d'].value=cay;
    casa=window.open("","","left=10,top=10,width=510,height=480");
    casa.document.writeln('<HTML>');
    casa.document.write('<'+'SC'+'RIPT src=images/mover.js ><'+'/SC'+'RIPT>');
    casa.document.writeln('<'+'SC'+'RIPT>');
    casa.document.writeln('cual='+cual+';');
    casa.document.writeln('<'+'/SC'+'RIPT>');
    casa.document.writeln('<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >');
    casa.document.writeln('<TABLE id="tabla" BORDER=0 CELLPADDING=0 CELLSPACING=0 >');
    casa.document.writeln('<TR>');
    casa.document.writeln('<TD><IMG id="arriba_izquierda" SRC="/mapaimages/map_L' +(xx-1)+ '_C' +(yy-1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="arriba_centro"    SRC="/mapaimages/map_L' +(xx-1)+ '_C' +(yy+0)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="arriba_derecha"   SRC="/mapaimages/map_L' +(xx-1)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('</TR><TR>');
    casa.document.writeln('<TD><IMG id="centro_izquierda" SRC="/mapaimages/map_L' +(xx+0)+ '_C' +(yy-1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="centro_centro"    SRC="/mapaimages/map_L' +(xx+0)+ '_C' +(yy+0)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="centro_derecha"   SRC="/mapaimages/map_L' +(xx+0)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('</TR><TR>');
    casa.document.writeln('<TD><IMG id="abajo_izquierda"  SRC="/mapaimages/map_L' +(xx+1)+ '_C' +(yy-1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="abajo_centro"     SRC="/mapaimages/map_L' +(xx+1)+ '_C' +(yy+0)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('<TD><IMG id="abajo_derecha"    SRC="/mapaimages/map_L' +(xx+1)+ '_C' +(yy+1)+ '.gif"  WIDTH=170 HEIGHT=140  ></TD>');
    casa.document.writeln('</TR>');
    casa.document.writeln('</TABLE>');
    casa.document.writeln('<DIV id="casita" style="position:absolute;left:'+cax+';top:'+cay+'"><IMG SRC="/mapaimages/casita.gif" width=016></DIV>');
    casa.document.writeln('<br>');
    casa.document.writeln('<TABLE id="tabla2" BORDER=0 CELLPADDING=4 CELLSPACING=0 width="100%" align=center >');
    casa.document.writeln('<TR>');
    casa.document.writeln('<TD align=center>');
    casa.document.writeln('&nbsp;');
    casa.document.writeln('</TD>');
    casa.document.writeln('<TD align=center bgcolor=yellow>');
    casa.document.writeln('<font size="1">PASO 1<br>Para desplazar el Mapa utilize estos Botones</font>');
    casa.document.writeln('</TD>');
    casa.document.write('<TD align=center bgcolor=yellow>');
    casa.document.write('<input type="button" value="Arriba"    onClick="mover( +0, -1 );" style="font-size: 2 mm; background-color: #00FFFF; border-style: solid" ><br>');
    casa.document.write('<input type="button" value="Izquierda" onClick="mover( -1, +0 );" style="font-size: 2 mm; background-color: #00FFFF; border-style: solid" >');
    casa.document.write('<input type="button" value="Derecha"   onClick="mover( +1, +0 );" style="font-size: 2 mm; background-color: #00FFFF; border-style: solid" ><br>');
    casa.document.write('<input type="button" value="Abajo"     onClick="mover( +0, +1 );" style="font-size: 2 mm; background-color: #00FFFF; border-style: solid" ><br>');
    casa.document.write('</TD>');
    casa.document.writeln('<TD align=center>');
    casa.document.writeln('<font size="1">PASO 2<br>Pinche en la Casita y arrastrela al lugar apropiado</font>');
    casa.document.writeln('</TD>');
    casa.document.writeln('<TD align=center>');
    casa.document.writeln('&nbsp;');
    casa.document.writeln('</TD>');
    casa.document.writeln('<TD align=center bgcolor=yellow>');
    casa.document.writeln('<font size="1">PASO 3<br>Pulse este Boton para guardar la posicion en la Base de Datos</font>');
    casa.document.writeln('</TD>');
    casa.document.writeln('<TD align=center bgcolor=yellow>');
    casa.document.writeln('<input type=button value="Confirmar" onClick="self.close()" style="font-size: 2 mm; background-color: #00FFFF; border-style: solid" >');
    casa.document.writeln('</TD>');
    casa.document.writeln('<TD align=center>');
    casa.document.writeln('&nbsp;');
    casa.document.writeln('</TD>');
    casa.document.writeln('</TR>');
    casa.document.writeln('</TABLE>');
    casa.document.writeln('<input type="hidden" name=valorX id=valorX value="'+xx+'">');
    casa.document.writeln('<input type="hidden" name=valorY id=valorY value="'+yy+'">');
    casa.document.writeln('<'+'SC'+'RIPT>init();<'+'/SC'+'RIPT>');
    casa.document.writeln('</BODY>');
    casa.document.writeln('</HTML>');
    casa.document.close();
  }




