var numberOfEntries=14; // To plithos twn biografiwn
var entry = new makeArray(numberOfEntries-1);
var url = new makeArray(numberOfEntries-1);
var index = new makeArray(numberOfEntries-1);
var word = unescape(parent.location.search.substring(1));


function makeArray(n) {
	this.length=n;
	for (var i=1;i<=n;i++);
		this[i]=null;
		return this;
	}



//finds matching definition terms
function init() {
if (word=='X') {
parent.frames['items'].location='itemX.htm';

}
else {

	for (var j=0; j<=entry.length; j++) {
	if (word==index[j]) {
		document.bios.terms.options[j].selected=true;
		parent.frames['items'].location=url[j];
		break; }			
		}
	}
}





function buildTermList() {
var termlist;
var i=-1;
i=i+1;index[i]="1a";entry[i]="Αριστοτέλης";url[i]="aristotle.htm";
i=i+1;index[i]="1"; entry[i]="Arrhenius";url[i]="arrhenius.htm";
i=i+1;index[i]="1b";entry[i]="Berzelius";url[i]="berzelius.htm";
i=i+1;index[i]="2";entry[i]="Boyle" ;url[i]="boyle.htm";
i=i+1;index[i]="2a";entry[i]="Dalton";url[i]="dalton.htm";
i=i+1;index[i]="3";entry[i]="Davy";url[i]="davy.htm";
i=i+1;index[i]="3a";entry[i]="Δημόκριτος";url[i]="democritus.htm";
i=i+1;index[i]="4";entry[i]="Lavoisier";url[i]="lavoisier.htm";
i=i+1;index[i]="5";entry[i]="Liebig";url[i]="liebig.htm";
i=i+1;index[i]="6";entry[i]="Mendeleev";url[i]="mendeleev.htm";
i=i+1;index[i]="7";entry[i]="Meyer";url[i]="meyer.htm";
i=i+1;index[i]="8";entry[i]="Newlands";url[i]="newlands.htm";
i=i+1;index[i]="9";entry[i]="Priestley";url[i]="priestley.htm";
i=i+1;index[i]="10";entry[i]="Solvay";url[i]="solvay.htm";
i=i+1;index[i]="11";entry[i]="Sorensen";url[i]="sorensen.htm";

	termlist = '<SELECT NAME=terms  size="21"  onChange="showDef(selectedIndex)">';
	for (var i=0;i<=entry.length;i++) {
		termlist += '<OPTION VALUE="'+url[i]+'">'+entry[i]+ '</OPTION>';
		}
	termlist += "</SELECT>";
	return termlist;

	}

//displays definition on selection
function showDef(index) {
parent.frames['items'].location=url[index];
	}
