var trim = [
{
code: '402',
color: ['Black','Ivory'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '403',
color: ['Green'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '406',
color: ['Green'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '404',
color: ['Blue'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '407',
color: ['Blue'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '405',
color: ['Red'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '408',
color: ['Maroon','Beige'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '409',
color: ['Black','Yellow'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '412',
color: ['Black','Ivory'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '415',
color: ['Red'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '416',
color: ['Green'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '417',
color: ['Blue'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '418',
color: ['Maroon','Beige'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '419',
color: ['Black','Yellow'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '422',
color: ['Black','Ivory'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '423',
color: ['Green'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '426',
color: ['Green'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '424',
color: ['Blue'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '427',
color: ['Green'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '425',
color: ['Red'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '428',
color: ['Maroon','Beige'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '429',
color: ['Black','Yellow'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '432',
color: ['Black','Ivory'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '435',
color: ['Red'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '433',
color: ['Green'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '434',
color: ['Blue'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '436',
color: ['Green'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '437',
color: ['Blue'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '438',
color: ['Maroon','Beige'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '439',
color: ['Black','Yellow'],
material: ['Leather'],
cloth: false,
vinyl: false,
leather: true
},
{
code: '440',
color: ['Gray','Gray'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '441',
color: ['Charcoal','Gray'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '441R',
color: ['Charcoal','Red'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '441B',
color: ['Blue','Blue'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '441G',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '442',
color: ['Charcoal','Red'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '443',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '443A',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '444',
color: ['Blue','Blue'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '444A',
color: ['Blue','Blue'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '445',
color: ['Charcoal','Gray'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '446',
color: ['Black','Ivory'],
material: ['Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '447',
color: ['Black','Red'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '448',
color: ['Green','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '449',
color: ['Blue','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '450',
color: ['Black','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '451',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '451A',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '452',
color: ['Black','Red'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '453',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '453A',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '454',
color: ['Blue','Blue'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '455',
color: ['Black','Gray'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '460',
color: ['Charcoal','Gray'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '461',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '462',
color: ['Charcoal','Red'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '463',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '464',
color: ['Blue','Blue'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '465',
color: ['Charcoal','Gray'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '466',
color: ['Black','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '467',
color: ['Black','Red','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '468',
color: ['Green','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '469',
color: ['Blue','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '470',
color: ['Black','Gray'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '472',
color: ['Black','Red'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '473',
color: ['Green','Green'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '474',
color: ['Blue','Blue'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '475',
color: ['Black','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '476',
color: ['Green','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '477',
color: ['Blue','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '478',
color: ['Black','Beige'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '479',
color: ['Green','Beige'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '480',
color: ['Blue','Beige'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '492',
color: ['Black','Silver','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '493',
color: ['Green','Silver','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '494',
color: ['Blue','Silver','Ivory'],
material: ['Cloth','Vinyl'],
cloth: true,
vinyl: true,
leather: false
},
{
code: '495',
color: ['Red','Beige'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '496',
color: ['Green','Beige'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '497',
color: ['Blue','Ivory'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '498',
color: ['Tan','Beige'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
},
{
code: '499',
color: ['Maroon','Beige'],
material: ['Vinyl'],
cloth: false,
vinyl: true,
leather: false
}
];

function trimPopulateSelect(selectName)
		{
			d=document.getElementById(selectName);
			if(!d){return;}	
			d.options.length=trim.length;
			for(var i=0;i<trim.length;i++)
			{
				d.options[i].text=trim[i].code;
				d.options[i].value=trim[i].code;
			}
		}

function trimGetSelect(value) {
    for(var i = 0; i < trim.length; i++) {
	    if (value == trim[i].code)
		    return trim[i];
	}
	return null;
}		
function trimShowSelect(element,value) {
    d=document.getElementById(element);
	if(!d){alert('element not found!');return;}	
    var selectedTrim = trimGetSelect(value);
	if (selectedTrim == null)
	    d.innerHTML='No value found';
	else {
	    var colors='<dl><lh>Color</lh>';
		for(var c=0; c<selectedTrim.color.length; c++) {
		    colors+='<dd>'+selectedTrim.color[c]+'</dd>';
		}
		colors+='</dl>';
		var materials='<dl><lh>Material</lh>';
		for (var m=0; m<selectedTrim.material.length; m++) {
		    materials+='<dd>'+selectedTrim.material[m]+'</dd>';
		}
		materials+='</dl>';
	    d.innerHTML='code='+selectedTrim.code+
		    colors+
			materials;
	
	
	}
}

