var imageCount = 10
var divCount = 9
var counter = 1
var imagePath = "webimages/"
var thumbPath = "webimages/thumbsnails/t-"
var img = new Array
var title = new Array
var desc = new Array

img[1] = "Synchronicity.jpg"
title[1] = "Synchronicity"
desc[1] = "Sold - Giclee Prints Available"

img[2] = "whaler.jpg"
title[2] = "Whaler"
desc[2] = "Sold"

img[3] = "coconuts.jpg"
title[3] = "What a Loverly Bunch of Coconuts"
desc[3] = "Sold - Giclee Prints Available"


img[4] = "orangesoda.jpg"
title[4] = "Orange Soda"
desc[4] = "Giclee Prints Available"


img[5] = "passion.jpg"
title[5] = "Passion"
desc[5] = "Sold - Giclee Prints Available"


img[6] = "sleepybabies.jpg"
title[6] = "Sleepy Babies"
desc[6] = "Sold - Giclee Prints Available"

img[7] = "caribumbrella.jpg"
title[7] = "Caribbean Umbrella"
desc[7] = "40 x 40 - $1250"

img[8] = "Serenity.jpg"
title[8] = "Serenity"
desc[8] = "Sold - Giclee Prints Available"

img[9] = "Hibiscus.jpg"
title[9] = "Hibiscus"
desc[9] = "Sold - Giclee Prints Available"

img[10] = "St_Kitts.jpg"
title[10] = "St Kitts"
desc[10] = "Giclee Prints Available"





var timerID
var imgCounter = 2
var tbCounter = 3

function loadImage(){
var iImg = queryString("load")
var sTitle
var	oImg = document.getElementById('imgMain')
	oImg.src = imagePath + img[iImg]
	
var	oH = document.getElementsByTagName('h3')
for(i=0;i<oH.length;i++){
	
	oH[i].innerHTML = title[iImg]
}

var	oH4 = document.getElementsByTagName('h4')
for(i=0;i<oH4.length;i++){
	
	oH4[i].innerHTML = desc[iImg]
}

}
function UpdateThumbs(){
	
	
	if (imgCounter>imageCount){
		imgCounter = 1
		}
		
	oImg = document.getElementById('imgMain')
	oImg.src = imagePath + img[imgCounter]

	
	imgCounter++
	timerID = window.setTimeout("UpdateThumbs()", 5001) ;

}

function PageQuery(q) {
	if(q.length > 1) this.q = q.substring(1, q.length);
	else this.q = null;
	this.keyValuePairs = new Array();
	if(q) {
		for(var i=0; i < this.q.split("&").length; i++) {
		this.keyValuePairs[i] = this.q.split("&")[i];
	}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	this.getValue = function(s) {
	for(var j=0; j < this.keyValuePairs.length; j++) {
	if(this.keyValuePairs[j].split("=")[0] == s)
	return this.keyValuePairs[j].split("=")[1];
	}
	return false;
	}
	this.getParameters = function() {
	var a = new Array(this.getLength());
	for(var j=0; j < this.keyValuePairs.length; j++) {
	a[j] = this.keyValuePairs[j].split("=")[0];
	}
	return a;
	}
	this.getLength = function() { return this.keyValuePairs.length; } 
}
function queryString(key){
	var page = new PageQuery(window.location.search); 
	return unescape(page.getValue(key)); 
}
function displayItem(key){
	if(queryString(key)=='false') 
	{
	document.write("you didn't enter a ?name=value querystring item.");
	}else{
	document.write(queryString(key));
	}
}




