function showtab(clickedtab) {
	
	var peopletab = document.getElementById('result_people');
	var clubtab = document.getElementById('result_club');
	
	// Hide them all at once and then just unhide the one that was clicked on	
	peopletab.style.display = 'none';
	clubtab.style.display = 'none';
	
	// Set class to normal	
	document.getElementById('li-people').className = 'cursorPointer';
	document.getElementById('li-club').className = 'cursorPointer';
	
	// See what tab was clicked, show contents and hide the other
	if(clickedtab == 'result_people') {
		// This means that the wall tab was clicked				
		peopletab.style.display = 'block';		
		document.getElementById('li-people').className = 'cursorPointer active';		
		document.getElementById('counter_top').style.display = 'block';
		document.getElementById('counter_club').style.display = 'none';
	} else if(clickedtab == 'result_club') {
		// This means that the photo tab was clicked
		clubtab.style.display = 'block';
		document.getElementById('li-club').className = 'cursorPointer active';		
		document.getElementById('counter_club').style.display = 'block';
		document.getElementById('counter_top').style.display = 'none';
	}
}

function submit_check_for_blank() {
	
	if(document.getElementById('search_string').value == '' || document.getElementById('search_string').value == 'Search') {
		// Then do nothing coz again user is an idiot
	} else {
		// Submit the form
		 document.searchform.submit();
	}
}

function clear_display(input) {
	
	// Clear the search bar
	document.getElementById(input).value = '';
}

function change_receiver(receiver) {
	
	// Chnage the receiver of the message
	document.getElementById('message_receiver').value = receiver;
}

function changeFriend(friend) {
	
	// Change the hidden value
	document.getElementById('friend_id').value = friend;
}