
strUserAgent = navigator.userAgent.toLowerCase();
isMacOS9 = false;
isIE = false;
isMacOSX = false;
isKonqueror = false;
isOpera = false;
isMac = (strUserAgent.indexOf("mac")!=-1);
isSafari = (strUserAgent.indexOf("safari")!=-1);
isOpera = (strUserAgent.indexOf("opera")!=-1);
isKonqueror = (strUserAgent.indexOf("konqueror")!=-1);
if (isMac) {isMacOSX = (strUserAgent.indexOf("5.2")!=-1);}
if (isMac && !isMacOSX) { isMacOS9 = true; }
isIE = ((strUserAgent.indexOf("msie") != -1) && (strUserAgent.indexOf("gecko") == -1) && (strUserAgent.indexOf("opera") == -1) && (strUserAgent.indexOf("netscape") == -1));


// EVENT HANDLERS
window.onload = fncPageInit;


//______________________________________________________________
// EVENT HANDLING FUNCTIONS

function fncPageInit() {
  //showDebug();
    
  if (typeof(fncPageOnload) == "function")  {
    fncPageOnload();
  }
}


//______________________________________________________________
// NAVIGATION
function fncShowMenu() {
  stm_bm(["menu7ae8",430,"/images/","blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","",67108897],this);
  stm_bp("p0",[1,4,0,0,0,6,0,7,100,"",-2,"",-2,50,0,0,"#999999","#000066","",3,0,0,"#000000"]);
  stm_ai("p0i0",[0,"Home","","",-1,-1,0,"/","_self","","","","",0,0,0,"","",0,0,0,0,1,"#000066",0,"#CCCCCC",0,"","",3,3,0,0,"#000066","#666666 #666666 #666666 #666666","#FFFFFF","#000066","bold 8pt 'Arial','Verdana'","bold 8pt 'Arial','Verdana'",0,0],120,0);
  stm_aix("p0i1","p0i0",[0,"About Us","","",-1,-1,0,"/about.php","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7],120,0);
  stm_bpx("p1","p0",[1,2,-5,5,0,4,0,7,100,"",-2,"",-2,50,2,3,"#999999","#FFFFF7"]);
  stm_aix("p1i0","p0i0",[0,"Staff","","",-1,-1,0,"/staff.php","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7,0,0,1,"#CCCCCC",0,"#999999",0,"","",3,3,1,1,"#000000 #000000 #CCCCCC","#000000 #000000 #999999","#000066","#FFFFFF"]);
  stm_bpx("p2","p0",[1,2,-5,5,0,4,0,0,100,"",-2,"",-2,50,2,3,"#999999","#CCCCCC"]);
  stm_aix("p2i0","p1i0",[0,"Judy","","",-1,-1,0,"/judy.php","_self","","","","",0,0,0,"","",0,0],80,0);
  stm_aix("p2i0","p1i0",[0,"Renee","","",-1,-1,0,"/renee.php","_self","","","","",0,0,0,"","",0,0],80,0);
  stm_aix("p2i1","p1i0",[0,"Peggy","","",-1,-1,0,"/peggy.php","_self","","","","",0,0,0,"","",0,0,0,0,1,"#CCCCCC",0,"#999999",0,"","",3,3,1,1,"#000000","#000000"],80,0);
  stm_ep();
  stm_aix("p1i1","p2i1",[0,"Strategic Alliances","","",-1,-1,0,"/alliances.php"]);
  //stm_aix("p1i1","p2i0",[0,"Strategic Alliances","","",-1,-1,0,"/alliances.php"]);
  //stm_aix("p1i2","p2i1",[0,"Community","","",-1,-1,0,"/community.php"]);
  stm_ep();
  stm_aix("p0i2","p0i1",[0,"Our Services","","",-1,-1,0,"/services.php"],120,0);
  stm_bpx("p3","p1",[1,2,-5,5,0,4,0,0]);
  stm_aix("p3i0","p2i0",[0,"Health","","",-1,-1,0,"/health.php"]);
  stm_aix("p3i1","p2i0",[0,"Life &amp; Disability","","",-1,-1,0,"/life.php"]);
  stm_aix("p3i2","p2i0",[0,"Retirement","","",-1,-1,0,"/retirement.php"]);
  stm_aix("p3i3","p2i1",[0,"Privacy Policy","","",-1,-1,0,"/privacy.php"]);
  stm_ep();
  stm_aix("p0i3","p0i0",[0,"Testimonials","","",-1,-1,0,"/testimonials.php"],120,0);
  stm_aix("p0i4","p0i0",[0,"News &amp; Events","","",-1,-1,0,"/news.php"],120,0);
  stm_aix("p0i5","p0i0",[0,"Contact Us","","",-1,-1,0,"/contact.php"],120,0);
  stm_ep();
  stm_em();
}


//______________________________________________________________
// UTILITY FUNCTIONS

function fncGetAbsoluteX(oObjectToGetPosition) {
  // Utility function to get the absolute X-coordinate of an object on the page
  if (typeof(oObjectToGetPosition) == "string") {
    oObjectToGetPosition = document.getElementById(oObjectToGetPosition);
  }
  var intCoords = {x: 0};
  while (oObjectToGetPosition) {
    intCoords.x += oObjectToGetPosition.offsetLeft;
    oObjectToGetPosition = oObjectToGetPosition.offsetParent;
  }
  return intCoords.x;
}

function fncGetAbsoluteY(oObjectToGetPosition) {
  // Utility function to get the absolute Y-coordinate of an object on the page
  if (typeof(oObjectToGetPosition) == "string") {
    oObjectToGetPosition = document.getElementById(oObjectToGetPosition);
  }
  var intCoords = {y: 0};
  while (oObjectToGetPosition) {
    intCoords.y += oObjectToGetPosition.offsetTop;
    oObjectToGetPosition = oObjectToGetPosition.offsetParent;
  }
  return intCoords.y;
}

function fncGetWidth(oObjectToGetSize) {
  if (typeof(oObjectToGetSize) == "string") {
    oObjectToGetSize = document.getElementById(oObjectToGetSize);
  }
  var intWidth = oObjectToGetSize.offsetWidth;
  return intWidth;
}

function fncGetHeight(oObjectToGetSize) {
  if (typeof(oObjectToGetSize) == "string") {
    oObjectToGetSize = document.getElementById(oObjectToGetSize);
  }
  var intHeight = oObjectToGetSize.offsetHeight;
  return intHeight;
}

function fncPopup(strURL, intWidth, intHeight) {
  var winPopup = window.open(strURL, "winPopup", "width=" + intWidth + ",innerWidth=" + intWidth + ",height=" + intHeight + ",innerHeight=" + intHeight + ",directories=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0");
}
