/* 	French Ranges Support JavaScript Document
*	Author:			Barkingweb.com - Nick Barling (with assistance from Steve Waag)
*	Date:			November 15 2006	
*	Version:		1.0
*	File:			SelectRangeColor.js
*	Description:	JavaScript file to control range color and trim selections in your_colors.html page	
*	Notes:			This is a file to store external JavaScript. */

var color, trim, description;
// set color and description to a default value if color has not been changed. This needs to be done in case a trim is selected before a color is selected.
if (color == null)
{
	color = "bu_fw";
	description = "A Cluny 1400 Range in Burgundy Red";
}
function displayRange(selectColor, selectTrim, showDes)
{
	var rangeName;
	var trimDesc;
	if (selectColor != '')
		color = selectColor;
	if (selectTrim != '')
		trim = selectTrim;
	rangeName = "images/content/cluny1400" + color;
	if (trim == 'chrome')
	{
		rangeName += "_chrome";
		trimDesc = " with chrome trim";
	}
	else
	{
		trimDesc = " with brass trim";
	}
	rangeName += ".jpg";
	
	var rangeDescription;
	if (showDes != '')
		description = showDes;
	rangeDescription = description + trimDesc;
	document.getElementById('rangePict').src = rangeName;
	document.getElementById('rangeDes').innerHTML = rangeDescription;
}