
function init_mouseover(obj1, obj2, obj3) {
	
	if(obj3 == true) { var box_height = obj1.offsetHeight+10; }
	else { var box_height = obj1.offsetHeight; }
	
	
	obj2.style.top = parseInt(box_height,10)+"px";
	
	Effect.toggle(obj2, "appear",{ duration: 0.3 });

}

function init_onkeypress(obj1, obj2)
{
	obj1.onmouseover = "";
	
	switch(obj1.className) {
		case "post-input_err":
			obj1.className = "post-input";
			break;
		case "post-input_err margt-9":
			obj1.className = "post-input margt-9";
			break;
		case "input-small_err margt-9":
			obj1.className = "input-small margt-9";
			break;
		case "input-med_err margt-9":
			obj1.className = "input-med margt-9";
			break;
		case "input-small_err":
			obj1.className = "input-small";
			break;
	}
	
	if(obj2.style.display == "")
	obj2.style.display = "none";
}

/* for messaging in the profile page */

function post_message(sendto) {
	
	var msg = $('ta_wallpost').value;	
	var url = '/message/store_message/';
		
	new Ajax.Request(url, {
		  method: 'post',
		  parameters: 'msg='+msg,
		  onSuccess: function(mess) {
				renderMessages(mess.responseText);
			}
		});
	
}

function renderMessages(resp) {
	$('ta_wallpost').value ="";
	$('wallposts_box').innerHTML = resp;
}
	


