var galleryimages= new Array() 
var gallerytext= new Array() 

galleryimages[0]='Eng0001.jpg'; 
gallerytext[0]='266017';

galleryimages[1]='Tun0114.jpg'; 
gallerytext[1]=''; //update

galleryimages[2]='Eng0015.jpg'; 
gallerytext[2]='266017';

galleryimages[3]='Tun0200.jpg'; 
gallerytext[3]=''; //update

galleryimages[4]='Arg0034copy.jpg'; 
gallerytext[4]='NA';

galleryimages[5]='Mex0047copy.jpg'; 
gallerytext[5]='NA';

galleryimages[6]='Tur0013.jpg'; 
gallerytext[6]='266017';

galleryimages[7]='Chn0023copy.jpg'; 
gallerytext[7]='274752';

galleryimages[8]='Tun0292.jpg'; 
gallerytext[8]=''; //update

galleryimages[9]='Arg0390copy.jpg'; 
gallerytext[9]='NA';

galleryimages[10]='Mex0589copy.jpg'; 
gallerytext[10]='NA';

galleryimages[11]='Arg0356copy.jpg'; 
gallerytext[11]='NA';

galleryimages[12]='Arg0437copy.jpg'; 
gallerytext[12]='NA';

galleryimages[13]='Tur0223.jpg'; 
gallerytext[13]='266017';

galleryimages[14]='Tur0249.jpg'; 
gallerytext[14]='266017';

galleryimages[15]='Mex0258copy.jpg'; 
gallerytext[15]='NA';

galleryimages[16]='Tun0336.jpg'; 
gallerytext[16]=''; //update

galleryimages[17]='Tur0350.jpg'; 
gallerytext[17]='266017';
 
galleryimages[18]='Egy0033.jpg'; 
gallerytext[18]='257195';
 
galleryimages[19]='Egy0172.jpg';
gallerytext[19]='257195';

galleryimages[20]='Egy0221.jpg';
gallerytext[20]='257195';

galleryimages[21]='Egy0301.jpg';
gallerytext[21]='257195';

galleryimages[22]='Egy0450.jpg';
gallerytext[22]='257195';

galleryimages[23]='Tun0442.jpg';
gallerytext[23]=''; //update

galleryimages[24]='Tun0482.jpg';
gallerytext[24]=''; //update

galleryimages[25]='Spa0520.jpg';
gallerytext[25]='255081';

galleryimages[26]='Chn0238copy.jpg';
gallerytext[26]='274752';

galleryimages[27]='Tun0505.jpg';
gallerytext[27]=''; //update

galleryimages[28]='Spa0737.jpg';
gallerytext[28]='255081';

galleryimages[29]='Chn0262copy.jpg';
gallerytext[29]='274752';


var hometext = "I believe photography has always performed two basic functions, to Inform, and to inspire. The content of good travel photography should include one, or better still, both of these qualities in abundance. I am passionate about taking photographs and love to travel, and my sole aim is to convey this love, so it may inform others and lift their hearts as it does mine.";
var biographytext = "<b>Name:</b> Gordon Sinclair.<br /><b>Age:</b> 51<br /><b>Profession:</b> Freelance Travel Photographer based in Blackpool, UK<br /><b>Duration:</b> Returned to Photography 2004.<br /><b>Turned Professional:</b> 2005.<br /><b>Background:</b> Trained in Textile Print Design 79.<br />Travelled extensively (30 countries) 81-06.<br />As an amateur exhibited (Sussex Artists) 87-88, published in Ceramic Review 88, Commissioned in 88. Pursued careers in Sailing, The Church and Politics.";
var techtext = "<b>Camera:</b> Hasselblad H1D<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HC 3.5-4.5/50-110MM ZOOM<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HC 3.5/35MM<br /><b>Filters:</b> Cokin X-Pro Series<br /><b>Tripod:</b> Gitzo G1228LVL G1270M<br /><b>Computer:</b> G5 Dual 2Ghz 23\" HD Monitor, La Cie 250GB HD<br /><b>Software:</b> Adobe Photoshop CS / Flexcolor / Extensis Portfolio7 / Gretagmacbeth Eye One Display / Titanium Toast 6<br /><b>Printer:</b> Epson Stylus Pro 4000";
var contacttext = "<b>email:</b> <a href=\"mailto:info@gsinclair.com\">info@gsinclair.com</a>";

var currentgalleryno = 1;
var currentimageno = 1;

function gallery_display(){

  	document.getElementById("mainimage").style.display = "";
  	document.getElementById("mainimagetext").style.display = "";
  	document.getElementById("topnavigation").style.display = "";
  	document.getElementById("bottomnavigation").style.display = "";
  	document.getElementById("imagenavigation").style.display = "";
	document.getElementById("collections").style.color = "#000";
	document.getElementById("collections").style.textDecoration = "none";
	document.getElementById("photolink").style.color = "#000";
	document.getElementById("photolink").style.textDecoration = "none";
	
  	document.getElementById("collectionsarea").style.display = "none";
  	document.getElementById("photolinksarea").style.display = "none";

	arrayvar = (currentgalleryno * 10) + currentimageno - 11;

	document.getElementById("mainimage").innerHTML = '<img src="/images/photography-large/'+galleryimages[arrayvar]+'" alt="" border="0">';
	document.getElementById("mainimagetext").innerHTML = '&copy; All rights reserved. This work is registered with the UK copyright service: Reg No. '+gallerytext[arrayvar];
	var nav="";
	if(currentimageno != 1)
		nav += '<a href="#" onclick="pervious_images();" class="pervious_images"></a>';
	
	nav += '<div class="navigationtext">'+currentimageno+' - 10</div>';
	
	if(currentimageno != 10)
		nav += '<a href="#" onclick="next_images();" class="next_images"></a>';
	document.getElementById("bottomnavigation").innerHTML = nav;
	document.getElementById("topnavigation").innerHTML = nav;
	
	var imagenav="";
	for (i = 1; i <= 10; i++){
	
		arrayvar = (currentgalleryno * 10) + i - 11;
	
		if(currentimageno == i)
			imagenav += '<a href="#" class="navimage-on" style="background-image: url(../images/photgraphy-gallery/'+galleryimages[arrayvar]+');" onclick="set_images('+i+');"></a>';
		else
			imagenav += '<a href="#" class="navimage-off" style="background-image: url(../images/photgraphy-gallery/'+galleryimages[arrayvar]+');" onclick="set_images('+i+');"></a>';
	
	}
	document.getElementById("imagenavigation").innerHTML = imagenav;
	
	switch (currentgalleryno){
		case 1:
			document.getElementById("gallery1").style.color = "#666";
			document.getElementById("gallery1").style.textDecoration = "underline";
			document.getElementById("gallery2").style.color = "#000";
			document.getElementById("gallery2").style.textDecoration = "none";
			document.getElementById("gallery3").style.color = "#000";
			document.getElementById("gallery3").style.textDecoration = "none";
		break;
		case 2: 
			document.getElementById("gallery1").style.color = "#000";
			document.getElementById("gallery1").style.textDecoration = "none";
			document.getElementById("gallery2").style.color = "#666";
			document.getElementById("gallery2").style.textDecoration = "underline";
			document.getElementById("gallery3").style.color = "#000";
			document.getElementById("gallery3").style.textDecoration = "none";
		break;
		case 3: 
			document.getElementById("gallery1").style.color = "#000";
			document.getElementById("gallery1").style.textDecoration = "none";
			document.getElementById("gallery2").style.color = "#000";
			document.getElementById("gallery2").style.textDecoration = "none";
			document.getElementById("gallery3").style.color = "#666";
			document.getElementById("gallery3").style.textDecoration = "underline";
		break;
	}
}

function hometextset()
{
  	document.getElementById("contenthome").style.display = "";
  	document.getElementById("contentbiography").style.display = "none";
  	document.getElementById("contenttech").style.display = "none";
  	document.getElementById("contentcontact").style.display = "none";

 	document.getElementById("contenthome").style.lineHeight = "1.5";
	return;
}

function biographytextset()
{
  	document.getElementById("contenthome").style.display = "none";
  	document.getElementById("contentbiography").style.display = "";
  	document.getElementById("contenttech").style.display = "none";
  	document.getElementById("contentcontact").style.display = "none";

 	document.getElementById("contentbiography").style.lineHeight = "1.1";
	return;
}

function techtextset()
{
  	document.getElementById("contenthome").style.display = "none";
  	document.getElementById("contentbiography").style.display = "none";
  	document.getElementById("contenttech").style.display = "";
  	document.getElementById("contentcontact").style.display = "none";

  	document.getElementById("contenttech").style.lineHeight = "1.2";
	return;
}

function contacttextset()
{
  	document.getElementById("contenthome").style.display = "none";
  	document.getElementById("contentbiography").style.display = "none";
  	document.getElementById("contenttech").style.display = "none";
  	document.getElementById("contentcontact").style.display = "";

  	document.getElementById("contentcontact").style.lineHeight = "1.2";
	return;
}

function collectionsset()
{
  	document.getElementById("mainimage").style.display = "none";
  	document.getElementById("mainimagetext").style.display = "none";
  	document.getElementById("topnavigation").style.display = "none";
  	document.getElementById("bottomnavigation").style.display = "none";
  	document.getElementById("imagenavigation").style.display = "none";
  	
	document.getElementById("gallery1").style.color = "#000";
	document.getElementById("gallery1").style.textDecoration = "none";
	document.getElementById("gallery2").style.color = "#000";
	document.getElementById("gallery2").style.textDecoration = "none";
	document.getElementById("gallery3").style.color = "#000";
	document.getElementById("gallery3").style.textDecoration = "none";
	
	document.getElementById("photolink").style.color = "#000";
	document.getElementById("photolink").style.textDecoration = "none";
  	document.getElementById("photolinksarea").style.display = "none";
	
	document.getElementById("collections").style.color = "#666";
	document.getElementById("collections").style.textDecoration = "underline";
	currentgalleryno = 0;
  	document.getElementById("collectionsarea").style.display = "";
	return;
}

function photolinkareaset()
{
  	document.getElementById("mainimage").style.display = "none";
  	document.getElementById("mainimagetext").style.display = "none";
  	document.getElementById("topnavigation").style.display = "none";
  	document.getElementById("bottomnavigation").style.display = "none";
  	document.getElementById("imagenavigation").style.display = "none";
  	
	document.getElementById("gallery1").style.color = "#000";
	document.getElementById("gallery1").style.textDecoration = "none";
	document.getElementById("gallery2").style.color = "#000";
	document.getElementById("gallery2").style.textDecoration = "none";
	document.getElementById("gallery3").style.color = "#000";
	document.getElementById("gallery3").style.textDecoration = "none";
	
	document.getElementById("collections").style.color = "#000";
	document.getElementById("collections").style.textDecoration = "none";
  	document.getElementById("collectionsarea").style.display = "none";
	
	document.getElementById("photolink").style.color = "#666";
	document.getElementById("photolink").style.textDecoration = "underline";
	currentgalleryno = 4;
  	document.getElementById("photolinksarea").style.display = "";
	return;
}

function ghoveron(galno)
{
	if(galno == currentgalleryno)
 		return;
 	switch (galno){
 		case 0:
			document.getElementById("collections").style.color = "#666";
			document.getElementById("collections").style.textDecoration = "underline";
		break;
 		case 1:
			document.getElementById("gallery1").style.color = "#666";
			document.getElementById("gallery1").style.textDecoration = "underline";
		break;
		case 2: 
			document.getElementById("gallery2").style.color = "#666";
			document.getElementById("gallery2").style.textDecoration = "underline";
		break;
		case 3: 
			document.getElementById("gallery3").style.color = "#666";
			document.getElementById("gallery3").style.textDecoration = "underline";
		break;
 		case 4:
			document.getElementById("photolink").style.color = "#666";
			document.getElementById("photolink").style.textDecoration = "underline";
		break;
	}
 	return;
	
}

function ghoveroff(galno)
{
	if(galno == currentgalleryno)
 		return;
 	switch (galno){
 		case 0:
			document.getElementById("collections").style.color = "#000";
			document.getElementById("collections").style.textDecoration = "none";
		break;
 		case 1:
			document.getElementById("gallery1").style.color = "#000";
			document.getElementById("gallery1").style.textDecoration = "none";
		break;
		case 2: 
			document.getElementById("gallery2").style.color = "#000";
			document.getElementById("gallery2").style.textDecoration = "none";
		break;
		case 3: 
			document.getElementById("gallery3").style.color = "#000";
			document.getElementById("gallery3").style.textDecoration = "none";
		break;
 		case 4:
			document.getElementById("photolink").style.color = "#000";
			document.getElementById("photolink").style.textDecoration = "none";
		break;
	}
 	return;
	
}

function get_random()
{
  	hometextset();
	document.getElementById("contenthome").style.color = "#000";
	document.getElementById("contentbiography").style.color = "#000";
	document.getElementById("contenttech").style.color = "#000";
	document.getElementById("contentcontact").style.color = "#000";

  	document.getElementById("collectionsarea").style.display = "none";
  	document.getElementById("photolinksarea").style.display = "none";
 	document.getElementById("loadhide").style.display = "none";
    var galleyran= Math.round(Math.random()*2)+1;
    var imageran= Math.round(Math.random()*9)+1;
    currentgalleryno = galleyran;
    currentimageno = imageran;

    gallery_display();
    return;
}

function pervious_images()
{
	currentimageno--;
	gallery_display();
}

function next_images()
{
	currentimageno++;
	gallery_display();
}

function set_gallery(galleryno)
{
    currentgalleryno = galleryno;
    currentimageno = 1;
	gallery_display();
}

function set_images(imageno)
{
    currentimageno = imageno;
	gallery_display();
}