
var thumbs = new Array();

thumbs[0]=new Image();
thumbs[1]=new Image();
thumbs[2]=new Image();
thumbs[3]=new Image();
thumbs[4]=new Image();
thumbs[5]=new Image();
thumbs[6]=new Image();
thumbs[7]=new Image();
thumbs[8]=new Image();
thumbs[9]=new Image();
thumbs[10]=new Image();
thumbs[11]=new Image();
thumbs[12]=new Image();
thumbs[13]=new Image();
thumbs[14]=new Image();
thumbs[15]=new Image();
thumbs[16]=new Image();
thumbs[17]=new Image();
thumbs[18]=new Image();
thumbs[19]=new Image();
thumbs[20]=new Image();
thumbs[21]=new Image();
thumbs[22]=new Image();
thumbs[23]=new Image();
thumbs[24]=new Image();
thumbs[25]=new Image();
thumbs[26]=new Image();
thumbs[27]=new Image();
thumbs[28]=new Image();
thumbs[29]=new Image();

function loadImages(){
thumbs[0].src="/images/gallery/01_thumb.jpg";
thumbs[1].src="/images/gallery/02_thumb.jpg";
thumbs[2].src="/images/gallery/03_thumb.jpg";
thumbs[3].src="/images/gallery/04_thumb.jpg";
thumbs[4].src="/images/gallery/05_thumb.jpg";
thumbs[5].src="/images/gallery/06_thumb.jpg";
thumbs[6].src="/images/gallery/07_thumb.jpg";
thumbs[7].src="/images/gallery/08_thumb.jpg";
thumbs[8].src="/images/gallery/09_thumb.jpg";
thumbs[9].src="/images/gallery/10_thumb.jpg";
thumbs[10].src="/images/gallery/11_thumb.jpg";
thumbs[11].src="/images/gallery/12_thumb.jpg";
thumbs[12].src="/images/gallery/13_thumb.jpg";
thumbs[13].src="/images/gallery/14_thumb.jpg";
thumbs[14].src="/images/gallery/15_thumb.jpg";
thumbs[15].src="/images/gallery/16_thumb.jpg";
thumbs[16].src="/images/gallery/17_thumb.jpg";
thumbs[17].src="/images/gallery/18_thumb.jpg";
thumbs[18].src="/images/gallery/19_thumb.jpg";
thumbs[19].src="/images/gallery/20_thumb.jpg";
thumbs[20].src="/images/gallery/21_thumb.jpg";
thumbs[21].src="/images/gallery/22_thumb.jpg";
thumbs[22].src="/images/gallery/23_thumb.jpg";
thumbs[23].src="/images/gallery/24_thumb.jpg";
thumbs[24].src="/images/gallery/25_thumb.jpg";
thumbs[25].src="/images/gallery/26_thumb.jpg";
thumbs[26].src="/images/gallery/27_thumb.jpg";
thumbs[27].src="/images/gallery/28_thumb.jpg";
thumbs[28].src="/images/gallery/29_thumb.jpg";
thumbs[29].src="/images/gallery/30_thumb.jpg";
var message = "All Photography Copyrighted & Protected.";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
var img = document.getElementById('mainImage');
img.onmousedown=click;

}
var BFimages = new Object;

BFimages.gallery={
  image: [
    { href: "/images/gallery/01_big.jpg", thumb: "/images/gallery/01_thumb.jpg" },
    { href: "/images/gallery/02_big.jpg", thumb: "/images/gallery/02_thumb.jpg" },
    { href: "/images/gallery/03_big.jpg", thumb: "/images/gallery/03_thumb.jpg" },
    { href: "/images/gallery/04_big.jpg", thumb: "/images/gallery/04_thumb.jpg" },
    { href: "/images/gallery/05_big.jpg", thumb: "/images/gallery/05_thumb.jpg" },
    { href: "/images/gallery/06_big.jpg", thumb: "/images/gallery/06_thumb.jpg" },
    { href: "/images/gallery/07_big.jpg", thumb: "/images/gallery/07_thumb.jpg" },
    { href: "/images/gallery/08_big.jpg", thumb: "/images/gallery/08_thumb.jpg" },
    { href: "/images/gallery/09_big.jpg", thumb: "/images/gallery/09_thumb.jpg" },
    { href: "/images/gallery/10_big.jpg", thumb: "/images/gallery/10_thumb.jpg" },
    { href: "/images/gallery/11_big.jpg", thumb: "/images/gallery/11_thumb.jpg" },
    { href: "/images/gallery/12_big.jpg", thumb: "/images/gallery/12_thumb.jpg" },
    { href: "/images/gallery/13_big.jpg", thumb: "/images/gallery/13_thumb.jpg" },
    { href: "/images/gallery/14_big.jpg", thumb: "/images/gallery/14_thumb.jpg" },
    { href: "/images/gallery/15_big.jpg", thumb: "/images/gallery/15_thumb.jpg" },
    { href: "/images/gallery/16_big.jpg", thumb: "/images/gallery/16_thumb.jpg" },
    { href: "/images/gallery/17_big.jpg", thumb: "/images/gallery/17_thumb.jpg" },
    { href: "/images/gallery/18_big.jpg", thumb: "/images/gallery/18_thumb.jpg" },
    { href: "/images/gallery/19_big.jpg", thumb: "/images/gallery/19_thumb.jpg" },
    { href: "/images/gallery/20_big.jpg", thumb: "/images/gallery/20_thumb.jpg" },
    { href: "/images/gallery/21_big.jpg", thumb: "/images/gallery/21_thumb.jpg" },
    { href: "/images/gallery/22_big.jpg", thumb: "/images/gallery/22_thumb.jpg" },
    { href: "/images/gallery/23_big.jpg", thumb: "/images/gallery/23_thumb.jpg" },
    { href: "/images/gallery/24_big.jpg", thumb: "/images/gallery/24_thumb.jpg" },
    { href: "/images/gallery/25_big.jpg", thumb: "/images/gallery/25_thumb.jpg" },
    { href: "/images/gallery/26_big.jpg", thumb: "/images/gallery/26_thumb.jpg" },
    { href: "/images/gallery/27_big.jpg", thumb: "/images/gallery/27_thumb.jpg" },
    { href: "/images/gallery/28_big.jpg", thumb: "/images/gallery/28_thumb.jpg" },
    { href: "/images/gallery/29_big.jpg", thumb: "/images/gallery/29_thumb.jpg" },
    { href: "/images/gallery/30_big.jpg", thumb: "/images/gallery/30_thumb.jpg" }
  ]
}


var req;
function changeThumbs(elm){
  var next1 = document.getElementById("next1");
  var next2 = document.getElementById("next2");
  var next3 = document.getElementById("next3");
  var next4 = document.getElementById("next4");
  var prvBtn = document.getElementById("prvBtn");
  var nextBtn = document.getElementById("nextBtn");
  var url = "gallery.htm";
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
    req.open('GET',url,true);
	if (elm.className=="one") {
	   	req.onreadystatechange = switchOne;
	}
	if (elm.className=="two") {
		req.onreadystatechange = switchTwo;
	}
        if (elm.className=="three") {
                req.onreadystatechange = switchThree;
        }
        if (elm.className=="four") {
                req.onreadystatechange = switchFour;
        }
        if (elm.className=="five") {
                req.onreadystatechange = switchFive;
        }
        if (elm.className=="six") {
                req.onreadystatechange = switchSix;
        }
        if (elm.className=="seven") {
                req.onreadystatechange = switchSeven;
        }
        if (elm.className=="eight") {
                req.onreadystatechange = switchEight;
        }
        if (elm.className=="first") {
                req.onreadystatechange = switchFirst;
        }
    req.send(null);
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    if (req) {
      req.open('GET',url,true);
	if (elm.className=="one") {
	   	req.onreadystatechange = switchOne;
	}
	if (elm.className=="two") {
		req.onreadystatechange = switchTwo;
	}
        if (elm.className=="three") {
                req.onreadystatechange = switchThree;
        }
        if (elm.className=="four") {
                req.onreadystatechange = switchFour;
        }
        if (elm.className=="five") {
                req.onreadystatechange = switchFive;
        }
        if (elm.className=="six") {
                req.onreadystatechange = switchSix;
        }
        if (elm.className=="seven") {
                req.onreadystatechange = switchSeven;
        }
        if (elm.className=="eight") {
                req.onreadystatechange = switchEight;
        }
        if (elm.className=="first") {
                req.onreadystatechange = switchFirst;
        }
      req.send();
    }
  }
}
function switchOne(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	       next1.firstChild.src = BFimages.gallery.image[4].thumb;
           next1.href = BFimages.gallery.image[4].href;
	       next2.firstChild.src = BFimages.gallery.image[5].thumb;
           next2.href = BFimages.gallery.image[5].href; 
           next3.firstChild.src = BFimages.gallery.image[6].thumb;
           next3.href = BFimages.gallery.image[6].href;
           next4.firstChild.src = BFimages.gallery.image[11].thumb;
           next4.href = BFimages.gallery.image[11].href;
	       nextBtn.className = "two";
           prvBtn.className = "first";
		   prvBtn.innerHTML = "Back"
	   
    }
  }
}
function switchTwo(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	   next1.firstChild.src = BFimages.gallery.image[11].thumb;
           next1.href = BFimages.gallery.image[11].href;
	   next2.firstChild.src = BFimages.gallery.image[8].thumb;
           next2.href = BFimages.gallery.image[8].href; 
           next3.firstChild.src = BFimages.gallery.image[9].thumb;
           next3.href = BFimages.gallery.image[9].href;
           next4.firstChild.src = BFimages.gallery.image[10].thumb;
           next4.href = BFimages.gallery.image[10].href;
	   nextBtn.className = "three";
           prvBtn.className = "one";
	   
    }
  }
}
function switchThree(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	       next1.firstChild.src = BFimages.gallery.image[10].thumb;
           next1.href = BFimages.gallery.image[10].href;
	       next2.firstChild.src = BFimages.gallery.image[12].thumb;
           next2.href = BFimages.gallery.image[12].href; 
           next3.firstChild.src = BFimages.gallery.image[13].thumb;
           next3.href = BFimages.gallery.image[13].href;
           next4.firstChild.src = BFimages.gallery.image[14].thumb;
           next4.href = BFimages.gallery.image[14].href;
	       nextBtn.className = "four";
           prvBtn.className = "two";
	   
    }
  }
}
function switchFour(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	   next1.firstChild.src = BFimages.gallery.image[14].thumb;
           next1.href = BFimages.gallery.image[14].href;
	   next2.firstChild.src = BFimages.gallery.image[15].thumb;
           next2.href = BFimages.gallery.image[15].href; 
           next3.firstChild.src = BFimages.gallery.image[16].thumb;
           next3.href = BFimages.gallery.image[16].href;
           next4.firstChild.src = BFimages.gallery.image[17].thumb;
           next4.href = BFimages.gallery.image[17].href;
	   nextBtn.className = "five";
           prvBtn.className = "three";
	   
    }
  }
}
function switchFive(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	   next1.firstChild.src = BFimages.gallery.image[17].thumb;
           next1.href = BFimages.gallery.image[17].href;
	   next2.firstChild.src = BFimages.gallery.image[18].thumb;
           next2.href = BFimages.gallery.image[18].href; 
           next3.firstChild.src = BFimages.gallery.image[19].thumb;
           next3.href = BFimages.gallery.image[19].href;
           next4.firstChild.src = BFimages.gallery.image[20].thumb;
           next4.href = BFimages.gallery.image[20].href;
	   nextBtn.className = "six";
           prvBtn.className = "four";
	   
    }
  }
}
function switchSix(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	   next1.firstChild.src = BFimages.gallery.image[20].thumb;
           next1.href = BFimages.gallery.image[20].href;
	   next2.firstChild.src = BFimages.gallery.image[21].thumb;
           next2.href = BFimages.gallery.image[21].href; 
           next3.firstChild.src = BFimages.gallery.image[22].thumb;
           next3.href = BFimages.gallery.image[22].href;
           next4.firstChild.src = BFimages.gallery.image[23].thumb;
           next4.href = BFimages.gallery.image[23].href;
	   nextBtn.className = "seven";
           prvBtn.className = "five";
	   
    }
  }
}
function switchSeven(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	   next1.firstChild.src = BFimages.gallery.image[23].thumb;
           next1.href = BFimages.gallery.image[23].href;
	   next2.firstChild.src = BFimages.gallery.image[24].thumb;
           next2.href = BFimages.gallery.image[24].href; 
           next3.firstChild.src = BFimages.gallery.image[25].thumb;
           next3.href = BFimages.gallery.image[25].href;
           next4.firstChild.src = BFimages.gallery.image[26].thumb;
           next4.href = BFimages.gallery.image[26].href;
	       nextBtn.className = "eight";
		   nextBtn.innerHTML = "Next";
           prvBtn.className = "six";
	   
    }
  }
}
function switchEight(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	   next1.firstChild.src = BFimages.gallery.image[26].thumb;
           next1.href = BFimages.gallery.image[26].href;
	   next2.firstChild.src = BFimages.gallery.image[27].thumb;
           next2.href = BFimages.gallery.image[27].href; 
           next3.firstChild.src = BFimages.gallery.image[28].thumb;
           next3.href = BFimages.gallery.image[28].href;
           next4.firstChild.src = BFimages.gallery.image[29].thumb;
           next4.href = BFimages.gallery.image[29].href;
  	       nextBtn.className = "first";
		   nextBtn.innerHTML = "Beginning";
           prvBtn.className = "seven";
		   prvBtn.innerHTML = "Back";
	   
    }
  }
}
function switchFirst(){
  if (req.readyState == 4) {
    if (req.status == 200) {
	       next1.firstChild.src = BFimages.gallery.image[0].thumb;
           next1.href = BFimages.gallery.image[0].href;
	       next2.firstChild.src = BFimages.gallery.image[1].thumb;
           next2.href = BFimages.gallery.image[1].href; 
           next3.firstChild.src = BFimages.gallery.image[2].thumb;
           next3.href = BFimages.gallery.image[2].href;
           next4.firstChild.src = BFimages.gallery.image[3].thumb;
           next4.href = BFimages.gallery.image[3].href;
	       nextBtn.className = "one";
		   nextBtn.innerHTML = "Next";
           prvBtn.className = "eight";
		   prvBtn.innerHTML = "End";
    }
  }
}
function changeImg(src) {
  var mainImg = document.getElementById("mainImage");
  mainImg.style.background="transparent url("+src+") center center no-repeat";
}
			
