var activeImage;
var activeProduct;
var productImages = new Array();

var copy = new Array();
	copy['premier'] = new Array();
	copy['premier'][0] = 'Mediatheque de Dole, Jura, France';
	copy['premier'][1] = 'Lord Sheratons Furniture, Cyprus';
	copy['premier'][2] = 'Exhibition stand, Prism Displays, Herts England';
	copy['premier'][3] = 'Clear laquered custom-made Furniture by Joiners Bressers';
	copy['premier'][4] = 'Technical innovation from Medite';
	copy['premier'][5] = 'Fitted Furniture, The Netherlands';

	copy['plus'] = new Array();
	copy['plus'][0] = 'Medite PLUS for bedroom furniture';
	copy['plus'][1] = 'Medite PLUS  pressed panel';
	copy['plus'][2] = 'Medite PLUS coloured panels';
	copy['plus'][3] = 'Deep routing possibilities with Medite PLUS';
	copy['plus'][4] = 'Technology has allowed the evolution of Medite PLUS';
	copy['plus'][5] = 'Medite PLUS finished &amp; unfinished panels';

	copy['exterior'] = new Array();
	copy['exterior'][0] = 'Medite EXTERIOR shopfront Llechwedd, Wales';
	copy['exterior'][1] = 'Construction of Luzern concert hall, Switzerland';
	copy['exterior'][2] = 'Moveable modular garden - Chelsea flower show 2002';
	copy['exterior'][3] = 'French Kiosk';
	copy['exterior'][4] = 'Medite Exterior Sign Barnabys Fish restaurant';
	copy['exterior'][5] = 'Medite Exterior Door';

	copy['ecologique'] = new Array();
	copy['ecologique'][0] = 'Playfair project, Edinburgh, Scotland';
	copy['ecologique'][1] = 'Corinium Museum 2, Cirencester';
	copy['ecologique'][2] = 'Display cabinets, Corinium museum, Cirencester';
	copy['ecologique'][3] = 'Laboratory furniture';
	copy['ecologique'][4] = 'National Waterfront Museum, Swansea, Wales';
	copy['ecologique'][5] = 'Display plinths, New York art gallery';

	copy['MR'] = new Array();
	copy['MR'][0] = 'Medite MR Architectural mouldings in an exclusive residental apartment';
	copy['MR'][1] = 'Medite MR in a high quality fitted kitchen, England';
	copy['MR'][2] = 'Medite MR in a high quality fitted bathroom, England';
	copy['MR'][3] = 'Medite MR. The White House apartments, South Bank London, England';
	copy['MR'][4] = 'Medite MR mouldings';
	copy['MR'][5] = 'Medite MR staircase';

	copy['FQ'] = new Array();
	copy['FQ'][0] = 'Living Room with maple laminate flooring courtesy of Alloc';
	copy['FQ'][1] = 'Medite FQ Dining room floor courtesy of Alloc';
	copy['FQ'][2] = 'Medite FQ customer room, Clonmel';
	copy['FQ'][3] = 'Medite FQ beech laminate flooring with table';
	copy['FQ'][4] = 'Medite FQ laminate swatch';
	copy['FQ'][5] = 'Medite FQ laminate flooring';


	copy['FR'] = new Array();
	copy['FR'][0] = 'FR Class B &amp; C Okura Hotel, Amsterdam';
	copy['FR'][1] = 'FR Class B &amp; C Mahony Hall, Dublin';
	copy['FR'][2] = 'FR Class B &amp; C Pavillion, New Maltings';
	copy['FR'][3] = 'FR Class B &amp; C  Dakota Bar, Schiphol airport The Netherlands';
	copy['FR'][4] = 'FR Class B &amp; C Copenhagen Opera House rehersal room';
	copy['FR'][5] = 'FR Class B &amp; C Copenhagen Opera House';










function loadProductImages(productname)
{
	activeProduct = productname;
	for(i = 0; i < 6; i++)
	{
		productImages[i] = new Object();
		productImages[i].image = new Image();
		productImages[i].image.src = '/images/products/'+productname+'_'+(i + 1)+'.jpg';
		productImages[i].thumb_active = new Image();
		productImages[i].thumb_active.src = '/images/products/'+productname+'_'+(i + 1)+'_thumb_over.jpg'; 
		productImages[i].thumb_inactive = new Image();
		productImages[i].thumb_inactive.src = '/images/products/'+productname+'_'+(i + 1)+'_thumb.jpg';
	}

}




function showImage(id)
{
	if(id != activeImage)
	{
		var obj = productImages[id - 1];
		
		var parNode = document.getElementById('displayArea');
		var thumbsNode = document.getElementById('browserthumbs');
		var bannerNode;
		var imageNode;
		var captionNode;
		
		try
		{
			bannerNode = document.getElementById('banner');
			parNode.removeChild(bannerNode);
		}
		catch ( e )
		{
			 
		}
		captionNode = document.getElementById('caption'); 
		imageNode = document.getElementById('displayimage');
		captionNode.style.display = 'block';
		captionNode.innerHTML = copy[activeProduct][id - 1];

		imageNode.style.display = 'block';
		imageNode.src= obj.image.src;
		imageNode.alt = copy[activeProduct][id - 1];
		
		var newThumbImage = document.getElementById('thumb'+id);
		newThumbImage.src = obj.thumb_active.src;
		if(activeImage != undefined)
		{
			var oldThumb = document.getElementById('thumb'+activeImage);
			oldThumb.src = productImages[activeImage-1].thumb_inactive.src;
		}
		
		activeImage = id;
		
		
		
	}
}





