function openActionbox(t, data) { 
		$('actionbox').show();
		var url = MOOGI.domain+'ajax/actionbox/'+t+'.php';
		mLoading('actionbox_inner');
		$('actionbox').setAttribute('class', t);
		new Ajax.Updater('actionbox_inner', url, {parameters: {serialized:data}});
}
function closeActionbox() {
		closeActionElement('actionbox');
}


// actionElement inserts stuff into an element
function openActionElement(element_id, t, data) {
		$(element_id).show();
		var url = MOOGI.domain+'ajax/'+t+'.php';
		mLoading(element_id);
		new Ajax.Updater(element_id, url, {parameters: {serialized:data}});
		return true;
}

function closeActionElement(element_id) {
		$(element_id).hide();
}

function mLoading(element_id) {
		$(element_id).innerHTML = "Loading...";
}


	function go_to_show(){ 
		if(document.getElementById('myInput').value != ''){
			show_name = clean_string(document.getElementById('myInput').value);
			show_id = document.getElementById('myHiddenField_show_id').value;
			window.location.href = MOOGI.domain+"shows/"+show_name+"/"+show_id+"/";
		}
	}


// multiply the element height by the factor, nice for textarea
// ex: multiply_element_height('my_textarea', 2/3) // makes it smaller
function multiply_element_height(id, factor) {
		var e = $(id);
		var h = e.getStyle('height').replace(/px/,'');
		e.setStyle({height: (h*factor)+'px'});
		return false;
}
