var i = 1
var set = 4
var g1 = 1
var g2 = 2
var g3 = 3
var g4 = 4
var g5 = 5
var g6 = 6
var g7 = 7
var g8 = 8
var g9 = 9
var g10 = 10
var g11 = 11
var g12 = 12
var g13 = 13
var g14 = 14
var max = 14
images = new Array
images[1] = "image1.jpg"
images[2] = "image2.jpg"
images[3] = "image3.jpg"
images[4] = "image4.jpg"
images[5] = "image5.jpg"
images[6] = "image6.jpg"
images[7] = "image7.jpg"
images[8] = "image8.jpg"
images[9] = "image9.jpg"
images[10] = "image10.jpg"
images[11] = "image11.jpg"
images[12] = "image12.jpg"
images[13] = "image13.jpg"
images[14] = "image14.jpg"


function changeimage(i) {
  if (i == 1) {
document.gallery.src = "gallery/" + images[g1];
  }
    if (i == 2) {
document.gallery.src = "gallery/" + images[g2];
  }
    if (i == 3) {
document.gallery.src = "gallery/" + images[g3];
  }
    if (i == 4) {
document.gallery.src = "gallery/" + images[g4];
  }
    if (i == 5) {
document.gallery.src = "gallery/" + images[g5];
  }
   if (i == 6) {
document.gallery.src = "gallery/" + images[g6];
  }
      if (i == 7) {
document.gallery.src = "gallery/" + images[g7];
  }
   if (i == 8) {
document.gallery.src = "gallery/" + images[g8];
  }
   if (i == 9) {
document.gallery.src = "gallery/" + images[g9];
  }
     if (i == 10) {
document.gallery.src = "gallery/" + images[g10];
  }
  
   if (i == 11) {
document.gallery.src = "gallery/" + images[g11];
  }
  
   if (i == 12) {
document.gallery.src = "gallery/" + images[g12];
  }
  
   if (i == 13) {
document.gallery.src = "gallery/" + images[g13];
  }
   if (i == 14) {
document.gallery.src = "gallery/" + images[g14];
  }
  	if (document.all) {
	gallery.filters.blendTrans.apply();
	gallery.filters.blendTrans.play();
	}
}


function previmg(){
	if (g1 > set){
		document.g1.src = "gallery/thumbs/" + images[g1-set]
		g1 = g1 - set
		document.g2.src = "gallery/thumbs/" + images[g2-set]
		g2 = g2 - set
		document.g3.src = "gallery/thumbs/" + images[g3-set]
		g3 = g3 - set
		/*
		document.g4.src = "gallery/thumbs/" + images[g4-set]
		g4 = g4 - set
		document.g5.src = "/thumbs/" + images[g5-set]
		g5 = g5 - set
		*/
	}
	
}

function nextimg(){
	if (g3 < max){
		document.g1.src = "gallery/thumbs/" + images[g1+set]
		g1 = g1 + set
		document.g2.src = "gallery/thumbs/" + images[g2+set]
		g2 = g2 + set
		document.g3.src = "gallery/thumbs/" + images[g3+set]
		g3 = g3 + set
		/*
		document.g4.src = "gallery/thumbs/" + images[g4+set]
		g4 = g4 + set
		document.g5.src = "gallery/thumbs/" + images[g5+set]
		g5 = g5 + set
		*/
	}
}



function movepic(img_name,img_src) {
document[img_name].src=img_src;
}

function hideLayer(show,hide1,hide2,hide3,hide4,hide5) {
if (document.getElementById) {
// this is the way the standards work
document.getElementById(show).style.display = "block";
document.getElementById(hide1).style.display = "none";
document.getElementById(hide2).style.display = "none";
document.getElementById(hide3).style.display = "none";
document.getElementById(hide4).style.display = "none";
document.getElementById(hide5).style.display = "none";
}
}


function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=570,height=500,left = 262,top = 234');");
}


function popUp1(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=570,height=650,left = 262,top = 234');");
}


function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=570,height=550,left = 262,top = 234');");
}

function popUp3(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=570,height=550,left = 262,top = 234');");
}