var fryWin;
function fryWinCk()
{
	if(fryWin != null && !fryWin.closed)
	{
		fryWin.close();
	}
}

function bibleLook()
{
	fryWinCk();
	var bibForm = document.scriptLook;
	var bVers = bibForm.version.options[bibForm.version.selectedIndex].text;
	var loc = bibForm.passage.value;
	loc = loc.replace(/;/g, "%3B");
	loc = loc.replace(/ /g, "+");
	loc = loc.replace(/,/g, "%2C");
	var webloc = "http://bible.gospelcom.net/cgi-bin/bible?language=English&version=" + bVers + "&passage=" + loc + "&search=&showxref=yep&showfn=yep";
	fryWin = window.open(webloc, "versewin", "WIDTH=598,HEIGHT=401,STATUS,SCROLLBARS,RESIZABLE");
	return false;
}

function dictLook()
{
	fryWinCk();
	var wrd = document.dict_form.term.value;
	wrd = wrd.replace(/ /g, "+");
	if(document.dict_form.db[document.dict_form.db.selectedIndex].value == "*")
	{
		wrd = "http://www.dictionary.com/cgi-bin/dict.pl?term=" + wrd;
	}
	else
	{
		wrd = "http://www.thesaurus.com/cgi-bin/search?config=roget&words=" + wrd;
	}
	fryWin = window.open(wrd, "versewin", "WIDTH=598,HEIGHT=401,STATUS,SCROLLBARS,RESIZABLE");
	return false;
}
