var Con_01 = null;
var Con_02 = null;
var Con_03 = null;
var Con_04 = null;
var Con_05 = null;
var Con_06 = null;
var Con_07 = null;
var Con_08 = null;
var Product_01 = null;
var Product_02 = null;
var Product_03 = null;
var Product_04 = null;
var Product_05 = null;
var Product_06 = null;
var Product_07 = null;
var Product_08 = null;
var Product_09 = null;
var Product_10 = null;
var Product_11 = null;
var Product_12 = null;
var Product_13 = null;
var Product_14 = null;
var Int_Com_01 = null;
var Int_Com_02 = null;
var Int_Com_03 = null;
var Int_Com_04 = null;
var Int_Com_05 = null;
var Int_Com_06 = null;
var Int_Com_07 = null;
var Int_Res_01 = null;
var Int_Res_02 = null;
var Int_Res_03 = null;
var Int_Res_04 = null;
var Int_Res_05 = null;
var Int_Res_06 = null;
var Int_Res_07 = null;
var Int_Res_08 = null;
var Int_Res_09 = null;
var Int_Res_10 = null;
var Int_Res_11 = null;
var Int_Res_12 = null;

function onHomePageLoad() {
	initConciergeVars();
	initProductDevelopmentVars();
	initInteriorResidentialVars();
	initInteriorCommercialVars();
}

function initConciergeVars() {
// imgUrl, desc, alttext
Con_01 = new ImageInfo("images/portfolio/Con_01.jpg", "&nbsp;", "Concierge sample image 1");
Con_02 = new ImageInfo("images/portfolio/Con_02.jpg", "&nbsp;", "Concierge sample image 2");
Con_03 = new ImageInfo("images/portfolio/Con_03.jpg", "&nbsp;", "Concierge sample image 3");
Con_04 = new ImageInfo("images/portfolio/Con_04.jpg", "&nbsp;", "Concierge sample image 4");
Con_05 = new ImageInfo("images/portfolio/Con_05.jpg", "&nbsp;", "Concierge sample image 5");
Con_06 = new ImageInfo("images/portfolio/Con_06.jpg", "&nbsp;", "Concierge sample image 6");
Con_07 = new ImageInfo("images/portfolio/Con_07.jpg", "&nbsp;", "Concierge sample image 7");
Con_08 = new ImageInfo("images/portfolio/Con_08.jpg", "&nbsp;", "Concierge sample image 8");
}

function initConcierge(imageListing) {
	initConciergeVars();
	imageListing.addImageInfo(Con_01);
	imageListing.addImageInfo(Con_02);
	imageListing.addImageInfo(Con_03);
	imageListing.addImageInfo(Con_04);
	imageListing.addImageInfo(Con_05);
	imageListing.addImageInfo(Con_06);
	imageListing.addImageInfo(Con_07);
	imageListing.addImageInfo(Con_08);
}

function initProductDevelopmentVars() {
// imgUrl, desc, alttext
Product_01 = new ImageInfo("images/portfolio/Product_01.jpg", "&nbsp;", "Product Development sample image 1");
Product_02 = new ImageInfo("images/portfolio/Product_02.jpg", "&nbsp;", "Product Development sample image 2");
Product_03 = new ImageInfo("images/portfolio/Product_03.jpg", "&nbsp;", "Product Development sample image 3");
Product_04 = new ImageInfo("images/portfolio/Product_04.jpg", "&nbsp;", "Product Development sample image 4");
Product_05 = new ImageInfo("images/portfolio/Product_05.jpg", "&nbsp;", "Product Development sample image 5");
Product_06 = new ImageInfo("images/portfolio/Product_06.jpg", "&nbsp;", "Product Development sample image 6");
Product_07 = new ImageInfo("images/portfolio/Product_07.jpg", "&nbsp;", "Product Development sample image 7");
Product_08 = new ImageInfo("images/portfolio/Product_08.jpg", "&nbsp;", "Product Development sample image 8");
Product_09 = new ImageInfo("images/portfolio/Product_09.jpg", "&nbsp;", "Product Development sample image 9");
Product_10 = new ImageInfo("images/portfolio/Product_10.jpg", "&nbsp;", "Product Development sample image 10");
Product_11 = new ImageInfo("images/portfolio/Product_11.jpg", "&nbsp;", "Product Development sample image 11");
Product_12 = new ImageInfo("images/portfolio/Product_12.jpg", "&nbsp;", "Product Development sample image 12");
Product_13 = new ImageInfo("images/portfolio/Product_13.jpg", "&nbsp;", "Product Development sample image 13");
Product_14 = new ImageInfo("images/portfolio/Product_14.jpg", "&nbsp;", "Product Development sample image 14");
}

function initProductDevelopment(imageListing) {
	initProductDevelopmentVars();
	imageListing.addImageInfo(Product_01);
	imageListing.addImageInfo(Product_02);
	imageListing.addImageInfo(Product_03);
	imageListing.addImageInfo(Product_04);
	imageListing.addImageInfo(Product_05);
	imageListing.addImageInfo(Product_06);
	imageListing.addImageInfo(Product_07);
	imageListing.addImageInfo(Product_08);
	imageListing.addImageInfo(Product_09);
	imageListing.addImageInfo(Product_10);
	imageListing.addImageInfo(Product_11);
	imageListing.addImageInfo(Product_12);
	imageListing.addImageInfo(Product_13);
	imageListing.addImageInfo(Product_14);
}

function initInteriorCommercialVars() {
// imgUrl, desc, alttext
Int_Com_01 = new ImageInfo("images/portfolio/Int_Com_01.jpg", "&nbsp;", "Commercial Interior Design sample image 1");
Int_Com_02 = new ImageInfo("images/portfolio/Int_Com_02.jpg", "&nbsp;", "Commercial Interior Design sample image 2");
Int_Com_03 = new ImageInfo("images/portfolio/Int_Com_03.jpg", "&nbsp;", "Commercial Interior Design sample image 3");
Int_Com_04 = new ImageInfo("images/portfolio/Int_Com_04.jpg", "&nbsp;", "Commercial Interior Design sample image 4");
Int_Com_05 = new ImageInfo("images/portfolio/Int_Com_05.jpg", "&nbsp;", "Commercial Interior Design sample image 5");
Int_Com_06 = new ImageInfo("images/portfolio/Int_Com_06.jpg", "&nbsp;", "Commercial Interior Design sample image 6");
Int_Com_07 = new ImageInfo("images/portfolio/Int_Com_07.jpg", "&nbsp;", "Commercial Interior Design sample image 7");
}

function initInteriorCommercial(imageListing) {
	initInteriorCommercialVars();
	imageListing.addImageInfo(Int_Com_01);
	imageListing.addImageInfo(Int_Com_02);
	imageListing.addImageInfo(Int_Com_03);
	imageListing.addImageInfo(Int_Com_04);
	imageListing.addImageInfo(Int_Com_05);
	imageListing.addImageInfo(Int_Com_06);
	imageListing.addImageInfo(Int_Com_07);
}

function initInteriorResidentialVars() {
// imgUrl, desc, alttext
Int_Res_01 = new ImageInfo("images/portfolio/Int_Res_01.jpg", "&nbsp;", "Residential Interior Design sample image 1");
Int_Res_02 = new ImageInfo("images/portfolio/Int_Res_02.jpg", "&nbsp;", "Residential Interior Design sample image 2");
Int_Res_03 = new ImageInfo("images/portfolio/Int_Res_03.jpg", "&nbsp;", "Residential Interior Design sample image 3");
Int_Res_04 = new ImageInfo("images/portfolio/Int_Res_04.jpg", "&nbsp;", "Residential Interior Design sample image 4");
Int_Res_05 = new ImageInfo("images/portfolio/Int_Res_05.jpg", "&nbsp;", "Residential Interior Design sample image 5");
Int_Res_06 = new ImageInfo("images/portfolio/Int_Res_06.jpg", "&nbsp;", "Residential Interior Design sample image 6");
Int_Res_07 = new ImageInfo("images/portfolio/Int_Res_07.jpg", "&nbsp;", "Residential Interior Design sample image 7");
Int_Res_08 = new ImageInfo("images/portfolio/Int_Res_08.jpg", "&nbsp;", "Residential Interior Design sample image 8");
Int_Res_09 = new ImageInfo("images/portfolio/Int_Res_09.jpg", "&nbsp;", "Residential Interior Design sample image 9");
Int_Res_10 = new ImageInfo("images/portfolio/Int_Res_10.jpg", "&nbsp;", "Residential Interior Design sample image 10");
Int_Res_11 = new ImageInfo("images/portfolio/Int_Res_11.jpg", "&nbsp;", "Residential Interior Design sample image 11");
Int_Res_12 = new ImageInfo("images/portfolio/Int_Res_12.jpg", "&nbsp;", "Residential Interior Design sample image 12");
}

function initInteriorResidential(imageListing) {
	initInteriorResidentialVars();
	imageListing.addImageInfo(Int_Res_01);
	imageListing.addImageInfo(Int_Res_02);
	imageListing.addImageInfo(Int_Res_03);
	imageListing.addImageInfo(Int_Res_04);
	imageListing.addImageInfo(Int_Res_05);
	imageListing.addImageInfo(Int_Res_06);
	imageListing.addImageInfo(Int_Res_07);
	imageListing.addImageInfo(Int_Res_08);
	imageListing.addImageInfo(Int_Res_09);
	imageListing.addImageInfo(Int_Res_10);
	imageListing.addImageInfo(Int_Res_11);
	imageListing.addImageInfo(Int_Res_12);
}

function ImageInfo(imgUrl, desc, alttext) {
	this.imageUrl = imgUrl;
	this.src = imgUrl;
	this.description = desc;
	this.altText = alttext;
	// TJG - comment out the two lines below
//	this.imgObj = new Image();
//	this.imgObj.src = imgUrl;
}

/*
* TJG
* This creates an Image object and sets its source
* in order to preload
*/
ImageInfo.prototype.preloadImage = function()
{
	this.imgObj = new Image();
	this.imgObj.src = this.src;
}

function ImageInfoListing() {
	this.imageList = new Array();

	this.getImageInfo = function(idx) {
		return this.imageList[idx];
	}

	this.size = function() {
		return this.imageList.length;
	}

//	this.addImageInfo = function(imgUrl, desc, alttext) {
//		this.imageList[this.imageList.length] = new ImageInfo(imgUrl, desc, alttext);
//	}
	this.addImageInfo = function(imgInfo) {
//		if (imgInfo==null)
//			alert("Missing image: " + this.imageList.length);
		this.imageList[this.imageList.length] = imgInfo;
	}

	this.getImageHTML = function(imgIdx) {
		var str;
		var imageInfo = this.imageList[imgIdx];

		str = "<img src=\"" + imageInfo.imgUrl + "\" alt=\"" + imageInfo.altText +"\" />";

		return str;
	}

	this.getDescriptionHTML = function(imgIdx) {
		var str;
		var imageInfo = this.imageList[imgIdx];

		str = imageInfo.description;

		return str;
	}
}

function setDivImageHTML(imgListing, divName, imgIdx) {
	var imageInfo = this.imageList[imgIdx];

	document.getElementById(divName).innerHTML = imgListing.getImageHTML(imgIdx);
} 

function setDivImageDescriptionHTML(imgListing, divName, imgIdx) {
	var imageInfo = this.imageList[imgIdx];

	document.getElementById(divName).innerHTML = imgListing.getDescriptionHTML(imgIdx);
} 



