window.defaultStatus = "Whitehaven Woodworks";

function blockError(){return true;}
window.onerror = blockError;

function ButtonHighlight(ButtonName)
         {document[ButtonName].src="images/button-"+ButtonName+"-over.jpg"}

function ButtonNormal(ButtonName)
         {document[ButtonName].src="images/button-"+ButtonName+".jpg"}

function ShowLargePic(picturefile) { var wtop  = 50;
                                    var wleft = (screen.width - 680) / 2;
                              	    var wprops = winprops = 'top='+wtop+',left='+wleft+',resizable'
 				        newwin = window.open('','','width=600,height=580,'+wprops);

                                          if (!newwin.opener) newwin.opener = self;
                                   		with (newwin.document) { open();
                                                                   write('<html><title>S. Sterling Company</title><body onLoad="setTimeout(window.close, 600000)" bgcolor="#FFFFFF"><table align="center" height=100% width=100% border=0><tr><td align="center"><font face="Times New Roman,Arial">');
                                                                   write('<IMG SRC="images/logo-popup.gif"><BR>');
                                                                   write('<IMG SRC="images/' + picturefile + '_large.jpg"><table><tr>');

                                                                   write('<td><form action="" method="post"><input type="image" src="images/button-close.gif" border="0" onclick=window.close()></form>');

                                                                   write('</tr></table></td></tr></table></body></html>');
                                                                   close();
                                                                  }
                                         }


// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000
// Duration of crossfade (seconds)
var crossFadeDuration = 30
// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0]  = 'images/gallery/ARC2007-CROP.jpg'
Pic[1]  = 'images/gallery/PWC2007-CROP.jpg'
Pic[2]  = 'images/gallery/RST2007-CROP.jpg'
Pic[3]  = 'images/gallery/ARB2006-CROP.jpg'
Pic[4]  = 'images/gallery/COS2005-CROP.jpg'
Pic[5]  = 'images/gallery/CRJ2006-CROP.jpg'
Pic[6]  = 'images/gallery/ERS2006-CROP.jpg'
Pic[7]  = 'images/gallery/FLF2006-CROP.jpg'
Pic[8]  = 'images/gallery/FST2006-CROP.jpg'
Pic[9]  = 'images/gallery/HTC2006-CROP.jpg'
Pic[10] = 'images/gallery/JBX2005-CROP.jpg'
Pic[11] = 'images/gallery/MWC2005-CROP.jpg'
Pic[12] = 'images/gallery/PBX2005-CROP.jpg'
Pic[13] = 'images/gallery/PMT2005-CROP.jpg'
Pic[14] = 'images/gallery/PRV2005-CROP.jpg'
Pic[15] = 'images/gallery/TCT2005-CROP.jpg'
Pic[16] = 'images/gallery/SPC2006-CROP.jpg'
Pic[17] = 'images/gallery/SLS2006-CROP.jpg'
Pic[18] = 'images/gallery/SVC2006-CROP.jpg'
Pic[19] = 'images/gallery/WET2006-CROP.jpg'

// =======================================
// do not edit anything below this line
// =======================================
var t
var a = 1
var b = 3
var c = 5
var d = 4
var e = 0
var f = 2
var x = 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(){
   document.images.SlideShowA.style.filter="blendTrans(duration=2)"
   document.images.SlideShowB.style.filter="blendTrans(duration=2)"
   document.images.SlideShowC.style.filter="blendTrans(duration=2)"
   document.images.SlideShowD.style.filter="blendTrans(duration=2)"
   document.images.SlideShowE.style.filter="blendTrans(duration=2)"
   document.images.SlideShowF.style.filter="blendTrans(duration=2)"
   document.images.SlideShowA.filters.blendTrans.Apply()      
   document.images.SlideShowB.filters.blendTrans.Apply()      
   document.images.SlideShowC.filters.blendTrans.Apply()      
   document.images.SlideShowD.filters.blendTrans.Apply()      
   document.images.SlideShowE.filters.blendTrans.Apply()      
   document.images.SlideShowF.filters.blendTrans.Apply()      
   
   document.images.SlideShowA.src = preLoad[a].src 
   document.images.SlideShowB.src = preLoad[b].src
   document.images.SlideShowC.src = preLoad[c].src
   document.images.SlideShowD.src = preLoad[d].src
   document.images.SlideShowE.src = preLoad[e].src
   document.images.SlideShowF.src = preLoad[f].src


   document.images.SlideShowA.filters.blendTrans.Play()
   document.images.SlideShowB.filters.blendTrans.Play()
   document.images.SlideShowC.filters.blendTrans.Play()
   document.images.SlideShowD.filters.blendTrans.Play()
   document.images.SlideShowE.filters.blendTrans.Play()
   document.images.SlideShowF.filters.blendTrans.Play()
 


   a = a + 1
   b = b + 1
   c = c + 1
   d = d + 1
   e = e + 1
   f = f + 1
   if (a > (p-1)) a=0
   if (b > (p-1)) b=0
   if (c > (p-1)) c=0
   if (d > (p-1)) d=0
   if (e > (p-1)) e=0
   if (f > (p-1)) f=0
   x = x + 1
   if (x > 5)     x=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

var NothingSpeed = 80000
function runNothing(){
   t = setTimeout('runSlideShow()', slideShowSpeed)
}