//function to draw google map==========================================
function do_map() {
	var map = new GMap2(document.getElementById("google_map"));
	map.addControl(new GSmallMapControl());
	map.setCenter(new GLatLng(33.910206, -83.475956), 13);
	var point = new GLatLng(33.910206, -83.475956);
	map.addOverlay(new GMarker(point));
}

//functions for projects admin page====================================
function show_add_project_form() {
	Element.hide('add_project');
	Element.show('add_project_form');
} // end show_add_user_form()

function hide_add_project_form() {
	Element.hide('add_project_form');
	Element.show('add_project');
} // end hide_add_user_form()

function show_add_project_busy() {
	Element.show('add_project_busy');
	Element.hide('add_project_form');
} // end show_add_user_busy()

function show_add_category_form() {
	Element.hide('category_add_link');
	Element.show('category_add_form');
}//end show_add_category_form()

function hide_add_category_form() {
	Element.hide('category_add_form');
	Element.show('category_add_link');
	$('category_name').value = '';
}//end hide_add_category_form()

function show_add_category_busy() {
	Element.hide('category_select');
	Element.hide('category_add_link');
	Element.hide('category_add_form');
	Element.show('category_add_busy');
}//end show_add_category_busy()

function submit_add_category() {
	var c_name = $F('category_name');
	show_add_category_busy();
	new Ajax.Updater('category_select', 
							'/manage/projects/add_category?name=' + c_name, 
							{asynchronous:true, 
							evalScripts:true, 
							onComplete:function(request){hide_add_category_form()}
							}); 
	return false;
}//end submit_add_category()

//functions for categories admin pages==================================
function show_add_cat_form() {
	Element.show('add_category_form');
	Element.hide('add_category');
}//end show_add_cat_form()

function hide_add_cat_form() {
	Element.show('add_category');
	Element.hide('add_category_form');
}//end hide_add_cat_form()

function show_add_cat_busy() {
	Element.hide('add_category_form');
	Element.show('add_category_busy');
}//end show_add_cat_busy()

//functions for services admin pages==================================
function show_add_service_form() {
	Element.show('add_service_form');
	Element.hide('add_service');
}//end show_add_service_form()

function hide_add_service_form() {
	Element.show('add_service');
	Element.hide('add_service_form');
}//end hide_add_service_form()

function show_add_service_busy() {
	Element.hide('add_service_form');
	Element.show('add_service_busy');
}//end show_add_service_busy()

//functions for news admin pages==================================
function show_add_news_form() {
	Element.show('add_news_form');
	Element.hide('add_news');
}//end show_add_news_form()

function hide_add_news_form() {
	Element.show('add_news');
	Element.hide('add_news_form');
}//end hide_add_news_form()

function show_add_news_busy() {
	Element.hide('add_news_form');
	Element.show('add_news_busy');
}//end show_add_news_busy()

//functions for picture upload=======================================
function show_busy_upload() {
	Element.show( 'file_upload_busy' );
	Element.hide( 'file_upload_form' );
} // end show_busy_upload()

//function for featured project divs=================================
function changeThisDiv(divID) {
	Element.removeClassName("pic1", "featured_pic_on");
	Element.addClassName("pic1", "featured_pic");
	Element.removeClassName("pic2", "featured_pic_on");
	Element.addClassName("pic2", "featured_pic");
	Element.removeClassName("pic3", "featured_pic_on");
	Element.addClassName("pic3", "featured_pic");
	Element.removeClassName("pic4", "featured_pic_on");
	Element.addClassName("pic4", "featured_pic");
	Element.removeClassName(divID, "featured_pic");
	Element.addClassName(divID, "featured_pic_on");
}