// ----------------------------------------
// Mouse-overs
// ----------------------------------------

function hiLite(imgName,imgObjName) {
	if (document.images) {
	document.images[imgName].src = eval(imgObjName + ".src");
	}}

// ----------------------------------------
// Open new window - no scrollbars, no resize
// ----------------------------------------

function openWin(url,name,w,h) {
      var att = "WIDTH="+ w +",HEIGHT="+ h +",TOOLBAR=NO,SCROLLBARS=NO,MENU=NO,STATUS=NO,RESIZABLE=NO,TOP=50,LEFT=200"
      window.open(url,name,att);
      }

// ----------------------------------------
// Open new window - scrollbars and resize
// ----------------------------------------

function openWinSB(url,name,w,h) {
      var att = "WIDTH="+ w +",HEIGHT="+ h +",TOOLBAR=NO,SCROLLBARS=YES,MENU=NO,STATUS=NO,RESIZABLE=YES,TOP=50,LEFT=200"
      window.open(url,name,att);
      }

// ----------------------------------------
// Open new window - scrollbars and resize
// ----------------------------------------

function openInfoWin(url,name) {
	if (screen) {
		w = screen.width
		h = screen.height
		}
	else {
		w = 640
		h = 480
		}
      var att = "WIDTH="+ w +",HEIGHT="+ h +",TOOLBAR=YES,SCROLLBARS=YES,MENU=yes,STATUS=yes,RESIZABLE=YES,TOP=0,LEFT=0"
      extrawindow = window.open(url,name,att);
      extrawindow.focus()
      }

// ----------------------------------------
// Sales Rep Locator
// ----------------------------------------

function findrep(scode, sname)  {
	repname = ["not found","being re-assigned.  Please call JAM",,"TOM PARMA","JON WOLFERT",,,,"TOP FORMAT PRODUCTIONS",
	"CARY BASS",,"STEVE ENGLAND"];
	if (scode == 0)  {
	alert("Sorry, that is not a valid selection.");
	}
	else alert("The JAM sales rep for " + sname + " is " + repname[scode] + ".");
	}

// ----------------------------------------
// Begin a table cell
// ----------------------------------------

function rowstart() {
	document.write("<TR><TD>")
	}

// ----------------------------------------
// End a table cell
// ----------------------------------------

function rowend() {
	document.write("</TD></TR>")
	}

// ----------------------------------------
// Insert menu bar spacer
// ----------------------------------------

function space(path) {
	document.write("<IMG SRC=\"" + path + "gfx/nav_spacer.gif\" WIDTH=120 HEIGHT=8 BORDER=0>")
	}

// ----------------------------------------
// Creates table of menu navigation buttons
// Function passed as "urhere" indicates which button set to grey out
// ----------------------------------------

function navwrite(urhere,path2use) {

// If the path2use variable exists, it indicates the call is from the cgi-bin directory
// so adjust the pathway to the graphics files.  (For most pages the path2use parameter
// will be undefined, because it was added much later.)

	if (path2use) {
		path="../jam/"	
	}
	else {
		path="../"	
	}

// Pre-load images for rollovers

	if (document.images) {
	nav_home_1 = new Image(120,28); nav_home_1.src = path + "gfx/nav_home_1.gif";
	nav_home_2 = new Image(120,28); nav_home_2.src = path + "gfx/nav_home_2.gif";
	nav_home_3 = new Image(120,28); nav_home_3.src = path + "gfx/nav_home_3.gif";

	nav_radio_1 = new Image(120,28); nav_radio_1.src = path + "gfx/nav_radio_1.gif";
	nav_radio_2 = new Image(120,28); nav_radio_2.src = path + "gfx/nav_radio_2.gif";
	nav_radio_3 = new Image(120,28); nav_radio_3.src = path + "gfx/nav_radio_3.gif";

	nav_demo_1 = new Image(120,28); nav_demo_1.src = path + "gfx/nav_demo_1.gif";
	nav_demo_2 = new Image(120,28); nav_demo_2.src = path + "gfx/nav_demo_2.gif";
	nav_demo_3 = new Image(120,28); nav_demo_3.src = path + "gfx/nav_demo_3.gif";

	nav_lyric_1 = new Image(120,28); nav_lyric_1.src = path + "gfx/nav_lyric_1.gif";
	nav_lyric_2 = new Image(120,28); nav_lyric_2.src = path + "gfx/nav_lyric_2.gif";
	nav_lyric_3 = new Image(120,28); nav_lyric_3.src = path + "gfx/nav_lyric_3.gif";

	nav_pams_1 = new Image(120,28); nav_pams_1.src = path + "gfx/nav_pams_1.gif";
	nav_pams_2 = new Image(120,28); nav_pams_2.src = path + "gfx/nav_pams_2.gif";
	nav_pams_3 = new Image(120,28); nav_pams_3.src = path + "gfx/nav_pams_3.gif";

	nav_tv_1 = new Image(120,28); nav_tv_1.src = path + "gfx/nav_tv_1.gif";
	nav_tv_2 = new Image(120,28); nav_tv_2.src = path + "gfx/nav_tv_2.gif";
	nav_tv_3 = new Image(120,28); nav_tv_3.src = path + "gfx/nav_tv_3.gif";

	nav_comm_1 = new Image(120,28); nav_comm_1.src = path + "gfx/nav_comm_1.gif";
	nav_comm_2 = new Image(120,28); nav_comm_2.src = path + "gfx/nav_comm_2.gif";
	nav_comm_3 = new Image(120,28); nav_comm_3.src = path + "gfx/nav_comm_3.gif";

	nav_prod_1 = new Image(120,28); nav_prod_1.src = path + "gfx/nav_prod_1.gif";
	nav_prod_2 = new Image(120,28); nav_prod_2.src = path + "gfx/nav_prod_2.gif";
	nav_prod_3 = new Image(120,28); nav_prod_3.src = path + "gfx/nav_prod_3.gif";

	nav_pc_1 = new Image(120,28); nav_pc_1.src = path + "gfx/nav_pc_1.gif";
	nav_pc_2 = new Image(120,28); nav_pc_2.src = path + "gfx/nav_pc_2.gif";
	nav_pc_3 = new Image(120,28); nav_pc_3.src = path + "gfx/nav_pc_3.gif";

	nav_contact_1 = new Image(120,28); nav_contact_1.src = path + "gfx/nav_contact_1.gif";
	nav_contact_2 = new Image(120,28); nav_contact_2.src = path + "gfx/nav_contact_2.gif";
	nav_contact_3 = new Image(120,28); nav_contact_3.src = path + "gfx/nav_contact_3.gif";

	nav_about_1 = new Image(120,28); nav_about_1.src = path + "gfx/nav_about_1.gif";
	nav_about_2 = new Image(120,28); nav_about_2.src = path + "gfx/nav_about_2.gif";
	nav_about_3 = new Image(120,28); nav_about_3.src = path + "gfx/nav_about_3.gif";

	nav_fans_1 = new Image(120,28); nav_fans_1.src = path + "gfx/nav_fans_1.gif";
	nav_fans_2 = new Image(120,28); nav_fans_2.src = path + "gfx/nav_fans_2.gif";
	nav_fans_3 = new Image(120,28); nav_fans_3.src = path + "gfx/nav_fans_3.gif";

	nav_store_1 = new Image(120,28); nav_store_1.src = path + "gfx/nav_store_1.gif";
	nav_store_2 = new Image(120,28); nav_store_2.src = path + "gfx/nav_store_2.gif";
	nav_store_3 = new Image(120,28); nav_store_3.src = path + "gfx/nav_store_3.gif";

	R01 = new Image(16,16); R01.src = path + "gfx/R01.gif";	
	R02 = new Image(16,16); R02.src = path + "gfx/R02.gif";
	M01 = new Image(16,16); M01.src = path + "gfx/M01.gif";	
	M02 = new Image(16,16); M02.src = path + "gfx/M02.gif";	
	L01 = new Image(16,16); L01.src = path + "gfx/L01.gif";	
	L02 = new Image(16,16); L02.src = path + "gfx/L02.gif";
	}

// Begin the table

	document.write("<CENTER>")
	document.write("<TABLE WIDTH=120 BORDER=0 CELLSPACING=3 CELLPADDING=0>")

// Item 1

	rowstart()
		document.write("<A HREF=\"" + path + "index.html\" onMouseOver=\"hiLite('Nav1','nav_home_2')\"onMouseOut=\"hiLite('Nav1','nav_home_1')\" onMouseDown=\"hiLite('Nav1','nav_home_3')\">")
		document.write("<IMG SRC=\"" + path + "gfx/nav_home_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav1\" ALT=\"JAM Home Page\"></A>")
	rowend()

// Spacer

	rowstart()
	space(path)
	rowend()
	
// Item 2

	rowstart()
		if (urhere==2) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_radio_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav2\" ALT=\"You are here!\">")
			}
		else {
			document.write("<A HREF=\"" + path + "radioids/index.html\" onMouseOver=\"hiLite('Nav2','nav_radio_2')\" onMouseOut=\"hiLite('Nav2','nav_radio_1')\" onMouseDown=\"hiLite('Nav2','nav_radio_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_radio_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav2\" ALT=\"Radio ID's\"></A>")
		}
	rowend()

// Item 3

	rowstart()
		if (urhere==3) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_demo_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav3\" ALT=\"You are here!\"></A>")
		}
		else {
			document.write("<A HREF=\"" + path + "radioids/demodl.html\" onMouseOver=\"hiLite('Nav3','nav_demo_2')\" onMouseOut=\"hiLite('Nav3','nav_demo_1')\" onMouseDown=\"hiLite('Nav3','nav_demo_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_demo_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav3\" ALT=\"Demo downloads\"></A>")
		}
	rowend()

// Item 4

	rowstart()
		if (urhere==4) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_lyric_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav4\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "radioids/packlist_1.html\" onMouseOver=\"hiLite('Nav4','nav_lyric_2')\" onMouseOut=\"hiLite('Nav4','nav_lyric_1')\" onMouseDown=\"hiLite('Nav4','nav_lyric_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_lyric_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav4\" ALT=\"Lyric sheets\"></A>")
		}
	rowend()

// Item 5

	rowstart()
		document.write("<A HREF=\"http://www.pams.com\" onMouseOver=\"hiLite('Nav5','nav_pams_2')\" onMouseOut=\"hiLite('Nav5','nav_pams_1')\" onMouseDown=\"hiLite('Nav5','nav_pams_3')\">")
		document.write("<IMG SRC=\"" + path + "gfx/nav_pams_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav5\" ALT=\"PAMS Productions website\"></A>")
	rowend()

// Spacer

	rowstart()
	space(path)
	rowend()

// Item 6

	rowstart()
		if (urhere==6) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_tv_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav6\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "tv/index.html\" onMouseOver=\"hiLite('Nav6','nav_tv_2')\" onMouseOut=\"hiLite('Nav6','nav_tv_1')\" onMouseDown=\"hiLite('Nav6','nav_tv_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_tv_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav6\" ALT=\"TV Music\"></A>")
		}
	rowend()

// Item 7

	rowstart()
		if (urhere==7) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_comm_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav7\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "commercials/index.html\" onMouseOver=\"hiLite('Nav7','nav_comm_2')\" onMouseOut=\"hiLite('Nav7','nav_comm_1')\" onMouseDown=\"hiLite('Nav7','nav_comm_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_comm_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav7\" ALT=\"Commercials\"></A>")
		}
	rowend()

// Item 8

//	rowstart()
//		if (urhere==8) {
//			document.write("<IMG SRC=\"" + path + "gfx/nav_prod_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav8\" ALT=\"You are here!\"></A>")
//			}
//		else {
//			document.write("<A HREF=\"" + path + "libraries/index.html\" onMouseOver=\"hiLite('Nav8','nav_prod_2')\" onMouseOut=\"hiLite('Nav8','nav_prod_1')\" onMouseDown=\"hiLite('Nav8','nav_prod_3')\">")
//			document.write("<IMG SRC=\"" + path + "gfx/nav_prod_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav8\" ALT=\"Production music\"></A>")
//		}
//	rowend()

// Item 9

	rowstart()
		if (urhere==9) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_pc_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav9\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "collector/jampersonal.html\" onMouseOver=\"hiLite('Nav9','nav_pc_2')\" onMouseOut=\"hiLite('Nav9','nav_pc_1')\" onMouseDown=\"hiLite('Nav9','nav_pc_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_pc_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav9\" ALT=\"Personal Cuts\"></A>")
		}
	rowend()

// Spacer

	rowstart()
	space(path)
	rowend()

// Item 10
	rowstart()
		if (urhere==10) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_contact_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav10\" ALT=\"You are here!\">")
			}
		else {
			document.write("<A HREF=\"" + path + "jaminfo/index.html\" onMouseOver=\"hiLite('Nav10','nav_contact_2')\" onMouseOut=\"hiLite('Nav10','nav_contact_1')\" onMouseDown=\"hiLite('Nav10','nav_contact_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_contact_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav10\" ALT=\"Contact JAM\"></A>")
		}
		rowend()

// Item 11

	rowstart()
		if (urhere==11) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_about_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav11\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "jaminfo/about.html\" onMouseOver=\"hiLite('Nav11','nav_about_2')\" onMouseOut=\"hiLite('Nav11','nav_about_1')\" onMouseDown=\"hiLite('Nav11','nav_about_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_about_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav11\" ALT=\"About JAM\"></A>")
		}	
	rowend()

// Item 12

	rowstart()
		if (urhere==12) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_fans_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav12\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"" + path + "collector/index.html\" onMouseOver=\"hiLite('Nav12','nav_fans_2')\" onMouseOut=\"hiLite('Nav12','nav_fans_1')\" onMouseDown=\"hiLite('Nav12','nav_fans_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_fans_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav12\" ALT=\"For Collectors and Fans\"></A>")
		}
	rowend()

// Spacer

	rowstart()
	space(path)
	rowend()

// Item 13

	rowstart()
		if (urhere==13) {
			document.write("<IMG SRC=\"" + path + "gfx/nav_store_4.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav13\" ALT=\"You are here!\"></A>")
			}
		else {
			document.write("<A HREF=\"https://www.jingles.com/catalog\" onMouseOver=\"hiLite('Nav13','nav_store_2')\" onMouseOut=\"hiLite('Nav13','nav_store_1')\" onMouseDown=\"hiLite('Nav13','nav_store_3')\">")
			document.write("<IMG SRC=\"" + path + "gfx/nav_store_1.gif\" WIDTH=120 HEIGHT=28 BORDER=0 NAME=\"Nav13\" ALT=\"JAM Store\"></A>")
		}
	rowend()

// End the table

	document.write("</TABLE>")
	document.write("</CENTER>")
}

// ----------------------------------------
// Generates code for flash player
// ----------------------------------------

function player(audiofile) {

  document.write("      <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"62\" height=\"28\">")
  document.write("        <param name=\"movie\" value=\"" + audiofile + "\" />")
  document.write("        <param name=\"quality\" value=\"high\" />")
  document.write("        <param name=\"wmode\" value=\"transparent\">")
  document.write("        <embed src=\"" + audiofile + "\" quality=\"high\" type=\"application/x-shockwave-flash\" WMODE=\"transparent\" width=\"62\" height=\"28\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />")
  document.write("      </object>")

}
