function spawn_buy_tickets_div(target_anchor,show_number){
	buy_tix_popup.offsetX=200;
	buy_tix_popup.offsetY=0;
	buy_tix_popup.setSize(200,200);
	buy_tix_popup.populate(eval('buy_tix_content_'+show_number));
	buy_tix_popup.refresh();
	buy_tix_popup.showPopup(target_anchor);
}

function spawn_calendar_info_div(target_anchor,performance_id,offsetX){
	calendar_info_popup.offsetX=offsetX;
	calendar_info_popup.offsetY=-10;
	calendar_info_popup.setSize(200,200);
	calendar_info_popup.populate(eval('calendar_div_content_'+performance_id));
	calendar_info_popup.refresh();
	calendar_info_popup.showPopup(target_anchor);
	
}

function st_anns_check_form(form){
	
	if(inForm(form.first_name) && (trim(form.first_name.value) == "" || trim(form.first_name.value) == "First Name")){
		alert('please enter your first name.'); return false;}
	if(inForm(form.last_name) && (trim(form.last_name.value) == "" || trim(form.last_name.value) == "Last Name")){
	alert('please enter your last name.'); return false;}
	if(inForm(form.email) && !(/[A-Za-z0-9_\.\-]+@+[A-Za-z0-9_\-]+\.[A-Za-z]+/.test(form.email.value))){
		alert('please enter a valid email address');
		return false;}
	
	return true;
}
	
function st_anns_check_add_section_form(form){
	
	if(inForm(form.page_title) && (trim(form.page_title.value) == "")){
		alert('please enter a page title.'); return false;}
	if(inForm(form.reference_name) && (trim(form.reference_name.value) == "")){
	alert('please enter a reference name.'); return false;}
	
	return true;
}
