// ---------------- rotating gallery ------------------
// Set speed (milliseconds)
var speed = 5000

// 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/main1.jpg'
Pic[1] = 'images/main2.jpg'
Pic[2] = 'images/main3.jpg'
Pic[3] = 'images/main4.jpg'
//Pic[4] = 'images/main5.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

function runSlideShow(){
   document.getElementById('rota').src = Pic[j];
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', speed)
}
// ---------------- rotating gallery ------------------

// ---------------- clickable image ------------------
function fwin(pic){
	return "<html>\n" + "<head>\n" + "<title>Image</title>\n" + "<script>\n" + "function reSize() {\n" + "  var wimg = document.getElementById('lgimg');\n" + "  var wnw = wimg.width + 40;\n" + "  var wnh = wimg.height + 120;\n" + "  window.resizeTo(wnw,wnh);\n" + "}\n" + "</scr" + "ipt>\n" + "</head>\n" + "<body onLoad='reSize()'>\n" + "<center><img src='images/photos/" + pic + ".jpg' alt='' id='lgimg' vspace='6' onclick='window.close();' /></center>\n" + "</body>\n" + "</html>\n";
}

function viewLg(img){
	link = "about:blank";
	var pw = window.open(link, "image", "width=50,height=50");
	pw.document.open();
	pw.document.write(fwin(img));
	pw.document.close();
}
// ---------------- clickable image ------------------
