// JavaScript Document
PositionX = 100;
PositionY = 100;
defaultWidth = 500;
defaultHeight = 500;
var AutoClose = true;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Cargando ...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){'); 
writeln('window.innerWidth=document.images["imagenes"].width;');writeln('window.innerHeight=document.images["imagenes"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="imagenes" src='+imageURL+' style="display:block"></body></html>');
close(); 
}}

function municipio(){
window.open("municipio.php","","channelmode,scrollbars")
}
function capce(){
window.open("capce.php","","channelmode,scrollbars")
}
function salud(){
window.open("salud.php","","channelmode,scrollbars")
}


function consta(){
window.open("consta.php","","channelmode,scrollbars")
}

function vsPortada(){
window.open("vsPortada.php","","channelmode,scrollbars")
}

function instantaneas(){
window.open("instantaneas.php","","channelmode,scrollbars")
}

function portada(){
window.open("Portada.php","","channelmode,scrollbars")
}
function acercad(){
window.open("acercade.php","","channelmode,scrollbars")
}

function obras(){
window.open("obras.php","","channelmode,scrollbars")
}

function gob(){
window.open("gob.php","","channelmode,scrollbars")
}

function gob3(){
window.open("gob3.php","","channelmode,scrollbars")
}

function gob4(){
window.open("gob4.php","","channelmode,scrollbars")
}
function tol(){
window.open("tol.php","","channelmode,scrollbars")
}

function cascanueces(){
window.open("cascanueces.php","","channelmode,scrollbars")
}

function publi1(){
window.open("publi1.php","","channelmode,scrollbars")
}

function informacion(){
window.open("informacion.php","","channelmode,scrollbars")
}

function seguro(){
window.open("seguro.php","","channelmode,scrollbars")
}

function seguro2(){
window.open("seguro.php","","channelmode,scrollbars")
}

function seguro3(){
window.open("seguro3.php","","channelmode,scrollbars")
}
function universidad(){
window.open("universidad.php","","channelmode,scrollbars")
}

function pergola(){
window.open("pergola.php","","channelmode,scrollbars")
}

function esquela(){
window.open("esquela.php","","channelmode,scrollbars")
}
function openWindow(url,alto,ancho) {  
	letop=(screen.height/2)-(alto/2);
	leleft=(screen.width/2)-(ancho/2);
	popupWin = window.open(url,'popup','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+ancho+',height='+alto+',top='+letop+',left='+leleft+'');  
}


//Abrir Ventana con imagen por Tunait
var ventana
var cont=0
var titulopordefecto = "Tu Titulo de la ventana"
function afoto(cual,titulo)
{
if(cont==1){ventana.close();ventana=null}
if(titulo==null){titulo=titulopordefecto}
ventana=window.open('','ventana','resizable=no,sc rollbars=no,width=50,height=50')
ventana.document.write('<html><head><title>' + titulo + '</title></head><body background-color: #1C4003; style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no"  onUnload="opener.cont=0"><div align="center"><a href="javascript:this.close()"><img src="' + cual + '" onLoad="opener.redimensionar(this.width, this.height)" style="border:none"></a></div>')
ventana.document.close()
cont++
}
function redimensionar(ancho, alto)
{
ventana.resizeTo(ancho+10,alto+80)
ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2) //centra la ventana. Eliminar si no se quiere centrar el popup
}
