current_site = "WorthySeek"
var set_def = false
function fetch() {
	if (set_def == true) {
		set_default = "t"
	}else{
		set_default = ""
	}
	tmp = document.SearchForm.Search.value;
	stmp = "";
	for (i=0 ; i <= tmp.length ; i++) {
		if (tmp.charAt(i) == " ") {
			stmp = stmp + "+"; 
		} else {
			stmp = stmp + tmp.charAt(i); 
		}
	}
	if (current_site == "WorthySeek") {
		top.location.href = "http://www.worthyseek.com/index.php?sm=Search&Source=1&req=search&term=" + document.SearchForm.Search.value
	}
	if (current_site == "WorthyLinks") {
		top.location.href = "http://www.worthylinks.com/index.php?q=" + document.SearchForm.Search.value
	}
	if (current_site == "WorthyNews") {
		top.location.href = "http://www.worthynews.com/archive.php?action=find&find_key=" + document.SearchForm.Search.value
	}
	if (current_site == "WorthyShop") {
		top.location.href = "http://www.worthychristianbookstore.com/content/search/product/index.php?new=1&source=homesearch&querytype=All&query=" + document.SearchForm.Search.value
	}
	if (current_site == "WorthyDevos") {
		top.location.href = "http://www.worthydevotions.com/?s=" + document.SearchForm.Search.value
	}
	return false;
	}
function toggle_setdef() {
set_def = !(set_def);
}
function setsite(sitenow) {
current_site = sitenow;
}
document.writeln("<form method=\"GET\" name=\"SearchForm\" onsubmit=\"return fetch()\"> ");
document.writeln("<input type=\"Text\" name=\"Search\" size=56>&nbsp;<input name=\"Submit\" type=\"Submit\" value=\"&nbsp;Search&nbsp;\"><br> ");
document.writeln("<input type=\"radio\" name=\"SITE\" value=\"WorthySeek\" checked onclick=\"setsite('WorthySeek')\">Search the Web");
document.writeln("<input type=\"radio\" name=\"SITE\" value=\"WorthyLinks\" onclick=\"setsite('WorthyLinks')\">Christian Links");
document.writeln("<input type=\"radio\" name=\"SITE\" value=\"WorthyNews\" onclick=\"setsite('WorthyNews')\">News");
document.writeln("<input type=\"radio\" name=\"SITE\" value=\"WorthyDevos\" onclick=\"setsite('WorthyDevos')\">Devos");
document.writeln("<input type=\"radio\" name=\"SITE\" value=\"WorthyShop\" onclick=\"setsite('WorthyShop')\">Worthy Shopping");
document.writeln("</form> "); 