/**
 * Called by onchange event to show hide payment details
 * depending on member type
 */ 
function show_hide_payment(member_type, obj_id)
{
	if (member_type == 'free')
	{
		document.getElementById(obj_id).style.display = "none";	
	}
	else if (member_type == 'paid')
	{
		document.getElementById(obj_id).style.display = "inline";
	}	
}



function show_hide(obj_id, action)
{
	document.getElementById(obj_id).style.display = action;
}


/**
 * Shows comment textearea and assigns parent to
 * hidden var so user can post comment
 */
function comment_prepare(parent, reply_to, reply_date)
{
	document.getElementById('parent').value = parent;
	
	if (reply_to == false)
	{
		// hide leave new comment link
		show_hide('comment-new', 'none');
		// set label to new comment
		document.getElementById('comment-label').innerHTML = "Leave a comment";
	}
	else
	{
		// show leave new comment link
		show_hide('comment-new', 'inline');
		// set label to reply
		document.getElementById('comment-label').innerHTML = "Reply to " + reply_to + "'s message (posted: " + reply_date + ")";
	}
	
	
	
}


