	function Entry(ID, Name, DescriptionText, URL)
	{
		this.ID = ID;
		this.Name = Name;
		this.DescriptionText = DescriptionText;
		this.URL = URL;
	}
	
	function InitializeFamiglie(currentForm) {
		for (var i=0; i < Famiglie.length; i++) {
			eval(currentForm + ".Famiglie.options[i] = new Option('" + Famiglie[i].Name + "')");
			eval(currentForm + ".Famiglie.options[i].value = " + Famiglie[i].ID);
		}
	}

function PopulatePane(currentPane, paneToPopulate) {
	var selectedArray, i;
	var selected = currentPane.options[currentPane.selectedIndex].value
	if (selected == 0) {
		// yeah, we should be able to just do the select set and index decrement no matter what,
		// and then check for selected being undefined, but browser bugs make life more "fun" than that
		if (currentPane.selectedIndex != 0)
			selected = currentPane.options[--currentPane.selectedIndex].value;
		else {
			currentPane.selectedIndex = -1;
			return false;
		}
	}
	selectedArray = eval(paneToPopulate + selected);
	paneToPopulate = eval("currentPane.form." + paneToPopulate)
	for (i = currentPane.form.elements.length - 1; i > 0; i--) {
		paneToClear = paneToPopulate.form.elements[i]
		if (paneToClear == paneToPopulate) {
			break;
		}
		if (paneToClear.name == "Prodotti" || paneToClear.name == "Categorie" || paneToClear.name == "Famiglie") {
			for (i = paneToClear.options.length; i != 0; i--) {
				paneToClear.options[i - 1] = null;
			}
		}
	}
	while (selectedArray.length < paneToPopulate.options.length) {
		paneToPopulate.options[(paneToPopulate.options.length - 1)] = null;
	}
	for (i = 0; i < selectedArray.length; i++) {
		if ( selectedArray[i] == null || selectedArray[i] == "" ) {
			alert("There is no " + paneToPopulate.Name + " associated with this " + currentPane.Name);
		} else {
			eval("paneToPopulate.options[i] = new Option('" + selectedArray[i].Name + "')");
			eval("paneToPopulate.options[i].value = '" + selectedArray[i].ID + "'");
		}
	}
	//if (document.welcome.Prodotti.options[0] == null) {
	//	document.welcome.Prodotti.options[0] = new Option("[Step 3]                             ");
	//	document.welcome.Prodotti.options[0].value = 0;
	//}
}

var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer == 4);
var NS6 = (navigator.vendor == "Netscape6");
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var Opera = (window.opera)

if (NS4) {
	layerRef="document.layers";
	styleSwitch="";
} else if (IE4) {
	layerRef="document.all";
	styleSwitch=".style";
} else if (NS6 || Opera) {
	layerRef="document.getElementById";
	styleSwitch=".style";
}