//
// ANILINA para MUTUA INTERCOMARCAL
//

var ventana = null;

/*
function AbrirFoto(foto,tipo,enlace,frame,notas,od) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 200; vent_y = 200;
	ventana = window.open('../comun/abrirfoto.php?id1='+foto+'&id2='+tipo+'&id3='+enlace+'&id4='+frame+'&id5='+escape(notas)+'&od='+od,'VentanaMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();
}
*/

function AbrirPagina(idpagina) {
	location.href='../comun/abrirpagina.php?id='+idpagina;
}

function AbrirLey(idley) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 400; vent_y = 200;
 	ventana = window.open('../comun/abrirley.php?id='+idley,'VentanaMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();
}

function AbrirGlosario(idglosario) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 400; vent_y = 200;
 	ventana = window.open('../comun/abrirglosario.php?id='+idglosario,'VentanaMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();
}

function AbrirTexto(idtexto) {
	location.href='../textos/textos.php?id='+idtexto;
}

function CerrarVentana() { 
   if (ventana != null) { ventana.close(); }
}

function AbrirWeb(idweb,destino) {
	if (destino == 1) {
      ventana = window.open('../comun/abrirweb.php?id='+idweb,'VentanaAbrirWebMutua');
	} else {
		  location.href='../comun/abrirweb.php?id='+idweb;
	}
}

function AbrirNoticia(idnoticia) {
	location.href='../noticias/noticias.php?id='+idnoticia;
}

function ImprimirNoticia(idnoticia,od) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 680; vent_y = 600;
 	ventana = window.open('../noticias/imprimirnoticia.php?id='+idnoticia+'&od='+od,'VentanaImprimirNoticiaMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();	
}

function ImprimirTexto(idtexto,od) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 680; vent_y = 600;
 	ventana = window.open('../textos/imprimirtexto.php?id='+idtexto+'&od='+od,'VentanaImprimirTextoMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();	
}

function EmailNoticia(idnoticia,od) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 550; vent_y = 240;
 	ventana = window.open('../noticias/emailnoticia.php?id='+idnoticia+'&od='+od,'VentanaEmailNoticiaMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();	
}

function AbrirVideo(fvideo) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 320; vent_y = 256;
 	ventana = window.open('../comun/abrirvideo.php?id='+fvideo+'&id3=VIDEO','VentanaMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();
}

function AbrirSonido(fsonido) {
  CerrarVentana();
	posx = 10; posy = 10; vent_x = 320; vent_y = 256;
 	ventana = window.open('../comun/abrirvideo.php?id='+fsonido+'&id3=AUDIO','VentanaMutua','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
	ventana.focus();
}

function AbrirFormulario(codform) {
	location.href = '../autoformularios/autoform.php?id=' + codform;
}

