﻿// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

var varPositionX = 100;
var varPositionY = 100;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var varAutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
    var varIsNetscape = (navigator.appName == "Netscape") ? 1 : 0;
    var varIsIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}

var varOptionsNetscape = 'scrollbars=no,width=620,height=620,left=' + varPositionX + ',top=' + varPositionY;
var varOptionsIE = 'scrollbars=no,width=620,height=620,left=' + varPositionX + ',top=' + varPositionY;

function popImage(varImageUrl, varWidth, varHeight) {
    if (varIsNetscape) {
        objWindow = window.open('about:blank', '', varOptionsNetscape);
    }
    if (varIsIE) {
        objWindow = window.open('about:blank', '', varOptionsIE);
    }
    with (objWindow.document) {
        writeln('<html>');
        writeln('<head>');
        writeln('<title>Agua Azul la Villa</title>');
        writeln('<style>body {margin: 0px;}</style>');
        writeln('<script type="text/javascript">');
        writeln('var varIsNetscape;');
        writeln('var varIsIE;');
        writeln('if (parseInt(navigator.appVersion.charAt(0)) >= 4) {');
        writeln('varIsNetscape = (navigator.appName == "Netscape") ? 1 : 0;');
        writeln('varIsIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;');
        writeln('}');
        writeln('function reSizeToImage() {');
        writeln('if (varIsIE) {');
        writeln('window.resizeTo(' + (varWidth + 40) + ', ' + (varHeight + 110) + ');');
        writeln('}');
        writeln('if (varIsNetscape) {');
        writeln('window.innerWidth = ' + (varWidth + 40) + ';');
        writeln('window.innerHeight = ' + (varHeight + 110) + ';');
        writeln('}');
        writeln('}');
        writeln('</script>');
        writeln('</head>');
        writeln('<body bgcolor="#e7d499" scroll="no" onload="reSizeToImage();self.focus()"');
        if (varAutoClose) {
            writeln(' onblur="self.close()"');
        }
        writeln('>');
        writeln('<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">');
        writeln('<tr><td width="100%" height="100%" align="center" valign="center">');
        writeln('<img name="Image" src=' + varImageUrl.replace(/\+/g, '%20') + ' style="display: block" />');
        writeln('</td></tr>');
        writeln('</table>');
        writeln('</body>');
        writeln('</html>');
        close();
    }
}
