var the_open_menu=false;

var just_opened_menu=false;

var active_page_menu=false;

var filter_pane_active=false;

function open_menu(a){if(!the_open_menu||the_open_menu!=a){if(the_open_menu)close_menus();

	//$('nav_'+a).style.backgroundColor='#3e5f87';

	the_open_menu=a;

	Element.show(a);


	just_opened_menu=true}return false}function close_menus(){if(just_opened_menu){just_opened_menu=false}else{if(the_open_menu){$(the_open_menu).style.display='none';
if($('nav_'+the_open_menu)){$('nav_'+the_open_menu).style.background=the_open_menu==active_page_menu?'#4d5872':'none'}the_open_menu=false}}}function select_field(a){el=$(a);
if(el.createTextRange){var b=el.createTextRange();
b.moveStart("character",0);
b.moveEnd("character",el.value.length);
b.select()}else if(el.setSelectionRange){el.setSelectionRange(0,el.value.length)}}function hideToolbar(){setTimeout(function(){window.scrollTo(0,1)},100)}function click_filter_button(a){if(filter_pane_active){if(!a)$('filter_button').src='/images/filter.png';
Element.hide('filter_pane');
filter_pane_active=false}else{$('filter_button').src='/images/filter_on.png';
Element.show('filter_pane');
filter_pane_active=true}}function submit_filter(a){if($('filter_type')&&$('filter_type').value=='everything'&&(($('filter_author')&&$('filter_author').value=='everyone')||a)){location.href=(a?('/channel/'+a):'/dashboard')}else{location.href=(a?('/channel/'+a):'')+'/show/'+$('filter_type').value+(a?'':'/by/'+$('filter_author').value)}return false}

function check_terms_agree() {
	if(!$("terms_agree").checked) {
		alert("You must agree to the terms and conditions before signing up.");
		return false;
	}
}
