var hideProgress;
var sub_menu_type = '';
var sub_menu_id = new Array('07', '09', '11', '13', '15', '17', '19');
var current_sub_menu_id = 0;
var main_url = 'http://www.eboltmedia.com/hosting/syp/';

function showSubMenu(type)
{
	if ( type == 'insurance' || type == 'resources' )
	{
		if ( sub_menu_type != '' )
		{
			Element.hide('sub_menu_' + type);
			//document.getElementById('button_' + type).src = 'images/calvary-toptemplatee_' + sub_menu_id[current_sub_menu_id] + '.gif';
			sub_menu_type = '';
			current_sub_menu_id = 0;
		}
		
		var new_sub_menu_id = ( type == 'home' ? 0 : ( type == 'about' ? 1 : ( type == 'weekly' ? 2 : ( type == 'ministries' ? 3 : ( type == 'media' ? 4 : ( type == 'directions' ? 5 : 6 ) ) ) ) ) );
		//document.getElementById('button_' + type).src = 'images/calvary-toptemplatee2_' + sub_menu_id[new_sub_menu_id] + '.gif';
		Element.show('sub_menu_' + type);
		sub_menu_type = type;
		current_sub_menu_id = new_sub_menu_id;
	}
}

function hideSubMenu(type)
{
	if ( type == 'insurance' || type == 'resources' )
	{
		if ( sub_menu_type != '' )
		{
			Element.hide('sub_menu_' + type);
			//document.getElementById('button_' + type).src = 'images/calvary-toptemplatee_' + sub_menu_id[current_sub_menu_id] + '.gif';
			sub_menu_type = '';
			current_sub_menu_id = 0;
		}
	}
}

function clearContact(type)
{
	if ( document.getElementById(type).value == 'First Name' || document.getElementById(type).value == 'Last Name' || document.getElementById(type).value == 'Phone Number' || document.getElementById(type).value == 'E-Mail' || document.getElementById(type).value == 'Questions / Comments' )
	{
		document.getElementById(type).value = '';
	}
}

var checkSession;
var user_browser = '';
var user_page = '';

function trackSessions(browser, page)
{
	
}

function updateSession(browser, page, screenW, screenH)
{
	var url = 'track-sessions.php';
	
	/* make the ajax request for the information */
	new Ajax.Request(url, {
		method: 'post',
		parameters: 'browser=' + browser + '&page=' + page + '&screen_width=' + screenW + '&screen_height=' + screenH + '&new_page=0',
		onSuccess: function(xhrResponse) {
			
		},
		onFailure: function(xhrResponse) {

		}
	});

}

function hideProgressBox()
{
	Element.hide('progress_box');
}

function progressDisappear()
{
	setTimeout("hideProgressBox()", 24000);
}
