////////////////////////////////////////
//
//  ipb_forum.js
//
//  Skrypty Odyssei uzywane na forum
//  IPB.
//
//  @author Michal Huniewicz
//
////////////////////////////////////////



//Sprawdza, czy input od szukania ludzi
//z danego miejsca nie jest pusty.
//
//@param string wiadomosc z bledem.
//@return true gdy nie jest pusty.
function validate_findUsers(message){
	var location=document.getElementById('odyssei_location_input').value;
	
	//Pusty?
	if(location=='0'){
	  alert(message);
		return false;
	}

	return true;
}


//Sprawdza, czy w podanym ciagu sa same spacje.
//
//@param string ciag.
//@return true - same spacje. Inaczej false.
function onlySpaces(string){
	var length=string.length;
	
	//Policz spacje.
	var spaces=0;
	for(var i=0;i<length;i++)
	  if(string[i]==' ')spaces++;

	if(spaces==length)return true;
	
	return false;
}


