// scripts for Cartouche (main) and Mac's Cartouche
function test_combo(){
	if (document.doublecombo){
		document.doublecombo.vYear.selectedIndex = 0
		document.doublecombo.vBody.selectedIndex = 0
	}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// breadcrumbs script by Tom E.
function crumbs() {
	var page = new Array(9)
	page[0] = "<a href=\"model_t_products.asp\">Model T Products</a>"
	page[1] = "<a href=\"select_model_t.asp\">Select Model T Year &amp; Body</a>"
	page[2] = "<a href=\"model_a_products.asp\">Model A Products</a>"
	page[3] = "<a href=\"select_model_a.asp\">Select Model A Year &amp; Body</a>"
	page[4] = "<a href=\"early_v8_products.asp\">Early V8 Products</a>"
	page[5] = "<a href=\"select_early_v8.asp\">Select V8 Year &amp; Body</a>"
	page[6] = "<a href=\"request_samples.aspx\">Request Samples</a>"
	page[7] = "<a href=\"photo_gallery.asp\">Photo Gallery</a>"
	page[8] = "<a href=\"dealer_list.aspx\">Dealer List</a>"
	var divider = " &raquo; "
	var default_page = "<a href=\"index.htm\">Home</a>"
	var doctitle = document.title
	var args = crumbs.arguments;
  	var argtotal = args.length;
	if (argtotal >= 1)  { // if there is more than one argument
		if (args[0] == "Welcome") {
			document.write('Home')
		} else {
			document.write(default_page) // write the first home link
		}
		for (cnt = 0; cnt < argtotal; cnt++) { // loop through arguments // 
			if (cnt == (argtotal-1) ) { // is the current argument the last page?
				document.write(divider + args[cnt])
			} else {
				switch (args[cnt]){
					case "Model T Products":
						document.write(divider + page[0])
						break
					case "Select Model T Year &amp; Body":
						document.write(divider + page[1])
						break
					case "Model A Products":
						document.write(divider + page[2])
						break
					case "Select Model A Year &amp; Body":
						document.write(divider + page[3])
						break
					case "Early V8 Products":
						document.write(divider + page[4])
						break
					case "Select V8 Year &amp; Body":
						document.write(divider + page[5])
						break
					case "Photo Gallery":
						document.write(divider + page[7])
						break
					case "Request Samples":
						document.write(divider + page[6])
						break
					case "Dealer List":
						document.write(divider + page[8])
						break
					default : document.write(divider + args[cnt])
				}
			}
		}
	}
}

function warning(n_year, n_body) {
	if (n_year == "YEAR" || n_body == "NONE") {
		alert ("Please select a year or body style.")
		return false
	} else {
		alert ("After making a selection on the next page, you will be taken to our parent company website - Macs Antique Auto Parts (hosted by Parts 1-2-3) - for viewing and ordering all upholstery items.")
		return true	
	}
}
function change_Location() {
	window.location="http://www.macsautoparts.com/cartouche/select_early_v8.asp"
}
