newimage0 = new Image();
newimage0.src = "home_on.gif";
newimage1 = new Image();
newimage1.src = "about_on.gif";
newimage2 = new Image();
newimage2.src = "events_on.gif";
newimage3 = new Image();
newimage3.src = "history_on.gif";
newimage4 = new Image();
newimage4.src = "contact_on.gif";
newimage5 = new Image();
newimage5.src = "view_on.gif";

function dblclick() {
	window.scrollTo(0,0)
}
if (document.layers) {
	document.captureEvents(Event.ONDBLCLICK);
}
document.ondblclick=dblclick;

function preview(URL){
	window.open(URL, 'window2', 'resizable=yes,scrollbars=yes,width=800,height=600')
}

function rental(URL){
	window.open(URL, 'window2', 'resizable=yes,scrollbars=yes,width=550,height=400')
}

function showAlert(){
	alert("Under Construction\n\nPlease check back soon!");
}

function mailClient(){
	window.location="mailto:avfred@aol.com?Subject=Comment from the Gault Audio.Visual Web Site";
}

var SpecialWord = "avfred",
    SpecialUrl = "http://www.gaultav.com/frog.jpg",
    SpecialLetter = 0;
function getKey(keyStroke) {
var isNetscape=(document.layers);
var eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
var which = String.fromCharCode(eventChooser).toLowerCase();
if (which == SpecialWord.charAt(SpecialLetter)) {
SpecialLetter++;
if (SpecialLetter == SpecialWord.length) window.location = SpecialUrl;
}
else SpecialLetter = 0;
}
document.onkeypress = getKey;

function calcDistance()
{
var height = document.distance.height.value
var distance = height * 8
document.distance.answer.value = Math.round(distance/12*100)/100
}

var slideShowSpeed = 4000;
var crossFadeDuration = 3;
var Pic = new Array();

Pic[0] = '1.jpg'
Pic[1] = '2.jpg'
Pic[2] = '3.jpg'
Pic[3] = '4.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(); }
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}

function clock() {
if (!document.layers && !document.all) return;
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
var amOrPm = "AM";
if (hours > 12) {
amOrPm = "PM";
hours = hours - 12;
}
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
if (document.layers) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}
else
if (document.all)
pendule.innerHTML = dispTime;
setTimeout("clock()", 1000);
}
