<!-- Initialize the Arrays -->

var list1array = new Array()
var list1source = new Array()
var list2array = new Array()
var list2source = new Array()
var list3array = new Array()
var list3source = new Array()

<!-- Populate the Arrays -->

list1array[1] = "Baby Cashmere Merino Silk Balls"
list1source[1] = "http://www.cpu-enterprises.com/sublime/yarn/k001-dk-baby-merino_m.htm"
list1array[2] = "Baby Cotton Kapok Balls"
list1source[2] = "http://www.cpu-enterprises.com/sublime/yarn/k013-dk-baby-kapok_m.htm"
 
list2array[1] = "Bamboo and Pearls Packs"
list2source[1] = "http://www.cpu-enterprises.com/sublime/yarn/k014-bamboo-x_m.htm"
list2array[2] = "Cashmere Merino Silk Balls"
list2source[2] = "http://www.cpu-enterprises.com/sublime/yarn/k002-dk-merino_m.htm"
list2array[3] = "Extra Fine Merino Wool Balls"
list2source[3] = "http://www.cpu-enterprises.com/sublime/yarn/k004-dk-fine-merino_m.htm"

list3array[1] = "Baby Cashmere Merino Silk 4ply Balls"
list3source[1] = "http://www.cpu-enterprises.com/sublime/yarn/k012-4ply-baby-merino_m.htm"
list3array[2] = "Extra Fine Merino Wool 4ply Packs"
list3source[2] = "http://www.cpu-enterprises.com/sublime/yarn/k010-4ply-merino-x_m.htm"
list3array[3] = "Cashmere Merino Silk Aran Balls"
list3source[3] = "http://www.cpu-enterprises.com/sublime/yarn/k003-aran-merino_m.htm"
list3array[4] = "Chunky Merino Tweed Packs"
list3source[4] = "http://www.cpu-enterprises.com/sublime/yarn/k015-ch-merino-x_m.htm"
list3array[5] = "Luxurious Woolly Merino Packs"
list3source[5] = "http://www.cpu-enterprises.com/sublime/yarn/k011-woolly-x_m.htm"
list3array[6] = "Kid Mohair Balls"
list3source[6] = "http://www.cpu-enterprises.com/sublime/yarn/k005-other-mohair_m.htm"

<!-- Function for changing the listcontent dependent on the list selected -->
function sublist(selecteditem){
document.listselect.listcontent.length = 0 
if (selecteditem=="noselect") {
	document.listselect.listcontent.options[0]= new Option("Please select a Yarn")
	}
if (selecteditem=="list1") {
	document.listselect.listcontent.options[0]= new Option("Select a Baby Double Knit yarn from this List")
	document.listselect.listcontent.options[0].value= "noselect"
	for(var count=1; count < list1array.length; count++) {
	document.listselect.listcontent.options[count]= new Option(list1array[count])
	document.listselect.listcontent.options[count].value= list1source[count]
	}
}
if (selecteditem=="list2") {
	document.listselect.listcontent.options[0]= new Option("Select a Double Knit yarn from this List")
	document.listselect.listcontent.options[0].value= "noselect"
	for(var count=1; count < list2array.length; count++) {
	document.listselect.listcontent.options[count]= new Option(list2array[count])
	document.listselect.listcontent.options[count].value= list2source[count]
	}
}
if (selecteditem=="list3") {
	document.listselect.listcontent.options[0]= new Option("Select an Other Ply yarn from this List")
	document.listselect.listcontent.options[0].value= "noselect"
	for(var count=1; count < list3array.length; count++) {
	document.listselect.listcontent.options[count]= new Option(list3array[count])
	document.listselect.listcontent.options[count].value= list3source[count]
	}
}
}

<!-- Quickjump Function to automatically jump to the selected site from the list-->
function shortcut(form){
var destsite
destsite=(form.listcontent.options[form.listcontent.selectedIndex].value)
	if (destsite=="noselect"){
		alert("Please select a yarn")
	}else{
		location.href=destsite
	} 
}
