function open_div_sendpm() {
	var div = document.getElementById('send-private-message');
	if ( div ) {
		div.style.display="block";
	}	
}

function ajax_search( url , search , result ) {
	if ( search == '' ) {
		document.getElementById(result).innerHTML = '';
	} else {
		shajObj.callLink(url + '?async=yes&search='+search,'',result,'','GET');
	}
}
function ajax_admin_search( url , search , result ) {
	if ( search == '' ) {
		document.getElementById(result).innerHTML = '';
	} else {
		shajObj.callLink(url + '?&admin=yes&async=yes&search='+search,'',result,'','GET');
	}
}


function toggleExtendedProfile() {
	var view = document.getElementById('extended-profile-view');
	var cmd = document.getElementById('extended-profile-cmd'); 
	//view.style.width = '100%';
	if ( view.style.display == 'none' ) {
		view.style.display = 'block';
		cmd.innerHTML = 'nascondi';
	} else {
		view.style.display = 'none';
		cmd.innerHTML = 'mostra';
	} 
}

function checkWallPost(form) {
	var text = form.getElementsByTagName('input');
	text = text[0].value;
	if( text == '' || text=='firma il wall...' ) {
		var div = document.getElementById('wall-alert');
		div.innerHTML = 'Nulla da pubblicare.';
		return(false);
	} else {
		return(true);
	}
}

function inputEnable(input) {
	input.style.color = '#000000';
	input.value = '';
}

function toggleView(id) {
	var e = document.getElementById(id);
	if ( ! e ) return;
	if ( e.style.display == 'block' ) {
		e.style.display = 'none';
	} else {
		e.style.display = 'block';
	}
}