//<![CDATA[

//create gallery objects
//gallery1 = new objGallery("above",11);
//gallery2 = new objGallery("black",15);
//gallery3 = new objGallery("build",11);
//gallery4 = new objGallery("cuyp",4);
//gallery6 = new objGallery("drive",9);
//gallery7 = new objGallery("java",6);
//gallery8 = new objGallery("land",7);
//gallery9 = new objGallery("murder",3);
//gallery10 = new objGallery("people",15);
//gallery11 = new objGallery("schiphol",5);
//gallery12 = new objGallery("shape",13);

//object definintion: create new gallery object
function objGallery(name,imageCount) {
	this.name = name;
	this.imageCount = imageCount;
	this.pathGallery = "/photo/" + this.name + "/";
	this.pathFullSize = this.pathGallery + "jpeg/";
	this.pathThumbSize = this.pathGallery + "thumb/";
	this.mthPreloadThumbs = mthPreloadThumbs;
	this.mthPreloadFull = mthPreloadFull;
}

//object method: preload thumbnails
function mthPreloadThumbs() {
	objImage = new Image();
	
	for(var i=1;i<this.imageCount;i++) {
		if(i<10) {
			photoNumber = "0" + i;
		} else {
			photoNumber = i;
		}
		objImage.src = this.pathThumbSize + this.name + photoNumber + "thumb.jpeg";
	}
	
}

//object method: preload fullsize photos
function mthPreloadFull() {
	objImage = new Image();
	
	for(var i=1;i<this.imageCount;i++) {
		if(i<10) {
			photoNumber = "0" + i;
		} else {
			photoNumber = i;
		}
		objImage.src = this.pathFullSize + this.name + photoNumber + ".jpeg";
	}
}


//]]>
