// methods to show/hide "AJAX" form divs. assumes you have _form, _busy, and _link divs
function show_busy_div(name) {
	if($(name+'_form')) { Element.hide(name+'_form'); };
	if($(name+'_link')) { Element.hide(name+'_link'); };
	if($(name+'_busy')) { Element.show(name+'_busy'); };
}
function show_form_div(name) {
	if($(name+'_link')) { Element.hide(name+'_link'); };
	if($(name+'_busy')) { Element.hide(name+'_busy'); };
	if($(name+'_form')) { Element.show(name+'_form'); };
}
function show_link_div(name) {
	if($(name+'_busy')) { Element.hide(name+'_busy'); };
	if($(name+'_form')) { Element.hide(name+'_form'); };
	if($(name+'_link')) { Element.show(name+'_link'); };
}
function clear_form_div(name) {
	if($(name+'_form')) { $(name+'_form').innerHTML = ''; }
	if($(name+'_form')) { Element.hide(name+'_form'); };
	if($(name+'_busy')) { Element.hide(name+'_busy'); };
	if($(name+'_link')) { Element.show(name+'_link'); };
}
// methods to show/hide "AJAX" form spans in table rows.
function show_busy_row(name,id) {
	if($('tr_'+name+'_link_'+id)) { Element.hide('tr_'+name+'_link_'+id); };
	if($('tr_'+name+'_busy_'+id)) { Element.show('tr_'+name+'_busy_'+id); };
}
function show_link_row(name,id) {
	if($('tr_'+name+'_busy_'+id)) { Element.hide('tr_'+name+'_busy_'+id); };
	if($('tr_'+name+'_link_'+id)) { Element.show('tr_'+name+'_link_'+id); };
}
// methods to show/hide busy widgets
function show_busy_widget(name) {
	if($(name)) { Element.show(name); };
} 
function hide_busy_widget(name) {
	if($(name)) { Element.hide(name); };
}
// -------------------------------------------------------
function show_help() {
	if($('show_help')) { Element.hide('show_help'); };
	if($('hide_help')) { Element.show('hide_help'); };
	if($('redcloth_help')) { Element.show('redcloth_help'); };
}
function hide_help() {
	if($('show_help')) { Element.show('show_help'); };
	if($('hide_help')) { Element.hide('hide_help'); };
	if($('redcloth_help')) { Element.hide('redcloth_help'); };
}
//--------------------------------------------------------
function focusForm() {
	Form.focusFirstElement(document.forms[0]);
}
//--------------------------------------------------------
function show_menus(element) {
	if (Element.visible(element)) { new Effect.BlindUp(element); }
	else { new Effect.BlindDown(element); }
}
//--------------------------------------------------------
// function to show custom contact forms
function showForm() {
	if($('wedding').visible()) { Element.hide('wedding'); }
	if($('non-wedding').visible()) { Element.hide('non-wedding'); }
	if($('simple').visible()) { Element.hide('simple'); }
	var form = $F('form_type');
	if($(form)) { Element.show(form); }
}
