<!-- 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()
var list4array = new Array()
var list4source = new Array()
var list5array = new Array()
var list5source = new Array()

<!-- Populate the Arrays -->

list1array[1] = "elle Sockwool 4ply"
list1source[1] = "http://www.cpu-enterprises.com/elle/yarn/others-4ply_m.htm"
list1array[2] = "elle Splish Splash 4ply"
list1source[2] = "http://www.cpu-enterprises.com/elle/yarn/others-4ply-splash_m.htm"
    
list2array[1] = "elle Cotton Fields"
list2source[1] = "http://www.cpu-enterprises.com/elle/yarn/dk-cotton_m.htm"
list2array[2] = "elle Caress"
list2source[2] = "http://www.cpu-enterprises.com/elle/yarn/dk-caress_m.htm"
list2array[3] = "elle Gold Medal Double Crepe"
list2source[3] = "http://www.cpu-enterprises.com/elle/yarn/dk-gold_m.htm"
list2array[4] = "elle Jeans"
list2source[4] = "http://www.cpu-enterprises.com/elle/yarn/dk2-jeans_m.htm"
list2array[5] = "elle Naturals Barley"
list2source[5] = "http://www.cpu-enterprises.com/elle/yarn/dk-nat-barley_m.htm"
list2array[6] = "elle Pure Gold"
list2source[6] = "http://www.cpu-enterprises.com/elle/yarn/dk-puregold_m.htm"
list2array[7] = "elle Rustica"
list2source[7] = "http://www.cpu-enterprises.com/elle/yarn/dk-rustica_m.htm"
list2array[8] = "elle True Blue"
list2source[8] = "http://www.cpu-enterprises.com/elle/yarn/dk2-true_m.htm"
list2array[9] = "elle True Blue Shimmer"
list2source[9] = "http://www.cpu-enterprises.com/elle/yarn/dk2-true-s_m.htm"

list3array[1] = "elle Naturals Wheat"
list3source[1] = "http://www.cpu-enterprises.com/elle/yarn/aran-nat-wheat_m.htm"
list3array[2] = "elle Pure Gold"
list3source[2] = "http://www.cpu-enterprises.com/elle/yarn/aran-puregold_m.htm"

list4array[1] = "elle Chunky"
list4source[1] = "http://www.cpu-enterprises.com/elle/yarn/chunky-chunky_m.htm"
list4array[2] = "elle Alaska"
list4source[2] = "http://www.cpu-enterprises.com/elle/yarn/chunky-alaska_m.htm"
list4array[3] = "elle Naturals Flax"
list4source[3] = "http://www.cpu-enterprises.com/elle/yarn/chunky-nat-flax_m.htm"

list5array[1] = "elle Crochet No.5"
list5source[1] = "http://www.cpu-enterprises.com/elle/yarn/others-crochet_m.htm"
list5array[2] = "elle Encore"
list5source[2] = "http://www.cpu-enterprises.com/elle/yarn/others-encore_m.htm"
list5array[3] = "elle Furry Friends"
list5source[3] = "http://www.cpu-enterprises.com/elle/yarn/others-furry_m.htm"
list5array[4] = "elle Galaxy"
list5source[4] = "http://www.cpu-enterprises.com/elle/yarn/others-galaxy_m.htm"
list5array[5] = "elle Lussuria"
list5source[5] = "http://www.cpu-enterprises.com/elle/yarn/others-lussuria_m.htm"
list5array[6] = "elle Pizzazz"
list5source[6] = "http://www.cpu-enterprises.com/elle/yarn/others-pizzazz_m.htm"
list5array[7] = "elle Plume"
list5source[7] = "http://www.cpu-enterprises.com/elle/yarn/others-plume_m.htm"
list5array[8] = "elle Rustica Ultra"
list5source[8] = "http://www.cpu-enterprises.com/elle/yarn/others-rustica_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 4ply 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 an DK 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 a Aran 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]
	}

}
if (selecteditem=="list4") {
	document.listselect.listcontent.options[0]= new Option("Select a Chunky Yarn from this List")
	document.listselect.listcontent.options[0].value= "noselect"
	for(var count=1; count < list4array.length; count++) {
	document.listselect.listcontent.options[count]= new Option(list4array[count])
	document.listselect.listcontent.options[count].value= list4source[count]
	}

}
if (selecteditem=="list5") {
	document.listselect.listcontent.options[0]= new Option("Select a Special Yarn from this List")
	document.listselect.listcontent.options[0].value= "noselect"
	for(var count=1; count < list5array.length; count++) {
	document.listselect.listcontent.options[count]= new Option(list5array[count])
	document.listselect.listcontent.options[count].value= list5source[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
	} 
}
