﻿// JavaScript Document


function privWin(page, name, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(page, name, winprops)
if (parseInt(navigator.appVersion) >= 4) {win.window.focus();}
}

//Hide status bar msg 

function hidestatus(){
window.status='  A P S   : :   A L L   P O O L   S A F E   : :  Specialists in Swimming Pool Safety'
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus


<!-- ### highlight all text in field fn ### -->

<!-- Begin
function highlight(field){
  field.focus();
  field.select();
}
// End -->



<!--

//Disable right mouse click Script

var message="Function Disabled";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->

// photo slideshow


    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this  header
    // NS4-6,IE4-6
    // Fade effect only in IE; degrades gracefully

    // =======================================
    // set the following variables
    // =======================================

    // Set slideShowSpeed (milliseconds)
    var slideShowSpeed = 6000

    // Duration of crossfade (seconds)
    var crossFadeDuration = 6

    // Specify the image files
    var Pic = new Array()

    
    Pic[0] = 'images/188x258/rest2.jpg'
    Pic[1] = 'images/188x258/winerack.jpg'
    Pic[2] = 'images/188x258/seatarea.jpg'
    Pic[3] = 'images/188x258/bar1.jpg'
    Pic[4] = 'images/188x258/window.jpg'
    Pic[5] = 'images/188x258/bar2.jpg'
    Pic[6] = 'images/188x258/rest1.jpg'
    Pic[7] = 'images/188x258/rest3.jpg'
    Pic[8] = 'images/188x258/towerpic.jpg'

    // =======================================
    // do not edit anything below this line
    // =======================================

    var t
    var j = 0
    var p = Pic.length

    var preLoad = new Array()
    for (i = 0; i < p; i++) {
        preLoad[i] = new Image()
        preLoad[i].src = Pic[i]
    }

    function runSlideShow() {
        if (document.all) {
            document.images.SlideShow.style.filter = "blendTrans(duration=2)"
            document.images.SlideShow.style.filter = "blendTrans(duration=crossFadeDuration)"
            document.images.SlideShow.filters.blendTrans.Apply()
        }
        document.images.SlideShow.src = preLoad[j].src
        if (document.all) {
            document.images.SlideShow.filters.blendTrans.Play()
        }
        var temp = j;
        while (j == temp) {
            j = parseInt(Math.random() * Pic.length);
        }

        t = setTimeout('runSlideShow()', slideShowSpeed)
    }

    //   j = j + 1
    //   if (j > (p-1)) j=0
    //   t = setTimeout('runSlideShow()', slideShowSpeed)
    //}


    //  To activate SlideShow, insert onload="runSlideShow()" into body tag


    function change(html) {
        document.getElementById('description').innerHTML = html
    }
    
    // End



// OPENS WINDOW SIZE OF IMAGE #####################################

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
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>Loading...</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(300,300);');
writeln('width=300-(document.body.clientWidth-document.images[0].width);');
writeln('height=300-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].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=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}

// End
