function $(x) { return document.getElementById(x); }
var slideshow1imgarray = Array(
Array("images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg", "images/spacer.jpg"),
Array("images/hvac.jpg", "images/hvac1.jpg", "images/hvac2.jpg", "images/hvac3a.jpg", "images/hvac4a.jpg", "images/hvac5a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvaci.jpg"),
Array("images/hvac.jpg", "images/hvac1.jpg", "images/hvac2.jpg", "images/hvac3a.jpg", "images/hvac4a.jpg", "images/hvac5a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvac6a.jpg", "images/hvaci.jpg")
);
var slideshow2imgarray = Array(
Array("images/family1aa.jpg", "images/family2a.jpg", "images/family3a.jpg", "images/family5a.jpg", "images/family6a.jpg", "images/family7aa.jpg", "images/family8a.jpg", "images/family9a.jpg", "images/family10a.jpg"),
Array("images/pic01.gif", "images/pic02.gif", "images/pic03.gif", "images/pic04.gif"),
Array("images/pic1.jpg", "images/pic2.jpg", "images/pic3.jpg", "images/pic4.jpg", "images/pic5.jpg")
);
var imgs2 = {
urls: Array("images/bg2a.jpg", "images/bg2b.jpg", "images/bg2.jpg", "images/bg2.jpg",
"images/pic01.gif", "images/pic02.gif", "images/pic03.gif", "images/pic04.gif",
"images/pic1.jpg", "images/pic2.jpg", "images/pic3.jpg", "images/pic4.jpg", "images/pic5.jpg"),
objects: Array(),
preload: function() {
for (i=0; i < imgs2.urls.length; i++) {
imgs2.objects[i] = new Image();
imgs2.objects[i].src = imgs2.urls[i];
}
}
}
var slideshow2 = {
imgs: slideshow2imgarray,
pause: 10,
delay: 60,
step: 0.05,
curIndex: 0,
curImgSet: 0,
curOpc: 1,
curDir: 0,
tOut: null,
start: function() {
$('slideIMG2').src = slideshow2.imgs[slideshow2.curImgSet][0];
$('slideIMG2').style.opacity = "1";
slideshow2.curOpc = 1;
$('slideDIV2').style.backgroundImage = "url('" + slideshow2.imgs[slideshow2.curImgSet][1] + "')";
slideshow2.curIndex++;
slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.pause*750);
},
doSlide: function() {
if (!slideshow2.curDir) {
slideshow2.curOpc-=slideshow2.step;
$('slideIMG2').style.opacity = slideshow2.curOpc;
if (window.ActiveXObject) $('slideIMG2').style.filter = "alpha (opacity=" + (slideshow2.curOpc*100) + ")";
if (slideshow2.curOpc > 0) slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.delay);
else {
slideshow2.changeImgs();
slideshow2.curDir = 1;
slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.pause*1000);
}
}
else {
slideshow2.curOpc+=slideshow2.step;
$('slideIMG2').style.opacity = slideshow2.curOpc;
if (window.ActiveXObject) $('slideIMG2').style.filter = "alpha (opacity=" + (slideshow2.curOpc*100) + ")";
if (slideshow2.curOpc < 1) slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.delay);
else {
slideshow2.changeImgs();
slideshow2.curDir = 0;
slideshow2.tOut = setTimeout(slideshow2.doSlide, slideshow2.pause*1000);
}
}
},
changeImgs: function() {
if (slideshow2.curIndex < slideshow2.imgs[slideshow2.curImgSet].length-1) slideshow2.curIndex++;
else slideshow2.curIndex = 0;
if (!slideshow2.curDir) {
$('slideIMG2').src = slideshow2.imgs[slideshow2.curImgSet][slideshow2.curIndex];
slideshow2.curOpc = 0;
$('slideIMG2').style.opacity = 0;
}
else $('slideDIV2').style.backgroundImage = "url('" + slideshow2.imgs[slideshow2.curImgSet][slideshow2.curIndex] + "')";
},
chgImgSet: function (newImgSet) {
if (newImgSet != slideshow2.curImgSet) {
clearTimeout(slideshow2.tOut);
slideshow2.curImgSet = newImgSet;
slideshow2.curIndex = 0;
slideshow2.start();
}
}
}
var imgs1 = {
urls: Array("images/pic1.jpg", "images/pic2.jpg", "images/pic3.jpg", "images/pic4.jpg", "images/pic5.jpg",
"images/pic1c.jpg", "images/pic2c.jpg", "images/pic3c.jpg", "images/pic4c.jpg", "images/pic5c.jpg", "images/pic6c.jpg",
"images/pic1s.jpg", "images/pic2s.jpg", "images/pic3s.jpg", "images/pic4s.jpg"),
objects: Array(),
preload: function() {
for (i=0; i < imgs1.urls.length; i++) {
imgs1.objects[i] = new Image();
imgs1.objects[i].src = imgs1.urls[i];
}
}
}
var slideshow1 = {
imgs: slideshow1imgarray,
pause: .50,
delay: 40,
step: 0.05,
curIndex: 0,
curImgSet: 0,
curOpc: 1,
curDir: 0,
tOut: null,
start: function() {
$('slideIMG1').src = slideshow1.imgs[slideshow1.curImgSet][0];
$('slideIMG1').style.opacity = "1";
slideshow1.curOpc = 1;
$('slideDIV1').style.backgroundImage = "url('" + slideshow1.imgs[slideshow1.curImgSet][1] + "')";
slideshow1.curIndex++;
slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.pause*700);
},
doSlide: function() {
if (!slideshow1.curDir) {
slideshow1.curOpc-=slideshow1.step;
$('slideIMG1').style.opacity = slideshow1.curOpc;
if (window.ActiveXObject) $('slideIMG1').style.filter = "alpha (opacity=" + (slideshow1.curOpc*100) + ")";
if (slideshow1.curOpc > 0) slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.delay);
else {
slideshow1.changeImgs();
slideshow1.curDir = 1;
slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.pause*1000);
}
}
else {
slideshow1.curOpc+=slideshow1.step;
$('slideIMG1').style.opacity = slideshow1.curOpc;
if (window.ActiveXObject) $('slideIMG1').style.filter = "alpha (opacity=" + (slideshow1.curOpc*100) + ")";
if (slideshow1.curOpc < 1) slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.delay);
else {
slideshow1.changeImgs();
slideshow1.curDir = 0;
slideshow1.tOut = setTimeout(slideshow1.doSlide, slideshow1.pause*1000);
}
}
},
changeImgs: function() {
if (slideshow1.curIndex < slideshow1.imgs[slideshow1.curImgSet].length-1) slideshow1.curIndex++;
else slideshow1.curIndex = 0;
if (!slideshow1.curDir) {
$('slideIMG1').src = slideshow1.imgs[slideshow1.curImgSet][slideshow1.curIndex];
slideshow1.curOpc = 0;
$('slideIMG1').style.opacity = 0;
}
else $('slideDIV1').style.backgroundImage = "url('" + slideshow1.imgs[slideshow1.curImgSet][slideshow1.curIndex] + "')";
},
chgImgSet: function (newImgSet) {
if (newImgSet != slideshow1.curImgSet) {
clearTimeout(slideshow1.tOut);
slideshow1.curImgSet = newImgSet;
slideshow1.curIndex = 0;
slideshow1.start();
}
}
}