/*	hs.graphicsDir = 'highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	//hs.dimmingOpacity = 0.75;

	// Add the controlbar
	hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .75,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});
	

hs.registerOverlay({
	overlayId: 'closebutton',
	position: 'top right',
	fade: 2 // fading the semi-transparent overlay looks bad in IE
});



hs.wrapperClassName = 'borderless';

*/
function objetoAjax(){
 var xmlhttp=false;
  try{
   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  }catch(e){
   try {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
   }catch(E){
    xmlhttp = false;
   }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
   xmlhttp = new XMLHttpRequest();
  }
  return xmlhttp;
}
function gup( name ){
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp ( regexS );
	var tmpURL = window.location.href;
	var results = regex.exec( tmpURL );
	if( results == null )
		return"";
	else
		return results[1];
}
function Pagina(nropagina){
 //donde se mostrará los registros
 divContenido = document.getElementById('contenido');
 ajax=objetoAjax();
 //uso del medoto GET
 //indicamos el archivo que realizará el proceso de paginar
 //junto con un valor que representa el nro de pagina
 ajax.open("GET", "ver_pagina.php?id_pagina="+gup('id_pagina')+"&pag="+nropagina);
 divContenido.innerHTML= '<img src="anim.gif">';
 ajax.onreadystatechange=function() {
  if (ajax.readyState==4) {
   //mostrar resultados en esta capa
   divContenido.innerHTML = ajax.responseText
  }
 }
 //como hacemos uso del metodo GET
 //colocamos null ya que enviamos 
 //el valor por la url ?pag=nropagina
 ajax.send(null)
}


function pasarSigMes(mes,anio){
	var f;
		f = document.getElementById("form_calendario");
var sigMes = mes + 1;
var sigAnio = anio;
if (sigMes > 12)
{
	sigMes = 1;
	sigAnio++;
}
if(navigator.appName=='Microsoft Internet Explorer')
{
	document.getElementById('mes').value=sigMes;
	document.getElementById('anio').value=sigAnio;
}
else
{
	document.forms['form_calendario']['mes'].value=sigMes;
	document.forms['form_calendario']['anio'].value=sigAnio;
}

f.submit();
}
function pasarAntMes(mes,anio){
var f;
f = document.getElementById("form_calendario");
var antMes = mes - 1;
var antAnio = anio;
if (antMes == 0)
{
	antMes = 12;
	antAnio--;
}
if(navigator.appName=='Microsoft Internet Explorer')
{

	document.getElementById('mes').value=antMes;
	document.getElementById('anio').value=antAnio;
}
else
{
	document.forms['form_calendario']['mes'].value=antMes;
	document.forms['form_calendario']['anio'].value=antAnio;
}
f.submit();

}
function pasarSigMes2(dia,mes,anio,cant){
var f;
f = document.getElementById("form_calendario2");
var sigDia = dia + 6;
var sigMes = mes;
var sigAnio = anio;
if (sigDia > cant)
{
    sigDia = (cant-dia + 1) + 1;
    sigMes = mes + 1;
    if (sigMes > 12)
    {
        sigMes = 1;
        sigAnio++;
    }
}

if(navigator.appName=='Microsoft Internet Explorer')
{
    document.getElementById('mes2').value=sigMes;
    document.getElementById('anio2').value=sigAnio;
    document.getElementById('dia2').value=sigDia;
}
else
{
    document.forms['form_calendario2']['mes2'].value=sigMes;
    document.forms['form_calendario2']['anio2'].value=sigAnio;
    document.forms['form_calendario2']['dia2'].value=sigDia;
}

f.submit();
}
function pasarAntMes2(dia,mes,anio,cant,cantAnt){

var f;
f = document.getElementById("form_calendario2");
var antDia = dia - 6;
var antMes = mes;
var antAnio = anio;
if (antDia < 1)
{
    antDia = (cantAnt - (antDia * (-1)));
    antMes = mes - 1;
    if (antMes < 1)
    {
        antMes = 12;
        antAnio--;
    }
}
if(navigator.appName=='Microsoft Internet Explorer')
{
    document.getElementById('mes2').value=antMes;
    document.getElementById('anio2').value=antAnio;
    document.getElementById('dia2').value=antDia;
}
else
{
    document.forms['form_calendario2']['mes2'].value=antMes;
    document.forms['form_calendario2']['anio2'].value=antAnio;
    document.forms['form_calendario2']['dia2'].value=antDia;
}
f.submit();

}




