
	function lookup(inputString) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			jQuery('#suggestions').hide();
		} else {
			jQuery.post("/news/text2", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					jQuery('#suggestions').show();
					jQuery('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue, idValue) {
		jQuery('#inputString').val(thisValue);
		jQuery('#idval').val(idValue);
		setTimeout("jQuery('#suggestions').hide();", 200);
	}


	

function search_lookup_uczelnia(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#suggestions').hide();
	} else {
		jQuery.post("/uczelnie/getUczelnie", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				jQuery('#suggestions').show();
				jQuery('#autoSuggestionsList').html(data);
			}
		});
	}
} // lookup

function search_fill_uczelnia(thisValue, idValue) {
	jQuery('#search_uczelnia').val(thisValue);
	jQuery('#search_iduczelnia').val(idValue);
	setTimeout("jQuery('#suggestions').hide();", 200);
}

function fcsearch_lookup_uczelnia(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#fcsuggestions'+suffix).hide();
	} else {
		jQuery.post("/uczelnie/getUczelnie", {queryString: ""+inputString+"|fc"}, function(data){
			if(data.length >0) {
				jQuery('#fcsuggestions'+suffix).show();
				jQuery('#fcautoSuggestionsList'+suffix).html(data);
			}
		});
	}
} // lookup

function fcsearch_fill_uczelnia(thisValue, idValue) {
	jQuery('#fcsearch_uczelnia'+suffix).val(thisValue);
	jQuery('#fcsearch_iduczelnia'+suffix).val(idValue);
	setTimeout("jQuery('#fcsuggestions'+suffix).hide();", 200);
}

function fcsearch_lookup_przedmiot(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#fcsuggestions_przedmiot'+suffix).hide();
	} else {
		jQuery.post("/uczelnie/getPrzedmioty", {queryString: ""+inputString+"|fc"}, function(data){
			if(data.length >0) {
				jQuery('#fcsuggestions_przedmiot'+suffix).show();
				jQuery('#fcautoSuggestionsList_przedmiot'+suffix).html(data);
			}
		});
	}
} // lookup

function fcsearch_fill_przedmiot(thisValue, idValue) {
	jQuery('#fcsearch_przedmiot'+suffix).val(thisValue);
	jQuery('#fcsearch_idprzedmiot'+suffix).val(idValue);
	setTimeout("jQuery('#fcsuggestions_przedmiot'+suffix).hide();", 200);
}

function fcsearch_lookup_akademik(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#fcsuggestionsakademik').hide();
	} else {
		jQuery.post("/uczelnie/getAkademiki", {queryString: ""+inputString+"|fc"}, function(data){
			if(data.length >0) {
				jQuery('#fcsuggestionsakademik').show();
				jQuery('#fcautoSuggestionsListakademik').html(data);
			}
		});
	}
} // lookup

function fcsearch_fill_akademik(thisValue, idValue) {
	jQuery('#fcsearch_akademik').val(thisValue);
	jQuery('#fcsearch_idakademik').val(idValue);
	setTimeout("jQuery('#fcsuggestionsakademik').hide();", 200);
}

// Kierunek wraz z uczelnia
function fcsearch_lookup_kierunek(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#fcsuggestionskierunek').hide();
	} else {
		
		jQuery.post("/uczelnie/getKierunki", {queryString: ""+inputString+"|fc"}, function(data){
			if(data.length >0) {
				jQuery('#fcsuggestionskierunek').show();
				jQuery('#fcautoSuggestionsListkierunek').html(data);
			}
		});
	}
} // lookup

function fcsearch_fill_kierunek(thisValue, idValue,surfix) {

	jQuery('#fcsearch_kierunek').val(thisValue);
	jQuery('#fcsearch_idkierunek').val(idValue);
	setTimeout("jQuery('#fcsuggestionskierunek').hide();", 200);
	
}

// Tylko nazwa kierunku
var suffix  = '';
function fcsearch_lookup_c_kierunek(inputString) {
	
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#fcsuggestions_c_kierunek'+suffix).hide();
	} else {
		
		jQuery.post("/uczelnie/get_C_Kierunki", {queryString: ""+inputString+"|fc",querySurfix: ""+suffix+""}, function(data){
			if(data.length >0) {
				jQuery('#fcsuggestions_c_kierunek'+suffix).show();
				jQuery('#fcautoSuggestionsList_c_kierunek'+suffix).html(data);
			}
		});
	}
	
} // lookup

/* Auto Suggest login'ow */
var suffix = '';
function search_login(inputString){
  if(inputString.length == 0){
	//Hide the suggestion box.
	jQuery('#suggestions_login'+suffix).hide();
  } else {
	jQuery.post("/4dm1n/userzy/suggestLogin", {queryString: "" + inputString + ""}, function(data){
	  if(data.length > 0){
		jQuery('#suggestions_logins'+suffix).show();
		jQuery('#autoSuggestionsList_logins'+suffix).html(data);
	  }
	});
  }
} // search_login


function suggest_fill_login(thisValue, idValue){
  jQuery('#suggest_login'+suffix).val(thisValue);
  jQuery('#search_id_suggest_login'+suffix).val(idValue);
  setTimeout("jQuery('#suggestions_logins'+suffix).hide();", 200);
}

function fcsearch_fill_c_kierunek(thisValue, idValue) {
	jQuery('#c_kierunek'+suffix).val(thisValue);
	jQuery('#fcsearch_id_c_kierunek'+suffix).val(idValue);
	setTimeout("jQuery('#fcsuggestions_c_kierunek'+suffix).hide();", 200);
	
}

// wydzial wraz z uczelnia
function fcsearch_lookup_wydzial(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#fcsuggestionswydzial').hide();
	} else {
		
		jQuery.post("/uczelnie/getWydzial", {queryString: ""+inputString+"|fc"}, function(data){
			if(data.length >0) {
				jQuery('#fcsuggestionswydzial').show();
				jQuery('#fcautoSuggestionsListwydzial').html(data);
			}
		});
	}
} // lookup

function fcsearch_fill_wydzial(thisValue, idValue,surfix) {

	jQuery('#fcsearch_wydzial').val(thisValue);
	jQuery('#fcsearch_idwydzial').val(idValue);
	setTimeout("jQuery('#fcsuggestionswydzial').hide();", 200);
	
}

// Tylko nazwa kierunku
var suffix  = '';
function fcsearch_lookup_c_wydzial(inputString) {
	
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#fcsuggestions_c_wydzial'+suffix).hide();
	} else {
		
		jQuery.post("/uczelnie/get_C_Wydzial", {queryString: ""+inputString+"|fc",querySurfix: ""+suffix+""}, function(data){
			if(data.length >0) {
				jQuery('#fcsuggestions_c_wydzial'+suffix).show();
				jQuery('#fcautoSuggestionsList_c_wydzial'+suffix).html(data);
			}
		});
	}
	
} // lookup



function fcsearch_fill_c_wydzial(thisValue, idValue) {
	jQuery('#c_wydzial'+suffix).val(thisValue);
	jQuery('#fcsearch_id_c_wydzial'+suffix).val(idValue);
	setTimeout("jQuery('#fcsuggestions_c_wydzial'+suffix).hide();", 200);
	
}

function search_lookup_fanklub(inputString) {
	/*
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#suggestions').hide();
	} else {
		$.post("/kluby/getKlub", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#suggestions').show();
				$('#autoSuggestionsList').html(data);
			}
		});
	}
	*/
} // lookup

function search_fill_fanklub(thisValue, idValue) {
	/*
	$('#search_klub').val(thisValue);
	$('#search_idklub').val(idValue);
	setTimeout("$('#suggestions').hide();", 200);
	*/
}

function search_lookup_fanklub(inputString) {
	
	if(inputString.length == 0) {
		// Hide the suggestion box.
		jQuery('#suggestions').hide();
	} else {
		
		jQuery.post("/fanklub/getFanklub", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				jQuery('#suggestions').show();
				jQuery('#autoSuggestionsList').html(data);
			}
		});
		
	}
	
} // lookup

function search_fill_fanklub(thisValue, idValue) {

	jQuery('#fc_domena').val(thisValue);
	jQuery('#search_idfanklub').val(idValue);
	setTimeout("jQuery('#suggestions').hide();", 200);
	
}
