
current_site = "ABZ"

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 == "ABZ") {

		top.location.href = "http://slovnik-cizich-slov.abz.cz/web.php/hledat?typ_hledani=prefix&cizi_slovo=" + document.SearchForm.Search.value

	}
	
			if (current_site == "Překladač") {

		top.location.href = "http://translate.google.cz/translate_t#en|cs|" + document.SearchForm.Search.value

	}
	
				if (current_site == "Wikipedie") {

		top.location.href = "http://cs.wikipedia.org/wiki/Speci%C3%A1ln%C3%AD:Hled%C3%A1n%C3%AD?search=" + document.SearchForm.Search.value

	}
	
					if (current_site == "Co je co") {

		top.location.href = "http://www.cojeco.cz/index.php?zal=1&s_term=" + document.SearchForm.Search.value

	}

						if (current_site == "Co to je") {

		top.location.href = "http://www.cotoje.cz/hledani.aspx?vyraz=" + document.SearchForm.Search.value

	}
   
   						if (current_site == "Lékařský slovník") {

		top.location.href = "http://lekarske.slovniky.cz/vyhledavani?term=&dictionary=" + document.SearchForm.Search.value

	}
	
	return false;

}



function toggle_setdef() {

set_def = !(set_def);

}



function setsite(sitenow) {

current_site = sitenow;

}

