var nombre_partido="";
var entrega="";
partidos=new Array();
partidos[0]='Y se llama Per&uacute';
partidos[1]='Partido Reformista del Per&uacute;';
partidos[2]='Movimiento Independiente Nueva Generaci&oacute;n';
partidos[3]='Coordinadora Nacional de Independientes';
partidos[4]='Partido Democr&aacute;tico Descentralista';
partidos[5]='Proyecto Pa&iacute;s';
partidos[6]='Y se llama Per&uacute;';
partidos[7]='Partido Reformista del Per&uacute;';
partidos[8]='Movimiento Independiente Nueva Generaci&oacute;n';
partidos[9]='Coordinadora Nacional de Independientes';

enlaces=new Array();
enlaces2=new Array();
enlaces[0]="<a href='Javascript:cambiar_detalle(1)' id='l1' style='text-decoration:none;'>Arequipa</a>";
enlaces[1]="<a href='Javascript:cambiar_detalle(2)' id='l2' style='text-decoration:none;'>Ayacucho</a>";
enlaces[2]="<a href='Javascript:cambiar_detalle(3)' id='l3' style='text-decoration:none;'>Cusco</a>";
enlaces[3]="<a href='Javascript:cambiar_detalle(4)' id='l4' style='text-decoration:none;'>Chiclayo</a>";
enlaces[4]="<a href='Javascript:cambiar_detalle(5)' id='l5' style='text-decoration:none;'>Lima</a>";
enlaces[5]="<a href='Javascript:cambiar_detalle(6)' id='l6' style='text-decoration:none;'>Huancayo</a>";
enlaces[6]="<a href='Javascript:cambiar_detalle(7)' id='l7' style='text-decoration:none;'>Iquitos</a>";
enlaces[7]="<a href='Javascript:cambiar_detalle(8)' id='l8' style='text-decoration:none;'>Tarapoto</a>";
enlaces[8]="<a href='Javascript:cambiar_detalle(9)' id='l9' style='text-decoration:none;'>Trujillo</a>";
enlaces[9]="<a href='Javascript:cambiar_detalle(10)' id='l10' style='text-decoration:none;'>Piura</a>";
enlaces[10]="<a href='Javascript:cambiar_detalle(11)' id='l11' style='text-decoration:none;'>Puno</a>";
enlaces[11]="<a href='Javascript:cambiar_detalle(12)' id='l12' style='text-decoration:none;'>Pucallpa</a>";
//document.getElementById('l1').style.color="#a82424";
var direccion="<a href='index.php'>Inicio </a> <span class=style6> </span><a href='verificaciondefirmas.php'>&raquo;Servicios</a><a href='verificaciondefirmas2.php'>&raquo;  Verificaci&oacute;n de Firmas </a><span class=style6></span>";

enlaces2=enlaces;
var temp="";
var id="";

var peticion = false; 
if (window.XMLHttpRequest) {
      peticion = new XMLHttpRequest();
      } else if (window.ActiveXObject) {
            peticion = new ActiveXObject("Microsoft.XMLHTTP");
}


function ObtenerDatosVeri(datos,divID) { 
if(peticion) {
     var obj = document.getElementById(divID); 
     peticion.open("GET", datos); 
     peticion.onreadystatechange = function()  { 
          if (peticion.readyState == 4) { 
               obj.innerHTML = peticion.responseText; 
          } 
     } 
peticion.send(null); 
}
}

function CambiarEstilo(id) {
	var elementosMenu = getElementsByClassName(document, "li", "activo");
	for (k = 0; k< elementosMenu.length; k++) {
	elementosMenu[k].className = "inactivo";
	}
	var identity=document.getElementById(id);
	identity.className="activo";
}
function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)
}



function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function cargar_enlaces()
{
document.getElementById('enlaces').innerHTML=enlaces2[0]+"&nbsp;|&nbsp;"+enlaces2[1]+"&nbsp;|&nbsp;"+enlaces2[2]+"&nbsp;|&nbsp;"+enlaces2[3]+"&nbsp;|&nbsp;"+enlaces2[4]+"&nbsp;|&nbsp;"+enlaces2[5]+"&nbsp;|&nbsp;"+enlaces2[6]+"&nbsp;|&nbsp;"+enlaces2[7]+"&nbsp;|&nbsp;"+enlaces2[8]+"&nbsp;|&nbsp;"+enlaces2[9]+"&nbsp;|&nbsp;"+enlaces2[10]+"&nbsp;|&nbsp;"+enlaces2[11];
}

function cambiar_detalle(param)
{
id=param;

for(var i=0;i<12;i++)
 {enlaces2[i]=enlaces[i];
 }

document.getElementById('enlaces').innerHTML=enlaces2[0]+"&nbsp;|&nbsp;"+enlaces2[1]+"&nbsp;|&nbsp;"+enlaces2[2]+"&nbsp;|&nbsp;"+enlaces2[3]+"&nbsp;|&nbsp;"+enlaces2[4]+"&nbsp;|&nbsp;"+enlaces2[5]+"&nbsp;|&nbsp;"+enlaces2[6]+"&nbsp;|&nbsp;"+enlaces2[7]+"&nbsp;|&nbsp;"+enlaces2[8]+"&nbsp;|&nbsp;"+enlaces2[9]+"&nbsp;|&nbsp;"+enlaces2[10]+"&nbsp;|&nbsp;"+enlaces2[11];

temp=direccion;

switch(param)
{case 1:ObtenerDatosGoecor('goecor/nuevaorc.html','detalle');
        temp=temp+"<a href='Javascript:cambiar_detalle(1)'>&gt;&gt; Arequipa </a>";
		document.getElementById('dir').innerHTML=temp;
		document.getElementById('l1').style.color="#a82424";
        	
		break;
 case 5:ObtenerDatosGoecor('goecor/nuevaorc1.html','detalle');
        temp=temp+"<a href='Javascript:cambiar_detalle(5)'>&gt;&gt; Lima </a>";
		document.getElementById('dir').innerHTML=temp;
		document.getElementById('l5').style.color="#a82424";
		
		break;
		
 default:
}


}

function cambiar_verificacion(param)
{
switch(param)
 {
 case 1:ObtenerDatosVeri('modVerificaciondefirmas/tabverificacion1.php','verificacion');break;
 case 2:ObtenerDatosVeri('modVerificaciondefirmas/tabverificacion2.php','verificacion');break;
 default:
 }
}

function cargar(valor){
id=valor;
document.getElementById('l1').style.color='#a82424';
cambiar_detalle(id);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function siguiente()
{ObtenerDatosVeri('modVerificaciondefirmas/tabla2.php','tabla');
}

function anterior()
{ObtenerDatosVeri('modVerificaciondefirmas/tabla1.php','tabla');
}

function cambiar_div_firmas(param1,param2)
{
nombre_partido=param1;
entrega=param2;
ObtenerDatosVeri('modVerificaciondefirmas/verificaciondefirmas.php?nombre_partido='+nombre_partido+'&&entrega='+entrega,'firmas');
document.getElementById('dir').innerHTML=direccion+"<a href='#'>&gt;&gt; "+partidos[param1]+"</a>";
}
function cambiar_div_firmas_test(pId_org,pId_Ent,pNom_Ins)
{
	var objetoDiv = "firmas";
ObtenerDatosVeri('modVerificaciondefirmas/institucionPolitica.php?id_org='+pId_org+'&id_ent='+pId_Ent,objetoDiv);
document.getElementById('dir').innerHTML=direccion+"<a href='#'>&gt;&gt; "+pNom_Ins+"</a>";
} 
function ver_lista_adherentes(reset,delta){
var objetoDiv = "listaAdherentes";
alert(objetoDiv+" "+reset+" "+delta);
alert('modVerificaciondefirmas/listaAdherentes.php?reset='+reset+'&delta='+delta);
ObtenerDatosVeri('modVerificaciondefirmas/listaAdherentes.php?reset='+reset+'&delta='+delta,objetoDiv);
} 
function cambiar_div_firmas_test2(pId_org,pId_Ent,pNom_Ins)
{
document.location.href='verificaciondefirmas3.php?id_org='+pId_org+'&id_ent='+pId_Ent,objetoDiv;
document.getElementById('dir').innerHTML=direccion+"<a href='#'>&gt;&gt; "+pNom_Ins+"</a>";
} 
///HECHO POR MIGUEL 30 DE DICIEMBRE DEL 2008
function validarSoloNumero(e)
	{
		tecla=(document.all) ?  e.keyCode : e.which; //2
		if (tecla==8) return true;//3
		patron=/[\d]$/;//4
		te=String.fromCharCode(tecla);//5
		return patron.test(te);//6
	}