// Top Navigation
var our_company_menu = '\
<div class="subnav" style="margin-left: 140px; height: 27px;">\
<div class="subnav" style="float: left; width: 90px; text-align: center; "><a href="/our_company.php?page=oc_about_us"><img src="/images/navigation/sn_about_us.gif" border="0" alt="About Us" onmouseover="this.src=\'/images/navigation/sn_about_us_on.gif\'" onmouseout="this.src=\'/images/navigation/sn_about_us.gif\'" alt="About Us"></a></div>\
<div class="subnav" style="float: left; width: 160px; text-align: center;"><a href="/our_company.php?page=oc_news_events"><img src="/images/navigation/sn_news.gif" border="0" alt="News and Events" onmouseover="this.src=\'/images/navigation/sn_news_on.gif\'" onmouseout="this.src=\'/images/navigation/sn_news.gif\'" alt="News and Events"></a></div>\
</div>';
var products_services_menu = '\
<div class="subnav" style="margin-left: 75px; height: 27px;">\
<div class="subnav" style="float: left; width: 200px; text-align: center;"><a href="/business_solutions.php?page=business_solutions_index"><img src="/images/navigation/bs.gif" onmouseover="this.src=\'/images/navigation/bs_on.gif\'" onmouseout="this.src=\'/images/navigation/bs.gif\'" alt="Business Solutions" border="0" /></a></div>\
<div class="subnav" style="float: left; width: 200px; text-align: center;"><a href="/personal_solutions.php?page=personal_solutions_index"><img src="/images/navigation/ps.gif" onmouseover="this.src=\'/images/navigation/ps_on.gif\'" onmouseout="this.src=\'/images/navigation/ps.gif\'" alt="Personal Solutions" border="0" /></a></div>\
</div>';

var in_subnav;

function hide_subnav(nav_id)
{
	if (document.layers)
	{
		if (document.layers[nav_id])
			document.layers[nav_id].visibility = 'hide';
	}
	else if (document.all)
	{
		if (document.all[nav_id])
			document.all[nav_id].style.visibility = 'hidden';
	}
	else if (document.getElementById)
	{
		if (document.getElementById(nav_id))
			document.getElementById(nav_id).style.visibility = 'hidden';					
	}
}				

function show_subnav(nav_id)
{
	if (document.layers)
	{
		document.layers[nav_id].visibility = 'show';
	}
	else if (document.all)
	{
		document.all[nav_id].style.visibility = 'visible';
	}
	else if (document.getElementById)
	{
		document.getElementById(nav_id).style.visibility = 'visible';					
	}
}
		
function subnav_over(nav_id)
{
	in_subnav = nav_id;
	show_subnav("site_subnav");
	if (nav_id == 'products_services')
	{
		document.getElementById("site_subnav").innerHTML = products_services_menu;
	}
	else if (nav_id == 'our_company')
	{
		document.getElementById("site_subnav").innerHTML = our_company_menu;
	}
	else
		document.getElementById("site_subnav").innerHTML = '';
		
}

function site_nav_mouseout(e)
{
	if (!e) e = window.event;
	var from = (window.event) ? e.srcElement : e.target;
	var to = (e.relatedTarget) ? e.relatedTarget : e.toElement;

	var to_root = to;
	while (to_root != null && from != to_root && to_root.nodeName != 'BODY' && to_root.id != 'site_subnav' && to_root.id != 'site_topnav')
	{
		to_root = to_root.parentNode;				
	}
		
	var from_root = from;
	while (from_root != null && to != from_root && from_root.nodeName != 'BODY' && from_root.id != 'site_subnav' && from_root.id != 'site_topnav')
		from_root = from_root.parentNode;					

	if ((from_root == null || to_root == null) || (from_root.id == 'site_subnav' || from_root.id == 'site_topnav') && (to_root.id != 'site_subnav' && to_root.id != 'site_topnav' && to_root.className != 'subnav'))
	{
		hide_subnav("site_subnav");		
	}
}

// Flash Loader (Prevents firefox glitching)
function load_flash()
{
		if (flash_objects && flash_objects != null)
		for (var i in flash_objects)
		{
				flash_objects[i].write(i);
		}
}