// JavaScript Document

// number of layers -- change this when you add layers, corresponds to apDiv#s
numLayers = 9;

var layerList = [numLayers];

for (i=0;i<numLayers;i++) {
	j = i + 1;
	layerList[i] = "apDiv"+j;
} // for

// change this to the number of thumbs, corresponds to thDiv#s
numThumbs = 9;

var thumbList = [numThumbs];

for (i=0;i<numThumbs;i++) {
	j = i + 1;
	thumbList[i] = "thDiv"+j;
} // for

// hides all the layers
function hideLayers() { 

	// iterate through the numLayers
	for (i=0;i<layerList.length;i++) {
		document.getElementById(layerList[i]).style.visibility = "hidden";
	}  // for
} // hideLayers()

function showLayer(theLayer) {
	hideLayers();
	document.getElementById(theLayer).style.visibility = "visible";
} // showLayer()

function hideThumbs() {
	// iterate through the numLayers
	for (i=0;i<thumbList.length;i++) {
		document.getElementById(thumbList[i]).style.visibility = "hidden";
	}  // for
} // hideThumbs()

// the starting point for the list of thumbnails
var pointer = 0;

// change these to the absolute position you from the left side of the screen
var positionOne = "245px";
var positionTwo = "385px";
var positionThree = "525px";

function showThumbs() {
	hideThumbs();
	document.getElementById(thumbList[pointer]).style.left = positionOne;
	document.getElementById(thumbList[pointer+1]).style.left = positionTwo;
	document.getElementById(thumbList[pointer+2]).style.left = positionThree;
	for (i=pointer;i<(pointer+3);i++) {
		document.getElementById(thumbList[i]).style.visibility = "visible";
	} // for
} // showThumbs

function left() {
	if (pointer<(numThumbs-3)) {
		pointer++;
		showThumbs();
	} // if
} // left

function right() {
	if (pointer>0) {
		pointer--;
		showThumbs();
	} // if
} // right()


// "Enlarge" photos to new window

function thDiv1_big() {
	window.open ("http://www.suciamanor.com/beach.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv2_big() {
	window.open ("http://www.suciamanor.com/sunset.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv3_big() {
	window.open ("http://www.suciamanor.com/living.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv4_big() {
	window.open ("http://www.suciamanor.com/master.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv5_big() {
	window.open ("http://www.suciamanor.com/jazz.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv6_big() {
	window.open ("http://www.suciamanor.com/country.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv7_big() {
	window.open ("http://www.suciamanor.com/rock.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv8_big() {
	window.open ("http://www.suciamanor.com/entry.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}

function thDiv9_big() {
	window.open ("http://www.suciamanor.com/diningkit.htm", null, "width=625, height=500, resizeable=yes, scrollbars=yes" ); return false;
}


// Asks user to turn off pop-up blocker when entering the gallery page

function popUp() {
		alert("MESSAGE FROM SUCIAMANOR.COM - PLEASE READ - To ensure maximum gallery functionality, please turn off your pop-up blocker.  If you are using Windows Internet Explorer, please choose the option 'Allow blocked content' when your browser warns you of scripts and 'ActiveX' controls.  This page uses JavaScipt which may not function properly if these requirements are not met.  Thank you.");
}
	