var numberOfEntries=4; // // To plithos twn orwn
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.glossary.terms.options[j].selected=true;
		parent.frames['items'].location=url[j];
		break; }			
		}
	}
}





function buildTermList() {
var termlist;
var i=-1;
i=i+1;index[i]="0"; entry[i]="Επιλέξτε ένα θέμα";url[i]="";
i=i+1;index[i]="1";entry[i]="Ο κύκλος του αζώτου";url[i]="../nitrogen_cycle.htm";
i=i+1;index[i]="2"; entry[i]="Πως παρασκευάζεται ο ασβέστης;";url[i]="../caO.htm";
i=i+1;index[i]="3";entry[i]="Διύλιση αργού πετρελαίου" ;url[i]="../refinary.htm";


	termlist = '<SELECT NAME=terms SIZE=1  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];
document.glossary.terms.options[0].selected=true;
	}
