/********************************************************************************************/
/* AJAX Simple Tabs by developersnippets, This code is intended for practice purposes.      */
/* You may use these functions as you wish, for commercial or non-commercial applications,  */
/* but please note that the author offers no guarantees to their usefulness, suitability or */
/* correctness, and accepts no liability for any losses caused by their use.                */
/********************************************************************************************/
var req=false;
var cadena="";
function activapest(){
if (document.form1.resdom!=null) {
if (document.form1.resdom.checked) resdom=1; else resdom=null;
if (document.form1.rescom.checked) rescom=1; else rescom=null;
if (document.form1.respub.checked) respub=1; else respub=null;
if (document.form1.desmon.checked) desmon=1; else desmon=null;
if (document.form1.resind.checked) resind=1; else resind=null;
if (document.form1.reshos.checked) reshos=1; else reshos=null;
if (document.form1.rrssrec.value) rrssrec=document.form1.rrssrec.value; else rrssrec=0;
if (document.form1.reccom.value) reccom=document.form1.reccom.value; else reccom=0;
if (document.form1.recbar.value) recbar=document.form1.recbar.value; else recbar=0;
if (document.form1.recvol.value) recvol=document.form1.recvol.value; else recvol=0;
if (document.form1.recfro.value) recfro=document.form1.recfro.value; else recfro=0;
if (document.form1.recmot.value) recmot=document.form1.recmot.value; else recmot=0;
if (document.form1.rectri.value) rectri=document.form1.rectri.value; else rectri=0;
if (document.form1.recper.value) recper=document.form1.recper.value; else recper=0;
rrssrecuni=document.form1.rrssrecuni.options[document.form1.rrssrecuni.selectedIndex].value;
cadena='?resdom='+resdom+'&rescom='+rescom+'&respub='+respub+'&desmon='+desmon+'&resind='+resind+'&reshos='+reshos+'&rrssrecuni='+rrssrecuni+'&rrssrec='+rrssrec+'&reccom='+reccom+'&recbar='+recbar+'&recvol='+recvol+'&recfro='+recfro+'&recmot='+recmot+'&rectri='+rectri+'&recper='+recper;
}
if (document.form1.rrssbaruni!=null) {
if (document.form1.barrec.value) barrec=document.form1.barrec.value; else barrec=0;
rrssbaruni=document.form1.rrssbaruni.options[document.form1.rrssbaruni.selectedIndex].value;
if (document.form1.bararea.value) bararea=document.form1.bararea.value; else bararea=0;
baruniarea=document.form1.baruniarea.options[document.form1.baruniarea.selectedIndex].value;
if (document.form1.bartac.value) bartac=document.form1.bartac.value; else bartac=0;
if (document.form1.baresc.value) baresc=document.form1.baresc.value; else baresc=0;
if (document.form1.barveh.value) barveh=document.form1.barveh.value; else barveh=0;
if (document.form1.baraco.value) baraco=document.form1.baraco.value; else baraco=0;
if (document.form1.barper.value) barper=document.form1.barper.value; else barper=0;
cadena='?barrec='+barrec+'&rrssbaruni='+rrssbaruni+'&bararea='+bararea+'&baruniarea='+baruniarea+'&bartac='+bartac+'&baresc='+baresc+'&barveh='+barveh+'&baraco='+baraco+'&barper='+barper;
}
if (document.form1.rrsstrauni!=null) {
if (document.form1.trarrss.value) trarrss=document.form1.trarrss.value; else trarrss=0;
rrsstrauni=document.form1.rrsstrauni.options[document.form1.rrsstrauni.selectedIndex].value;
if (document.form1.traarea.value) traarea=document.form1.traarea.value; else traarea=0;
if (document.form1.tracas.value) tracas=document.form1.tracas.value; else tracas=0;
if (document.form1.trabal.value) trabal=document.form1.trabal.value; else trabal=0;
if (document.form1.tratol.value) tratol=document.form1.tratol.value; else tratol=0;
if (document.form1.traveh.value) traveh=document.form1.traveh.value; else traveh=0;
if (document.form1.traper.value) traper=document.form1.traper.value; else traper=0;
cadena='?trarrss='+trarrss+'&rrsstrauni='+rrsstrauni+'&traarea='+traarea+'&tracas='+tracas+'&trabal='+trabal+'&tratol='+tratol+'&traveh='+traveh+'&traper='+traper;
}
if (document.form1.rrssrstuni!=null) {
if (document.form1.rstrrss.value) rstrrss=document.form1.rstrrss.value; else rstrrss=0;
rrssrstuni=document.form1.rrssrstuni.options[document.form1.rrssrstuni.selectedIndex].value;
if (document.form1.rstorg.value) rstorg=document.form1.rstorg.value; else rstorg=0;
if (document.form1.rstpap.value) rstpap=document.form1.rstpap.value; else rstpap=0;
if (document.form1.rstpla.value) rstpla=document.form1.rstpla.value; else rstpla=0;
if (document.form1.rstmet.value) rstmet=document.form1.rstmet.value; else rstmet=0;
if (document.form1.rstvid.value) rstvid=document.form1.rstvid.value; else rstvid=0;
if (document.form1.rstotr.value) rstotr=document.form1.rstotr.value; else rstotr=0;
if (document.form1.rstarea.value) rstarea=document.form1.rstarea.value; else rstarea=0;
if (document.form1.rstcas.value) rstcas=document.form1.rstcas.value; else rstcas=0;
if (document.form1.rstbal.value) rstbal=document.form1.rstbal.value; else rstbal=0;
if (document.form1.rstfaj.value) rstfaj=document.form1.rstfaj.value; else rstfaj=0;
if (document.form1.rstpre.value) rstpre=document.form1.rstpre.value; else rstpre=0;
if (document.form1.rstpic.value) rstpic=document.form1.rstpic.value; else rstpic=0;
if (document.form1.rstpil.value) rstpil=document.form1.rstpil.value; else rstpil=0;
if (document.form1.rstcar.value) rstcar=document.form1.rstcar.value; else rstcar=0;
if (document.form1.rstare.value) rstare=document.form1.rstare.value; else rstare=0;
if (document.form1.rstper.value) rstper=document.form1.rstper.value; else rstper=0;
cadena='?rstrrss='+rstrrss+'&rrssrstuni='+rrssrstuni+'&rstorg='+rstorg+'&rstpap='+rstpap+'&rstpla='+rstpla+'&rstmet='+rstmet+'&rstvid='+rstvid+'&rstotr='+rstotr+'&rstarea='+rstarea+'&rstcas='+rstcas+'&rstbal='+rstbal+'&rstfaj='+rstfaj+'&rstpre='+rstpre+'&rstpic='+rstpic+'&rstpil='+rstpil+'&rstcar='+rstcar+'&rstare='+rstare+'&rstper='+rstper;
}
if (document.form1.rrssdspuni!=null) { 
if (document.form1.dsprrss.value) dsprrss=document.form1.dsprrss.value; else dsprrss=0;
rrssdspuni=document.form1.rrssdspuni.options[document.form1.rrssdspuni.selectedIndex].value;
if (document.form1.dspbnc.checked) dspbnc=1; else dspbnc=null;
if (document.form1.dspmic.checked) dspmic=1; else dspmic=null;
if (document.form1.dspman.checked) dspman=1; else dspman=null;
if (document.form1.dspmec.checked) dspmec=1; else dspmec=null;
if (document.form1.dsparea.value) dsparea=document.form1.dsparea.value; else dsparea=0;
if (document.form1.dspcas.value) dspcas=document.form1.dspcas.value; else dspcas=0;
if (document.form1.dspbal.value) dspbal=document.form1.dspbal.value; else dspbal=0;
if (document.form1.dspfro.value) dspfro=document.form1.dspfro.value; else dspfro=0;
if (document.form1.dsporg.value) dsporg=document.form1.dsporg.value; else dsporg=0;
if (document.form1.dspcar.value) dspcar=document.form1.dspcar.value; else dspcar=0;
if (document.form1.dspper.value) dspper=document.form1.dspper.value; else dspper=0;
cadena='?dsprrss='+dsprrss+'&rrssdspuni='+rrssdspuni+'&dspbnc='+dspbnc+'&dspmic='+dspmic+'&dspman='+dspman+'&dspmec='+dspmec+'&dsparea='+dsparea+'&dspcas='+dspcas+'&dspbal='+dspbal+'&dspfro='+dspfro+'&dsporg='+dsporg+'&dspcar='+dspcar+'&dspper='+dspper;
}
if (document.form1.coslimp!=null) { 
if (document.form1.inglimp.value) inglimp=document.form1.inglimp.value; else inglimp=0;
if (document.form1.nivmor.value) nivmor=document.form1.nivmor.value; else nivmor=0;
if (document.form1.coslimp.value) coslimp=document.form1.coslimp.value; else coslimp=0.00;
if (document.form1.coslimp.value=='0') coslimp='0.00';
cadena='?coslimp='+coslimp+'&inglimp='+inglimp+'&nivmor='+nivmor;
}
if (document.form1.capa!=null) { 
for(var j=0; j<document.form1.capa.length; j++) {
if (document.form1.capa[j].checked) { capa=document.form1.capa[j].value; break; } else { capa=null; }
}
if (document.form1.horcapa.value) horcapa=document.form1.horcapa.value; else horcapa=0;
for(var j=0; j<document.form1.senc.length; j++) {
if (document.form1.senc[j].checked) { senc=document.form1.senc[j].value; break; } else { senc=null; }
}
if (document.form1.persenc.value) persenc=document.form1.persenc.value; else persenc=0;
cadena='?capa='+capa+'&horcapa='+horcapa+'&senc='+senc+'&persenc='+persenc;
}
}
function callPage(pageUrl, divElementId, loadinglMessage, pageErrorMessage) {
document.getElementById(divElementId).innerHTML = loadinglMessage;
try {
req = new XMLHttpRequest(); /* e.g. Firefox */
estado=true;
} catch(e) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");  /* some versions IE */
estado=false;
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");  /* some versions IE */
estado=false;
} catch (E) {
req = false;
} 
} 
}
req.onreadystatechange = function() {responsefromServer(divElementId, pageErrorMessage);};
req.open("GET",pageUrl,true);
req.send(null);
}
function responsefromServer(divElementId, pageErrorMessage) {
var output = '';
if(req.readyState == 4) {
if(req.status == 200) {
output = req.responseText;
document.getElementById(divElementId).innerHTML = output;
} else {
document.getElementById(divElementId).innerHTML = pageErrorMessage+"\n"+output;
}
}
}
/* This Function is for Tab Panels */
function activeTab(tab)
{   activapest();
if (document.getElementById("tab0")!=null) document.getElementById("tab0").className = "";
if (document.getElementById("tab1")!=null) document.getElementById("tab1").className = "";
if (document.getElementById("tab2")!=null) document.getElementById("tab2").className = "";
if (document.getElementById("tab3")!=null) document.getElementById("tab3").className = "";
if (document.getElementById("tab4")!=null) document.getElementById("tab4").className = "";
if (document.getElementById("tab5")!=null) document.getElementById("tab5").className = "";
if (document.getElementById("tab6")!=null) document.getElementById("tab6").className = "";
if (document.getElementById("tab7")!=null) document.getElementById("tab7").className = "";
if (document.getElementById("tab8")!=null) document.getElementById("tab8").className = "";
document.getElementById("tab"+tab).className = "active";
// If your tabs are more, then you can use 'switch' condition instead of 'if' condition for better practice
if (tab == 0)
{
for(var j=0; j<document.form1.limpia.length; j++) {
if (document.form1.limpia[j].checked) { limpia=document.form1.limpia[j].value; break; } else { limpia=null; }
}
for(var j=0; j<document.form1.admrrss.length; j++) {
if (document.form1.admrrss[j].checked) { admrrss=document.form1.admrrss[j].value; break; } else { admrrss=null; }
}
if (document.form1.rd.checked) rd=1; else rd=null;
if (document.form1.bc.checked) bc=1; else bc=null;
if (document.form1.tf.checked) tf=1; else tf=null;
if (document.form1.rs.checked) rs=1; else rs=null;
if (document.form1.tr.checked) tr=1; else tr=null;
if (document.form1.df.checked) df=1; else df=null;
if(document.form1.trd.options[document.form1.trd.selectedIndex].value) { trd=document.form1.trd.options[document.form1.trd.selectedIndex].value; } else { trd=0; }
if(document.form1.tbc.options[document.form1.tbc.selectedIndex].value) { tbc=document.form1.tbc.options[document.form1.tbc.selectedIndex].value; } else { tbc=0; }
if(document.form1.ttf.options[document.form1.ttf.selectedIndex].value) { ttf=document.form1.ttf.options[document.form1.ttf.selectedIndex].value; } else { ttf=0; }
if(document.form1.trs.options[document.form1.trs.selectedIndex].value) { trs=document.form1.trs.options[document.form1.trs.selectedIndex].value; } else { trs=0; }
if(document.form1.ttr.options[document.form1.ttr.selectedIndex].value) { ttr=document.form1.ttr.options[document.form1.ttr.selectedIndex].value; } else { ttr=0; }
if(document.form1.tdf.options[document.form1.tdf.selectedIndex].value) { tdf=document.form1.tdf.options[document.form1.tdf.selectedIndex].value; } else { tdf=0; }
callPage('casilla1.php?limpia='+limpia+'&admrrss='+admrrss+'&rd='+rd+'&bc='+bc+'&tf='+tf+'&rs='+rs+'&tr='+tr+'&df='+df+'&empresa='+document.form1.empresa.value+'&trd='+trd+'&tbc='+tbc+'&ttf='+ttf+'&trs='+trs+'&ttr='+ttr+'&tdf='+tdf, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}else if(tab == 1){
if(document.form1.aprobado.disabled) { 
aprobado=null;
docapro=null;
nrodoc=null;
} else { 
aprobado=document.form1.aprobado.options[document.form1.aprobado.selectedIndex].value; 
docapro=document.form1.docapro.value;
nrodoc=document.form1.nrodoc.value;
} 
callPage('casilla2.php?prural='+document.form1.prural.value+'&purbana='+document.form1.purbana.value+'&aprobado='+aprobado+'&docapro='+docapro+'&nrodoc='+nrodoc, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}else if(tab == 2){
callPage('casillab1.php'+cadena, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}else if(tab == 3){
callPage('casillab2.php'+cadena, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina'); 
}else if(tab == 4){
callPage('casillab3.php'+cadena, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}else if(tab == 5){
callPage('casillab4.php'+cadena, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}else if(tab == 6){
callPage('casillab5.php'+cadena, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}else if(tab == 7){
callPage('casilla3.php'+cadena, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}else if(tab == 8){
callPage('casilla4.php'+cadena, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
}
function Paginador(boton,extra)
{   activapest();
if ( (boton == "p1") || (boton== null) ){
callPage('formulario0.php', 'paginador', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
} else if (boton == "p2") {
if (extra==null){
if (document.form1.limpia!=null){
for(var j=0; j<document.form1.limpia.length; j++) {
if (document.form1.limpia[j].checked) { limpia=document.form1.limpia[j].value; break; } else { limpia=null; }
}
for(var j=0; j<document.form1.admrrss.length; j++) {
if (document.form1.admrrss[j].checked) { admrrss=document.form1.admrrss[j].value; break; } else { admrrss=null; }
}
if(document.form1.rd.checked) { rd=document.form1.rd.value; } else { rd=0; }
if(document.form1.bc.checked) { bc=document.form1.bc.value; } else { bc=0; }
if(document.form1.tf.checked) { tf=document.form1.tf.value; } else { tf=0; }
if(document.form1.rs.checked) { rs=document.form1.rs.value; } else { rs=0; }
if(document.form1.tr.checked) { tr=document.form1.tr.value; } else { tr=0; }
if(document.form1.df.checked) { df=document.form1.df.value; } else { df=0; }
if(document.form1.trd.options[document.form1.trd.selectedIndex].value) { trd=document.form1.trd.options[document.form1.trd.selectedIndex].value; } else { trd=0; }
if(document.form1.tbc.options[document.form1.tbc.selectedIndex].value) { tbc=document.form1.tbc.options[document.form1.tbc.selectedIndex].value; } else { tbc=0; }
if(document.form1.ttf.options[document.form1.ttf.selectedIndex].value) { ttf=document.form1.ttf.options[document.form1.ttf.selectedIndex].value; } else { ttf=0; }
if(document.form1.trs.options[document.form1.trs.selectedIndex].value) { trs=document.form1.trs.options[document.form1.trs.selectedIndex].value; } else { trs=0; }
if(document.form1.ttr.options[document.form1.ttr.selectedIndex].value) { ttr=document.form1.ttr.options[document.form1.ttr.selectedIndex].value; } else { ttr=0; }
if(document.form1.tdf.options[document.form1.tdf.selectedIndex].value) { tdf=document.form1.tdf.options[document.form1.tdf.selectedIndex].value; } else { tdf=0; }
callPage('formulario1.php?limpia='+limpia+'&admrrss='+admrrss+'&rd='+rd+'&bc='+bc+'&tf='+tf+'&rs='+rs+'&tr='+tr+'&df='+df+'&empresa='+document.form1.empresa.value+'&trd='+trd+'&tbc='+tbc+'&ttf='+ttf+'&trs='+trs+'&ttr='+ttr+'&tdf='+tdf, 'paginador', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
} else { 
callPage('formulario0.php', 'paginador', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
} else {
callPage('formulario1.php'+extra, 'paginador', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
} else if (boton == "p3") {
activapest();
callPage('formulario2.php'+cadena, 'paginador', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
} else if (boton == "p4") {
activapest();
callPage('gracias.php'+cadena, 'paginador', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
}
function Busca()
{   
callPage('../admin/buscar.php?de='+document.form1.select1.options[document.form1.select1.selectedIndex].value+'&pr='+document.form1.select2.options[document.form1.select2.selectedIndex].value+'&di='+document.form1.select3.options[document.form1.select3.selectedIndex].value, 'content1', '<img src=\"../images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"../images/error_caution.gif\" /> Error cargando pagina');
}
function Pagina()
{   
callPage('../admin/genera.php?op=1', 'content', '<img src=\"../images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"../images/error_caution.gif\" /> Error cargando pagina');
}
function video(vid, titu){
callPage('reproductor.php?video='+vid+'&titulo='+titu, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
function iranoticia(dato)
{   
callPage('noticiacontenido.php?op='+dato, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
function Restaura()
{   
callPage('../admin/restaura.php?de='+document.form1.select1.options[document.form1.select1.selectedIndex].value+'&pr='+document.form1.select2.options[document.form1.select2.selectedIndex].value+'&di='+document.form1.select3.options[document.form1.select3.selectedIndex].value, 'content', '<img src=\"../images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"../images/error_caution.gif\" /> Error cargando pagina');
}	
function Cambiapwd()
{   
callPage('../admin/cambiapwd.php?de='+document.form1.select1.options[document.form1.select1.selectedIndex].value+'&pr='+document.form1.select2.options[document.form1.select2.selectedIndex].value+'&di='+document.form1.select3.options[document.form1.select3.selectedIndex].value+'&pwd='+document.form1.pass.value, 'content', '<img src=\"../images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"../images/error_caution.gif\" /> Error cargando pagina');
}	
function Actualiza()
{   
callPage('../admin/actualiza.php?de='+document.form1.select1.options[document.form1.select1.selectedIndex].value+'&pr='+document.form1.select2.options[document.form1.select2.selectedIndex].value+'&di='+document.form1.select3.options[document.form1.select3.selectedIndex].value+'&alcalde='+document.form1.alcalde.value, 'content', '<img src=\"../images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"../images/error_caution.gif\" /> Error cargando pagina');
}	
function Nada()
{   
callPage('../admin/nada.php?op=1', 'content', '<img src=\"../images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"../images/error_caution.gif\" /> Error cargando pagina');
}
function ficha()
{   
callPage('../admin/ficha.php?muni='+document.form1.muni.value, 'content2', '<img src=\"../images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"../images/error_caution.gif\" /> Error cargando pagina');
}
function cargaventana()
{   
/*var yes = 1;
var no = 0;
var menubar = no; // The File, Edit, View Menus
var scrollbars = yes; // Horizontal and vertical scrollbars
var locationbar = no; // The location box with the site URL
var directories = no; // the "What's New", "What Cool" links
var resizable = yes; // Can the window be resized?
var statusbar = no; // Status bar (with "Document: Done")
var toolbar = no; // Back, Forward, Home, Stop toolbar
if (navigator.appName == "Microsoft Internet Explorer"){ // better be ie6 at least
windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-30) + ",top=0,left=0";
}
else { // i.e. if Firefox
windowprops = "width=" + (screen.width-5) + ",height=" + (screen.height-30) + ",top=0,left=0";
}
windowprops += (menubar ? ",menubars" : "") +
(scrollbars ? ",scrollbars" : "") +
(locationbar ? ",location" : "") +
(directories ? ",directories" : "") +
(resizable ? ",resizable" : "") +
(statusbar ? ",status" : "") +
(toolbar ? ",toolbar" : "");
window.open('menu.php', 'fullPopup', windowprops);
window.opener = top; // this will close opener in ie only (not Firefox)
//window.close();*/
var myLeft = (screen.width-720)/2;
var myTop = (screen.height-500)/2;
window.open("http://www.sigersol.pe/menu.php","","toolbar=no,menubar=no,scrollbars=yes,top="+myTop+",left="+myLeft+",width=720,height=500,location=0")
}
function cerrar()
{   
window.close();
}
function menure()
{   
callPage('definidos/menu.php', 'contentmenu', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
function biblio()
{   
callPage('biblio.php?tipo='+document.form1.tipo.value+'&concepto='+document.form1.concepto.value, 'content', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
function ficha(cod)
{   
var myLeft = (screen.width-600)/2;
var myTop = (screen.height-500)/2;
window.open("ficha.php?cod="+cod,"Ficha","toolbar=no,menubar=no,scrollbars=yes,top="+myTop+",left="+myLeft+",width=600,height=500")
}
function indicador(pag)
{   
callPage(pag, 'indicadores', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}


function indicadores(pag,anio)
{   
callPage(pag+'?anio='+anio, 'indicadores', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}


function ValidarCorreo1(valor) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
rpt = 1;
} else {
rpt = -1;
}
return rpt;
}
function contactos()
{   
estado=1;
if (estado==1 && document.formcorreo.nombres.value==''){
	alert("Ingrese su Nombre");
	estado=-1;
	}
if (estado==1 && document.formcorreo.apellidos.value==''){
	alert("Ingrese su Apellido");
	estado=-1;
	}
if (estado==1 && document.formcorreo.email.value==''){
	alert("Ingrese su Correo Electrónico");
	estado=-1;
	}
if (estado==1 && (ValidarCorreo1(document.formcorreo.email.value)==-1)){
	alert("Correo Electrónico es incorrecto");
	estado=-1;
	}
if (estado==1 && document.formcorreo.asunto.value==''){
	alert("Ingrese su Consulta");
	estado=-1;
	}

if (estado==1)
callPage("respuesta.php?nombres="+document.formcorreo.nombres.value+"&apellidos="+document.formcorreo.apellidos.value+"&email="+document.formcorreo.email.value+"&asunto="+document.formcorreo.asunto.value, 'contacto', '<img src=\"images/loading.gif\" /> Cargando contenido; espere un momento... ', '<img src=\"images/error_caution.gif\" /> Error cargando pagina');
}
