    // Choose the dictionary when the user pulls down a select box

	// Go out and search a dictionary
    function findDict( engine ) 
    {
	var dict = getDictionary( engine ); 
        var url = dict.url;
	var x, y, width, height;

	if(document.all)
	{
		x = window.screenLeft+10;
		y = window.screenTop-10;
		width = document.body.clientWidth - 30;
		height = document.body.clientHeight - 70;
	}
	else
	{
		x = window.screenX+30;
		y = window.screenY+40;
		width = window.innerWidth - 60;
		height = window.innerHeight - 30;
	}

	var dictWindow;
	if(dict.method_type == "POST")
	{
		dictWindow = window.open("", "DictWindow", "menubar=1, location=1, left=" + x + ",top=" + y + ",width=" + width + ",height=" + height + ",toolbar=1,scrollbars=1,resizable=1" );
		if(dict.name == "biotech")
		{
			document.biotechDict.word.value = getDictQueryString();
			document.biotechDict.submit();
		}
		else if(dict.name == "webstersDict")
		{
			document.webstersDict.va.value = getDictQueryString();
			document.webstersDict.submit();
		}
		else if(dict.name == "webstersThesaurus")
		{
			document.webstersThesaurus.va.value = getDictQueryString();
			document.webstersThesaurus.submit();
		}
		}
		else{
			dictWindow = window.open(url + escape(getDictQueryString()), "DictWindow", "menubar=1, location=1, left=" + x + ",top=" + y + ",width=" + width + ",height=" + height + ",toolbar=1,scrollbars=1,resizable=1" );
			// dictWindow.location.href = url + escape(getDictQueryString());
		}
		dictWindow.focus();
		return false;
    	}

    	// Get the current dictionary that the user has picked
    	function getCurrentDict() {
        return document.dictForm.dictSel[document.dictForm.dictSel.selectedIndex].value;
    }

    // Get the current query string that the user has entered.
    function getDictQueryString() {
        return document.dictForm.searchText.value;
    }

    function getDictionary( engine )
    {
        for ( i = 0; i < dictionaries.length; ++i ) {
            
            if ( dictionaries[i].name == engine ) {
                return dictionaries[i];
            }
        }
    }
    
    
    // Get the definied Dictionaries
    function getDictionaries()
    {
        return dictionaries;
    }
    
    // Create a Dictionary object
    function Dictionary( name, title, url, method_type) {
        this.name = name;
        this.title = title;
        this.url = url;
        this.method_type = method_type;
    }
    
    //perform any object instantiations...
    
    // Populate the dictionary hashtable.
    // In order to define a dictionary just add it in the source.
    dictionaries = new Array();
    dictionaries[0] = new Dictionary( "medical", "Medical Dictionary", "http://cancerweb.ncl.ac.uk/cgi-bin/omd?query=", "GET");
    dictionaries[1] = new Dictionary( "biotech", "Biotech Dictionary", "http://www.google.com/search?q=", "POST");
    dictionaries[2] = new Dictionary( "webstersDict", "Webster's Dictionary", "http://www.dictionary.com/cgi-bin/dict.pl?term=", "POST");
    dictionaries[3] = new Dictionary( "webstersThesaurus", "Webster's Thesaurus", "http://www.thesaurus.com/cgi-bin/search?config=roget&words=", "POST");
    