/*
	John Canfield, 2010
*/

document.observe("dom:loaded", function() {
	// Change the navbar depending on page on load
	var site_name = document.URL;
	var site_array = site_name.split("/");
	site_name = site_array[3]; // # of slashes before what you want
	site_array = site_name.split("#");
	site_name = site_array[0]; // all this code kills early URL stuff and things after "#"
	
	
	if (site_name == "index.php") {
		highlight_home();
	} else if (site_name == "clients.php") {
		highlight_clients();
	} else if (site_name == "results.php") {
		highlight_results();
	} else if (site_name == "documents.php") {
		highlight_documents();
	} else if (site_name == "cases.php") {
		highlight_cases();
	} else if (site_name == "veterans.php") {
		highlight_veterans();
	} else if (site_name == "motorcycle.php") {
		highlight_motorcycle();
	} else if (site_name == "employment_cases.php") {
		highlight_employment();
	} else if (site_name == "contact.php") {
		highlight_contact();
	} else if (site_name == "links.php") {
		highlight_links();
	} else {
		highlight_home();
	}
	
	if (site_name == "contact.php") {
		$("contact_float").innerHTML = "<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />";
	}
});


function highlight_home() {
	$("home_button").style.color = "#ffd800";
}

function highlight_clients() {
	$("clients_button").style.color = "#ffd800";
}

function highlight_results() {
	$("results_button").style.color = "#ffd800";
}

function highlight_documents() {
	$("documents_button").style.color = "#ffd800";
}

function highlight_cases() {
	$("cases_button").style.color = "#ffd800";
}

function highlight_motorcycle() {
	$("motorcycle_button").style.color = "#ffd800";
}

function highlight_employment() {
	$("employment_button").style.color = "#ffd800";
}

function highlight_contact() {
	$("contact_button").style.color = "#ffd800";
}

function highlight_links() {
	$("links_button").style.color = "#ffd800";
}

function highlight_veterans() {
	$("veteran_button").style.color = "#ffd800";
}