// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


function toggleEditor(id)
{
	if (!tinyMCE.get(id)){
		tinyMCE.execCommand('mceAddControl', false, id);
	}
	else{
		tinyMCE.execCommand('mceRemoveControl', false, id);
	}
}

function switch_snippet_kind(path)
{
	obj_sel = $('#snippet_kind')[0];
	kind = obj_sel.options[obj_sel.selectedIndex].value;
	
	window.location = path + "?kind=" + kind;
}