/***************************************************************************
* Create a photo object                                                    *
***************************************************************************/
function photo(id, galleries_id, photo_ref, section_code, src, width, height, caption, thumbnail, thumbnail_width, thumbnail_height, home, gallery, description, takendate, photographer, location, item_price, purchase_instruction) {
	this.id = id;
	this.galleries_id = galleries_id;
	this.photo_ref = photo_ref;
	this.section_code = section_code;
	this.src = src;
	this.width = width;
	this.height = height;
	this.caption = caption;
	this.thumbnail = thumbnail;
	this.thumbnail_width = thumbnail_width;
	this.thumbnail_height = thumbnail_height;
	this.home = home;
	this.gallery = gallery;
	this.description = description;
	this.takendate = takendate;
	this.photographer = photographer;
	this.location = location;
	this.item_price = item_price;
	this.purchase_instruction = purchase_instruction;
}
/***************************************************************************
* Create a gallery object                                                  *
***************************************************************************/

function gallery(id,featured_images,title,section_code) {
	this.id = id;
	this.featured_images = featured_images;
	this.title = title;
	this.section_code = section_code;}

/***************************************************************************
* Select a random value from a comma separated list                        *
***************************************************************************/
function randomListVal(list) {
	arrayVals = list.split(',');
	pos = Math.round(Math.random() * (arrayVals.length - 1));
	debug('Returning ' + arrayVals[pos] + ' as random image');
	return arrayVals[pos];
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('3048427');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if (!basic) {
			img.src = photos[j].src;
			img.width = photos[j].width;
			img.height = photos[j].height;
			}
			else {
				newImage = new Image(photos[j].width,photos[j].height);
				newImage.src = photos[j].src;
				document.images[img.name] = newImage;
				debug(newImage.src);
			}
			break;
		}
	}
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline() {
	
	imageID = randomListVal('3048427');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !((0) || (0))) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
									document.title = 'geir skeie photography: ' + photos[nextImg].caption;
										/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
						if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
						if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(618086,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Monument 011.jpg',454,312,'Clouds, Monument Valley´02','http://www1.clikpic.com/skeiephoto/images/Monument 011_thumb.jpg',130, 89,0, 0,'Minolta S7 lens 38mm 125sek f:11.0','','','Utah ´02','','');
photos[1] = new photo(618130,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Kjole sepia 01.jpg',454,347,'The Italian Bride','http://www1.clikpic.com/skeiephoto/images/Kjole sepia 01_thumb.jpg',130, 99,0, 1,'Olympus MJU 600 - lens 50 mm 1/15 sek f:2.8','','','Toscana ´05','','');
photos[2] = new photo(618138,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Café Vence 012.jpg',454,322,'Café Provence','http://www1.clikpic.com/skeiephoto/images/Café Vence 012_thumb.jpg',130, 92,0, 0,'Leica M6 - lens: 35mm 1/60 sek f: 8.0 Ilford','','','Vence, France ´97','','');
photos[3] = new photo(618477,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Hilde i P 014.jpg',484,644,'Hilde in Hotel des Invalides','http://www1.clikpic.com/skeiephoto/images/Hilde i P 014_thumb.jpg',130, 173,0, 1,'Leica M6J - lens 50 mm, 1/15 sek f:2.8','','','Paris ´99','','');
photos[4] = new photo(618480,'47330','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 125.jpg',454,313,'Packard','http://www1.clikpic.com/skeiephoto/images/Bilde 125_thumb.jpg',130, 90,0, 1,'Leica M6J - lens 35 mm 1/15 sek f:2.8','','','Strømmen, Norway ´99','','');
photos[5] = new photo(620420,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/GRACAN-01.jpg',454,312,'Sunset, Grand Canyon','http://www1.clikpic.com/skeiephoto/images/GRACAN-01_thumb.jpg',130, 89,0, 1,'Minolta M300 - lens 135 mm 1/125 sek f:5.6','','','Utah ´02','','');
photos[6] = new photo(620675,'47330','','gallery','http://www1.clikpic.com/skeiephoto/images/Pascal 01.jpg',329,454,'Le Garcon et Les Tractiones','http://www1.clikpic.com/skeiephoto/images/Pascal 01_thumb.jpg',130, 179,0, 0,'Olympus MJU 600 - lens: 105mm 1/125 sek f: 8.0','','','Blaafarveverket, Modum ´06','','');
photos[7] = new photo(620739,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 146.jpg',291,454,'In the bath','http://www1.clikpic.com/skeiephoto/images/Bilde 146_thumb.jpg',130, 203,0, 0,'Leica M2M - lens 50 mm 1/30 sek f: 4.0','','','Saarbrücken, Germany 1998','','');
photos[8] = new photo(620744,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 150.jpg',326,454,'Sigars Sanctuary','http://www1.clikpic.com/skeiephoto/images/Bilde 150_thumb.jpg',130, 181,0, 0,'Leica M6 - lens 50mm 1/30 sek f: 5.6','','','Manhattan, New York ´02','','');
photos[9] = new photo(620851,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 163.jpg',454,200,'Musician á Quartier Latin','http://www1.clikpic.com/skeiephoto/images/Bilde 163_thumb.jpg',130, 57,0, 1,'Leica M6 - lens 50 mm 1/60 sek f: 5.6','','','Paris, France 1999','','');
photos[10] = new photo(620866,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Elvira 01.jpg',454,342,'Elvira in Concert','http://www1.clikpic.com/skeiephoto/images/Elvira 01_thumb.jpg',130, 98,0, 0,'Canon PS 700 - lens 50 mm 1/4 sek f: 2.8','','','Lillestrøm, Norway 2006','','');
photos[11] = new photo(620871,'47330','','gallery','http://www1.clikpic.com/skeiephoto/images/Ferndale 011.jpg',500,498,'Main Street Parking','http://www1.clikpic.com/skeiephoto/images/Ferndale 011_thumb.jpg',130, 129,0, 0,'Leica 0-Series','','','Ferndale, California ´01','','');
photos[12] = new photo(620874,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 326.jpg',194,454,'Les Enfants á Place des Abbesses','http://www1.clikpic.com/skeiephoto/images/Bilde 326_thumb.jpg',130, 304,0, 0,'Leicaflex SL - lens 135 mm 1/250 sek f:2.8','','','Paris 1986','','');
photos[13] = new photo(620898,'47662','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 164.jpg',355,454,'A rainy night','http://www1.clikpic.com/skeiephoto/images/Bilde 164_thumb.jpg',130, 166,0, 0,'Leica M6J - lens 50 mm 1/15 sek f: 2.8','','','Paris, France ´98','','');
photos[14] = new photo(620907,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 116.jpg',454,321,'A foggy day at Jeløy','http://www1.clikpic.com/skeiephoto/images/Bilde 116_thumb.jpg',130, 92,0, 0,'Leica M6 - lens 35 mm 1/30 sek f: 4,0','','','Moss, Norway ´89','','');
photos[15] = new photo(620908,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 172.jpg',309,454,'Nuns','http://www1.clikpic.com/skeiephoto/images/Bilde 172_thumb.jpg',130, 191,0, 0,'Leica M6 - lens 50 mm 1/60 sek f: 5.6','','','Strasbourg, France 1988','','');
photos[16] = new photo(621583,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Sølenfjellene 01.jpg',454,359,'Sølenfjellene','http://www1.clikpic.com/skeiephoto/images/Sølenfjellene 01_thumb.jpg',130, 103,0, 0,'Canon PS 700 - lens 135 mm 1/250 sek f:5.6','','','Engerdal, Norway 2006','','');
photos[17] = new photo(621606,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Monument 10.jpg',454,306,'The road through Monument Valley','http://www1.clikpic.com/skeiephoto/images/Monument 10_thumb.jpg',130, 88,0, 0,'Minolta S7 - lens 38 mm 1/125 sek f: 11.0','','','Utah, USA ´02','','');
photos[18] = new photo(623154,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Frieren 01.jpg',310,450,'Frieren','http://www1.clikpic.com/skeiephoto/images/Frieren 01_thumb.jpg',130, 189,0, 0,'Olympus 600 - lens: 100 mm 1/60 sek f:5.6','','','Fjellhamar, Norway 2006','','');
photos[19] = new photo(623212,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde 166W.jpg',306,454,'Francesca','http://www1.clikpic.com/skeiephoto/images/Bilde 166W_thumb.jpg',130, 193,0, 0,'Leica M6J - lens 50 mm 1/30 sek f:2.8','','','San Francisco 2000','','');
photos[20] = new photo(623244,'47662','','gallery','http://www1.clikpic.com/skeiephoto/images/Brooklyn B 03W.jpg',450,450,'Detail of Brooklyn Bridge','http://www1.clikpic.com/skeiephoto/images/Brooklyn B 03W_thumb.jpg',130, 130,0, 0,'Kodak DX6490 - lens 300 mm 1/250 sek f:5.6','','','New York 2004','','');
photos[21] = new photo(623259,'47662','','gallery','http://www1.clikpic.com/skeiephoto/images/Chrysler Building 10W.jpg',450,338,'Chrysler Building as seen from Empire State','http://www1.clikpic.com/skeiephoto/images/Chrysler Building 10W_thumb.jpg',130, 98,0, 0,'Kodak DX6490 - lens at 300 mm 1/250 sek f:5.6','','','New York 2004','','');
photos[22] = new photo(623264,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/H&K 01W.jpg',454,323,'Kathrine and Hilde in a Corvette ´57','http://www1.clikpic.com/skeiephoto/images/H&K 01W_thumb.jpg',130, 92,0, 0,'Leica M6J - lens 50 mm 1/125 sek f:11.0','','','Hackberry, California 2000','','');
photos[23] = new photo(623279,'47662','','gallery','http://www1.clikpic.com/skeiephoto/images/Moonrise Coral Gables 01W.jpg',404,450,'Moonrise in Coral Gables','http://www1.clikpic.com/skeiephoto/images/Moonrise Coral Gables 01W_thumb.jpg',130, 145,0, 0,'Canon PS 700 - lens 50 mm 1/15 sek f:2.8','','','Miami, USA 2006','','');
photos[24] = new photo(623289,'47662','','gallery','http://www1.clikpic.com/skeiephoto/images/PPP NY 01W.jpg',450,355,'Manhattan Skyline from Brooklyn Promenade','http://www1.clikpic.com/skeiephoto/images/PPP NY 01W_thumb.jpg',130, 103,0, 0,'Kodak DX6490 - lens 50 mm 1/125 sek f:8.0','','','Brooklyn, New York ´04','','');
photos[25] = new photo(623316,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Whitehouse-02W.jpg',310,450,'White House Ruins','http://www1.clikpic.com/skeiephoto/images/Whitehouse-02W_thumb.jpg',130, 189,0, 0,'Minolta S7 - lens 38 mm 1/125 sek f:16.0','','','Canyon de Chelly, Utah ´03','','');
photos[26] = new photo(623346,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Yosemite Valley 010W.jpg',450,265,'Tunnel Wiew','http://www1.clikpic.com/skeiephoto/images/Yosemite Valley 010W_thumb.jpg',130, 77,0, 0,'Canon S70 - lens 100 mm 1/60 sek f:11.0','','','Yosemite Valley, California ´05','','');
photos[27] = new photo(623347,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Wales train 01W.jpg',454,356,'Steam builders','http://www1.clikpic.com/skeiephoto/images/Wales train 01W_thumb.jpg',130, 102,0, 0,'Leica M6 - lens 50 mm 1/30 sek f:5.6','','','Wales, England 1998','','');
photos[28] = new photo(710881,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Yosemite Falls 010W.jpg',352,450,'Lower Yosemite Falls´05','http://www1.clikpic.com/skeiephoto/images/Yosemite Falls 010W_thumb.jpg',130, 166,0, 0,'Canon S70 - lens 28 mm 1/125 sek f:8.0','','','California 2005','','');
photos[29] = new photo(710958,'54604','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde216W.jpg',304,450,'View from Villa San Michele','http://www1.clikpic.com/skeiephoto/images/Bilde216W_thumb.jpg',130, 192,0, 0,'Leica M6 - lens 21 mm, 1/60 sek f:8.0','','','Capri, Italy ´98','','');
photos[30] = new photo(710960,'47330','','gallery','http://www1.clikpic.com/skeiephoto/images/Tractiones01W.jpg',344,450,'Les Tractiones','http://www1.clikpic.com/skeiephoto/images/Tractiones01W_thumb.jpg',130, 170,0, 0,'Canon S70 - lens 100 mm 1/60 sek f:11.0','','','Fornebu, Oslo ´05','','');
photos[31] = new photo(710962,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde92W.jpg',322,450,'Deux Filles de Bretagne','http://www1.clikpic.com/skeiephoto/images/Bilde92W_thumb.jpg',130, 182,0, 0,'Leica R4s - lens 35 mm, 1/60 sek f: 8.0','','','Bretagne ´99','','');
photos[32] = new photo(711968,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/018W2.jpg',450,322,'Parti fra Nøklevann','http://www1.clikpic.com/skeiephoto/images/018W2_thumb.jpg',130, 93,0, 0,'Olympus Mju 300 - lens 105 mm 1/125 sek f:8.0','','','Østmarka, Oslo ´04','','');
photos[33] = new photo(711969,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/055BW2.jpg',450,372,'El Captain','http://www1.clikpic.com/skeiephoto/images/055BW2_thumb.jpg',130, 107,0, 0,'Olympus Mju 300 - lens 50 mm 1/125 sek f:8.0','','','Yosemite, California ´05','','');
photos[34] = new photo(711970,'47662','','gallery','http://www1.clikpic.com/skeiephoto/images/FlatIron01W.jpg',339,450,'Flat Iron Building','http://www1.clikpic.com/skeiephoto/images/FlatIron01W_thumb.jpg',130, 173,0, 0,'Kodak DX 6490 - lens 300 mm, 1/250 sek f:5.6','','','New York ´04','','');
photos[35] = new photo(711971,'47502','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde115W.jpg',321,450,'Ile Porquerolles´06','http://www1.clikpic.com/skeiephoto/images/Bilde115W_thumb.jpg',130, 182,0, 0,'Leica M6 - lens: 35 mm, 1/125 sek f:11.0','','','','','');
photos[36] = new photo(711972,'54604','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde261W.jpg',305,450,'Gallerie Vittorio Emanuelle','http://www1.clikpic.com/skeiephoto/images/Bilde261W_thumb.jpg',130, 192,0, 0,'Minolta TC 1 - lens 28 mm, 1/8 sek f:3.5','','','Milano ´96','','');
photos[37] = new photo(711974,'47330','','gallery','http://www1.clikpic.com/skeiephoto/images/Traction11W.jpg',450,450,'Traction Avant','http://www1.clikpic.com/skeiephoto/images/Traction11W_thumb.jpg',130, 130,0, 0,'Olympus Mju 300 - lens 50 mm 1/30 sek f:4.0','','','Hammarstoppen ´04','','');
photos[38] = new photo(711978,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Harley0W.jpg',450,364,'The traveller','http://www1.clikpic.com/skeiephoto/images/Harley0W_thumb.jpg',130, 105,0, 0,'Canon PS A700 lens 100 mm, 1/125 sek f:5.6','','','Florida Keys ´06','','');
photos[39] = new photo(713059,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/USA0806199W1.jpg',349,450,'The Beach','http://www1.clikpic.com/skeiephoto/images/USA0806199W1_thumb.jpg',130, 168,0, 0,'Canon PS A700 - lens 35 mm, 1/125 sek f:11.0','','','Fort Lauderdale, Florida 06','','');
photos[40] = new photo(715587,'54604','','gallery','http://www1.clikpic.com/skeiephoto/images/Universal NY 01.jpg',339,450,'New York in the 20´s','http://www1.clikpic.com/skeiephoto/images/Universal NY 01_thumb.jpg',130, 173,0, 0,'Canon PS A700 - lens 35 mm 1/250 sek f:11.0','','','Orlando, Florida ´06','','');
photos[41] = new photo(715613,'54604','','gallery','http://www1.clikpic.com/skeiephoto/images/USA 08-06 009B.jpg',450,339,'The Avalon','http://www1.clikpic.com/skeiephoto/images/USA 08-06 009B_thumb.jpg',130, 98,0, 0,'Olympus Mju 600 - lens 35 mm, 1/125 sek f:8.0','','','Miami South Beach ´06','','');
photos[42] = new photo(715618,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Cola039W.jpg',344,450,'Coke','http://www1.clikpic.com/skeiephoto/images/Cola039W_thumb.jpg',130, 170,0, 0,'Leica M6J - lens: 50 mm 1/30 sek f:4.0','','','San Francisco, California ´02','','');
photos[43] = new photo(715622,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde165W.jpg',450,287,'Hilde in the Avenue of the Giants','http://www1.clikpic.com/skeiephoto/images/Bilde165W_thumb.jpg',130, 83,0, 0,'Leica M6 - lens 28 mm, 1/30 sek f:5.6','','','Oregon ´03','','');
photos[44] = new photo(729390,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/Marka 2007 005.jpg',450,335,'F15 Janviér','http://www1.clikpic.com/skeiephoto/images/Marka 2007 005_thumb.jpg',130, 97,0, 1,'Pentax K100D - lens 50 mm, 1/15 sek f:5.6','','','Jeløy, Moss ´07','','');
photos[45] = new photo(729402,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/BudIstvan01W1.jpg',450,339,'In St.Istvan´s Cathedral','http://www1.clikpic.com/skeiephoto/images/BudIstvan01W1_thumb.jpg',130, 98,0, 0,'Canon S70 - lens 28 mm, 1/4 sek f:2.8','','','Budapest ´05','','');
photos[46] = new photo(729408,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/Majorie01W1.jpg',333,450,'Majorie','http://www1.clikpic.com/skeiephoto/images/Majorie01W1_thumb.jpg',130, 176,0, 0,'Olympus 300, 50 mm, 1/60 sek f:8.0','','','San Franscisco´05','','');
photos[47] = new photo(729413,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/Ice03W1.jpg',450,338,'The church of the Ice Hotel','http://www1.clikpic.com/skeiephoto/images/Ice03W1_thumb.jpg',130, 98,0, 0,'Olympus Mju 300 - lens 35 mm 1 sek f:3.5','','','Alta, Norway ´05','','');
photos[48] = new photo(729415,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/NY2004150BW.jpg',378,450,'Hotel New Yorker by night','http://www1.clikpic.com/skeiephoto/images/NY2004150BW_thumb.jpg',130, 155,0, 0,'Olympus Mju 300 - lens 50 mm, 1/8 sek f:3.5','','','New York ´04','','');
photos[49] = new photo(729417,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/Nøkken2W.jpg',450,450,'Nøkken','http://www1.clikpic.com/skeiephoto/images/Nøkken2W_thumb.jpg',130, 130,0, 0,'Olympus Mju 600 - lens 105 mm, 1/125 sek f:5.6','','','Fetsund Lenser ´06','','');
photos[50] = new photo(729458,'54604','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde211W1.jpg',319,450,'Arc de Triomphe Nouvelle','http://www1.clikpic.com/skeiephoto/images/Bilde211W1_thumb.jpg',130, 183,0, 0,'Leica M6 - lens 50 mm 1/125 sek f: 8.0','','','Paris, France ´98','','');
photos[51] = new photo(729466,'47330','','gallery','http://www1.clikpic.com/skeiephoto/images/Bilde215W.jpg',450,288,'Parking complete','http://www1.clikpic.com/skeiephoto/images/Bilde215W_thumb.jpg',130, 83,0, 0,'Leica M6J - lens 50 mm, 1/60 sek f:5.6','','','Baasnäss, Sweden ´00','','');
photos[52] = new photo(729470,'47172','','gallery','http://www1.clikpic.com/skeiephoto/images/Noklevann10W.jpg',450,386,'Ice in Nøklevann','http://www1.clikpic.com/skeiephoto/images/Noklevann10W_thumb.jpg',130, 112,0, 0,'Kodak DX 6490 - lens 100 mm 1/60 sek f:5.6','','','Østmarka, Oslo ´02','','');
photos[53] = new photo(729477,'54604','','gallery','http://www1.clikpic.com/skeiephoto/images/NY101W1.jpg',450,339,'Hotel New Yorker seen form Broadway','http://www1.clikpic.com/skeiephoto/images/NY101W1_thumb.jpg',130, 98,0, 0,'Kodak DX 6490 - lens 300 mm, 1/250 sek f:6.3','','','New York ´04','','');
photos[54] = new photo(815118,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/Ice castle 01.jpg',500,376,'From the icecastle by the castle','http://www1.clikpic.com/skeiephoto/images/Ice castle 01_thumb.jpg',130, 98,0, 0,'Olympus Mju 600 - lens 50 mm 1/15 sek f:4.0','','','Oslo, Norway ´07','','');
photos[55] = new photo(815128,'47313','','gallery','http://www1.clikpic.com/skeiephoto/images/Marka 2007 035B.jpg',500,338,'After the winterstorm','http://www1.clikpic.com/skeiephoto/images/Marka 2007 035B_thumb.jpg',130, 88,0, 0,'Pentax K100D, lens 50 mm 1/60 sek f: 8.0','','','Nøklevann, Oslo ´07','','');
photos[56] = new photo(815129,'56196','','gallery','http://www1.clikpic.com/skeiephoto/images/Rally Norway 2007 113.jpg',500,376,'Rally Norway 2007','http://www1.clikpic.com/skeiephoto/images/Rally Norway 2007 113_thumb.jpg',130, 98,0, 0,'Canon PS A700, lens 200 mm 1/250 sek f: 5.6','','','Hamar Norway ´07','','');
photos[57] = new photo(815134,'54604','','gallery','http://www1.clikpic.com/skeiephoto/images/USA 08-06 102B.jpg',500,392,'Hollywood Photostore','http://www1.clikpic.com/skeiephoto/images/USA 08-06 102B_thumb.jpg',130, 102,0, 0,'Canon PS A700, lens 50 mm 1/250 sek f: 11.0','','','Florida, USA ´06','','');
photos[58] = new photo(815137,'47662','','gallery','http://www1.clikpic.com/skeiephoto/images/USA 08-06 223.jpg',446,604,'Starbucks Ocean Drive South Beach','http://www1.clikpic.com/skeiephoto/images/USA 08-06 223_thumb.jpg',130, 176,0, 0,'Canon PS A700, lens 180 mm 1/250 sek f: 5.6','','','Miami, Florida ´06','','');
photos[59] = new photo(3048427,'47502','','gallery','http://admin.clikpic.com/skeiephoto/images/Søsken Bilbao 08 005.jpg',434,600,'My sister','http://admin.clikpic.com/skeiephoto/images/Søsken Bilbao 08 005_thumb.jpg',130, 180,1, 0,'Leica V-Lux1, 300 mm','','','Bilbao, Spain 2008','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(47172,'618130','ambiance','gallery');
galleries[1] = new gallery(54604,'815134,729477,729458,715613,715587,711972,710958','architecture','gallery');
galleries[2] = new gallery(47330,'618480','automobiles','gallery');
galleries[3] = new gallery(47662,'815137,711970,623289,623279,623259,623244,620898','cityscapes','gallery');
galleries[4] = new gallery(56196,'729390','en coleur','gallery');
galleries[5] = new gallery(47313,'620420','landscapes','gallery');
galleries[6] = new gallery(47502,'620851,618477','people','gallery');


