	// URL examples
	// http://www.pearls.com/pearl-education.html?page=page-akoya-saltwater-pearls&submenu=sub_1&mmlh=1&smlh=1; - akoya saltwater pearls
	// http://localhost/russ3/pearl-education.html?page=page-tahitian-pearls&submenu=sub_1&mmlh=1&smlh=3 - tahitian pearls
	
	// Link examples
	//show_page('page-akoya-saltwater-pearls', 'sub_1', 1, 1); - akoya saltwater pearls
	//show_page('page-tahitian-pearls', 'sub_1', 1, 3); - tahitian pearls

	//show_page function formula: show_page('name of div with dynamic page text', 'submenu that needs to be opened', 'number of link in main menu to be highlited' , 'number of link in sub menu to be highlited')

hide_submenus();
hide_pages();

if (getURL('page') == 'nothing')
	{
	document.getElementById('sub_0').style.cssText = "display: normal; height: auto";
	}
else
	{
	var url_page_request = getURL('page');
	var url_submenu_request = getURL('submenu');
	var url_main_menu_link_highlit = getURL('mmlh');
	var url_sub_menu_link_highlit = getURL('smlh');
	show_page(url_page_request, url_submenu_request, url_main_menu_link_highlit, url_sub_menu_link_highlit);
	}

function getURL(name){
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null )
	return "nothing";
	else
return results[1];}

function show_page(page, sub_menu, main_menu_item_highlit, sub_menu_item_highlit)
	{
	/*Hide pages and submenus*/
	hide_pages();
	hide_submenus();

	/*Set highlit on main menu item*/
	var parent_div = document.getElementById('main_menu');
	var menu_collection = parent_div.getElementsByTagName('a');
	var menu_count = menu_collection.length;

	for (var x = 0; x < menu_count; x++ )
		{
		menu_collection[x].style.cssText = "color: #505050; background: #fff";
		}
	menu_collection[main_menu_item_highlit-1].style.cssText = "color: #fff; background: #48b9c7";

	/*Show appropriate menu*/
	document.getElementById(sub_menu).style.cssText = "display: normal; height: auto";

	/*Set highlit on sub menu item*/
	if (sub_menu_item_highlit > 0)
	{
	var sub_parent_div = document.getElementById(sub_menu);
	var sub_menu_collection = sub_parent_div.getElementsByTagName('a');
	var sub_menu_count = sub_menu_collection.length;

	for (var x = 0; x < sub_menu_count; x++ )
		{
		sub_menu_collection[x].style.cssText = "color: #505050; background: #fff";
		}
	sub_menu_collection[sub_menu_item_highlit-1].style.cssText = "color: #fff; background: #48b9c7";

	/*Open page*/
	var page_to_open = document.getElementById(page);
	page_to_open.style.cssText = "display: normal";
	}

	if (sub_menu_item_highlit == 0)
	{
	var sub_parent_div = document.getElementById(sub_menu);
	var sub_menu_collection = sub_parent_div.getElementsByTagName('a');
	var sub_menu_count = sub_menu_collection.length;

	for (var x = 0; x < sub_menu_count; x++ )
		{
		sub_menu_collection[x].style.cssText = "color: #505050; background: #fff";
		}
	}



	/*Stretch container DIV*/
	document.getElementById('info-content2').style.height = document.getElementById('educationcolumninset3').offsetHeight+100+'px';
	}

function hide_submenus()
	{
	var parent_div = document.getElementById('educationcolumninset2');
	var submenus_collection = parent_div.getElementsByTagName("ul");
	var submenu_count = submenus_collection.length;

	for (var x = 0; x < submenu_count; x++)
		{
		submenus_collection[x].style.cssText = "display: none";
		}
	}

function hide_pages()
	{
	var parent_div = document.getElementById('educationcolumninset3');
	var page_collection = parent_div.getElementsByTagName("div");
	var page_count = page_collection.length;

	for (var x = 0; x < page_count; x++)
		{
		page_collection[x].style.cssText = "display: none; margin-left: -9999px; height: 0px";
		}
	}

