<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

//-->
function decodeCarLine(carLine, year, priceClass){



//		                          "          11"

//		                          "012345678901"

		     if (year == "6") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "7") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "8") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "9") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "0") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "1") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "2") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "3") i = "BCDJLPRVWXY".indexOf(carLine)

		else if (year == "4") i = "BCDJLPRVWXY".indexOf(carLine)



	if (i == 0) carLine += " = Plymouth Barracuda"

	else if (i == 1) carLine += " = Chrysler"

	else if (i == 2) carLine += " = Dodge Polara / Monaco"

	else if (i == 3) carLine += " = Dodge Challenger"

	else if (i == 4) carLine += " = Dodge Dart / Demon"

	else if (i == 5) carLine += " = Plymouth Fury"

	else if (i == 6){ 
		if(priceClass == "M"){
			carLine += " = Plymouth Road Runner";
		}else if(priceClass == "S"){
			carLine += " = Plymouth GTX";
		}else{
			carLine += " = Plymouth Belvedere/Satellite"
		}
	}else if (i == 7) carLine += " = Plymouth Valiant / Duster"

	else if (i == 8) carLine += " = Dodge Coronet / Charger"

	else if (i == 9) carLine += " = Dodge Charger"

	else if (i == 10) carLine += " = Imperial / LeBaron"

	else carLine += " = Unknown"



	return carLine

}



function decodePriceClass(carLine, priceClass, engine, year){



//	                          "         "

//	                          "0123456789"

	     if (year == "6") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "7") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "8") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "9") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "0") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "1") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "2") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "3") i = "LMHPSXKTGE".indexOf(priceClass)

	else if (year == "4") i = "LMHPSXKTGE".indexOf(priceClass)



	if (i == 0) priceClass += " = Low"



	else if (i == 1) {

		priceClass += " = Medium"

//		                          "         "

//		                          "012345678"

		     if (year == "6") i = "R~".indexOf(carLine)

		else if (year == "7") i = "R~".indexOf(carLine)

		else if (year == "8") i = "RW".indexOf(carLine)

		else if (year == "9") i = "RW".indexOf(carLine)

		else if (year == "0") i = "RW".indexOf(carLine)

		else if (year == "1") i = "R~".indexOf(carLine)

		else if (year == "2") i = "R~".indexOf(carLine)

		else if (year == "3") i = "R~".indexOf(carLine)

		else if (year == "4") i = "R~".indexOf(carLine)



		if (i == 0) priceClass += ", Road Runner"

		else if (i == 1) priceClass += ", Super Bee"

	}



	else if (i == 2) priceClass += " = High"



	else if (i == 3) {

		priceClass += " = Premium"

//		                          "         "

//		                          "012345678"

		     if (year == "6") i = "~~".indexOf(carLine)

		else if (year == "7") i = "~~".indexOf(carLine)

		else if (year == "8") i = "~~".indexOf(carLine)

		else if (year == "9") i = "~~".indexOf(carLine)

		else if (year == "0") i = "B~".indexOf(carLine)

		else if (year == "1") i = "B~".indexOf(carLine)

		else if (year == "2") i = "~~".indexOf(carLine)

		else if (year == "3") i = "~~".indexOf(carLine)

		else if (year == "4") i = "~~".indexOf(carLine)



		if (i == 0) priceClass += ", Gran Coupe"

	}



	else if (i == 4) {

		priceClass += " = Special"

//		                          "         "

//		                          "012345678"

		     if (year == "6") i = "B~~~~X".indexOf(carLine)

		else if (year == "7") i = "B~~R~X".indexOf(carLine)

		else if (year == "8") i = "B~~RWX".indexOf(carLine)

		else if (year == "9") i = "B~~RWX".indexOf(carLine)

		else if (year == "0") i = "BJ~RWX".indexOf(carLine)

		else if (year == "1") i = "BJ~R~X".indexOf(carLine)

		else if (year == "2") i = "B~J~~X".indexOf(carLine)

		else if (year == "3") i = "B~~~~X".indexOf(carLine)

		else if (year == "4") i = "B~~~~X".indexOf(carLine)



		if (i == 0) {

			if ((engine == "J") && (year == "0")) priceClass += ", AAR 'Cuda"

			else priceClass += ", 'Cuda"

		}

		else if (i == 1) {

			if ((engine == "J") && (year == "0")) priceClass += ", T/A"

			else priceClass += ", R/T"

		}else if (i == 2){
			 priceClass += ", Rallye";
		}else if (i == 3){
			priceClass += ", GTX";
		}else if ((i == 4) || (i == 5)) priceClass += ", R/T"

	}



	else if (i == 5) priceClass += " = Fast Top, Charger 500 or Daytona Charger"

	else if (i == 6) priceClass += " = Police"

	else if (i == 7) priceClass += " = Taxi"

	else if (i == 8) priceClass += " = New York Taxi"

	else if (i == 9) priceClass += " = Economy"

	else priceClass += " = Unknown"



	return priceClass

}



function decodeBodyType(bodyType){

	if (bodyType == "21") bodyType += " = 2 Door Coupe"

	else if (bodyType == "23") bodyType += " = 2 Door Hardtop"

	else if (bodyType == "27") bodyType += " = Convertible"

	else if (bodyType == "29") bodyType += " = 2 Door Sports Hardtop"

	else if (bodyType == "41") bodyType += " = 4 Door Sedan"

	else if (bodyType == "43") bodyType += " = 4 Door Hardtop"

	else if (bodyType == "45") bodyType += " = 6 Passenger Wagon"

	else if (bodyType == "46") bodyType += " = 9 Passenger Wagon"

	else bodyType += " = Unknown"



	return bodyType

}

function decodeEngine(engine, year){
	i = -1
	if (lateVin) {
//		                          "          11111111112222222222333333333344444444445555555"
//		                          "012345678901234567890123456789012345678901234567890123456"
		     if (year == "6") i = "~A~~~~~B~~~~~~C~~~~~D~~E~~~~~~~~~~F~~~~G~~~~~~~H~~~~~~~~~".indexOf(engine)
		else if (year == "7") i = "~~A~~~~B~~~~~~C~~D~E~~~F~~~~~~~~~~~G~~~H~~~~~~~JL~~~~~~~~".indexOf(engine)
		else if (year == "8") i = "~~A~~~~B~~~~~~C~~~D~~~~F~~~P~~~~~~~~~G~~H~~~~~~JL~~~~~~~M".indexOf(engine)
		else if (year == "9") i = "~~A~~~~B~~~~~~C~~~D~~~~F~~~P~~~~~~~~~G~~H~~~~~~JL~~~~~~M~".indexOf(engine)
		else if (year == "0") i = "~~~B~~~C~~~~~~E~~~~~~~~G~~~H~J~~~~~~~L~~N~~~~~~RU~~~~~~VZ".indexOf(engine)
		else if (year == "1") i = "~~~B~~~C~~~~~~E~~~~~~~~G~~~H~~~~~~~~L~N~~~~~~~~R~U~~~V~~Z".indexOf(engine)
		else if (year == "2") i = "~~~~B~~~C~~~~~E~~~~~~~~~G~~~H~~~~~~~~~~~~M~~P~~~~~~U~~V~Z".indexOf(engine)
		else if (year == "3") i = "~~~~~B~~~C~~~~E~~~~~~~~~~G~~H~~K~~~~~~~~~~M~~P~~~~U~~~~~Z".indexOf(engine)
		else if (year == "4") i = "~~~~~B~~~C~~~~E~~~~~~~~~~G~~~~K~JL~~~~~~~~MN~~P~~~~~U~~~Z".indexOf(engine)
	}
	
	if (i == 0) engine += " = Special Order Engine"
	else if (i == 1) engine += " = 170 101HP 1-1BBL 6 CYL"
	else if (i == 2) engine += " = 170 115HP 1-1BBL 6 CYL"
	else if (i == 3) engine += " = 198 125HP 1-1BBL 6 CYL"
	else if (i == 4) engine += " = 198 100HP(net) 1-1BBL 6 CYL"
	else if (i == 5) engine += " = 198 95HP(net) 1-1BBL 6 CYL"
	else if (i == 6) engine += " = 215 Low Comp 6 CYL"
	else if (i == 7) engine += " = 225 145HP 1-1BBL 6 CYL"
	else if (i == 8) engine += " = 225 110HP(net) 1-1BBL 6 CYL"
	else if (i == 9) engine += " = 225 105HP(net) 1-1BBL 6 CYL"
	else if (i == 10) engine += " = 225 1-1BBL 6 CYL HD"
	else if (i == 11) engine += " = 225 1-1BBL 6 CYL For Export"
	else if (i == 12) engine += " = 225 1-2BBL 6 CYL"
	else if (i == 13) engine += " = 245 C.I. 6 CYL (Australia)"
	else if (i == 14) engine += " = Special Order 6 CYL"
	else if (i == 15) engine += " = 265 C.I. 6 CYL (Australia)"
	else if (i == 16) engine += " = 265 6-Pack 6 CYL (Australia)"
	else if (i == 17) engine += " = 273 180HP 1-2BBL 8 CYL"
	else if (i == 18) engine += " = 273 190HP 1-2BBL 8 CYL"
	else if (i == 19) engine += " = 273 235HP 1-4BBL 8 CYL"
	else if (i == 20) engine += " = 273 180HP 1-2BBL or 235HP 1-4BBL 8 CYL"
	else if (i == 21) engine += " = 273 235HP or 275HP 1-4BBL 8 CYL"
	else if (i == 22) engine += " = 318 5.2BBL 8 CYL"
	else if (i == 23) engine += " = 318 230HP 1-2BBL 8 CYL"
	else if (i == 24) engine += " = 318 150HP(net) or 155HP(net) 1-2BBL 8 CYL"
	else if (i == 25) engine += " = 318 150HP(net) or 170HP(net) 1-2BBL 8 CYL"
	else if (i == 26) engine += " = 318 170HP 1-2BBL 8 CYL"
	else if (i == 27) engine += " = 340 275HP 1-4BBL 8 CYL"
	else if (i == 28) engine += " = 340 240HP(net) 1-4BBL 8 CYL"
	else if (i == 29) engine += " = 340 290HP 3-2BBL 8 CYL"
	else if (i == 30) engine += " = 360 180HP(net) 1-2BBL 8 CYL"
	else if (i == 31) engine += " = 360 170HP(net) 1-2BBL 8 CYL"
	else if (i == 32) engine += " = 360 200HP(net) or 245HP(net) 1-4BBL 8 CYL"
	else if (i == 33) engine += " = 360 245HP(net) 1-4BBL 8 CYL HP"
	else if (i == 34) engine += " = 361 265HP 1-2BBL 8 CYL"
	else if (i == 35) engine += " = 383 270HP 1-2BBL 8 CYL"
	else if (i == 36) engine += " = 383 275HP 1-2BBL 8 CYL"
	else if (i == 37) engine += " = 383 290HP 1-2BBL 8 CYL"
	else if (i == 38) engine += " = 383 300HP 1-4BBL 8 CYL"
	else if (i == 39) engine += " = 383 325HP 1-4BBL 8 CYL"
	else if (i == 40) engine += " = 383 330HP OR 335HP 1-4BBL 8 CYL"
	else if (i == 41) engine += " = 400 190HP(net) 1-2BBL 8 CYL"
	else if (i == 42) engine += " = 400 175HP(net) OR 185HP(net) 1-2BBL 8 CYL"
	else if (i == 43) engine += " = 400 205HP(net) 1-4BBL 8 CYL"
	else if (i == 44) engine += " = 400 255HP(net) 1-4BBL 8 CYL"
	else if (i == 45) engine += " = 400 260HP(net) 1-4BBL 8 CYL"
	else if (i == 46) engine += " = 400 250HP(net) 1-4BBL 8 CYL"
	else if (i == 47) engine += " = 426 HEMI 425HP 2-4BBL 8 CYL"
	else if (i == 48) engine += " = 440 375HP 1-4BBL 8 CYL"
	else if (i == 49) engine += " = 440 370HP 1-4BBL 8 CYL"
	else if (i == 50) engine += " = 440 280HP(net) 1-4BBL 8 CYL"
	else if (i == 51) engine += " = 440 280HP(net) or 290HP(net) 1-4BBL 8 CYL"
	else if (i == 52) engine += " = 440 275HP(net) 1-4BBL 8 CYL"
	else if (i == 53) engine += " = 440 385HP 3-2BBL 8 CYL"
	else if (i == 54) engine += " = 440 330HP(net) 3-2BBL 8 CYL"
	else if (i == 55) engine += " = 440 390HP 3-2BBL 8 CYL"
	else if (i == 56) engine += " = Special Order 8 CYL"
	else engine += " = Unknown"
	
	return engine
}

function decodeModelYear(modelYear){
	if(modelYear == "o" || modelYear == "O"){
		modelYear = "0";
	}
	if (lateVin) {
		if ((modelYear == "6")||(modelYear == "7")||(modelYear == "8")||(modelYear == "9")) modelYear += " = 196" + modelYear
		else modelYear += " = 197" + modelYear
	}else {
		modelYear += " = 196" + modelYear
	}
	return modelYear
}
function decodeAssemblyPlant(assemblyPlant){
	if ((assemblyPlant == "A") || (assemblyPlant == "1")) assemblyPlant += " = Lynch Road, MI, USA"
	else if ((assemblyPlant == "B") || (assemblyPlant == "2")) assemblyPlant += " = Dodge Main, Hamtramck, MI, USA"
	else if ((assemblyPlant == "C") || (assemblyPlant == "3")) assemblyPlant += " = Jefferson Avenue, MI, USA"
	else if ((assemblyPlant == "D") || (assemblyPlant == "4")) assemblyPlant += " = Belvidere, IL, USA"
	else if ((assemblyPlant == "E") || (assemblyPlant == "5")) assemblyPlant += " = Los Angeles, CA, USA"
	else if ((assemblyPlant == "F") || (assemblyPlant == "6")) assemblyPlant += " = Newark, DE, USA"
	else if ((assemblyPlant == "G") || (assemblyPlant == "7")) assemblyPlant += " = St. Louis, MO, USA"
	else if (assemblyPlant == "H") assemblyPlant += " = New Stanton, PA, USA"
	else if ((assemblyPlant == "P") || (assemblyPlant == "8")) assemblyPlant += " = Export"
	else if ((assemblyPlant == "R") || (assemblyPlant == "9")) assemblyPlant += " = Windsor, ONT, CAN"
	else assemblyPlant += " = Unknown"
	return assemblyPlant
}
function decodeVin(vin,view)
{
entry = vin;
lateVin = 1;

var carLine = entry.substring(0,1)
var carLine = entry.substring(0,1)		
var priceClass = entry.substring(1,2)		
var bodyType = entry.substring(2,4)		
var engine = entry.substring(4,5)		
var modelYear = entry.substring(5,6)		
var assemblyPlant = entry.substring(6,7)
if(modelYear == "o" || modelYear == "O"){
	modelYear = 0;
}
carLine = carLine.toUpperCase()
priceClass = priceClass.toUpperCase()
engine = engine.toUpperCase()
assemblyPlant = assemblyPlant.toUpperCase()
carLine = decodeCarLine(carLine, modelYear, priceClass)
priceClass = decodePriceClass(carLine, priceClass, engine, modelYear)
bodyType = decodeBodyType(bodyType)
engine = decodeEngine(engine, modelYear)
modelYear = decodeModelYear(modelYear)
assemblyPlant = decodeAssemblyPlant(assemblyPlant)
if(view == 1){
	return "<div style=\"margin-bottom:3px;\">"+carLine+"</div><div style=\"margin-bottom:3px;\">"+priceClass+"</div><div style=\"margin-bottom:3px;\">"+bodyType+"</div>"
}else if(view == 2){
	return "<div style=\"margin-bottom:3px;\">"+engine+"</div><div style=\"margin-bottom:3px;\">"+modelYear+"</div><div style=\"margin-bottom:3px;\">"+assemblyPlant+"</div>"
}else if(view == 3){
	return "Decoding of "+modelYear.substr(4,modelYear.length-4)+" "+carLine.substr(4,carLine.length-4)
}else if(view == 4){
	return year
}
}
	function getBodyType(vin){
		carCode = vin.substring(0,1);
		year = vin.substring(5,6);
		if(carCode=="B"){
			if(year<5){
				bodyType = "E";
			}else{
				bodyType = "A";
			}
		}else if(carCode == "C"){
			bodyType = "C";
		}else if(carCode == "D"){
			bodyType = "C";
		}else if(carCode == "J"){
			bodyType = "E";
		}else if(carCode == "L"){
			bodyType = "A";
		}else if(carCode == "P"){
			bodyType = "C";
		}else if(carCode == "R"){
			bodyType = "B";
		}else if(carCode == "V"){
			bodyType = "A";
		}else if(carCode == "W"){
			bodyType = "B";
		}else if(carCode == "X"){
			bodyType = "B";
		}else if(carCode == "Y"){
			if(year < 2 || year > 7){
				bodyType = "C";
			}else{
				bodyType = "D";
			}
		}
		return bodyType
	}
	function getDateCode(code)
	{
        url = location.href;
		var_start = url.indexOf("DateCode=");
		val_start = var_start+9;
        date = url.substr(val_start,3);
        if(date !=  ""){
            digit_1 = date.substr(0,1);
	    digit_23 = date.substr(1,2);
        }
        if(!isNaN(digit_1)){
		month = digit_1;
	}else{
		if(digit_1 == "A"){
			month == 10;
		}else if(digit_1 == "B"){
			month = 11;
		}else if(digit_1 == "C"){
			month = 12;
		}
	}
	day = digit_23;
	if(month > 7){
		year = code-1;
	}else{
		year = code;
	}
        date_return = month+"/"+day+"/"+year;
	return date_return
	}
	
	function decodeInterior(code){
		digit_1 = code.substr(0,1)
		digit_1 = digit_1.toUpperCase()
		digit_2 = code.substr(1,1)
		if(isNaN(digit_2)){
			digit_2 = digit_2.toUpperCase();
		}
		digit_3 = code.substr(2,1);
		if(isNaN(digit_3)){
			digit_3 = digit_3.toUpperCase()
		}
		digit_4 = code.substr(3,1);	
		if(!isNaN(digit_4)){
			digit_34 = String(digit_3) + String(digit_4);
		}else{
			digit_34 = digit_3
		}
			if(digit_1 == "A"){
				trim_grade = "A Class";
			}else if(digit_1 == "B"){
				trim_grade = "B Class";
			}else if(digit_1 == "C"){
				trim_grade = "Charger";
			}else if(digit_1 == "D"){
				trim_grade = "Deluxe";
			}else if(digit_1 == "E"){
				trim_grade = "Economy";
			}else if(digit_1 == "F"){
				trim_grade = "F Class";
			}else if(digit_1 == "G"){
				trim_grade = "G Class";
			}else if(digit_1 == "H"){
				trim_grade = "High";
			}else if(digit_1 == "J"){
				trim_grade = "J Class";
			}else if(digit_1 == "K"){
				trim_grade = "Police";
			}else if(digit_1 == "L"){
				trim_grade = "Low";
			}else if(digit_1 == "M"){
				trim_grade = "Medium";
			}else if(digit_1 == "N"){
				trim_grade = "N Class";
			}else if(digit_1 == "P"){
				trim_grade = "Premium";
			}else if(digit_1 == "Q"){
				trim_grade = "Q Class";
			}else if(digit_1 == "R"){
				trim_grade = "R Class";
			}else if(digit_1 == "S"){
				trim_grade = "Sport";
			}else if(digit_1 == "T"){
				trim_grade = "Taxi";
			}else if(digit_1 == "V"){
				trim_grade = "V Class";
			}else if(digit_1 == "W"){
				trim_grade = "W Class";
			}else if(digit_1 == "X"){
				trim_grade = "X Class";
			}
		// Trim Style
			if(digit_2 == "1"){
				trim_style = "Cloth and Vinyl Bench";
			}else if(digit_2 == "2"){
				trim_style = "Vinyl Bench";
			}else if(digit_2 == "3"){
				trim_style = "Cloth and Vinyl Split Bench w/ Center Armrest";
			}else if(digit_2 == "4"){
				trim_style = "Vinyl Split Bench w/ Center Armrest";
			}else if(digit_2 == "5"){
				trim_style = "Cloth and Vinyl Bucket Seats";
			}else if(digit_2 == "6"){
				trim_style = "Vinyl Bucket Seats";
			}else if(digit_2 == "7"){
				trim_style = "Cloth and Vinyl 50/50 Split Bench Seat";
			}else if(digit_2 == "8"){
				trim_style = "Vinyl 50/50 Split Bench Seat";
			}else if(digit_2 == "9"){
				trim_style = "Vinyl Bench Seat";
			}else if(digit_2 == "H"){
				trim_style = "Vinyl, Special Design";
			}else if(digit_2 == "S"){
				trim_style = "Leather Bucket Seats";
			}else if(digit_2 == "L"){
				trim_style = "Leather 50/50 Split Bench Seat";
			}else if(digit_2 == "B"){
				trim_style = "Vinyl and Leather Split Bench Seat w/ Center Armrest";
			}else if(digit_2 == "P"){
				trim_style = "Vinyl and Leather Split Bench Seat";
			}else if(digit_2 == "R"){
				trim_style = "Vinyl and Leather Bucket Seats";
			}
		// Trim Color
			if(digit_34 == "B5"){
				trim_color = "Medium Blue";
			}else if(digit_34 == "X9"){
				trim_color = "Black";
			}else if(digit_34 == "XX"){
				trim_color = "White and Black";
			}else if(digit_34 == "C7"){
				trim_color = "Blue and White";
			}else if(digit_34 == "A5"){
				trim_color = "Gray";
			}else if(digit_34 == "A8"){
				trim_color = "Black Frost";
			}else if(digit_34 == "A"){
				trim_color = "Gray";
			}else if(digit_34 == "A9"){
				trim_color = "Dark Gray";
			}else if(digit_34 == "B"){
				trim_color = "Light Blue";
			}else if(digit_34 == "B2"){
				trim_color = "Light Blue";
			}else if(digit_34 == "B3"){
				trim_color = "Light Blue";
			}else if(digit_34 == "B6"){
				trim_color = "Medium Blue";
			}else if(digit_34 == "B7"){
				trim_color = "Dark Blue";
			}else if(digit_34 == "B8"){
				trim_color = "Dark Blue";
			}else if(digit_3 == "C"){
				trim_color = "Blue and White";
			}else if(digit_3 == "D"){
				trim_color = "Dark Blue";
			}else if(digit_34 == "E"){
				trim_color = "Briar";
			}else if(digit_34 == "E4"){
				trim_color = "Red";
			}else if(digit_34 == "E8"){
				trim_color = "Russet";
			}else if(digit_34 == "F"){
				trim_color = "White and Green";
			}else if(digit_34 == "F4"){
				trim_color = "Light Green";
			}else if(digit_34 == "F6"){
				trim_color = "Green";
			}else if(digit_34 == "F7"){
				trim_color = "Green";
			}else if(digit_34 == "F8"){
				trim_color = "Green";
			}else if(digit_34 == "G"){
				trim_color = "Green";
			}else if(digit_34 == "G6"){
				trim_color = "White and Green";
			}else if(digit_3 == "H"){
				trim_color = "White and Tan";
			}else if(digit_34 == "B8"){
				trim_color = "Dark Blue";
			}else if(digit_34 == "K"){
				trim_color = "Walnut and Beige";
			}else if(digit_34 == "K4"){
				trim_color = "Burnt Orange";
			}else if(digit_34 == "L"){
				trim_color = "Champagne and Black";
			}else if(digit_34 == "L2"){
				trim_color = "Beige";
			}else if(digit_34 == "L3"){
				trim_color = "Parchment";
			}else if(digit_3 == "M"){
				trim_color = "Burgandy";
			}else if(digit_3 == "N"){
				trim_color = "Black, Gold, and Black";
			}else if(digit_34 == "P6"){
				trim_color = "Teal";
			}else if(digit_3 == "Q"){
				trim_color = "Turquiose";
			}else if(digit_34 == "R"){
				trim_color = "Red";
			}else if(digit_34 == "R9"){
				trim_color = "Ox Blood";
			}else if(digit_3 == "S"){
				trim_color = "Pewter and Black";
			}else if(digit_34 == "T"){
				trim_color = "Saddle Tan";
			}else if(digit_34 == "T3"){
				trim_color = "Light Tan";
			}else if(digit_34 == "T5"){
				trim_color = "Saddle Tan";
			}else if(digit_34 == "T7"){
				trim_color = "Chestnut";
			}else if(digit_3 == "U"){
				trim_color = "Saddle Tan and Black";
			}else if(digit_3 == "W"){
				trim_color = "White and Black";
			}else if(digit_34 == "X9"){
				trim_color = "Black";
			}else if(digit_34 == "X"){
				trim_color = "Black";
			}else if(digit_34 == "Y"){
				trim_color = "Gold";
			}else if(digit_34 == "Y3"){
				trim_color = "Light Gold";
			}else if(digit_34 == "Y4"){
				trim_color = "Gold";
			}else if(digit_34 == "Y5"){
				trim_color = "Medium Gold";
			}else{
				trim_color = "Unknown";
			}
		return "<div style=\"margin-bottom:3px;\">Trim Grade/Style/Color</div><div style=\"margin-bottom:3px;\">"+digit_1+" = "+trim_grade+"</div><div style=\"margin-bottom:3px;\">"+digit_2+" = "+trim_style+"</div><div style=\"margin-bottom:3px;\">"+digit_34+" = "+trim_color+"</div>"
	}
	function getTheYear(dateCode,year){
		month = dateCode.substr(0,1);
		day = dateCode.substr(1,2);
		if(year == "o" || year == "O"){
			year = 0;
		}
		if(isNaN(month)){
			if(month == "A"){
				month = 10;
				subtract = 1;
			}else if(month == "B"){
				month = 11;
				subtract = 1;
			}else if(month == "C"){
				month = 12;
				subtract = 1;
			}
		}else{
			if(month>7){
				subtract = 1;
			}else{
				subtract = 0;
			}
		}
		if ((year == "6") || (year == "7")||(year == "8")||(year == "9")) year = "196" + year
		else year = "197" + year
		if(isNaN(day)){
			return "Error"
		}

		year = year - subtract;
		return "Date Built: "+month + " / " + day + " / " + year
	}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  if(document.form1.Code26.value.length == 4){
	  invalid_tag = "This decoder only currently supports 1969 - 1974 fender tags, sorry.";
  }else{
	  invalid_tag = "";
  }
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors+invalid_tag);
  if(invalid_tag != "") alert(invalid_tag);
  document.MM_returnValue = (errors == '');
}