<!--
// Browser Sniffer
var sAgent = navigator.userAgent;
var mac = sAgent.indexOf("Mac") > -1;
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
var ns3 = (bName == "Netscape" && bVer == 3);
var ie3 = (bName == "Microsoft Internet Explorer" && bVer == 3);
var ns4 = (document.layers) ? true : false;
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

// Just in case function 
function init(){null}

// Netscape Resize Workaround
if (ns4) {
	widthCheck = window.innerWidth
	heightCheck = window.innerHeight
	window.onResize = refresh
}

function refresh() {
	if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
	document.location.href = document.location.href
}

// Rollover Function
function findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
}

function swapImage(){//v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function swapImgRestore(){//v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

// Declare the normal and MouseOver state of the primary nav
var home_norm = ''; var home_over = '_down';
var phys_norm = ''; var phys_over = '_down';
var serv_norm = ''; var serv_over = '_down';
var faci_norm = ''; var faci_over = '_down';
var heal_norm = ''; var heal_over = '_down';
var empl_norm = ''; var empl_over = '_down';
var alas_norm = ''; var alas_over = '_down';

// Declare the ON state of the primary nav
if (section == 'home')       { home_norm = '_down'; home_over = '_down'; }
if (section == 'physicians') { phys_norm = '_down'; phys_over = '_down'; }
if (section == 'services')   { serv_norm = '_down'; serv_over = '_down'; }
if (section == 'facilities') { faci_norm = '_down'; faci_over = '_down'; }
if (section == 'healthinfo') { heal_norm = '_down'; serv_over = '_down'; }
if (section == 'employment') { empl_norm = '_down'; empl_over = '_down'; }
if (section == 'alaska')     { alas_norm = '_down'; alas_over = '_down'; }

// changes color of secondary nav to show state 
// in NS it needs to be declared prior to writing the subnav
// in IE after (function is called after writing the 'subnav' variable)
if (ns4) { subideval() }

function subideval() {
	var subidcolor = '#660000';
	var type = typeof subid;
	if (type != 'undefined' ) { 
		if (ns4) { eval('document.ids.' + subid + '.color = "' + subidcolor + '"')
		} else { eval('document.all.' + subid +  '.style.color = "' + subidcolor + '"')
		}
	}
}

// changes color of tertiarary nav to show state 
// in NS it needs to be declared prior to writing thetertiarary nav
// in IE after (function is called after writing the 'tertiarary nav' variable)
if (ns4) { tertideval() }

function tertideval() {
	var tertidcolor = '#660000';
	var type = typeof tertnavid;
	if (type != 'undefined' ) { 
		if (ns4) { eval('document.ids.' + tertnavid + '.color = "' + tertidcolor + '"')
		} else { eval('document.all.' + tertnavid +  '.style.color = "' + tertidcolor + '"')
		}
	}
}

//
// construct the breadcrumbs from the supplied URL and index file name
//
function breadcrumb( url , indx )
{
  var i    = 0   ;
  var html = ''  ; // accumulator for html
  var path = ''  ; // accumulator for path
  var segs       ; // array of directories
  var brk  = ''  ; // break point

  // --------------------------------------------------------------------
  // split the directory path into its component parts. First, remove
  // leading/trailing /s, then split it.
  // --------------------------------------------------------------------
  segs = url.replace( /(^\/+|\/+$)/g , '' ).split( /\/+/ )  ;

  // ----------------------------------------------------
  // Scan the array and construct the breadcrumbs.
  //
  // The last segment is excluded as it is the page name.
  // ----------------------------------------------------
  for ( i = 0 ; i < segs.length - 1 ; ++i )
    {
      var seg  = segs[i] ;
      var link ;

      path += '/' + seg ;
      link  = path + '/Default.htm' + indx ;

      html += brk + '<a href="' + link + '">' + seg + '</a>' ;

      brk = '&nbsp;&gt;&nbsp;' ;

    }

  return html ;

}
