// THE JAVACRIPT
// REDIMENSIONANDO VENTANAS CON EL TAMAŅO DE LA IMAGEN

function PopupPic(sPicURL, root) { 
root = root + "";
if ((root == "undefined") || (root == "")) root = "";
win = window.open(root + "view_image.asp?picURL="+sPicURL, "Fotos", "resizable=0,statusbar=0,scrollbars=1,HEIGHT=200,WIDTH=200");
            if( win != null ){
                if( stringMatch( navigator.appName.substring( 0, 8 ), "Netscape" ) ){
                    win.opener = self;
                }
                if( stringMatch( navigator.appName, "Netscape" ) &&
                    navigator.appVersion.substring( 0, 1 ) >= 3 ){
                    win.focus();
                }
                else if( stringMatch( navigator.appName, "Microsoft Internet Explorer" ) &&
                    navigator.appVersion.substring( 0, 1 ) >= 4 ){
                    win.focus();
                }
            }

}

function stringMatch( x, y ){
if( x.length != y.length ){
                return false;
}
            for( var i = 0; i<x.length; i++ ){ if( x.charAt( i ) != y.charAt( i ) ){ return false; } } return true; } /* BEGIN: show info code for Netscape users */ var showInfo = 0; var infoMsg = ''; var infoWidth; var infoHeight; if(!window.event && window.captureEvents) { /* capture a CLICK event */ window.captureEvents(Event.CLICK); /* set event handlers */ window.onclick = onClickHandler; } function onClickHandler(e) { if( showInfo == 1 ){ var leftOffset = e.screenX; var heightOffset = e.screenY; openInfoWin( leftOffset, heightOffset ); showInfo = 0; } if( routeEvent(e) == false ){ return false; } else{ return true; } } /* END: show info code for Netscape users */ function doInfo( msg, w, h, rsc ){ infoMsg = msg; rscMsg = ''; if( rsc != null ){ rscMsg = rsc; } if( w != null && h != null ){ infoWidth = w; infoHeight = h; } else{ infoWidth = '220'; infoHeight = '120'; } if( stringMatch(navigator.appName, "Netscape") ){ /* Use even handler code for Netscape users */ showInfo = 1; } else if( stringMatch(navigator.appName, "Microsoft Internet Explorer") ){ leftOffset = window.event.screenX; heightOffset = window.event.screenY; var widthVariant = infoWidth/2; var heightVariant = infoHeight/2; leftOffset = leftOffset-widthVariant; heightOffset = heightOffset-heightVariant; openInfoWin( leftOffset, heightOffset ); } } function openInfoWin( x, y ){ var w = window.open('/roving/info.jsp?i='+escape(infoMsg)+'&r='+rscMsg, 'infoWin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+infoWidth+',height='+infoHeight+',left='+x+',top='+y); /* close any already open info window that the user might've left open */ if( stringMatch(navigator.appName, "Microsoft Internet Explorer") ){ if( w.screenLeft > (x+10) || w.screenLeft < (x-10) || w.sreenTop > (y+10) || w.screeTop < (y-10) ){ w.close(); w = window.open('/roving/info.jsp?i='+escape(infoMsg)+'&r='+rscMsg, 'infoWin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+infoWidth+',height='+infoHeight+',left='+x+',top='+y); } } else if( stringMatch(navigator.appName, "Netscape") ){ if( w.screenX > (x+10) || w.screenX < (x-10) || w.sreenY > (y+10) || w.sreenY < (y-10) ){ w.close(); w = window.open('/roving/info.jsp?i='+escape(infoMsg)+'&r='+rscMsg, 'infoWin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+infoWidth+',height='+infoHeight+',left='+x+',top='+y); } } w.focus(); 
} 

function PopupGallery(sPicURL, fotoid, root) { 
root = root + "";
if ((root == "undefined") || (root == "")) root = "";
win = window.open(root + "fotoGaleria.asp?picURL="+sPicURL+"&FotoId="+fotoid, "Fotos", "resizable=1,HEIGHT=200,WIDTH=200");
            if( win != null ){
                if( stringMatch( navigator.appName.substring( 0, 8 ), "Netscape" ) ){
                    win.opener = self;
                }
                if( stringMatch( navigator.appName, "Netscape" ) &&
                    navigator.appVersion.substring( 0, 1 ) >= 3 ){
                    win.focus();
                }
                else if( stringMatch( navigator.appName, "Microsoft Internet Explorer" ) &&
                    navigator.appVersion.substring( 0, 1 ) >= 4 ){
                    win.focus();
                }
            }

}