function saveit(id) {
	toggler(id,'saveit');
	var box = document.getElementById('saveit_'+id).firstChild;
	//var content = '<a href="#" onclick="new Ajax.Updater(\'toggle-'+id+'-inner\', \'/tutorial/'+id+'/save\', {asynchronous:true, evalScripts:true}); return false;">Click to save or unsave this tutorial.</a>';
	//box.innerHTML = content;
	box.className = 'saveit';
}
function reportit(id) {
	toggler(id,'reportit');
	var box = document.getElementById('reportit_'+id).firstChild;
	//var content = '<a href="#" onclick="new Ajax.Updater(\'toggle-'+id+'-inner\', \'/tutorial/'+id+'/report\', {asynchronous:true, evalScripts:true}); return false;">Click to report this tutorial.</a>';
	//box.innerHTML = content;
	box.className = 'reportit';
}
function toggler(id,process) {

	if (process == 'saveit')
	{
		if (document.getElementById('saveit_'+id).style.display == 'none' || document.getElementById('saveit_'+id).firstChild.className == process)
			new Effect.toggle('saveit_'+id,'slide',{duration: .1});
		else {
			new Effect.Appear('saveit_'+id);
		}
	}

	if (process == 'reportit')
	{
		if (document.getElementById('reportit_'+id).style.display == 'none' || document.getElementById('reportit_'+id).firstChild.className == process)
			new Effect.toggle('reportit_'+id,'slide',{duration: .1});
		else {
			new Effect.Appear('reportit_'+id);
		}
	}

}
