From: <Saved by Windows Internet Explorer 8>
Subject: =?Windows-1252?Q?NIMH_=B7_Older_Adults:_Depression_and_Suicide_Facts_=28F?=
	=?Windows-1252?Q?act_Sheet=29?=
Date: Fri, 11 Sep 2009 14:26:09 -0400
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_0000_01CA32EB.CE8C6050"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/health/publications/older-adults-depression-and-suicide-facts-fact-sheet/index.shtml

=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML lang=3Den xmlns=3D"http://www.w3.org/1999/xhtml" =
xml:lang=3D"en"><HEAD><TITLE>NIMH =C2=B7 Older Adults: Depression and =
Suicide Facts (Fact Sheet)</TITLE>
<META content=3D"text/html; charset=3Dutf-8" http-equiv=3Dcontent-type>
<META name=3Dcontent_id content=3D37382>
<META name=3Ddescription=20
content=3D"A brief overview of the statistics on depression and suicide =
in older adults, with information on depression treatments and suicide =
prevention"><LINK=20
title=3D"NIMH RSS Feed" rel=3Dalternate type=3Dapplication/atom+xml=20
href=3D"http://www.nimh.nih.gov/site-info/index-rss.atom"><!-- GENERAL =
SITEWIDE STYLES --><LINK=20
rel=3Dstylesheet type=3Dtext/css =
href=3D"http://www.nimh.nih.gov/styles/screen.css"=20
media=3Dall><!-- DROP-DOWN MENU STYLES--><LINK rel=3Dstylesheet =
type=3Dtext/css=20
href=3D"http://www.nimh.nih.gov/menu/menu.css" media=3Dall><LINK =
rel=3Dstylesheet=20
type=3Dtext/css href=3D"http://www.nimh.nih.gov/menu/menuNIMH.css" =
media=3Dall>
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/scripts/swfobject/swfobject.js"></SCRIPT>
<!-- THE DROP-DOWN MENU SCRIPTS--><!-- Namespace source file -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/menu/yahoo.js"></SCRIPT>
<!-- Dependency source files -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/menu/event.js"></SCRIPT>

<SCRIPT type=3Dtext/javascript =
src=3D"http://www.nimh.nih.gov/menu/dom.js"></SCRIPT>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/menu/animation.js"></SCRIPT>
<!-- Container source file -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/menu/container_core.js"></SCRIPT>
<!-- Menu source file -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/menu/menu.js"></SCRIPT>
<!-- Page-specific script -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/menu/menuNIMH.js"></SCRIPT>

<SCRIPT type=3Dtext/javascript>
function jumpToPageAction(sel){
window.location =3D sel.options[sel.selectedIndex].value;
}
</SCRIPT>

<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18702"></HEAD>
<BODY id=3Dhealth>
<DIV id=3Dtoolbar><A id=3Dskipnav=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#primary_content">Skip=20
Navigation Links</A>=20
<DIV id=3Dnih><A href=3D"http://www.nih.gov/"><IMG=20
alt=3D"National Institutes of Health"=20
src=3D"http://www.nimh.nih.gov/images/toolbar_nih.gif" width=3D196=20
height=3D30></A></DIV>
<DIV id=3Dtools><!-- BEGIN SEARCH FORM -->
<DIV>
<FORM id=3Dsearch method=3Dget name=3Dgs =
action=3Dhttp://wwwsearch.nimh.nih.gov/><LABEL=20
for=3Dsearchbox>Search NIMH:</LABEL> <INPUT id=3Dsearchbox =
maxLength=3D255 size=3D28=20
type=3Dtext name=3Dq> <INPUT id=3DbtnG alt=3D"Search NIMH Internet"=20
src=3D"http://www.nimh.nih.gov/images/button_go.gif" type=3Dimage =
name=3DbtnG> <INPUT=20
value=3D0 type=3Dhidden name=3Dentqr> <INPUT value=3D1 type=3Dhidden =
name=3Dud> <INPUT=20
value=3Ddate:D:L:d1 type=3Dhidden name=3Dsort> <INPUT value=3Dxml_no_dtd =
type=3Dhidden=20
name=3Doutput> <INPUT value=3DUTF-8 type=3Dhidden name=3Doe> <INPUT =
value=3DUTF-8=20
type=3Dhidden name=3Die> <INPUT value=3Dinternet_frontend type=3Dhidden =
name=3Dclient>=20
<INPUT value=3Dinternet_frontend type=3Dhidden name=3Dproxystylesheet> =
<INPUT=20
value=3Dinternet_collection type=3Dhidden name=3Dsite> </FORM></DIV><!-- =
END SEARCH FORM -->
<DIV id=3Dprintpage></DIV>
<DIV id=3Dtopicfinder><A =
href=3D"http://www.nimh.nih.gov/topics/index.shtml">Topic=20
Finder</A></DIV>
<DIV id=3Drssfeed><A =
href=3D"http://www.nimh.nih.gov/site-info/index-rss.atom">RSS=20
Feed</A> (<A id=3Drssinstructions=20
href=3D"http://www.nimh.nih.gov/site-info/subscribe-to-nimh-rss-updates.s=
html">What=E2=80=99s=20
RSS?</A>)</DIV></DIV></DIV>
<DIV></DIV>
<DIV id=3Dbanner><A href=3D"http://www.nimh.nih.gov/index.shtml"><IMG=20
alt=3D"National Institute of Mental Health"=20
src=3D"http://www.nimh.nih.gov/images/banner_nimh.gif" width=3D433=20
height=3D70></A></DIV><!-- BEGIN NAVIGATION -->
<DIV id=3DnavWrap class=3Dyuimenubar>
<DIV id=3DnavInner class=3Dbd>
<UL class=3Dfirst-of-type>
  <LI class=3D"yuimenubaritem home"><A class=3Dnav=20
  href=3D"http://www.nimh.nih.gov/index.shtml">NIMH Home</A></LI>
  <LI class=3D"yuimenubaritem health"><A class=3Dnav=20
  href=3D"http://www.nimh.nih.gov/health/index.shtml">Health &amp;=20
  Outreach</A></LI>
  <LI class=3D"yuimenubaritem research"><A class=3Dnav=20
  href=3D"http://www.nimh.nih.gov/research-funding/index.shtml">Research =

  Funding</A></LI>
  <LI class=3D"yuimenubaritem news"><A class=3Dnav=20
  href=3D"http://www.nimh.nih.gov/science-news/index.shtml">Science =
News</A></LI>
  <LI class=3D"yuimenubaritem about"><A class=3Dnav=20
  href=3D"http://www.nimh.nih.gov/about/index.shtml">About=20
NIMH</A></LI></UL></DIV></DIV><!-- END NAVIGATION --><!-- BEGIN =
BREADCRUMBS -->
<DIV id=3Dbreadcrumbs>Back to: <A =
href=3D"http://www.nimh.nih.gov/index.shtml">NIMH=20
Home</A> =C2=BB <A =
href=3D"http://www.nimh.nih.gov/health/index.shtml">Health &amp;=20
Outreach</A> =C2=BB <A=20
href=3D"http://www.nimh.nih.gov/health/publications/index.shtml">Publicat=
ions</A>=20
</DIV><!-- END BREADCRUMBS -->
<DIV id=3Dcontent>
<DIV id=3Dprimary_content>
<H1 id=3Dtitle>Older Adults: Depression and Suicide Facts (Fact =
Sheet)</H1>
<P>A brief overview of the statistics on depression and suicide in older =
adults,=20
with information on depression treatments and suicide prevention =
(2003).</P>
<DIV class=3DsingleColMed>
<UL>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#how-common">How=20
  common is suicide among older adults?</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#role">What=20
  role does depression play?</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#part-of-aging">Isn=E2=80=99t =

  depression just part of aging?</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#treatments">What=20
  are the treatments for depression in older adults?</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#ethnic-racial">Are=20
  some ethnic/racial groups at higher risk of suicide?</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#research">What=20
  research is being done?</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#more-info">For=20
  More Information</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#references">References</A></L=
I></UL></DIV>
<P><BR class=3Dclearall></P>
<DIV class=3DsingleColThin>
<H3 id=3Dhow-common>How common is suicide among older adults?</H3>
<P>Older Americans are disproportionately likely to die by suicide.</P>
<UL>
  <LI>Although they comprise only 12 percent of the U.S. population, =
people age=20
  65 and older accounted for 16 percent of suicide deaths in 2004.<A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#cdc"><SUP>1</SUP></A></LI>
  <LI>14.3 of every 100,000 people age 65 and older died by suicide in =
2004,=20
  higher than the rate of about 11 per 100,000 in the general =
population. <A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#cdc"><SUP>1</SUP></A></LI>
  <LI>Non-Hispanic white men age 85 and older were most likely to die by =

  suicide. They had a rate of 49.8 suicide deaths per 100,000 persons in =
that=20
  age group.<A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#cdc"><SUP>1</SUP></A></LI></U=
L>
<DIV class=3Dencloseborder>
<H3>IF YOU ARE IN CRISIS AND NEED HELP RIGHT AWAY:</H3>
<P>Call this toll-free number, available 24 hours a day, every day:=20
1-800-273-TALK (8255). You will reach the National Suicide Prevention =
Lifeline,=20
a service available to anyone. You may call for yourself or for someone =
you care=20
about. All calls are confidential.</P>
<P><A href=3D"http://www.nlm.nih.gov/medlineplus/suicide.html">Suicide =
information=20
and resources from MedlinePlus</A> (<A=20
href=3D"http://www.nlm.nih.gov/medlineplus/spanish/suicide.html">en=20
Espa=C3=B1ol</A>)</P></DIV>
<H3 id=3Drole>What role does depression play?</H3>
<P>Depression, one of the conditions most commonly associated with =
suicide in=20
older adults,<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#conwell-suicide-aging"><SUP>2=
</SUP></A>=20
is a widely under-recognized and undertreated medical illness. Studies =
show that=20
many older adults who die by suicide =E2=80=94 up to 75 percent =
=E2=80=94 visited a physician=20
within a month before death.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#conwell-later-life"><SUP>3</S=
UP></A>=20
These findings point to the urgency of improving detection and treatment =
of=20
depression to reduce suicide risk among older adults.</P>
<UL>
  <LI>The risk of depression in the elderly increases with other =
illnesses and=20
  when ability to function becomes limited. Estimates of major =
depression in=20
  older people living in the community range from less than 1 percent to =
about 5=20
  percent, but rises to 13.5 percent in those who require home =
healthcare and to=20
  11.5 percent in elderly hospital patients.<A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#hybels-blazer"><SUP>4</SUP></=
A></LI>
  <LI>An estimated 5 million have subsyndromal depression, symptoms that =
fall=20
  short of meeting the full diagnostic criteria for a disorder.<A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#narrow"><SUP>5</SUP></A><SUP>=
,<A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#alexopoulos">6</A></SUP></LI>=

  <LI>Subsyndromal depression is especially common among older persons =
and is=20
  associated with an increased risk of developing major depression.<A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#horwath"><SUP>7</SUP></A></LI=
></UL>
<H3 id=3Dpart-of-aging>Isn=E2=80=99t depression just part of aging?</H3>
<P>Depressive disorder is not a normal part of aging. Emotional =
experiences of=20
sadness, grief, response to loss, and temporary =E2=80=9Cblue=E2=80=9D =
moods are normal.=20
Persistent depression that interferes significantly with ability to =
function is=20
not.</P>
<P>Health professionals may mistakenly think that persistent depression =
is an=20
acceptable response to other serious illnesses and the social and =
financial=20
hardships that often accompany aging - an attitude often shared by older =
people=20
themselves.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#panel"><SUP>8</SUP></A><SUP>,=
<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#lebowitz">9</A></SUP>=20
This contributes to low rates of diagnosis and treatment in older =
adults.</P>
<P>Depression can and should be treated when it occurs at the same time =
as other=20
medical illnesses. Untreated depression can delay recovery or worsen the =
outcome=20
of these other illnesses.</P>
<H3 id=3Dtreatments>What are the treatments for depression in older =
adults?</H3>
<P>Antidepressant medications or psychotherapy, or a combination of the =
two, can=20
be effective treatments for late-life depression.</P>
<H4>Medications</H4>
<P>Antidepressant medications affect brain chemicals called =
neurotransmitters.=20
For example, medications called SSRIs (selective serotonin reuptake =
inhibitors)=20
affect the neurotransmitter serotonin. Different medications may affect=20
different neurotransmitters.</P>
<P>Some older adults may find that newer antidepressant medications, =
including=20
SSRIs, have fewer side effects than older medications, which include =
tricyclic=20
antidepressants and monoamine oxidase inhibitors (MAOIs).<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#reynolds-lebowitz"><SUP>10</S=
UP></A>=20
However, others may find that these older medications work well for =
them.</P>
<P>It=E2=80=99s important to be aware that there are several medications =
for depression,=20
that different medications work for different people, and that it takes =
four to=20
eight weeks for the medications to work. If one medication =
doesn=E2=80=99t help,=20
research shows that a different antidepressant might.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#madhukar"><SUP>11</SUP></A></=
P>
<P>Also, older adults experiencing depression for the first time should =
talk to=20
their doctors about continuing medication even if their symptoms have=20
disappeared with treatment. Studies showed that patients age 70 and =
older who=20
became symptom-free and continued to take their medication for two more =
years=20
were 60 percent less likely to relapse than those who discontinued their =

medications.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#reynolds-dew"><SUP>12</SUP></=
A></P>
<H4>Psychotherapy</H4>
<P>In psychotherapy, people interact with a specially trained health=20
professional to deal with depression, thoughts of suicide, and other =
problems.=20
Research shows that certain types of psychotherapy are effective =
treatments for=20
late-life depression.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#lebowitz"><SUP>9</SUP></A></P=
>
<P>For many older adults, especially those who are in good physical =
health,=20
combining psychotherapy with antidepressant medication appears to =
provide the=20
most benefit. A study showed that about 80 percent of older adults with=20
depression recovered with this kind of combined treatment <A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#little-reynolds"><SUP>13</SUP=
></A>=20
and had lower recurrence rates than with psychotherapy or medication =
alone.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#reynolds-frank"><SUP>14</SUP>=
</A></P>
<P>Another study of depressed older adults with physical illnesses and =
problems=20
with memory and thinking showed that combined treatment was no more =
effective=20
than medication alone.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#reynolds-dew"><SUP>12</SUP></=
A>=20
Research can help further determine which older adults appear to be most =
likely=20
to benefit from a combination of medication and psychotherapy or from =
either=20
treatment alone.</P>
<H3 id=3Dethnic-racial>Are some ethnic/racial groups at higher risk of=20
suicide?</H3>
<P>For every 100,000 people age 65 and older in each of the =
ethnic/racial groups=20
below, the following number died by suicide in 2004<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#cdc"><SUP>1</SUP></A>:</P>
<UL>
  <LI>Non-Hispanic Whites =E2=80=94 15.8 per 100,000</LI>
  <LI>Asian and Pacific Islanders =E2=80=94 10.6 per 100,000</LI>
  <LI>Hispanics =E2=80=94 7.9 per 100,000</LI>
  <LI>Non-Hispanic Blacks =E2=80=94 5.0 per 100,000</LI></UL>
<H3 id=3Dresearch>What research is being done?</H3>
<P>NIMH-funded researchers designed a program for health-care clinics, =
to=20
improve recognition and treatment of depression and suicidal symptoms in =
elderly=20
patients. A recent study of the program showed that it reduced thoughts =
of=20
suicide and that major depression improved.<A=20
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-depressi=
on-and-suicide-facts-fact-sheet/index.shtml#bruce"><SUP>15</SUP></A></P>
<P>Examples of other ongoing or recently completed NIMH-funded studies =
on topics=20
related to depression and suicide in older adults include:</P>
<UL>
  <LI>overcoming barriers to treatment for depression</LI>
  <LI>improving adherence to treatment</LI>
  <LI>the relationship between other medical illnesses and =
depression</LI>
  <LI>physical function and depression</LI>
  <LI>depression treatment for depressed older adults in homecare</LI>
  <LI>treatment services for depression</LI>
  <LI>death rates of depressed older adults, compared to others</LI>
  <LI>depression treatment for low-income older adults</LI>
  <LI>depression treatment for caregivers of older adults</LI></UL>
<DIV class=3Dencloseborder>
<H3 class=3Dcenter>Ask yourself=E2=80=A6</H3>
<H4>=E2=80=A6if you feel:</H4>
<UL>
  <LI>nervous</LI>
  <LI>empty</LI>
  <LI>worthless</LI>
  <LI>that you don=E2=80=99t enjoy things you used to</LI>
  <LI>restless</LI>
  <LI>irritable</LI>
  <LI>unloved</LI>
  <LI>that life isn=E2=80=99t worth living</LI></UL>
<H4>=E2=80=A6or if you are:</H4>
<UL>
  <LI>sleeping more or less than usual</LI>
  <LI>eating more or less than usual</LI></UL>
<P><STRONG>These may be symptoms of depression, a treatable illness. =
Talk to=20
your doctor.</STRONG></P>
<P>Other symptoms that may signal depression, but may also be signs of =
other=20
serious illnesses, should be checked by a doctor, whatever the cause. =
They=20
include:</P>
<UL>
  <LI>being very tired and sluggish</LI>
  <LI>frequent headaches</LI>
  <LI>frequent stomachaches</LI>
  <LI>chronic pain</LI></UL></DIV>
<DIV class=3Dencloseborder>
<H3 id=3Dmore-info>For More Information</H3>
<P><A =
href=3D"http://www.nlm.nih.gov/medlineplus/depression.html">Depression=20
Information and Organizations</A> from NLM=E2=80=99s MedlinePlus (<A =
lang=3Des=20
href=3D"http://www.nlm.nih.gov/medlineplus/spanish/depression.html">en=20
Espa=C3=B1ol</A>)</P></DIV>
<H3 id=3Dreferences>References</H3>
<P id=3Dcdc>1. Centers for Disease Control and Prevention, National =
Center for=20
Injury Prevention and Control. Web-based Injury Statistics Query and =
Reporting=20
System (WISQARS) [online]. (2005) [accessed January 31 2007]. Available =
from=20
URL: <A=20
href=3D"http://www.cdc.gov/ncipc/wisqars">www.cdc.gov/ncipc/wisqars</A>.<=
/P>
<P id=3Dconwell-suicide-aging>2. Conwell Y, Brent D. Suicide and aging. =
I:=20
patterns of psychiatric diagnosis. <CITE>International =
Psychogeriatrics</CITE>,=20
1995; 7(2): 149-64.</P>
<P id=3Dconwell-later-life>3. Conwell Y. Suicide in later life: a review =
and=20
recommendations for prevention. <CITE>Suicide and Life Threatening=20
Behavior</CITE>, 2001; 31(Suppl): 32-47.</P>
<P id=3Dhybels-blazer>4. Hybels CF and Blazer DG. Epidemiology of =
late-life mental=20
disorders. <CITE>Clinics in Geriatric Medicine</CITE>, 19(Nov.=20
2003):663-696.</P>
<P id=3Dnarrow>5. Narrow WE. One-year prevalence of depressive disorders =
among=20
adults 18 and over in the U.S.: NIMH ECA prospective data. Unpublished=20
table.</P>
<P id=3Dalexopoulos>6. Alexopoulos GS. Mood disorders. In: Sadock BJ, =
Sadock VA,=20
eds. <CITE>Comprehensive Textbook of Psychiatry, 7th Edition, Vol. =
2</CITE>.=20
Baltimore: Williams and Wilkins, 2000.</P>
<P id=3Dhorwath>7. Horwath E, Johnson J, Klerman GL, Weissman MM. =
Depressive=20
symptoms as relative and attributable risk factors for first-onset major =

depression. <CITE>Archives of General Psychiatry</CITE>, 1992; 49(10):=20
817-23.</P>
<P id=3Dpanel>8. Depression Guideline Panel. Depression in primary care: =
volume 1.=20
Detection and diagnosis. Clinical practice guideline, number 5. =
<CITE>AHCPR=20
Publication No. 93-0550</CITE>. Rockville, MD: Agency for Health Care, =
Policy=20
and Research, 1993.</P>
<P id=3Dlebowitz>9. Lebowitz BD, Pearson JL, Schneider LS, Reynolds III =
CF,=20
Alexopoulos GS, Bruce ML, Conwell Y, Katz IR, Meyers BS, Morrison MF, =
Mossey J,=20
Niederehe G, Parmelee P. Diagnosis and treatment of depression in late =
life.=20
Consensus statement update. <CITE>Journal of the American Medical=20
Association</CITE>, 1997; 278(14): 1186-90.</P>
<P id=3Dreynolds-lebowitz>10. Reynolds III CF, Lebowitz BD. What are the =
best=20
treatments for depression in old age? <CITE>The Harvard Mental Health=20
Letter</CITE>, 1999; 15(12): 8.</P>
<P id=3Dmadhukar>11. Madhukar H. Trivedi H, Fava M, Wisniewski SR, Thase =
ME,=20
Quitkin F, Warden D, Ritz L, Nierenberg AA, Lebowitz BD, Biggs MM, =
Luther JF,=20
Shores-Wilson K, Rush AK, for the STAR*D Study Team. Medication =
Augmentation=20
after the Failure of SSRIs for Depression. <CITE>New England Journal of=20
Medicine</CITE>, Volume 354:1243-1252. 2006.</P>
<P id=3Dreynolds-dew>12. Reynolds III CF, Dew MA, Pollock BG, Mulsant =
BH, Frank E,=20
Miller MD, Houck PR, Mazumdar S, Butters MA, Stack JA, Schlernitzauer =
MA, Whyte=20
EM, Gildengers A, Karp J, Lenze E, Szanto K, Bensasi S, Kupfer DJ. =
Maintenance=20
treatment of major depression in old age. <CITE>New England Journal of=20
Medicine</CITE>. Mar 16;354(11):1130-8. 2006.</P>
<P id=3Dlittle-reynolds>13. Little JT, Reynolds III CF, Dew MA, Frank E, =
Begley=20
AE, Miller MD, Cornes C, Mazumdar S, Perel JM, Kupfer DJ. How common is=20
resistance to treatment in recurrent, nonpsychotic geriatric depression? =

<CITE>American Journal of Psychiatry</CITE>, 1998; 155(8): 1035-8.</P>
<P id=3Dreynolds-frank>14. Reynolds III CF, Frank E, Perel JM, Imber SD, =
Cornes C,=20
Miller MD, Mazumdar S, Houck PR, Dew MA, Stack JA, Pollock BG, Kupfer =
DJ.=20
Nortriptyline and interpersonal psychotherapy as maintenance therapies =
for=20
recurrent major depression: a randomized controlled trial in patients =
older than=20
59 years. <CITE>Journal of the American Medical Association</CITE>, =
1999;=20
281(1): 39-45.</P>
<P id=3Dbruce>15. Bruce ML, Ten Have TR, Reynolds III CF, Katz II, =
Schulberg HC,=20
Mulsant BH, Brown GK, McAvay GJ, Pearson JL, Alexopoulos GS. Reducing =
Suicidal=20
Ideation and Depressive Symptoms in Depressed Older Primary Care =
Patients: A=20
Randomized Controlled Trial. <CITE>Journal of the American Medical=20
Association</CITE>, 2004;291:1081-1091.</P>
<HR>

<P>NIH Publication No. 4593<BR>Revised April 2007</P></DIV>
<DIV class=3D"singleColThin encloseborder">
<P>NIMH publications are in the public domain and may be reproduced or =
copied=20
without the permission from the National Institute of Mental Health =
(NIMH). NIMH=20
encourages you to reproduce them and use them in your efforts to improve =
public=20
health. Citation of the National Institute of Mental Health as a source =
is=20
appreciated. However, using government materials inappropriately can =
raise legal=20
or ethical concerns, so we ask you to use these guidelines:</P>
<UL>
  <LI>NIMH does not endorse or recommend any commercial products, =
processes, or=20
  services, and publications may not be used for advertising or =
endorsement=20
  purposes.</LI>
  <LI>NIMH does not provide specific medical advice or treatment =
recommendations=20
  or referrals; these materials may not be used in a manner that has the =

  appearance of such information.</LI>
  <LI>NIMH requests that non-Federal organizations not alter =
publications in a=20
  way that will jeopardize the integrity and "brand" when using=20
  publications.</LI>
  <LI>Addition of Non-Federal Government logos and website links may not =
have=20
  the appearance of NIMH endorsement of any specific commercial products =
or=20
  services or medical treatments or services.</LI></UL>
<P>If you have questions regarding these guidelines and use of NIMH=20
publications, please contact the NIMH Information Center at =
1-866-615-6464 or at=20
<A =
href=3D"mailto:nimhinfo@nih.gov">nimhinfo@nih.gov</A>.</P></DIV></DIV>
<DIV id=3Dsidebar><!-- Start Box -->
<DIV class=3Dbox>
<DIV class=3Dboxheader>
<H2>Options</H2></DIV>
<DIV class=3Dboxcontent>
<UL>
  <LI>See all NIMH publications about: <A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/depression-listing.sh=
tml">Depression</A>=20
  , <A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/suicide-prevention-li=
sting.shtml">Suicide=20
  Prevention</A> , <A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/older-adults-listing.=
shtml">Older=20
  Adults</A> , <A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/prevention-listing.sh=
tml">Prevention</A>=20
  </LI>
  <LI><A =
href=3D"http://www.nimh.nih.gov/health/topics/index.shtml">Browse Mental =

  Health Topics</A> </LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/health/publications/about-nimh-publicatio=
ns.shtml">About=20
  NIMH Publications</A> </LI></UL></DIV></DIV><!-- End Box =
--></DIV></DIV>
<DIV id=3Dfooter>
<H2 id=3Dfooter_header>Footer</H2>
<P>Some NIMH pages link to <ABBR title=3D"Portable Document =
Format">PDF</ABBR>=20
files. <A =
href=3D"http://www.adobe.com/products/acrobat/readstep2.html">Download=20
Adobe Reader</A> to view and print <ABBR=20
title=3D"Portable Document Format">PDF</ABBR> files.</P>
<DIV id=3Dreviewdate>
<P>This page last reviewed: May 18, 2009</P></DIV><!-- BEGIN =
FOOTER_LINKS -->
<DIV id=3Dfooter_links>
<UL>
  <LI><A href=3D"http://www.nimh.nih.gov/site-info/site-map.shtml">Site=20
  Map</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/site-info/register-for-nimh-e-mail-newsle=
tters.shtml">Newsletters</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/about/staff-directories/index.shtml">Staf=
f=20
  Directories</A></LI>
  <LI><A =
href=3D"http://www.nimh.nih.gov/site-info/contact-nimh.shtml">Contact=20
  NIMH</A></LI>
  <LI><A href=3D"http://www.nimh.nih.gov/about/jobs.shtml">Jobs</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/site-info/copyright.shtml">Copyright</A><=
/LI>
  <LI><A =
href=3D"http://www.nimh.nih.gov/site-info/privacy-policy.shtml">Privacy=20
  Policy</A></LI>
  <LI><A=20
  =
href=3D"http://www.nimh.nih.gov/site-info/policies.shtml">Policies</A></L=
I>
  <LI id=3Dlast><A=20
href=3D"http://www.nih.gov/icd/od/foia/index.htm">FOIA</A></LI></UL></DIV=
><!-- END FOOTER_LINKS -->
<P>The National Institute of Mental Health (NIMH) is part of the =
National=20
Institutes of Health (NIH), a component of the U.S. Department of Health =
and=20
Human Services.</P>
<P id=3Dlogos><A href=3D"http://www.nih.gov/"><IMG=20
alt=3D"NIH - National Institutes of Health"=20
src=3D"http://www.nimh.nih.gov/images/footer_nihlogo.gif" width=3D37=20
height=3D37></A><A href=3D"http://www.hhs.gov/"><IMG=20
alt=3D"HHS - Department of Health and Human Services"=20
src=3D"http://www.nimh.nih.gov/images/footer_hhslogo.gif" width=3D37=20
height=3D37></A><A href=3D"http://www.usa.gov/"><IMG=20
alt=3D"USA.gov - Government Made Easy"=20
src=3D"http://www.nimh.nih.gov/images/footer_usagovlogo.gif" width=3D98=20
height=3D37></A></P><!-- GENERAL SITEWIDE SCRIPTS -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/scripts/init.js"></SCRIPT>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/scripts/print.js"></SCRIPT>
<!-- START OF SmartSource Data Collector TAG --><!-- Copyright (c) =
1996-2009 WebTrends Inc.  All rights reserved. --><!-- Version: 8.6.2 =
--><!-- Tag Builder Version: 3.0  --><!-- Created: 7/6/2009 8:43:53 PM =
-->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.nimh.nih.gov/scripts/webtrends.js"></SCRIPT>
<!-- =
-------------------------------------------------------------------------=
---------- --><!-- Warning: The two script blocks below must remain =
inline. Moving them to an external --><!-- JavaScript include file can =
cause serious problems with cross-domain tracking.      --><!-- =
-------------------------------------------------------------------------=
---------- -->
<SCRIPT type=3Dtext/javascript>
//<![CDATA[
var _tag=3Dnew WebTrends();
//]]>>
</SCRIPT>

<SCRIPT type=3Dtext/javascript>
//<![CDATA[
// Add custom parameters here.
//_tag.DCSext.param_name=3Dparam_value;
_tag.dcsCollect();
//]]>>
</SCRIPT>
<NOSCRIPT>
<DIV><IMG id=3DDCSIMG alt=3DDCSIMG=20
src=3D"http://nimhwdc2.nimh.nih.gov/dcspa4k6s00000o22m03y5l99_9l2t/njs.gi=
f?dcsuri=3D/nojavascript&amp;WT.js=3DNo&amp;DCS.dcscfg=3D1&amp;WT.tv=3D8.=
6.2"=20
width=3D1=20
height=3D1></DIV></NOSCRIPT><!-- END OF SmartSource Data Collector TAG =
--></DIV></BODY></HTML>

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.nimh.nih.gov/images/toolbar_nih.gif

R0lGODlhxAAeAPcAANfSuWZmYYSDeLm1oqKgkJORhJuYin18c25tZ3V0bcjErc/Ls6qnlsC8p4yK
frGunAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAADEAB4A
AAj/AAEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOqXMmypcuX
MGPKnEmzps2bOHPq3Mmzp8+SCxS0bPBSwQKFRnUSCJAAgIAAAwQyCBCAgcCnVAMIEEhV4AKsCKI6
DVAAQFeBBagK5Rog4dmnZc8uDYDAqtmsAQgAGKB1L16oYwfw3coXb1SsZxUkoCrgaMEGiwMcWIt3
a8GngvveZTxwatWBZwHMzcpWdF7TARpgFmiAalkABrAKMFAaNtmlB67SvTvwAFW7vBG+3d11AdMH
CAIcFeAbgQCrgwGoXpxAAFHM0acztT72gADLrQmk/6Vd0Lf4AOQZzzaIXbN68rbJgm4rVUBy76WX
6p0bGzCAAwckkNt8BA0X1XABPHCWcQ6gR6Bw9GGlYFt8JbBAbET5ZZmGA+k3UHsbeqibWLoRoBp8
BEYX3EEg1kYQgAI++KF/vHk4V3X+afVUgfTVthqCadHH11IbhmYQkGcll8ADBKnIoUAiBuZklHAR
YNdcBThWUFcqUkUAASTOWEBalnkJJmjf9WhkYPMR8NR+TMUZ1ZCtkWikgcE9lQACyUEJlW8yHhkh
U3zS10Bypwnk5JSJSqmZaXrpxhlaVFko6JN4RUoQYu5lFSmdOfY44nyemhYkYEuN2eidgx446Kkl
+v8m1po86garVw0qp+ijjGraop++5jVAhgIh5+CWFHYq2Fqb5kUkW8v6qWqka64GbVpwEuAbYLlS
5UCgeA43IX2IeunipWONy6Gsu27Y64yZhdiotSMquGGKnSb065rdBvDtiqPmd5p+c0WV3ABTIQAu
fa0VgNuIuUon2QCt/asecA9iFrECdBnr2KKPRhleWq9BOqN3lo03nkHmrQzwZVB1qSN5ByfM1nd2
0duVjXlxDJXPbFEmamLbhjWiZwBMRRhTbJmL7NFnteb0k1RHqVilzFKJl0CQUTWZQQMg+vXLzcbb
dF9A3yVUpgHX2OhGDYSZErMWKUBsRAtoedCwP/Uf7fffgAcu+OCEF2744YgnrvjijDfu+OOQRy75
5CEFBAA7

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.nimh.nih.gov/images/banner_nimh.gif

R0lGODlhsQFGAOYAAKSq05Oby/z7/UxYqGRwtMjM54KKwrW63H2GwKiu1ZuizsXI5DhGn1ZhrXiB
vp2j0F1psb7D4uTl8kVSpK602EhVpmhztsDE4klWp2t1uCw7mYqSxmFssnF7ujxKoNnc7Y2VyNba
63R+vTRCnEhWpvLy+UdUpe3u98PH5Kux11hjrmJus7i+393g7+Lk8aCm0bC22kBNoujq9NHV6bq/
3uXn8z5MoURRpLzA4N/h8LzA3rm+305aqkNQpERQpLi93lJeqltmsDtIoLzB4cLG401aqT9MojpH
n0NQo0tYqEJPo253uLi83FJerLq+3WNvtM7S57q/4HJ8u8HE4EpXp0pYqHN8vI+XyVBcqcPG4cvO
5V9qspifzsfL5PDw+Lm+3VFeqkRRo09bqVBcqlFdq05aqVFdqr/E4k5bqU9cqlBdqr3C4U1ZqMTH
4oeQxU5aqFNfq2Vvs1FcqkZTpevs9b7C4MHF40JPpHJ7u7/D4pCYykhWpXV/vPj4/P///1JeqyH5
BAAAAAAALAAAAACxAUYAAAf/gH+Cg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWm
p6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNnGlKQkfT1NNCMWKDZFQe1Uc2
2dDS3tXgf9vd5EceSWSJ4urU5n9mGEox+Pn6SGmIYxUYzGgbUGGMI4GCylQoA4oMQYOHFDK8hPCP
REIVGWXUZIaKEiVoDI0xYWKAO0H1TATEtNFfBZOHOlLJeLGSzIo4qcxkdUOAn59Ag/o5grAMAqE/
jfzpiRRpDItHm/4kUCQRU6lAn/6h8qJEjRxgw+ZwIUNAD0RzDgSYM2gAAhps/xeNmaMCyx8xHGhw
yObJLdxDePXynTS37t28e/8UtiuXLmNNZOYYqOEFzMa0FBAMGFSBCwUuGCyZqdBgcKI5NDQfwqBA
QWhBgRNTYu36XBIwE2m/VsVmyZIXWBFQETSmQYcDQKcYCN07A5OmLp44CF3cAQepCkwkav68KYfp
gtgYoPBBKoAd2g95+KlmogkKfjwwurGAhnY2RxGw+fQ+/qEBfPjBx2aU0GffH/j5od9S9aWniIEO
ZlLECkDJV8h6fnRxliAYyqCEJRgEQMcNjKxHQYSDKHHCCR8KAqCABE6iIot/FEGAH0r9MWOLqpBR
BhUxYJUFj2MMIAQAfrxwxP9OPsaAJFItCMHGSWOwMYJUWWx4SJNPIjXClII45EGXQmlgAkSGHPHT
Ai3OkcBQjAjhRwJsFYdAA2hy4iachgzQgR8dxCiJnHQq1sCdBhEalyKKctJfA0eYJoiaffh3VwN+
COCCVpSoKAOniahZqCEx1FADp34CKmgkpZ76R39HCNIqqKswgJUfPeSZxBKqFrInUjnQ+oeaTQkg
xCK/IhWrr282tSwixPqBBUN7PpuGCR9VoAZxVwJghBlksHEDmLb1oMRKxFWQBBU99LDTIGVMoIS7
CFX735+B0kMFBuIqoa02SZj7r2LdfhvuuGSMUTC4DyW0EMF+eItQR+aiiwj/GQGfO7ERSGrQTpp+
PHeDQVQY4IcWEnCqRgXzfuwwGywjTM8RLrjAAET1fDTBYKIuSsisbeFLIMUaE+LQDUrI/MesZDjp
xwgMteoB0hajEm1TXERYxo0jnDRIskEFC7JUcEjKrFTPft2ssoqo2UWGH9r7BxoVKGDqAzYYtGcI
AWAQWzZm3NBBCDWAkLcgc+yARwYfhGDABCdRAQcNEjh+g0ByF5JqvqwFQIUWNbxweGSD1/CAB3q/
ybffiImxd99+sfX369TFYADhIMSQJ0aC4354iCFErFohaoLghwHD3aDDBzO4+kcaRzxQQwgdzOEO
Xj+ksYEMWqwwHAZXlFBC/wp12gBCCBLgMEdIw87p8yBAuyi0YrbjrjtKgnchQfevzTqAA+UBwF5K
FSwtyCB3uyvF1ZoiBK+RwVZpQ9zawiYsNQUPKSDYzSHAFpQI/oGDQPEgIdQUAC1Iqwz2MoMQKgUU
HUzgDzYASgl68KIB/QEDUfkJDVq0niwERQqbKQMchIK8D75JhJvbjBLoUIOgnOgPA8BDULRwlhj+
ZIY1HIAV/TDD/sgni1uc4VJSEJQUkGg1OfTDDv/QgxIAhQkVABkXWqADEtlAAAr4gKtUSIegLGE4
L1pAUArSAy8AxQZspEFQ+uABd/TsEKWSgBAGQMk58CpfNyAjUMwoCBwKpf8BPFiaqWJQAeT8RD8x
kEALnIgiBfqhAFjZwn4GoSYPgtAPYiOeHx7QlDZoaYMT7KAhbsknaEUMCXCzVxLc4IcDaKACPpEP
BizgByfEgQ1JJAOxKkAzPwCBIcQKgAaY+QUSzaENAtLAjUKABCMWkxBJXFoO/LAAD2CqBEq5gQkn
IIQZ+GEm06zmNZMYUGuywV4EpaZBeTDEenpAkHAIZSG0+RNuusCbZWBDHJzghydwYCIj3OULBJC3
CfhhCzlwFfj8IE4quLGBqfKDBTSATuSxgQMykEEGAkIFP7hACEKAgh8IAE73QVICMnhCB5a6hA2o
iqH09MBD/RDRpfmkAhr/QNIL4jirMqhAB0PFUwzmWc975shqgMLKAu4QUlsG8ye5DCk1kWIsRRDT
rWhr25xG8DYsKOGICEKADCqAhhjwMlZk6JYSHCK0AVjBD26YwwDY4IcUaEdNJ2CAGBjgBZUqIAQ2
SAMDWuCqzMFzfmP1gw2KEAMY+OFYSqjBCTQwBwJ8YAVjSGzEFptNxUYGsL3dLRlMoAA/MIAktspO
nx4b2clW1gRkUAKSRmC29gHgCU+jwp804AJXKSEEJRiBRwK0giKk6gAxKEMMLUsGD0hAkglbQQj4
gAETYBeI7RtVIVLblEAR17jI9YNyJ1AAAOxMA0YF2g2ma5DUrra1r1WF/5ogYEKpTABNtRzmW3FZ
QT8guCllO82G3ynBvIZqTkrAQoZGANht2MAIR0iCCZf1yCT+N8QeKEEIPqQmAy9NAnusgAdswAAV
aOoppg1ar1LpAkTaS59+yAIEGGCEWdZ4fo9EKJaN+t0arGCpK5gejwZx42zkeMfuFKF1bYWHGKRA
ABoY5R/WcwALLDUIu3zJnzIwHFsVKn5FUIINPBAD4OTrkaRyQQlekIBGA+A5gerylzsQZjSP4QZD
HkGA/ixnuTHZyYBNhZos4ACsbGA3GT4bsDqsgRM0JYMiNjEh7qpXOinhbdKFE+ku+BMaGzWJe2KA
rID8lEcCTQ1KAMFF4f+K5FBrDrWdBqwQgeKCJVwuv2yJZ5aBu+U/LzsoHtKwcYddWmfrMgEjEEAK
RkAHHYxAzgv8yYm0nWA5QxEObwPKoY1Kqhq4YARzCHgMqBmoGHwbKOEWAxVSYMifcLrcfAJakl3Z
gStJpQSInBSJ3blqkGnAlELxZaydJW6Sn5hOZVDxBwIAp5sCpQ5T4NOVVRVsche73q4yAS/9cIIU
vLfZG4citCG+rAFMYG1FnPm+C6XlXhlbAotudAJSABpxC/vHRDdmAhigAxkg2AAMgLcfZsDoRmeG
kt1mC9D+ARQoIGnp75OVvYWuqlRGvdFUD00MyoNLZj4c6MuSuLlNoab/DtigO01pj8bx2nFdjiCN
QKkrWkbMeLadnC23zhCcoNwAITDgsBovlI2LG2I5odnYco6hF74xghakLM33WnK04SSGed2AAcxk
J7bpDnd3CpsKGXA6l4OngQnM4QZHUEICy/wH08dt8LSckw1Mtgc/3MAGcl5PHRgwB3kdYQ5qoPff
t6IHyI5ACNjtfb+dx/sBfNfDxke+8sWAqSxowAgIHr+nZ69mURReW1jBBGeUarO2YXEVfQxwA2RT
XRxneQUoa4fwSCkXQksjAy2gWSPgar4meo3FXJJVBM+1e0AjJw+gBG8QQ2Izce0nSlmnBH5wAdgw
Ah/wKbsnfmxhAmRk/wNlEAPI0Xs46AfrMgZHcEBJsFyQ9YEhqIL51QOY4lqEJmel8jRiMAANIAMd
gAY2KEqv94MagAY20IObgWj7NXc2RkZBOIQgkARsIAIdVQFzUGr69yZXJ3hBNwqFp0UHJxQjIBAE
qDZNcYCLZwOuhkEa9IAmZ4gOGIH8pgSCBCdIUB4NkFU/wQCO5AcUQF3ZtE39hFEimH08xwAe4E8t
oBQqGE90GCuPKFMjcCMu1D6XOIVb9ool4wdtoAFztW+vOG0lQAUfx1LDMVGa6E/fBHuKSCdykiE9
ADQYYDz1JAQS4AcqAIvCx2mzVQQVABwGoAGl5gd/tHvrhypCo4u8iP8cnrM1fjAFGhAEhuRjEkdG
DFABZnCKEqYqGOBUUgFrfVhijddWPdCIIfdLiCgUlSeQimAi6VEGavAT8jGLQOFPFhASRgAUSpBF
N5RGazRnlqgdO/IHEwBWQNFE8uFF/xEgNrSRIpkEfxIUcMAQEfkTE0mSm9GSfqB8FRAUSGJDMvkh
mbRIQtASFRkUFymS6pGRPfA2GbSRKiQDQPkhFGmQSyFUflAFbIApQBE8W4WRT2QIG+kiMDlGPAku
HsBCftBHLXAWG0kF5QdZSWCS8GEhaBUoY2BSUjEDNzeQQAGI7XMEy1gsbqlqbBMuVJANtHYaqREj
cxAAB8AWgSNYIbD/BDHwA1IQEkmwAnTgAjfwN/TQO4VzOB9UmDfUGtThARRQA1rABitAAw1gBrED
GK3zmbWxmqSjP1oAB784mZV5ma1pm5Z5bwaEAHDwBYmhmyQyBjFwPjWQAoSFCIFTOoYDEau5QYXp
FgewBWKgG7DBGqbSnIchGJ2pGmJgAi1wAnuBARygRyCgAQlwBUWIGsNTCNYJG61JnMaJnOyDBnMA
OikwfRQQR9ZpBjZQByeQhtb5nG+5GXfgj0iBG/nYgBQEMpEyRE0xMsCENmXgASIQAA1gAkcHgSLx
El5TDwWBEh7RA0lAN2ASLkrgAwZRE+VSNOkCEzdBHNgyLjCTDQ4R/6IR8TD6wiQNcw4DgDQ3AFIo
qqIWoaNDChFlQDUwMxFHihL2oARzwIBhkjEWc6MJ9KJkcKMMEaOCcC0fYTE18Q8wcRfmUhXhUjHV
mQQCIaZegxE6QRM6Sg9PGqWEIAZIMwc/ggHbwqVxqQQzEaNWOo/5wgZbgBV0sqC3hJcZJgQ+gRTC
MaFNwQAkIJYIYAOU5wyYmqmaWgl3eA7HKBUMAEElJxSKCic9gE5IcQBn5Jd6CBxBwWIcuqmyOqu0
2qmvwgXBcSV2yWwOekPGgxQnkHGsGhQaoElAgZ6xSqvKuqzLYKtj0ANCgmC7ymG9KgYQihQSOqxA
MQKuuq2XyqzgGv+ux2CrOuJDUiGto9qgurQsjNoUj6qtkzipQFGp3yqu9nqvvUCuVAB5QWEy01qq
y3KqTcEELwSvQ1GhImAAKqCh9YqvDvuws0CuZmArUqGU/9phy7KXSPEBAMmgwhQuSSCYDQuxJFuy
otYrfogVF9urd3GtQXFq6SpMBtt/JluzNrsJ5GoRYHArK7uug/CpKmk2gxmQMnuzRnu0mZCzS+NP
sZqoGJsiTBt5xxKzFDizqRAuJkAurVCdV4oJY+A3p8C1pvC1UtoLZFAEJvAuo0C2i6C0GnuIKUuq
TysI/xUUIke1vYa3dTgI3xlwc3Aml7CGXWAAVUEJZYABXasIZCD/Bmu6BQUQR55QAQWwBYl7MWjQ
po0wBo4bR4dbuZgguZRrNIw7CYvrk5JQuoxQBhmwAA+wKpZABpd7CKBbuUprBhYHt/ootyxbIxQS
FLCmt9O6t/SwAguAAz8wBF1QiJIwAXbQAUHguYmABRmAApALCUVgBXCwuAQQAXGXCXMQAQRQtoew
r7P0CGKwvXMgvdQrCt8bvoRwvdkrCfCLuZMwv4tQATDgANG4CeS7QeBbtkq7FIhHkPAKsNpAsUAR
YsC7wIowAEtgBT/wBBZQBt/5ElVCEhPxnSRRBFmKtnNABUXAAThwBFOSBhgwB4irGBVQAVSgBhps
AklQASbAwcWR/0H/cMImMBFfawIrjCbxSARbQAVl8ARrYANZexJisMKSwrViW8FHDBtCtgZPkA1J
XAHZ8A8sDC5soBJmUAYcQAQ6aAZbnMOwQRIz7A5fewMQsAZzUMOICxB/q8P11cNGMwBPfMNxDMUe
IMWD8cNBbAYVPABmsMNMasdT4scz8cIxfMb6MgdWvLg8fMSI3KZfi8JjEI9DEAQY4DVYnLb1RS5V
fMVwTMZeDMZloJp5/L1TrFf5UggI2bQGOLeCoARRK3kMTLRVmwgOwQFrgARioLkXAAAgUAEOgAIs
8ARoAMwvQAQZUAZFkAEsgAIBcAMJAAMosAJl0AAJQAQvwAb/QP8EXPACGLAFF/ACdpAB29zMYwAB
KMDDC4AARBDBZVAlL4ACV7C+grBwMLAGwvEEPwACKCAC+0F/MBAFQTAYmlsAE7C5mmsHXBDQAx0E
NJAABzDFBG3QSQzOLzAASYAACwAAMcwCMMDM/2PMyKzMzDzPbGDOD7ADbczO7gzP8kzP9ozP4bEB
77wfFfDO8fwEFCzRFL3K+ZwC+6wZ5CzMk5UAKODTCILT+qHP/DwA5GzO6JzSkcEFRAADDVAGW+DQ
EA3VCABS9MzNbEAFCgADdZABaFIBNS0CD0AEC3LRB73TMu3TFSDSzEwFG0AEx2yfESDUxtTKhWAD
bpSIuauubUX/CHVLix172EUbtwSsCGLwBNx7FwTwA3oQxAjAAQiQAH5z2QiAADAgw3ZgASqwUx3w
A1swABjwAgEABw/ABVSQOFxgAQMA2ggQBXwg2laMvomjAHCgB/tJBVeQAH/ABS7Nt2rAAnwgB0O8
AwggAnbwQq0d2uLMt9uLBOh7vj8Q3dNNBhWQAG4AwVNc3QggzrRtAWygAhegAnhQBg6s2pO12Z39
2d3N21TABQ8Q3HBxvtz728E93MV93Mk9CEXgBksw3R+0A8At3Css3uQ9GGKw3M29NZi9BRWgBxsg
AjCgHQee4DtD4c6N27rN2wPgBvsdAFkD2tId4swtB15D3A/Q/wSxXQFAsAPg8TU44AYZsANuIAIX
QN0vYN0nzOAB/hJLIN9s4AZb4AaercoAjLLuaY+RDdl3Kcu8CxS/e8tWnsuJMNmVPdk40MUUMwZn
EKVPMAR0cQF/awdu8A8TsgYjMwB2EAQVYAFnPgdrsNqTXcS8bAPsjeb/HQENgAEqcOYmwAIWQBqV
PQgTsAYf1ef48L83EORocOZ8S9lIQNloPgQVEAPgC992YAYmMARTXOkTcOkBt+cDMAaHbm1jIAYr
IOf6kitnPtlqHuhz8AOLrgLcC+YBR+iGjuiKzug+MxoMsAYQMBfCfugTQOekbuqm8eiR/gRjjkI/
oAIekAcmgf/syh6XkE7BRGwDfx7o77ECHnDoPpDmn/6/1A5Sr6Loc4Dn3QfppvG9KmAEe24DEbDs
qK7q31vohx6ls04iOTMGeRDsgK2Igk0IcYm7HsurRqOrRoPACszlju3liADsd0HZLyQGQZAAUfAD
gr7p3FsGK/ADEYAAGMDpY2ABEYAEKD/oFq3pmr7dnN6+t/3fefAEO+8zUA7sqswGFnAAOxAFeeAg
YK7dv+7xQw/zPXADf030Ro/0JgDlf9DRdpBBHA/yIk/yS5/zPf/zQg++Pz8HY4++hMAGGWAHBxC+
Or+9YQD1Ur/wQe/xH/QDP4ADOGABVdL2b+86fy0GYR/zvq3/92uA9Dfg9IOP9V8TAd6zAjR/7+CL
BH9t+QRA9Uef9HHf9JU9IQVN8o6PCLbS8ITAiIYd8dS69gFydVCbKVMLqak/tF/O6R1f2SYQBSLQ
AGpe+HNQDzEA5GHA6Q5R53fOAlc/+IVv8oKu8AOQ83bAAUng60AP+eJO81OJA1vAAUHAPpYdAUZA
/WXv0wNwAX9QAaae/dvf/VifBhMAAXmgAm+wvSSS+7vf+zb/33aA4VsACGtzYk8Rc3MRTwOFh3Yc
SSqGf5NkZSgVNE9iiIqFEwMXfxVDmpOTiCtlhJJzdRZbT0mVl5mbEamrSIW6hnNrBFscQUmMnLap
pn9zZxZz/xYsJsbJnEiJ1U9sDTjBQWici4ZiBBE3lUQZDUOHiWLJ7mM3fhlU7qYDS375+kf1cwn6
AHPEcEcFH5x2pkxw8dOmRz1T/gAC5OcuosR8FB+aEieJ45w/JuxYEIFj0Dgk4+awMbDFip0bKf9g
eBGgSYIrVBAREMMRZQSfJntFIDAgJYYHAYS4ifIx4YUlf8qk1CnGBAw3DTIgnDTBTgY3JT1StYpA
xI+dVrFqpToGggMVF1SIaRBhC5s5IkkGBYohgIImXHYEXUfUKFKlTE2NUZEnyI6dOosaImt2ZzIT
T6PGnKkHgoUyixs/rppZ6s+TKalwUQBBRQbJhElDJWNK9f+DJg9wUp02tBoB31WvZrVV2NAYuluo
MFaBoOTuemTY9HDg54CQAWOgH7mY8U+lGAAu+mkhhA3t6DEC+HEwh/akAVL8gMDw8Ht48SPMT/sn
vrvGMVsUUMEfAAr4BxsIoHDFJQVOEKAJfxyQBwuvBTjgXAnY8QIbY1RQwBZjNBiggwIWWIGHW7xh
oRhBsJAHAD80NQkVIHSRQREWojgGiyygsAEbySCoIIM5fjhGGU+g8MIFIPLoIxs6jhHEEEQgkIRM
D3SxAhUJLliBiALOBQMRbizwZZEprtjiizEmgwEIPzDZ4YcqCoikknImQ6ONOBooJhEPDCATnHLu
eeOIiJb/yMaSPlKB5hiGZjfJGIsSseGcICaD4gQfctpki0+iWOeAR2lZAQhDnmjkQxg4wIcM+QBg
RQOSXrbQREEukQET4rnwhAP0tWpFPicEcQQV5zHgx0EPsaErr+JxAOykc4zwgHh+aODBVhqJgYGk
3mYXnQknZhduuB3OYUIRZIQ7SRoYzPEtgRggdO637qJbb7vfkjGAEkEwJuMfZlBhQhn8hljvJFXN
MYB7lLBB7pd/6ItQGSZkbG80D4+xcMUZ62cGBiaIYYbE5VaM77xiVCAvxRYn7C/AAidjRhIa0ytG
wlFlXLI7BR/Mc8UuU2EGwTj/HDTC9+44r8eHDGCGxQQb/1zGO/E+/bFi9XoshtcMc0yG1zyPXHLQ
5YL9UAziIXD1OxNI5EEyNwiALUADsX2RAW/fkIMSGtV9tz4DyXTB4PkUrtHijDfu+OOMi7HEEnAo
8AB9kGeu+eaccy455ZZj3vnopJdu+umZi2HDEayz7gGyDxXhQes2cJuGEkK0rjvt7ai+++vujWFC
re7cnvvuutdO7fHIs6486tCbXoYDKJyRQAPcRq/99o1PX/312XMv/vjkl2/++einv/i48qah/vuk
s4+B+/DXb//9+Oev//789+///wAMIPTAprbxuUt7BcTfAQXIwAY68IGaK8O3dKQj7bXraCbaXgXx
l0EIev/wgyAUIBYycAmqPAd6RbACHNoVE+2d0H4eCaEMZ0jD9x1nPsYwRocqYAL9EO1g3ilCNIw2
LqOZwgwxIEJykLQGG/SQNlWpgNSgprWvfcxjExuDLyAQBiAmI4oPK9gcKtCOcWEAgyR7m7+eSKAT
GZGKb3hCE9lYwzra8Y6jawsKosEOY1RgSCIAkphQ8IQyFCEDPQrAAJKAgAUEAEgzSgEM1oAAKjzh
B6gKJIAuAAAQDKBSl9qUkSj1glTNYQcBuMAPCqmYLXASBHfhAhFggD1GLgAASaBUAgh5NTZsYAEI
AFIFiMCFF2BnAAkgAgAqcMlMQhKP0IymNDcylT72EQf/bhCBHSYgkxdkEwYZE4lr2ACXIGhlI2pg
AR/kgKQdlGWb4viBHrZQgSvc5gFcyElvhiIGKlwhAX8IzCF2wAU46IECA2IYAeS5BQy44QFwCAAX
KgAXFeChDFTQwwZEAM4/FMENS9imMghqAW+94AGuWYQ7tcnNabr0pTRcxTo0kcMIqMAG/LzBBebg
gTwMAC9u6JAY4EKAORzNFBNYAwdUIccYxGAoi8CBGcowBxY0wwJnmOk1qmLVCtBlHQ3AgAqyupEn
SBVjFFiBB8Y6gbEu4QbC+4EKehrGCjBgDRDQ4hq2cMy4sIEnTX2qZWBK2MI2UKY1pek+sWGBA+wA
Bziw/8AAVvCDCASTkVV6pjLYgdhEgIObqKDCCoTymz7mQRHVLI6MVgHaH/xgDVHIgwkYaQccuhay
FqBUBuxwAMiwYwwW+AkUi8EOwxr3uPzrrGKXe41sbAMWucRADERwAROkYQJPsAOEIHILpgqlE6xg
hjOgMYe42GANNHUEJL4LjtUyQhm/4EYZrguBPKhgAq6A7iwwsdydDeAMKvircsOH3AIbuHxi4acJ
94kWGCBgC59ZSUu2CQE+WEC7lylNamHzB9vgBicVcHBlvHWYpRCGwwqVhGpYM063VLQCL+jMZ0Lj
GN9apgIJUEBKU0vgA/v4x6czEQWNJMpPjekBV5IQhbXYMCUiBFJPNTqUgERlIQKBkkNlyICl5MQj
No2RTlWeVJVJeQEfDaDJVvpToAYVJxBVUAxwODIGHgXkOtvZdFQjYNc+1rI5GC1d62pXyCBWNaHF
7IBUFJcQczazgOVhDmRboMokBTWHTW3QRPPz0W6WswL2mQpqoNqdR01q436ucpcrtapXzerxec96
2Gu1rGdNa83Jj361zrWud83rXvv618AOtrCHTexiG/vYyE62sped7EAAADs=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.nimh.nih.gov/images/footer_nihlogo.gif

R0lGODlhJQAlAMQAAP///2ZmZtnZ2fX19YyMjLKysqCgoHl5eYODg5aWlqmpqcXFxXBwcOzs7OLi
4s/Pz7y8vAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAA
AAAALAAAAAAlACUAAAX/ICCOpOgMJSEQD9CUcAwXUOowCXDIPJkgA0GOxDIcHonH4SDokVCAggHR
YIheOsVCgYDQGgcFtCcFQAgHxgGBWIgKhYYggBB0t0DeAGUwrAYPCw4yEAYQAwEDCFNjJQZ0CmsE
TiIDBgwFCQYACQmNI4oQD5mfTmUGBAUKJQtpRm6UMAMNiwBzTSMHDZZ9PEJYsoeRrSMOCCOTMgUB
AQyluWKtsAAIBQNlMA0EzEwJYjEDCwx+JgkQCQSeMA8MzAZKzASDMPKV1xCRCbigj82jzAHSMKhR
IomASwUILEDhABgABwfi2WGGgx0zdcU6CUIz5cCQNwALiGOGgKQQivse/wqQgmBSuFUABmwLeNIf
AAUUIUAIOUKBggJ2kAQwgGWmn4gBCACzGEBfyQAFRKws8GAbAXIAHjBbsIxZ1EqVZjIQagXA1UUH
BkBo2WRZF4AQBMidOzcBQAfMmkxSmsyBgRzLDHQFSLgwwDkB9Jo1a4QAg1U7GQhAargyC2a7WjZw
wJnXFZIP6IoeXaDdJC9g2kRpY8DNgsqwCzMYBCfBAq4NILWQaje24XFQBngroMtFrOMldsFwIODZ
8QYwZUyJ5BB5zD7PHCTjar1SC3F5SgiAqarecWMHCADhXmLAAXxsIn01FeCBcAPOXdDAGS2rjAYP
eFGVCL30UMU1MJVlW0BCPx0AkQjmgNXDLCRMFhoBKgjggAIEKNDaQ85094YB8mGo0FUBtGLEPCLW
o08yZi2ghBYikjDPDiYqUFZ1MYQAADs=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.nimh.nih.gov/images/footer_hhslogo.gif

R0lGODlhJQAlAPcAAP///2ZmZv7+/v39/fr6+tra2uLi4tzc3MjIyPv7+/T09OXl5evr6/j4+OPj
49bW1srKyufn57y8vK+vr9/f39PT08TExO3t7b6+vs7OzvPz8/Ly8tnZ2e/v72pqau7u7vn5+fHx
8d3d3fDw8Onp6bu7u83Nzampqbi4uMfHx/f392dnZ/z8/GhoaOHh4Zubm8vLy4aGhuzs7N7e3ujo
6ODg4NfX19HR0cbGxsnJycLCwnZ2dp2dncHBwbCwsL+/v4WFhXJyctXV1eTk5JqamtLS0qenp8XF
xbKyspiYmLq6und3d5eXl6ioqMPDw9TU1GlpafX19aysrKCgoHBwcI+Pj2xsbJSUlLa2toCAgG9v
b4iIiJKSkubm5tvb26KioomJierq6rm5udDQ0M/Pz46OjqqqqnFxcY2NjdjY2G1tbczMzH9/f/b2
9nx8fISEhHV1da6urrOzs319fZWVlaGhoa2trXt7e8DAwJOTk6ampqWlpZ6enpGRkZaWlre3t35+
foKCgrS0tIqKinl5eYGBgYyMjG5ubpycnLW1tQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAlACUA
AAj/AAEIHEhQoAIZDwr8yVDCRI4aXoYQGFCwokWBA8JciNADAwIsNm4cwFADD4QjHQBQvHhRQ4g4
GAYIIbEhQQKVCUZQ8AKBgYsCKlgWFNAAhhgODlayTDCgwgMTDoQKJFABCYcDIKQSbMNAQoEwBBRc
ZHEASQkGWi120aFkQQwNFQUUEDKjQdqLMhbwCUBi6AEEY4LevTghwAsAKGgMjFKiRJTBFhtMCVCF
gIgAJQayGLEAcsULhgJMkXvGigGBDnxk8FyQgpsAiQCY8KDmxkAFGA6wHkjmkIccADAEWELhtoMN
AnYDkDBc94kAQBh82IB6QoXdA8wEiHEBBJ0AV0DQ/3CzGsDTvp41+AmQhIAMIAGMAEgThIoMgRBu
2IVM4k0AKQAUsEMAEgBgwQpBFDDQAgfsdxcI8PUAQA5Q1AZAYYEMQZANCBAAWQYBnADADwHcYQAL
RATARQgF4aCDUml9EUAXEbTARgcdgBFAEzcVFEERHt41QBY7AIBFAGsQwEYAGFzkhA5BpqUAFHkA
QMQKCsAQgBwsFYAAi3c5ECIARF4YQA0sPTHBaSy5gEAKOFiQRADXXdFCCMwpeNEHDLDA0gErBCCo
oBMIoEEhaAjARAsatmlCVhYhoAQEOByRQnEA6NACEyFU4AEXK6mwQZQCkIGCATCaF0MMdhQh2EAN
aP8HoBHxQcADFR4AoscPqymAwBo9CsSCDzxsEWgLffRwwUAzWEGFABFUQQQKKUwwYABBjCFQBApE
EawAyQFwQQovaBGABy9UcFMZKyByQh04DLQBBE4sO9ATMIwglAYIlCHoG04sQAEHMmrhYFwGFCEB
ekKJwIOgW3TGARQShMuSAYI8MENaM+jogwEv2JCWAB0occQDwbL0wxxiwOHCYAJ8YMEUT4yQKkEG
8EADGgFEdTNLbSDwQAY2pKFCqhEsAdyccEiBFmQicIBCDygIIQIFCxjwwR4BpABAB000cYDFgw2w
wAcwWCABBEhYIMJzhFigmHIFjRCBCwYUwAADg5wGwQSaUgUEADs=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.nimh.nih.gov/images/footer_usagovlogo.gif

R0lGODlhYgAlAPcAAP///2ZmZv7+/v39/ZSUlGdnZ+bm5mhoaKmpqaqqqvLy8tnZ2fr6+vj4+PDw
8JqamqCgoNHR0ZeXl6+vr5iYmJWVlZ6envv7+9TU1Onp6evr66Wlpfn5+aenp/z8/KSkpJKSkqOj
o/X19bW1tfb29rOzs5ubm7CwsNPT052dnbm5ube3t/f39/T09O/v7+Tk5OXl5aGhofHx8dbW1r6+
vp+fn+zs7JaWlqKiopOTk8XFxcHBwe3t7eDg4MjIyOPj44iIiMfHx93d3YuLi8zMzMrKyqysrIyM
jJCQkNfX13Z2dnBwcL29vd/f39DQ0O7u7tvb28vLy6ampra2trS0tLKystzc3ImJic3Nzdra2r+/
v62trZycnMLCwo+Pj+fn58PDw25ubnNzc46OjmxsbLGxsXl5ebq6uvPz89XV1Wlpaby8vMTExH9/
f2pqatLS0m1tbdjY2MnJyXR0dJmZmbi4uM7Ozm9vb3h4eOHh4d7e3sDAwHV1dXp6eru7u+Li4mtr
a+jo6H19fYODg42Nja6uroeHh3JycoGBgYKCgsbGxoSEhKioqHx8fHd3d4aGhnFxcYCAgJGRkXt7
e4WFhQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAABiACUA
AAj/AAEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGC8KoOEko8ePDi948ICBAAYHGhiAXMmyAYAu
NTZYeGBCCgYPLHNSZKFhxpQHiJSoYHGCAhcuWlzoXOpwwIs1D/ocCAAIiIUVEQZQuXGjBNOvCUVE
SNAngJs2D3b0QINT4A4pRWqsAUtX4AUhMZQcwBOCiIEBBgXoCUICABQMdb82YALkAKERGFQO5NAA
sMABPC4IFMBhsxUsTlA8GSgAYQYWiRW2WCEICJUMAxyMYDTkiG0EVXgQ9PFhyBUKKABEGORlhZwp
ElJY6YHjoAdDPlIfHKBjDIQslgEM4NAkgPcAGTiU/x54QQECNzAE7AgQQzIABiUAKRlyUEiACtIL
akhgBAbCQN8doABCUEgAQAZk4OHeQCoEQJ9BEwRARgb5CWSAH/4lZECADiC0AAIAjODgeAQJAMQi
BjUwiXdlVAiAEAsetKF3B3R40AIJAJBCAHDMcJAWgxgUQQAFBJCISy4uNGMANXoIIgTe3WHEDCIQ
pEEVBlkQBpEB+OhQCwZUCYAAJI5pwwtKbVammg0t2eSNIDZYZABqzHHFBmB8cZAGJhjBpQkNcbAD
BA9AUIQCE1TRGQBNFJLCAylM8IdwFqRBkBAWFNEmh04CYMAdRM75HSQdoEYQDWdosGUAYoy2EA0E
fP/gQxcx0CDFBp3NQMEDKgRRggQU9GCABBMQpAIBWWxKo40G4SjQGlN5V8C0c0qC5JgU5AHAFd8x
sdALdISgGwA2hGBCAuXV8EASA71BwQY8JJCCBgK1EAIOhTHkJrMFfTgQCkgs8Z203ukwUA+AArAH
l1dkd5AOIBg8EBEEJCAAFjmsUFAJJvlAQAQCLVCBt8oyyS9B/rZg2RcRlDHGHAQTMBAVXQj0hBhF
HmBFQlrlsABBGTxgcR0fFxQBCDu8UMEKpe0Aws8NwfCdGjIglAWIIUBNkAxdmOFdG4AN8AgBMUBQ
wyFMBrBBQgycQIABBCnwAQIinHADuwTNQMAILST/YIICHoQQQ9UNaUAGjYEglEYHAEBwAkI9CCwI
TjOYAMMPmJ/BpSMDHsTABBUIEXcICMBXgdYCJZHDFACAkUMcLxDAukMiRPIdyAf5UQcAH4iRpkEg
BHCDQB9gQRAJfHynyPEwDCiACiAEN1DQINKQg6a7gcAGAH/coAIbBEjv0AbffTAdEnoA0EEANSBE
SABBAKCABKYOFAKXXgzUwhbvUhjF3gQJQgUSMAAoDHBRAGBBByQABQA04AMWgEAKfteQDHjNLEQo
SAPKVpr1BeADmiHIDwJwBMDQIEcFSYIavAOHHwgEAxLgQgUMxgMIUCAKCmhBGkJggdJ9jgAqsAEJ
/2ywghycQDMC0AKwStCWhxhgDNLagBNgkIUSUIICSEpBDDoQBi9gQAEcUIAczAACGdhACwEAQhzy
BQANNEFg3rHAC0TQgwdIQALSQwEFCIADHEAAAx3ogEtskAAQPKADXCDAFlwFACtUAAkZlIgAiFCD
NiyBD0pohASi0y6lyIAJFtiAFCBABzAIhA1GMMIWJvCCgeigDCeYgCy3cAIXouAERQghAPKwggmc
IQMk2IAgBUICO4ygECtwwrUSaIcoUFAiInCADByABoaIgAfVvEgTmxCEzoTQBT1c0AB0maSlYAAJ
NBiPB6IAgj2sqZxgkcEHbjACLESgChWAAL3gKRodA4wABykwAQ5KoCd+GvSgCE2oQhfKUAAEBAA7

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-Location: http://nimhwdc2.nimh.nih.gov/dcspa4k6s00000o22m03y5l99_9l2t/njs.gif?dcsuri=/nojavascript&WT.js=No&DCS.dcscfg=1&WT.tv=8.6.2

R0lGODlhAQABAIAAAP8A/wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://www.nimh.nih.gov/images/button_go.gif

R0lGODlhHgAQAMQeAGZmYf///3Bwa4yMieLi4dnZ14ODf/X19bi0ocnErpmWiLKysJmXiW1sZn9+
dOzs62trZcXFxHl5daCgnKmpppaWk25uZ5ORhGpqZImIfY+NgWhoY4uJfry8uv///wAAACH5BAEA
AB4ALAAAAAAeABAAAAW4oCd6iOI0QKqurMUh45gwEGvf6XYlsob/twzPw7AJKIuKbbKgCGwMUm1l
ODwK1idAQLg+DgYWpmQ7RFLcM6BA0EYONhOrctACBpRtYKASHJQrJywLBSkSA4h3ASwFCywNKCuE
KRNsiwOLK42PDiyYEioTmQETKhIBYYEKNgRtAAYPmR1gW61xCFMqBgQBvRSZABG9AQV2KWNENwYD
xoYDqSxRHgk+QNYpQjI01zg6QzElgtwALjAjIQA7

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: text/css;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/styles/screen.css

BODY {
	PADDING-BOTTOM: 0px; BACKGROUND-COLOR: #fff; MARGIN: 0px; PADDING-LEFT: =
0px; PADDING-RIGHT: 0px; FONT: 76%/1.4 Arial, Helvetica, sans-serif; =
COLOR: #333; PADDING-TOP: 0px
}
A:link {
	COLOR: #5050ff
}
A:visited {
	COLOR: #5a5aa7
}
A:hover {
	COLOR: #009
}
H1 {
	BORDER-BOTTOM: #8c8c85 1px solid; PADDING-BOTTOM: 0.3em; MARGIN-TOP: =
0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT: bold 1.6em/1.2 =
Verdana, Arial, Helvetica, sans-serif; MARGIN-BOTTOM: 0.3em; COLOR: =
#576099; PADDING-TOP: 0px
}
H2 {
	MARGIN-TOP: 0.5em; FONT: 1.2em/1.2 Verdana, Arial, Helvetica, =
sans-serif; MARGIN-BOTTOM: 1em; COLOR: #000
}
H2#subtitle {
	COLOR: #576099; FONT-SIZE: 1.4em; FONT-WEIGHT: bold
}
H2.pubsection {
	COLOR: #576099; FONT-SIZE: 1.4em; FONT-WEIGHT: bold
}
H3 {
	MARGIN-TOP: 1em; FONT: bold 1em/1.4 Verdana, Arial, Helvetica, =
sans-serif; MARGIN-BOTTOM: 1em; COLOR: #000
}
H4 {
	MARGIN-TOP: 1em; FONT: bold 1em/1.4 Arial, Helvetica, sans-serif; =
MARGIN-BOTTOM: 1em; COLOR: #333
}
P {
	MARGIN-TOP: 0px; MARGIN-BOTTOM: 1em; FONT-SIZE: 1em
}
UL {
	PADDING-BOTTOM: 1em; LIST-STYLE-TYPE: none; MARGIN: 0px 2em; =
PADDING-LEFT: 0px; FONT-SIZE: 1em
}
UL LI {
	PADDING-LEFT: 8px; BACKGROUND: =
url(../images/bullet_smallgraysquare.gif) no-repeat left 0.2em
}
OL {
	PADDING-BOTTOM: 1em; MARGIN: 0px 2em; FONT-SIZE: 1em
}
OL.long {
	MARGIN-LEFT: 4em
}
UL UL {
	PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0px
}
OL UL {
	PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0px
}
OL OL {
	PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0px
}
UL OL {
	PADDING-BOTTOM: 0px; MARGIN: 1em 0px 0px
}
UL.checkbox LI {
	PADDING-BOTTOM: 0.5em; PADDING-LEFT: 20px; BACKGROUND: =
url(../images/bullet_checkbox.gif) no-repeat left top
}
UL.spaced {
	PADDING-BOTTOM: 0.2em
}
OL.spaced {
	PADDING-BOTTOM: 0.2em
}
UL.spaced LI {
	MARGIN-BOTTOM: 1em
}
OL.spaced LI {
	MARGIN-BOTTOM: 1em
}
.spaced LI UL {
	PADDING-BOTTOM: 0px; MARGIN-BOTTOM: 0px
}
.spaced LI OL {
	PADDING-BOTTOM: 0px; MARGIN-BOTTOM: 0px
}
.spaced LI LI {
	MARGIN-BOTTOM: 0px
}
DL {
	PADDING-BOTTOM: 1em; MARGIN: 0px 2em; PADDING-LEFT: 0px
}
DT {
	PADDING-BOTTOM: 0.2em; PADDING-LEFT: 8px; BACKGROUND: =
url(../images/bullet_smallgraysquare.gif) no-repeat left 0.2em
}
DD {
	MARGIN-BOTTOM: 0.7em; MARGIN-LEFT: 8px
}
DL.BasicDl {
	MARGIN: 0px
}
DL.BasicDl DT {
	BACKGROUND-IMAGE: none; PADDING-BOTTOM: 0px; MARGIN-TOP: 1em; =
PADDING-LEFT: 0px
}
DL.BasicDl DD {
	MARGIN-BOTTOM: 0.4em; MARGIN-LEFT: 2em
}
DL.EnhancedDl {
	MARGIN: 0px
}
DL.EnhancedDl DT {
	BACKGROUND-IMAGE: none; PADDING-BOTTOM: 0px; MARGIN-TOP: 1em; =
PADDING-LEFT: 0px; FONT-WEIGHT: bold
}
DL.EnhancedDl DD {
	MARGIN: 0px
}
IMG {
	BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-TOP: 0px; BORDER-RIGHT: =
0px
}
FORM {
	PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: =
0px; PADDING-TOP: 0px
}
FIELDSET {
	MARGIN-BOTTOM: 0.7em
}
FORM INPUT {
	LINE-HEIGHT: 1; FONT-SIZE: 1em
}
#toolbar {
	BACKGROUND-COLOR: #d7d2b9; WIDTH: 100%; MARGIN-BOTTOM: 1px; HEIGHT: =
30px; COLOR: #454545
}
#toolbar A {
	COLOR: #454545
}
#skipnav {
	POSITION: absolute; LEFT: -10000px; whit-space: nowrap
}
#footer_header {
	POSITION: absolute; LEFT: -10000px; whit-space: nowrap
}
#skipnav:active {
	LEFT: 230px
}
#skipnav:focus {
	LEFT: 230px
}
.conceal {
	DISPLAY: none
}
#nih {
	Z-INDEX: 20; POSITION: absolute; TOP: 0px; LEFT: 2%
}
#tools {
	Z-INDEX: 10; POSITION: absolute; LINE-HEIGHT: 2; WIDTH: 90%; FONT-SIZE: =
1em; TOP: 1px; RIGHT: 2%
}
#tools DIV {
	DISPLAY: inline; FLOAT: right; MARGIN-LEFT: 18px
}
#tools #rssfeed {
	BACKGROUND: url(../images/rss-icon.png) no-repeat left center
}
#tools #rssfeed A {
	PADDING-LEFT: 20px
}
#tools #rssfeed A#rssinstructions {
	PADDING-LEFT: 0px
}
#tools #printpage {
	BACKGROUND: url(../images/icon_printer.gif) no-repeat left center
}
#tools #printpage A {
	PADDING-LEFT: 20px
}
#tools #topicfinder {
	BACKGROUND: url(../images/icon_topicfinderarrow.gif) no-repeat left =
center
}
#tools #topicfinder A {
	PADDING-LEFT: 16px
}
#tools A:hover {
	COLOR: #fff
}
#tools #searchwrapper {
	DISPLAY: inline; FLOAT: none; MARGIN-LEFT: 0px
}
#tools #btnG {
	POSITION: relative; TOP: 3px
}
#banner {
	WIDTH: 100%; MARGIN-BOTTOM: 1px; BACKGROUND: =
url(../images/banner_photos.jpg) #525eaf no-repeat right top; HEIGHT: =
70px; OVERFLOW: hidden
}
#banner IMG {
	MARGIN-LEFT: 2%
}
#navigation {
	BACKGROUND-COLOR: #9dc257; WIDTH: 100%; FLOAT: left; FONT-SIZE: 1em
}
#navigation UL {
	PADDING-BOTTOM: 0px; LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: =
2%; PADDING-RIGHT: 0px; LIST-STYLE-IMAGE: none; PADDING-TOP: 9px
}
#navigation LI {
	PADDING-BOTTOM: 0px; MARGIN: 0px 2px 0px 0px; PADDING-LEFT: 0px; =
PADDING-RIGHT: 0px; BACKGROUND: url(../images/tab_rightcorner_off.gif) =
#5e66ff no-repeat right top; FLOAT: left; PADDING-TOP: 0px
}
#navigation A {
	PADDING-BOTTOM: 2px; MARGIN: 0px; PADDING-LEFT: 14px; PADDING-RIGHT: =
14px; DISPLAY: block; BACKGROUND: url(../images/tab_leftcorner_off.gif) =
no-repeat left top; FLOAT: left; COLOR: #fff; TEXT-DECORATION: none; =
PADDING-TOP: 2px
}
#navigation A:hover {
	TEXT-DECORATION: underline
}
#home .home {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#health .health {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#research .research {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#news .news {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#about .about {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#home .home A {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf; CURSOR: default; TEXT-DECORATION: none
}
#health .health A {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf; CURSOR: default; TEXT-DECORATION: none
}
#research .research A {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf; CURSOR: default; TEXT-DECORATION: none
}
#news .news A {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf; CURSOR: default; TEXT-DECORATION: none
}
#about .about A {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf; CURSOR: default; TEXT-DECORATION: none
}
#breadcrumbs {
	LINE-HEIGHT: 1.3; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; =
HEIGHT: 1%; COLOR: #666; MARGIN-LEFT: 2%; CLEAR: both; FONT-SIZE: 0.9em; =
MARGIN-RIGHT: 2%; PADDING-TOP: 9px
}
#topics {
	LINE-HEIGHT: 1.3; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; =
HEIGHT: 1%; COLOR: #666; MARGIN-LEFT: 2%; CLEAR: both; FONT-SIZE: 0.9em; =
MARGIN-RIGHT: 2%; PADDING-TOP: 9px
}
#breadcrumbs A {
	COLOR: #666
}
#topics A {
	COLOR: #666
}
#breadcrumbs A:hover {
	COLOR: #009
}
#topics A:hover {
	COLOR: #009
}
#stamp {
	POSITION: relative; LINE-HEIGHT: 1.3; MARGIN: 0px; FONT-FAMILY: =
Verdana, Arial, Helvetica, sans-serif; COLOR: #666; FONT-SIZE: 0.9em; =
TOP: -0.2em; FONT-WEIGHT: bold
}
#stamp .date-stamp {
	FONT-WEIGHT: normal
}
#content {
	WIDTH: 100%; CLEAR: both; PADDING-TOP: 28px
}
#content A {
	TEXT-DECORATION: none
}
#content A:hover {
	TEXT-DECORATION: underline
}
#extra_content {
	WIDTH: 31%; DISPLAY: inline; MARGIN-BOTTOM: 20px; FLOAT: left; =
MARGIN-LEFT: 2%
}
#extra_content P:first-child {
	MARGIN-TOP: -3px
}
#primary_content {
	WIDTH: 64%; DISPLAY: inline; MARGIN-BOTTOM: 9px; FLOAT: left; =
MARGIN-LEFT: 2%
}
#central_content {
	WIDTH: 31%; DISPLAY: inline; MARGIN-BOTTOM: 20px; FLOAT: left; =
MARGIN-LEFT: 2%
}
#sidebar {
	WIDTH: 30%; DISPLAY: inline; MARGIN-BOTTOM: 9px; FLOAT: left; =
MARGIN-LEFT: 2%; MARGIN-RIGHT: 1%
}
#sections {
	WIDTH: 100%; BACKGROUND: url(../images/splitter.gif) repeat-y center =
top; FLOAT: right
}
#first-section {
	WIDTH: 49%; DISPLAY: inline; FLOAT: left
}
#second-section {
	WIDTH: 49%; DISPLAY: inline; FLOAT: right
}
#singlewidecolumn {
	WIDTH: 96%; DISPLAY: inline; MARGIN-BOTTOM: 20px; FLOAT: left; =
MARGIN-LEFT: 2%; MARGIN-RIGHT: 1%
}
#search_content {
	WIDTH: 47%; DISPLAY: inline; MARGIN-BOTTOM: 9px; FLOAT: left; =
MARGIN-LEFT: 2%
}
#search_sidebar {
	WIDTH: 47%; DISPLAY: inline; MARGIN-BOTTOM: 9px; FLOAT: left; =
MARGIN-LEFT: 2%; MARGIN-RIGHT: 1%
}
#extra_content .box {
	MARGIN-BOTTOM: 18px; BACKGROUND: url(../images/box_right.gif) #eeeee6 =
no-repeat right bottom
}
#central_content .box {
	MARGIN-BOTTOM: 18px; BACKGROUND: url(../images/box_right.gif) #eeeee6 =
no-repeat right bottom
}
#sidebar .box {
	MARGIN-BOTTOM: 18px; BACKGROUND: url(../images/box_right.gif) #eeeee6 =
no-repeat right bottom
}
#search_sidebar .box {
	MARGIN-BOTTOM: 18px; BACKGROUND: url(../images/box_right.gif) #eeeee6 =
no-repeat right bottom
}
#extra_content .boxheader {
	BACKGROUND: url(../images/box_left.gif) #8c8c85 no-repeat left top
}
#central_content .boxheader {
	BACKGROUND: url(../images/box_left.gif) #8c8c85 no-repeat left top
}
#sidebar .boxheader {
	BACKGROUND: url(../images/box_left.gif) #8c8c85 no-repeat left top
}
#search_sidebar .boxheader {
	BACKGROUND: url(../images/box_left.gif) #8c8c85 no-repeat left top
}
#extra_content .boxheader H2 {
	PADDING-BOTTOM: 3px; LINE-HEIGHT: 1.4; MARGIN: 0px 0px 10px; =
PADDING-LEFT: 1em; PADDING-RIGHT: 1em; FONT-FAMILY: Verdana, Arial, =
Helvetica, sans-serif; BACKGROUND: url(../images/box_right.gif) =
no-repeat right top; COLOR: #fff; FONT-SIZE: 1em; PADDING-TOP: 2px
}
#central_content .boxheader H2 {
	PADDING-BOTTOM: 3px; LINE-HEIGHT: 1.4; MARGIN: 0px 0px 10px; =
PADDING-LEFT: 1em; PADDING-RIGHT: 1em; FONT-FAMILY: Verdana, Arial, =
Helvetica, sans-serif; BACKGROUND: url(../images/box_right.gif) =
no-repeat right top; COLOR: #fff; FONT-SIZE: 1em; PADDING-TOP: 2px
}
#sidebar .boxheader H2 {
	PADDING-BOTTOM: 3px; LINE-HEIGHT: 1.4; MARGIN: 0px 0px 10px; =
PADDING-LEFT: 1em; PADDING-RIGHT: 1em; FONT-FAMILY: Verdana, Arial, =
Helvetica, sans-serif; BACKGROUND: url(../images/box_right.gif) =
no-repeat right top; COLOR: #fff; FONT-SIZE: 1em; PADDING-TOP: 2px
}
#search_sidebar .boxheader H2 {
	PADDING-BOTTOM: 3px; LINE-HEIGHT: 1.4; MARGIN: 0px 0px 10px; =
PADDING-LEFT: 1em; PADDING-RIGHT: 1em; FONT-FAMILY: Verdana, Arial, =
Helvetica, sans-serif; BACKGROUND: url(../images/box_right.gif) =
no-repeat right top; COLOR: #fff; FONT-SIZE: 1em; PADDING-TOP: 2px
}
#extra_content .boxcontent {
	LINE-HEIGHT: 1.3; BACKGROUND: url(../images/box_left.gif) no-repeat =
left bottom; HEIGHT: 1%
}
#central_content .boxcontent {
	LINE-HEIGHT: 1.3; BACKGROUND: url(../images/box_left.gif) no-repeat =
left bottom; HEIGHT: 1%
}
#sidebar .boxcontent {
	LINE-HEIGHT: 1.3; BACKGROUND: url(../images/box_left.gif) no-repeat =
left bottom; HEIGHT: 1%
}
#search_sidebar .boxcontent {
	LINE-HEIGHT: 1.3; BACKGROUND: url(../images/box_left.gif) no-repeat =
left bottom; HEIGHT: 1%
}
#extra_content .boxcontent P {
	PADDING-BOTTOM: 1em; MARGIN: 0px 1em
}
#central_content .boxcontent P {
	PADDING-BOTTOM: 1em; MARGIN: 0px 1em
}
#sidebar .boxcontent P {
	PADDING-BOTTOM: 1em; MARGIN: 0px 1em
}
#search_sidebar .boxcontent P {
	PADDING-BOTTOM: 1em; MARGIN: 0px 1em
}
#extra_content .boxcontent H3 {
	PADDING-BOTTOM: 0.5em; MARGIN: 0px 1em; FONT-SIZE: 1em
}
#central_content .boxcontent H3 {
	PADDING-BOTTOM: 0.5em; MARGIN: 0px 1em; FONT-SIZE: 1em
}
#sidebar .boxcontent H3 {
	PADDING-BOTTOM: 0.5em; MARGIN: 0px 1em; FONT-SIZE: 1em
}
#search_sidebar .boxcontent H3 {
	PADDING-BOTTOM: 0.5em; MARGIN: 0px 1em; FONT-SIZE: 1em
}
#extra_content .boxcontent UL {
	PADDING-BOTTOM: 0.4em; LIST-STYLE-TYPE: none; MARGIN: 0px 1em; =
PADDING-LEFT: 0px
}
#central_content .boxcontent UL {
	PADDING-BOTTOM: 0.4em; LIST-STYLE-TYPE: none; MARGIN: 0px 1em; =
PADDING-LEFT: 0px
}
#sidebar .boxcontent UL {
	PADDING-BOTTOM: 0.4em; LIST-STYLE-TYPE: none; MARGIN: 0px 1em; =
PADDING-LEFT: 0px
}
#search_sidebar .boxcontent UL {
	PADDING-BOTTOM: 0.4em; LIST-STYLE-TYPE: none; MARGIN: 0px 1em; =
PADDING-LEFT: 0px
}
#extra_content .boxcontent LI {
	PADDING-LEFT: 8px; MARGIN-BOTTOM: 0.7em; BACKGROUND: =
url(../images/bullet_smallgraysquare.gif) no-repeat left 0.2em
}
#central_content .boxcontent LI {
	PADDING-LEFT: 8px; MARGIN-BOTTOM: 0.7em; BACKGROUND: =
url(../images/bullet_smallgraysquare.gif) no-repeat left 0.2em
}
#sidebar .boxcontent LI {
	PADDING-LEFT: 8px; MARGIN-BOTTOM: 0.7em; BACKGROUND: =
url(../images/bullet_smallgraysquare.gif) no-repeat left 0.2em
}
#search_sidebar .boxcontent LI {
	PADDING-LEFT: 8px; MARGIN-BOTTOM: 0.7em; BACKGROUND: =
url(../images/bullet_smallgraysquare.gif) no-repeat left 0.2em
}
#sidebar .boxcontent UL.dense LI {
	MARGIN: 0px 0px 0.1em 2em
}
#extra_content .boxcontent UL UL {
	PADDING-BOTTOM: 0px; PADDING-TOP: 0.4em
}
#central_content .boxcontent UL UL {
	PADDING-BOTTOM: 0px; PADDING-TOP: 0.4em
}
#sidebar .boxcontent UL UL {
	PADDING-BOTTOM: 0px; PADDING-TOP: 0.4em
}
#search_sidebar .boxcontent UL UL {
	PADDING-BOTTOM: 0px; PADDING-TOP: 0.4em
}
#extra_content .boxcontent UL UL LI {
	PADDING-BOTTOM: 0.4em; MARGIN-BOTTOM: 0px
}
#central_content .boxcontent UL UL LI {
	PADDING-BOTTOM: 0.4em; MARGIN-BOTTOM: 0px
}
#sidebar .boxcontent UL UL LI {
	PADDING-BOTTOM: 0.4em; MARGIN-BOTTOM: 0px
}
#search_sidebar .boxcontent UL UL LI {
	PADDING-BOTTOM: 0.4em; MARGIN-BOTTOM: 0px
}
#extra_content .boxcontent DL {
	MARGIN: 0px 1em
}
#central_content .boxcontent DL {
	MARGIN: 0px 1em
}
#sidebar .boxcontent DL {
	MARGIN: 0px 1em
}
#search_sidebar .boxcontent DL {
	MARGIN: 0px 1em
}
#extra_content .boxcontent DT {
	PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%
}
#central_content .boxcontent DT {
	PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%
}
#sidebar .boxcontent DT {
	PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%
}
#search_sidebar .boxcontent DT {
	PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%
}
#extra_content .boxcontent DD {
	MARGIN-LEFT: 0px
}
#central_content .boxcontent DD {
	MARGIN-LEFT: 0px
}
#sidebar .boxcontent DD {
	MARGIN-LEFT: 0px
}
#search_sidebar .boxcontent DD {
	MARGIN-LEFT: 0px
}
.boxoutlined {
	MARGIN-BOTTOM: 18px; BACKGROUND: url(../images/boxoutlined_right.gif) =
#f5f7dc no-repeat right bottom
}
.boxoutlinedheader {
	BACKGROUND: url(../images/boxoutlined_right.gif) no-repeat right top
}
.boxoutlined H2 {
	PADDING-BOTTOM: 0.2em; LINE-HEIGHT: 1.4; MARGIN: 0px; PADDING-LEFT: =
1em; PADDING-RIGHT: 1em; BACKGROUND: url(../images/boxoutlined_left.gif) =
no-repeat left top; COLOR: #fff; FONT-SIZE: 1em; FONT-WEIGHT: normal; =
PADDING-TOP: 0.5em
}
.boxoutlinedcontent {
	PADDING-BOTTOM: 0px; LINE-HEIGHT: 1.3; PADDING-LEFT: 1em; =
PADDING-RIGHT: 1em; BACKGROUND: url(../images/boxoutlined_left.gif) =
no-repeat left bottom; HEIGHT: 1%; PADDING-TOP: 0px
}
.boxoutlinedcontent P {
	PADDING-BOTTOM: 1em; MARGIN-BOTTOM: 0px
}
UL.compact {
	PADDING-BOTTOM: 0.8em
}
UL.compact LI {
	MARGIN-BOTTOM: 0.4em
}
#pubcover {
	FLOAT: left; CLEAR: both
}
#pubcover IMG {
	MARGIN: 2px 10px 10px 0px
}
#pubcontents {
	MIN-HEIGHT: 1%; HEIGHT: 1%; MARGIN-LEFT: 120px
}
.quote {
	BORDER-LEFT: #ccc 1px dotted; PADDING-LEFT: 1em; FONT: bold italic =
1.2em/1.6 Georgia, Arial, Helvetica, sans-serif; MARGIN-BOTTOM: 1.4em; =
COLOR: #808059; MARGIN-LEFT: 2em
}
.references {
	LINE-HEIGHT: 1.3; MARGIN-TOP: 2em; PADDING-LEFT: 2em; FONT-FAMILY: =
Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 0.9em; BORDER-TOP: =
#ddd 1px solid; PADDING-TOP: 1.3em
}
.references A {
	COLOR: #666
}
.references A:hover {
	COLOR: #009
}
.fineprint {
	BORDER-BOTTOM: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; =
PADDING-BOTTOM: 0.6em; LINE-HEIGHT: 1.3; MARGIN-TOP: 1.4em; =
PADDING-LEFT: 1.4em; PADDING-RIGHT: 1.4em; FONT-FAMILY: Verdana, Arial, =
Helvetica, sans-serif; MARGIN-BOTTOM: 1em; FONT-SIZE: 0.9em; BORDER-TOP: =
#bbb 1px solid; BORDER-RIGHT: #bbb 1px solid; PADDING-TOP: 1.3em
}
.fineprint H2 {
	MARGIN-TOP: 0px; FONT: bold 1em/1.2 Verdana, Arial, Helvetica, =
sans-serif; MARGIN-BOTTOM: 1em; COLOR: #333
}
SUP {
	LINE-HEIGHT: 1
}
.pagenavigation {
	MARGIN-BOTTOM: 1.3em
}
.contentspage {
	PADDING-BOTTOM: 1em; PADDING-LEFT: 17px; BACKGROUND: =
url(../images/button_left.gif) no-repeat left top; MARGIN-RIGHT: 1em
}
.previouspage {
	PADDING-BOTTOM: 1em; PADDING-LEFT: 17px; BACKGROUND: =
url(../images/button_left.gif) no-repeat left top; MARGIN-RIGHT: 1em
}
.nextpage {
	PADDING-BOTTOM: 1em; PADDING-RIGHT: 18px; BACKGROUND: =
url(../images/button_right.gif) no-repeat right top
}
.email-subscribe {
	PADDING-LEFT: 20px; BACKGROUND: url(../images/icon_subscribe.gif) =
no-repeat left center
}
.rss-subscribe {
	PADDING-LEFT: 20px; BACKGROUND: url(../images/rss-icon.png) no-repeat =
left center
}
A.pdf {
	PADDING-BOTTOM: 1em; PADDING-RIGHT: 19px; BACKGROUND: =
url(../images/icon_pdf.gif) no-repeat right top
}
TABLE.listing {
=09
}
TABLE.listing TH {
	TEXT-ALIGN: left; PADDING-BOTTOM: 0.4em; PADDING-LEFT: 0.4em; =
PADDING-RIGHT: 0.4em; PADDING-TOP: 0.4em
}
TABLE.listing THEAD TH {
	BACKGROUND-COLOR: #ccc
}
TABLE.listing TBODY TH {
	BACKGROUND-COLOR: #eee
}
TABLE.listing TD {
	BORDER-BOTTOM: #ccc 1px solid; PADDING-BOTTOM: 0.4em; PADDING-LEFT: =
0.4em; PADDING-RIGHT: 0.4em; PADDING-TOP: 0.4em
}
.ListStyleD LI {
	PADDING-BOTTOM: 3px; MARGIN: 0.5em 0px; PADDING-LEFT: 18px; =
PADDING-RIGHT: 0px; BACKGROUND: url(../images/whitesquare.gif) no-repeat =
0px 3px; VERTICAL-ALIGN: top; PADDING-TOP: 3px
}
#footer {
	PADDING-BOTTOM: 10px; LINE-HEIGHT: 1.3; MARGIN-TOP: 2em; WIDTH: 100%; =
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; COLOR: #666; CLEAR: =
both; FONT-SIZE: 0.9em
}
#footer_links {
	MARGIN-TOP: 9px; BORDER-TOP: #bbb 1px solid; PADDING-TOP: 9px
}
#reviewdate {
	MARGIN-TOP: 9px; BORDER-TOP: #bbb 1px solid; PADDING-TOP: 9px
}
#footer_links {
	MARGIN-TOP: 9px; BORDER-TOP: #bbb 1px solid; PADDING-TOP: 9px
}
#footer UL {
	PADDING-BOTTOM: 1.8em; LIST-STYLE-TYPE: none; MARGIN: 0px; =
PADDING-LEFT: 2%; PADDING-RIGHT: 2%; LIST-STYLE-IMAGE: none; =
PADDING-TOP: 0px
}
#footer LI {
	PADDING-BOTTOM: 0.2em; MARGIN: 0px 0.6em 0px 0px; PADDING-LEFT: 0px; =
PADDING-RIGHT: 0.6em; BACKGROUND: none transparent scroll repeat 0% 0%; =
FLOAT: left; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px
}
#footer LI#last {
	BORDER-RIGHT: medium none
}
#footer P {
	MARGIN-BOTTOM: 0.5em; MARGIN-LEFT: 2%; CLEAR: both
}
#footer P#logos IMG {
	MARGIN-TOP: 5px; MARGIN-RIGHT: 19px
}
#footer A {
	COLOR: #666
}
#footer A:hover {
	COLOR: #009
}
.encloseborder {
	BORDER-BOTTOM: black 2px solid; BORDER-LEFT: black 2px solid; =
PADDING-BOTTOM: 0px !important; MARGIN: 0px 0px 1em; PADDING-LEFT: 1em =
!important; PADDING-RIGHT: 1em !important; BORDER-TOP: black 2px solid; =
BORDER-RIGHT: black 2px solid; PADDING-TOP: 1em !important
}
.setout {
	BORDER-BOTTOM: black 2px solid; BORDER-LEFT: black 2px solid; =
PADDING-BOTTOM: 0px !important; MARGIN: 0px 0px 1em; PADDING-LEFT: 1em =
!important; PADDING-RIGHT: 1em !important; BORDER-TOP: black 2px solid; =
BORDER-RIGHT: black 2px solid; PADDING-TOP: 1em !important
}
.setout H3 {
	TEXT-ALIGN: center
}
.image-feature {
	BORDER-LEFT: black 2px solid; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 10px =
20px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; PADDING-TOP: 0px
}
.image-feature IMG {
	MARGIN: 10px 0px; DISPLAY: block
}
.image-feature P {
=09
}
.extras-image {
	WIDTH: 224px; MARGIN-BOTTOM: 1em; FLOAT: right; MARGIN-LEFT: 10px
}
.extras-image DIV {
	BORDER-BOTTOM: #777 2px solid; BORDER-LEFT: #777 2px solid; =
PADDING-BOTTOM: 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; =
BORDER-TOP: #777 2px solid; BORDER-RIGHT: #777 2px solid; PADDING-TOP: =
10px
}
.extras-image P {
	MARGIN: 0px; PADDING-TOP: 10px
}
TABLE.BasicTable {
	TEXT-ALIGN: left; BORDER-LEFT: black 1px solid; BORDER-COLLAPSE: =
collapse; EMPTY-CELLS: show; MARGIN-BOTTOM: 1em; FONT-SIZE: 1em; =
BORDER-TOP: black 1px solid
}
TABLE.BasicTable TH {
	BORDER-BOTTOM: black 1px solid; PADDING-BOTTOM: 5px; PADDING-LEFT: 5px; =
PADDING-RIGHT: 5px; VERTICAL-ALIGN: top; BORDER-RIGHT: black 1px solid; =
PADDING-TOP: 5px
}
TABLE.BasicTable TD {
	BORDER-BOTTOM: black 1px solid; PADDING-BOTTOM: 5px; PADDING-LEFT: 5px; =
PADDING-RIGHT: 5px; VERTICAL-ALIGN: top; BORDER-RIGHT: black 1px solid; =
PADDING-TOP: 5px
}
TABLE.NoBorder {
	TEXT-ALIGN: left; FONT-SIZE: 1em
}
TABLE.NoBorder TH {
	BORDER-BOTTOM: medium none; PADDING-BOTTOM: 5px; PADDING-LEFT: 5px; =
PADDING-RIGHT: 5px; VERTICAL-ALIGN: top; BORDER-RIGHT: medium none; =
PADDING-TOP: 5px
}
TABLE.NoBorder TD {
	BORDER-BOTTOM: medium none; PADDING-BOTTOM: 5px; PADDING-LEFT: 5px; =
PADDING-RIGHT: 5px; VERTICAL-ALIGN: top; BORDER-RIGHT: medium none; =
PADDING-TOP: 5px
}
.encloseborder {
	BORDER-BOTTOM: #000000 2px solid; BORDER-LEFT: #000000 2px solid; =
PADDING-BOTTOM: 0px !important; BACKGROUND-COLOR: white; MARGIN: 0px 0px =
1em; PADDING-LEFT: 1em !important; PADDING-RIGHT: 1em !important; =
BORDER-TOP: #000000 2px solid; BORDER-RIGHT: #000000 2px solid; =
PADDING-TOP: 1em !important
}
.bind {
	WHITE-SPACE: nowrap
}
.displace-text {
	MARGIN: 0px 0px 1em 16px; FLOAT: right
}
.displace-text-alt {
	MARGIN: 0px 16px 1em 0px; FLOAT: left
}
.image-caption-alt {
	MARGIN: 0.2em 8px 8px 0px; WIDTH: 100px; FLOAT: left; FONT-SIZE: 0.9em; =
FONT-WEIGHT: bold
}
.image-caption-alt IMG {
	DISPLAY: block; MARGIN-BOTTOM: 8px
}
.image-caption-alt P {
	MARGIN: 0px
}
.research-box {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 1em; WIDTH: 50%; PADDING-RIGHT: 1em; =
BACKGROUND: #f5f7dc; FLOAT: right; MARGIN-LEFT: 1%; PADDING-TOP: 1em
}
.toc {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 1em; PADDING-RIGHT: 1em; =
MARGIN-BOTTOM: 1em; BACKGROUND: #f5f7dc; PADDING-TOP: 1em
}
.unite {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 1em; PADDING-RIGHT: 1em; =
MARGIN-BOTTOM: 1em; BACKGROUND: #f5f7dc; PADDING-TOP: 1em
}
.toc :first-child {
	MARGIN-TOP: 0px
}
.unite :first-child {
	MARGIN-TOP: 0px
}
.distinguish {
	PADDING-BOTTOM: 1em; PADDING-LEFT: 1em; PADDING-RIGHT: 1em; =
MARGIN-BOTTOM: 1em; BACKGROUND: #f5f7dc; PADDING-TOP: 1em
}
.grid {
	WIDTH: 100%
}
.grid H3 {
	LINE-HEIGHT: 1.3; MARGIN: 0px
}
.grid P {
	LINE-HEIGHT: 1.3; MARGIN: 0px 0px 0.5em
}
.grid .row {
	CLEAR: both
}
.grid .cell-f {
	DISPLAY: inline; FLOAT: left
}
.grid .cell-l {
	DISPLAY: inline; FLOAT: left
}
.grid .cell-f {
	WIDTH: 49%; PADDING-RIGHT: 1%
}
.grid .cell-l {
	PADDING-LEFT: 1%; WIDTH: 49%
}
.divisions {
	WIDTH: 100%; FLOAT: right
}
.divisions .first-div {
	WIDTH: 49%; DISPLAY: inline; FLOAT: left
}
.divisions .second-div {
	WIDTH: 49%; DISPLAY: inline; FLOAT: right
}
.plain {
	LIST-STYLE-TYPE: none; PADDING-LEFT: 0px; MARGIN-LEFT: 0px
}
.plain LI {
	BACKGROUND-IMAGE: none; PADDING-LEFT: 0px; MARGIN-LEFT: 0px
}
.plain DT {
	BACKGROUND-IMAGE: none; PADDING-LEFT: 0px; MARGIN-LEFT: 0px
}
.clearer {
	CLEAR: both
}
.sig {
	TEXT-ALIGN: right
}
.prtag {
	TEXT-ALIGN: center; MARGIN-BOTTOM: 0.8em
}
.central {
	TEXT-ALIGN: center
}
HR {
	BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; MARGIN: 0px; HEIGHT: 1px; =
BORDER-TOP: #8c8c85 1px solid; BORDER-RIGHT: 0px
}
HR.sectionline {
	HEIGHT: 3px; BORDER-TOP: black 3px double
}
OL.lower-alpha {
	LIST-STYLE-TYPE: lower-alpha
}
.red {
	BACKGROUND-COLOR: #ff0000
}
.purple {
	BACKGROUND-COLOR: #cc0099
}
.blue {
	BACKGROUND-COLOR: #66ffff
}
.orange {
	BACKGROUND-COLOR: #ff9900
}
.green {
	BACKGROUND-COLOR: #ccffcc
}
.pink {
	BACKGROUND-COLOR: #ff6699
}
.yellow {
	BACKGROUND-COLOR: #ffff99
}
.turquoise {
	BACKGROUND-COLOR: #ccffff
}
.gray {
	BACKGROUND-COLOR: #eeeeee
}
.external_link {
	DISPLAY: inline
}
#recovery-text {
	MIN-HEIGHT: 52px; MARGIN-BOTTOM: 80px; BACKGROUND: =
url(/images/logos/recovery-logo-small.png) no-repeat; HEIGHT: 52px
}
#recovery-text P {
	PADDING-BOTTOM: 20px; MARGIN: 0px 0px 0px 60px; PADDING-LEFT: 0px; =
PADDING-RIGHT: 0px; PADDING-TOP: 20px
}
#strategic-text {
	MIN-HEIGHT: 62px; MARGIN-BOTTOM: 62px; BACKGROUND: =
url(/images/logos/strategicthumb.png) no-repeat 0% 5px; HEIGHT: 62px
}
#strategic-text P {
	PADDING-BOTTOM: 20px; MARGIN: 0px 0px 0px 60px; PADDING-LEFT: 0px; =
PADDING-RIGHT: 0px; PADDING-TOP: 20px
}
#sidebar .box .boxcontent .image-list LI {
	BACKGROUND-IMAGE: none; PADDING-LEFT: 0px; WIDTH: 100%; DISPLAY: =
inline; FLOAT: left; MARGIN-LEFT: 0px; CLEAR: both
}
#sidebar .box .boxcontent .image-list IMG {
	DISPLAY: inline; FLOAT: left; MARGIN-RIGHT: 10px
}
.indent {
	MARGIN-LEFT: 3em
}
OBJECT {
	PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: =
0px; PADDING-TOP: 0px
}
.flash_with_captions {
	BORDER-LEFT: black 2px solid; PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; =
PADDING-RIGHT: 0px; MARGIN-BOTTOM: 10px; BACKGROUND: =
url(../images/video-symbol.gif) no-repeat 10px 3px; PADDING-TOP: 20px
}
.video_anchor {
	BORDER-LEFT: black 2px solid; PADDING-BOTTOM: 10px; PADDING-LEFT: 10px; =
PADDING-RIGHT: 0px; BACKGROUND: url(../images/video-symbol.gif) =
no-repeat 10px 3px; FLOAT: right; MARGIN-LEFT: 10px; PADDING-TOP: 20px
}
.video_anchor IMG {
	DISPLAY: block
}
.video_anchor SPAN {
	DISPLAY: block
}
.video_anchor SPAN {
	MARGIN-BOTTOM: 5px
}
.video {
	BACKGROUND-IMAGE: url(../images/video-symbol.gif); PADDING-BOTTOM: 0px; =
LINE-HEIGHT: 1.4; BACKGROUND-COLOR: transparent; PADDING-LEFT: 30px; =
PADDING-RIGHT: 0px; DISPLAY: inline; BACKGROUND-REPEAT: no-repeat; =
BACKGROUND-POSITION: left top; PADDING-TOP: 0px
}

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: text/css;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/menu.css

DIV.yuimenu {
	BORDER-BOTTOM: #c4c4be 1px solid; BORDER-LEFT: #c4c4be 1px solid; =
PADDING-BOTTOM: 1px; BACKGROUND-COLOR: #f6f7ee; PADDING-LEFT: 1px; =
PADDING-RIGHT: 1px; BORDER-TOP: #c4c4be 1px solid; BORDER-RIGHT: #c4c4be =
1px solid; PADDING-TOP: 1px
}
DIV.yuimenu DIV.yuimenu {
	POSITION: absolute; VISIBILITY: hidden
}
DIV.yuimenubar DIV.yuimenu {
	POSITION: absolute; VISIBILITY: hidden
}
DIV.yuimenubar {
	BACKGROUND-COLOR: #f6f7ee
}
DIV.yuimenubar DIV.bd {
	WIDTH: 100%
}
DIV.yuimenubar DIV.bd:after {
	DISPLAY: block; HEIGHT: 0px; VISIBILITY: hidden; CLEAR: both; CONTENT: =
'.'
}
DIV.yuimenu H6 {
	BORDER-BOTTOM: #c4c4be 1px solid; BORDER-LEFT: #c4c4be 1px solid; =
MARGIN: 0px; COLOR: #b9b9b9; FONT-SIZE: 100%; BORDER-TOP: #c4c4be 1px =
solid; FONT-WEIGHT: normal; BORDER-RIGHT: #c4c4be 1px solid
}
DIV.yuimenubar H6 {
	BORDER-BOTTOM: #c4c4be 1px solid; BORDER-LEFT: #c4c4be 1px solid; =
MARGIN: 0px; COLOR: #b9b9b9; FONT-SIZE: 100%; BORDER-TOP: #c4c4be 1px =
solid; FONT-WEIGHT: normal; BORDER-RIGHT: #c4c4be 1px solid
}
DIV.yuimenubar H6 {
	PADDING-BOTTOM: 4px; BORDER-RIGHT-WIDTH: 1px; PADDING-LEFT: 12px; =
PADDING-RIGHT: 12px; DISPLAY: inline; FLOAT: left; BORDER-TOP-WIDTH: =
0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; PADDING-TOP: 4px
}
DIV.yuimenu H6 {
	PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; PADDING-LEFT: 10px; =
PADDING-RIGHT: 10px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 1px; =
BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; PADDING-TOP: 5px
}
DIV.yuimenubar UL {
	PADDING-BOTTOM: 0px; LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: =
0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px
}
DIV.yuimenu UL {
	BORDER-BOTTOM: #c4c4be 0px solid; BORDER-LEFT: #c4c4be 0px solid; =
PADDING-BOTTOM: 10px; LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: =
0px; PADDING-RIGHT: 0px; BORDER-TOP: #c4c4be 1px solid; BORDER-RIGHT: =
#c4c4be 0px solid; PADDING-TOP: 10px
}
DIV.yuimenu UL.first-of-type {
	BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: =
0px; BORDER-LEFT-WIDTH: 0px
}
DIV.yuimenu UL.hastitle {
	BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: =
0px; BORDER-LEFT-WIDTH: 0px
}
DIV.yuimenu H6.first-of-type {
	BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: =
0px; BORDER-LEFT-WIDTH: 0px
}
DIV.yuimenu DIV.topscrollbar {
	BACKGROUND-IMAGE: url(map.gif); BACKGROUND-REPEAT: no-repeat; HEIGHT: =
16px
}
DIV.yuimenu DIV.bottomscrollbar {
	BACKGROUND-IMAGE: url(map.gif); BACKGROUND-REPEAT: no-repeat; HEIGHT: =
16px
}
DIV.yuimenu DIV.topscrollbar {
	BACKGROUND-IMAGE: url(map.gif); BACKGROUND-POSITION: center -72px
}
DIV.yuimenu DIV.topscrollbar_disabled {
	BACKGROUND-IMAGE: url(map.gif); BACKGROUND-POSITION: center -88px
}
DIV.yuimenu DIV.bottomscrollbar {
	BACKGROUND-IMAGE: url(map.gif); BACKGROUND-POSITION: center -104px
}
DIV.yuimenu DIV.bottomscrollbar_disabled {
	BACKGROUND-IMAGE: url(map.gif); BACKGROUND-POSITION: center -120px
}
DIV.yuimenu LI {
	TEXT-ALIGN: left; WHITE-SPACE: nowrap; FONT-SIZE: 85%; CURSOR: hand
}
DIV.yuimenubar LI {
	TEXT-ALIGN: left; WHITE-SPACE: nowrap; FONT-SIZE: 85%; CURSOR: hand
}
DIV.yuimenu LI.yuimenuitem {
	PADDING-BOTTOM: 2px; PADDING-LEFT: 24px; PADDING-RIGHT: 24px; =
PADDING-TOP: 2px
}
DIV.yuimenu LI LI {
	FONT-SIZE: 100%
}
DIV.yuimenubar LI LI {
	FONT-SIZE: 100%
}
DIV.yuimenu LI.hashelptext EM.helptext {
	FONT-STYLE: normal; MARGIN: 0px 0px 0px 40px
}
DIV.yuimenu LI A {
	ZOOM: 1; COLOR: #000; TEXT-DECORATION: none
}
DIV.yuimenubar LI A {
	ZOOM: 1; COLOR: #000; TEXT-DECORATION: none
}
DIV.yuimenu LI.hassubmenu {
	TEXT-ALIGN: right
}
DIV.yuimenu LI.hashelptext {
	TEXT-ALIGN: right
}
DIV.yuimenu LI.hassubmenu A.hassubmenu {
	TEXT-ALIGN: left
}
DIV.yuimenu LI.hashelptext A.hashelptext {
	TEXT-ALIGN: left
}
DIV.visible.yuimenu LI.hassubmenu A.hassubmenu {
	FLOAT: left
}
DIV.visible.yuimenu LI.hashelptext A.hashelptext {
	FLOAT: left
}
DIV.yuimenu LI.selected {
	BACKGROUND-COLOR: #8c8ad0
}
DIV.yuimenubar LI.selected {
	BACKGROUND-COLOR: #8c8ad0
}
DIV.yuimenu LI.selected A.selected {
	TEXT-DECORATION: underline
}
DIV.yuimenubar LI.selected A.selected {
	TEXT-DECORATION: underline
}
DIV.yuimenu LI.selected A.selected {
	COLOR: #fff
}
DIV.yuimenu LI.selected EM.selected {
	COLOR: #fff
}
DIV.yuimenubar LI.selected A.selected {
	COLOR: #fff
}
DIV.yuimenu LI.disabled {
	CURSOR: default
}
DIV.yuimenubar LI.disabled {
	CURSOR: default
}
DIV.yuimenu LI.disabled A.disabled {
	COLOR: #b9b9b9; CURSOR: default
}
DIV.yuimenu LI.disabled EM.disabled {
	COLOR: #b9b9b9; CURSOR: default
}
DIV.yuimenubar LI.disabled A.disabled {
	COLOR: #b9b9b9; CURSOR: default
}
DIV.yuimenubar LI.yuimenubaritem {
	BORDER-BOTTOM: #c4c4be 0px solid; BORDER-LEFT: #c4c4be 1px solid; =
PADDING-BOTTOM: 4px; MARGIN: 0px; PADDING-LEFT: 24px; PADDING-RIGHT: =
24px; DISPLAY: inline; FLOAT: left; BORDER-TOP: #c4c4be 0px solid; =
BORDER-RIGHT: #c4c4be 0px solid; PADDING-TOP: 4px
}
DIV.yuimenubar LI.first-of-type.yuimenubaritem {
	BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: =
0px; BORDER-LEFT-WIDTH: 0px
}
DIV.yuimenu LI.hassubmenu EM.submenuindicator {
	BACKGROUND-IMAGE: url(map.gif); TEXT-INDENT: 9px; WIDTH: 8px; DISPLAY: =
inline-block; BACKGROUND-REPEAT: no-repeat; FONT: 0px/0 arial; HEIGHT: =
8px; VERTICAL-ALIGN: middle; OVERFLOW: hidden
}
DIV.yuimenubar LI.hassubmenu EM.submenuindicator {
	BACKGROUND-IMAGE: url(map.gif); TEXT-INDENT: 9px; WIDTH: 8px; DISPLAY: =
inline-block; BACKGROUND-REPEAT: no-repeat; FONT: 0px/0 arial; HEIGHT: =
8px; VERTICAL-ALIGN: middle; OVERFLOW: hidden
}
DIV.yuimenubar LI.hassubmenu EM.submenuindicator {
	MARGIN: 0px 0px 0px 10px; BACKGROUND-POSITION: 0px -24px
}
DIV.yuimenubar LI.hassubmenu EM.selected.submenuindicator {
	BACKGROUND-POSITION: 0px -32px
}
DIV.yuimenubar LI.hassubmenu EM.disabled.submenuindicator {
	BACKGROUND-POSITION: 0px -40px
}
DIV.yuimenu LI.hassubmenu EM.submenuindicator {
	MARGIN: 0px -16px 0px 10px; BACKGROUND-POSITION: 0px 0px
}
DIV.yuimenu LI.hassubmenu EM.selected.submenuindicator {
	BACKGROUND-POSITION: 0px -8px
}
DIV.yuimenu LI.hassubmenu EM.disabled.submenuindicator {
	BACKGROUND-POSITION: 0px -16px
}
DIV.yuimenu LI.checked {
	POSITION: relative
}
DIV.yuimenu LI.checked EM.checkedindicator {
	BACKGROUND-IMAGE: url(map.gif); POSITION: absolute; TEXT-INDENT: 9px; =
WIDTH: 8px; BACKGROUND-REPEAT: no-repeat; BACKGROUND-POSITION: 0px =
-48px; HEIGHT: 8px; OVERFLOW: hidden; TOP: 0.5em; LEFT: 6px; _left: =
-16px
}
DIV.yuimenu LI.checked EM.selected.checkedindicator {
	BACKGROUND-POSITION: 0px -56px
}
DIV.yuimenu LI.checked EM.disabled.checkedindicator {
	BACKGROUND-POSITION: 0px -64px
}

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: text/css;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/menuNIMH.css

DIV.yuimenubar LI LI {
	PADDING-BOTTOM: 2px !important; PADDING-LEFT: 8px !important; =
FONT-SIZE: 90%; PADDING-TOP: 0px !important
}
DIV.yuimenubar LI LI A {
	BACKGROUND: none transparent scroll repeat 0% 0%
}
DIV.yuimenubar LI LI A:hover {
	COLOR: white !important
}
#navInner {
	BACKGROUND-COLOR: #9dc257; WIDTH: 100%; FLOAT: left; FONT-SIZE: 1em
}
#navInner UL {
	PADDING-BOTTOM: 0px; LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: =
2%; PADDING-RIGHT: 0px; LIST-STYLE-IMAGE: none; PADDING-TOP: 9px
}
LI.yuimenubaritem {
	PADDING-BOTTOM: 0px !important; MARGIN: 0px 1px 0px 0px; PADDING-LEFT: =
0px !important; PADDING-RIGHT: 0px !important; BACKGROUND: =
url(../images/tab_rightcorner_off.gif) #5e66ff no-repeat right top; =
FLOAT: left; FONT-SIZE: 100% !important; PADDING-TOP: 0px !important
}
A.nav {
	PADDING-BOTTOM: 2px; MARGIN: 0px; PADDING-LEFT: 14px; PADDING-RIGHT: =
14px; DISPLAY: block; BACKGROUND: url(../images/tab_leftcorner_off.gif) =
no-repeat left top; FLOAT: left; COLOR: #fff !important; FONT-SIZE: 100% =
!important; TEXT-DECORATION: none; PADDING-TOP: 2px
}
DIV.yuimenu LI.selected {
	BACKGROUND-COLOR: #5e66ff
}
DIV.yuimenubar LI.selected {
	BACKGROUND-COLOR: #5e66ff
}
#home .home {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#health .health {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#research .research {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#news .news {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#about .about {
	BACKGROUND: url(../images/tab_rightcorner_on.gif) #fff no-repeat right =
top
}
#home .home A.nav {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf !important; CURSOR: default !important; TEXT-DECORATION: =
none !important
}
#health .health A.nav {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf !important; CURSOR: default !important; TEXT-DECORATION: =
none !important
}
#research .research A.nav {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf !important; CURSOR: default !important; TEXT-DECORATION: =
none !important
}
#news .news A.nav {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf !important; CURSOR: default !important; TEXT-DECORATION: =
none !important
}
#about .about A.nav {
	BACKGROUND: url(../images/tab_leftcorner_on.gif) no-repeat left top; =
COLOR: #525eaf !important; CURSOR: default !important; TEXT-DECORATION: =
none !important
}

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/scripts/swfobject/swfobject.js

/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> =0A=
	is released under the MIT License =
<http://www.opensource.org/licenses/mit-license.php> =0A=
*/=0A=
var swfobject=3Dfunction(){var =
D=3D"undefined",r=3D"object",S=3D"Shockwave =
Flash",W=3D"ShockwaveFlash.ShockwaveFlash",q=3D"application/x-shockwave-f=
lash",R=3D"SWFObjectExprInst",x=3D"onreadystatechange",O=3Dwindow,j=3Ddoc=
ument,t=3Dnavigator,T=3Dfalse,U=3D[h],o=3D[],N=3D[],I=3D[],l,Q,E,B,J=3Dfa=
lse,a=3Dfalse,n,G,m=3Dtrue,M=3Dfunction(){var aa=3Dtypeof =
j.getElementById!=3DD&&typeof j.getElementsByTagName!=3DD&&typeof =
j.createElement!=3DD,ah=3Dt.userAgent.toLowerCase(),Y=3Dt.platform.toLowe=
rCase(),ae=3DY?/win/.test(Y):/win/.test(ah),ac=3DY?/mac/.test(Y):/mac/.te=
st(ah),af=3D/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d=
+)?).*$/,"$1")):false,X=3D!+"\v1",ag=3D[0,0,0],ab=3Dnull;if(typeof =
t.plugins!=3DD&&typeof =
t.plugins[S]=3D=3Dr){ab=3Dt.plugins[S].description;if(ab&&!(typeof =
t.mimeTypes!=3DD&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=3Dtru=
e;X=3Dfalse;ab=3Dab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=3DparseInt(a=
b.replace(/^(.*)\..*$/,"$1"),10);ag[1]=3DparseInt(ab.replace(/^.*\.(.*)\s=
.*$/,"$1"),10);ag[2]=3D/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-=
Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=3DD){try{var =
ad=3Dnew =
ActiveXObject(W);if(ad){ab=3Dad.GetVariable("$version");if(ab){X=3Dtrue;a=
b=3Dab.split(" =
")[1].split(",");ag=3D[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[=
2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=3D=
function(){if(!M.w3){return}if((typeof =
j.readyState!=3DD&&j.readyState=3D=3D"complete")||(typeof =
j.readyState=3D=3DD&&(j.getElementsByTagName("body")[0]||j.body))){f()}if=
(!J){if(typeof =
j.addEventListener!=3DD){j.addEventListener("DOMContentLoaded",f,false)}i=
f(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=3D=3D"complete"=
){j.detachEvent(x,arguments.callee);f()}});if(O=3D=3Dtop){(function(){if(=
J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(argu=
ments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/lo=
aded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}=
f()})()}s(f)}}();function f(){if(J){return}try{var =
Z=3Dj.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode=
.removeChild(Z)}catch(aa){return}J=3Dtrue;var X=3DU.length;for(var =
Y=3D0;Y<X;Y++){U[Y]()}}function =
K(X){if(J){X()}else{U[U.length]=3DX}}function s(Y){if(typeof =
O.addEventListener!=3DD){O.addEventListener("load",Y,false)}else{if(typeo=
f =
j.addEventListener!=3DD){j.addEventListener("load",Y,false)}else{if(typeo=
f O.attachEvent!=3DD){i(O,"onload",Y)}else{if(typeof =
O.onload=3D=3D"function"){var =
X=3DO.onload;O.onload=3Dfunction(){X();Y()}}else{O.onload=3DY}}}}}functio=
n h(){if(T){V()}else{H()}}function V(){var =
X=3Dj.getElementsByTagName("body")[0];var =
aa=3DC(r);aa.setAttribute("type",q);var Z=3DX.appendChild(aa);if(Z){var =
Y=3D0;(function(){if(typeof Z.GetVariable!=3DD){var =
ab=3DZ.GetVariable("$version");if(ab){ab=3Dab.split(" =
")[1].split(",");M.pv=3D[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(a=
b[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.re=
moveChild(aa);Z=3Dnull;H()})()}else{H()}}function H(){var =
ag=3Do.length;if(ag>0){for(var af=3D0;af<ag;af++){var Y=3Do[af].id;var =
ab=3Do[af].callbackFn;var aa=3D{success:false,id:Y};if(M.pv[0]>0){var =
ae=3Dc(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(=
ab){aa.success=3Dtrue;aa.ref=3Dz(Y);ab(aa)}}else{if(o[af].expressInstall&=
&A()){var =
ai=3D{};ai.data=3Do[af].expressInstall;ai.width=3Dae.getAttribute("width"=
)||"0";ai.height=3Dae.getAttribute("height")||"0";if(ae.getAttribute("cla=
ss")){ai.styleclass=3Dae.getAttribute("class")}if(ae.getAttribute("align"=
)){ai.align=3Dae.getAttribute("align")}var ah=3D{};var =
X=3Dae.getElementsByTagName("param");var ac=3DX.length;for(var =
ad=3D0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!=3D"movie"=
){ah[X[ad].getAttribute("name")]=3DX[ad].getAttribute("value")}}P(ai,ah,Y=
,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var =
Z=3Dz(Y);if(Z&&typeof =
Z.SetVariable!=3DD){aa.success=3Dtrue;aa.ref=3DZ}ab(aa)}}}}}function =
z(aa){var X=3Dnull;var =
Y=3Dc(aa);if(Y&&Y.nodeName=3D=3D"OBJECT"){if(typeof =
Y.SetVariable!=3DD){X=3DY}else{var =
Z=3DY.getElementsByTagName(r)[0];if(Z){X=3DZ}}}return X}function =
A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function =
P(aa,ab,X,Z){a=3Dtrue;E=3DZ||null;B=3D{success:false,id:X};var =
ae=3Dc(X);if(ae){if(ae.nodeName=3D=3D"OBJECT"){l=3Dg(ae);Q=3Dnull}else{l=3D=
ae;Q=3DX}aa.id=3DR;if(typeof =
aa.width=3D=3DD||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.wi=
dth=3D"310"}if(typeof =
aa.height=3D=3DD||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa=
.height=3D"137"}j.title=3Dj.title.slice(0,47)+" - Flash Player =
Installation";var =
ad=3DM.ie&&M.win?"ActiveX":"PlugIn",ac=3D"MMredirectURL=3D"+O.location.to=
String().replace(/&/g,"%26")+"&MMplayerType=3D"+ad+"&MMdoctitle=3D"+j.tit=
le;if(typeof =
ab.flashvars!=3DD){ab.flashvars+=3D"&"+ac}else{ab.flashvars=3Dac}if(M.ie&=
&M.win&&ae.readyState!=3D4){var =
Y=3DC("div");X+=3D"SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.ins=
ertBefore(Y,ae);ae.style.display=3D"none";(function(){if(ae.readyState=3D=
=3D4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}=
})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=3D4){var =
X=3DC("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y=
),X);Y.style.display=3D"none";(function(){if(Y.readyState=3D=3D4){Y.paren=
tNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.par=
entNode.replaceChild(g(Y),Y)}}function g(ab){var =
aa=3DC("div");if(M.win&&M.ie){aa.innerHTML=3Dab.innerHTML}else{var =
Y=3Dab.getElementsByTagName(r)[0];if(Y){var ad=3DY.childNodes;if(ad){var =
X=3Dad.length;for(var =
Z=3D0;Z<X;Z++){if(!(ad[Z].nodeType=3D=3D1&&ad[Z].nodeName=3D=3D"PARAM")&&=
!(ad[Z].nodeType=3D=3D8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}retur=
n aa}function u(ai,ag,Y){var X,aa=3Dc(Y);if(M.wk&&M.wk<312){return =
X}if(aa){if(typeof ai.id=3D=3DD){ai.id=3DY}if(M.ie&&M.win){var =
ah=3D"";for(var ae in =
ai){if(ai[ae]!=3DObject.prototype[ae]){if(ae.toLowerCase()=3D=3D"data"){a=
g.movie=3Dai[ae]}else{if(ae.toLowerCase()=3D=3D"styleclass"){ah+=3D' =
class=3D"'+ai[ae]+'"'}else{if(ae.toLowerCase()!=3D"classid"){ah+=3D" =
"+ae+'=3D"'+ai[ae]+'"'}}}}}var af=3D"";for(var ad in =
ag){if(ag[ad]!=3DObject.prototype[ad]){af+=3D'<param name=3D"'+ad+'" =
value=3D"'+ag[ad]+'" />'}}aa.outerHTML=3D'<object =
classid=3D"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</obje=
ct>";N[N.length]=3Dai.id;X=3Dc(ai.id)}else{var =
Z=3DC(r);Z.setAttribute("type",q);for(var ac in =
ai){if(ai[ac]!=3DObject.prototype[ac]){if(ac.toLowerCase()=3D=3D"stylecla=
ss"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!=3D"classid"=
){Z.setAttribute(ac,ai[ac])}}}}for(var ab in =
ag){if(ag[ab]!=3DObject.prototype[ab]&&ab.toLowerCase()!=3D"movie"){e(Z,a=
b,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=3DZ}}return X}function =
e(Z,X,Y){var =
aa=3DC("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.ap=
pendChild(aa)}function y(Y){var =
X=3Dc(Y);if(X&&X.nodeName=3D=3D"OBJECT"){if(M.ie&&M.win){X.style.display=3D=
"none";(function(){if(X.readyState=3D=3D4){b(Y)}else{setTimeout(arguments=
.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var =
Y=3Dc(Z);if(Y){for(var X in Y){if(typeof =
Y[X]=3D=3D"function"){Y[X]=3Dnull}}Y.parentNode.removeChild(Y)}}function =
c(Z){var X=3Dnull;try{X=3Dj.getElementById(Z)}catch(Y){}return =
X}function C(X){return j.createElement(X)}function =
i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=3D[Z,X,Y]}function F(Z){var =
Y=3DM.pv,X=3DZ.split(".");X[0]=3DparseInt(X[0],10);X[1]=3DparseInt(X[1],1=
0)||0;X[2]=3DparseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]=3D=3DX[0]&&Y[1]=
>X[1])||(Y[0]=3D=3DX[0]&&Y[1]=3D=3DX[1]&&Y[2]>=3DX[2]))?true:false}functi=
on v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var =
aa=3Dj.getElementsByTagName("head")[0];if(!aa){return}var =
X=3D(ad&&typeof =
ad=3D=3D"string")?ad:"screen";if(ab){n=3Dnull;G=3Dnull}if(!n||G!=3DX){var=
 =
Z=3DC("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X=
);n=3Daa.appendChild(Z);if(M.ie&&M.win&&typeof =
j.styleSheets!=3DD&&j.styleSheets.length>0){n=3Dj.styleSheets[j.styleShee=
ts.length-1]}G=3DX}if(M.ie&&M.win){if(n&&typeof =
n.addRule=3D=3Dr){n.addRule(ac,Y)}}else{if(n&&typeof =
j.createTextNode!=3DD){n.appendChild(j.createTextNode(ac+" =
{"+Y+"}"))}}}function w(Z,X){if(!m){return}var =
Y=3DX?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=3DY}else{v("#"=
+Z,"visibility:"+Y)}}function L(Y){var Z=3D/[\\\"<>\.;]/;var =
X=3DZ.exec(Y)!=3Dnull;return X&&typeof =
encodeURIComponent!=3DD?encodeURIComponent(Y):Y}var =
d=3Dfunction(){if(M.ie&&M.win){window.attachEvent("onunload",function(){v=
ar ac=3DI.length;for(var =
ab=3D0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var =
Z=3DN.length;for(var aa=3D0;aa<Z;aa++){y(N[aa])}for(var Y in =
M){M[Y]=3Dnull}M=3Dnull;for(var X in =
swfobject){swfobject[X]=3Dnull}swfobject=3Dnull})}}();return{registerObje=
ct:function(ab,X,aa,Z){if(M.w3&&ab&&X){var =
Y=3D{};Y.id=3Dab;Y.swfVersion=3DX;Y.expressInstall=3Daa;Y.callbackFn=3DZ;=
o[o.length]=3DY;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObj=
ectById:function(X){if(M.w3){return =
z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var =
X=3D{success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){=
w(ah,false);K(function(){ae+=3D"";ag+=3D"";var aj=3D{};if(af&&typeof =
af=3D=3D=3Dr){for(var al in =
af){aj[al]=3Daf[al]}}aj.data=3Dab;aj.width=3Dae;aj.height=3Dag;var =
am=3D{};if(ad&&typeof ad=3D=3D=3Dr){for(var ak in =
ad){am[ak]=3Dad[ak]}}if(Z&&typeof Z=3D=3D=3Dr){for(var ai in =
Z){if(typeof =
am.flashvars!=3DD){am.flashvars+=3D"&"+ai+"=3D"+Z[ai]}else{am.flashvars=3D=
ai+"=3D"+Z[ai]}}}if(F(Y)){var =
an=3Du(aj,am,ah);if(aj.id=3D=3Dah){w(ah,true)}X.success=3Dtrue;X.ref=3Dan=
}else{if(aa&&A()){aj.data=3Daa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(=
ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=3Dfa=
lse},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.p=
v[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){=
if(M.w3){return u(Z,Y,X)}else{return =
undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,=
Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){i=
f(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue=
:function(aa){var =
Z=3Dj.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=3DZ.split=
("?")[1]}if(aa=3D=3Dnull){return L(Z)}var Y=3DZ.split("&");for(var =
X=3D0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("=3D"))=3D=3Daa){r=
eturn =
L(Y[X].substring((Y[X].indexOf("=3D")+1)))}}}return""},expressInstallCall=
back:function(){if(a){var =
X=3Dc(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&=
&M.win){l.style.display=3D"block"}}if(E){E(B)}}a=3Dfalse}}}}();
------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/yahoo.js

/*=0A=
Copyright (c) 2007, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
version: 2.2.2=0A=
*/=0A=
/**=0A=
 * The YAHOO object is the single global object used by YUI Library.  It=0A=
 * contains utility function for setting up namespaces, inheritance, and=0A=
 * logging.  YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces=0A=
 * created automatically for and used by the library.=0A=
 * @module yahoo=0A=
 * @title  YAHOO Global=0A=
 */=0A=
=0A=
/**=0A=
 * YAHOO_config is not included part of the library.  Instead it is an =
object=0A=
 * that can be defined by the implementer immediately before including =
the=0A=
 * YUI library.  The properties included in this object will be used to=0A=
 * configure global properties needed as soon as the library begins to =
load.=0A=
 * @class YAHOO_config=0A=
 * @static=0A=
 */=0A=
=0A=
/**=0A=
 * A reference to a function that will be executed every time a YAHOO =
module=0A=
 * is loaded.  As parameter, this function will receive the version=0A=
 * information for the module. See <a href=3D"YAHOO.env.html#getVersion">=0A=
 * YAHOO.env.getVersion</a> for the description of the version data =
structure.=0A=
 * @property listener=0A=
 * @static=0A=
 */=0A=
if (typeof YAHOO =3D=3D "undefined") {=0A=
    /**=0A=
     * The YAHOO global namespace object.  If YAHOO is already defined, =
the=0A=
     * existing YAHOO object will not be overwritten so that defined=0A=
     * namespaces are preserved.=0A=
     * @class YAHOO=0A=
     * @static=0A=
     */=0A=
    var YAHOO =3D {};=0A=
}=0A=
=0A=
/**=0A=
 * Returns the namespace specified and creates it if it doesn't exist=0A=
 * <pre>=0A=
 * YAHOO.namespace("property.package");=0A=
 * YAHOO.namespace("YAHOO.property.package");=0A=
 * </pre>=0A=
 * Either of the above would create YAHOO.property, then=0A=
 * YAHOO.property.package=0A=
 *=0A=
 * Be careful when naming packages. Reserved words may work in some =
browsers=0A=
 * and not others. For instance, the following will fail in Safari:=0A=
 * <pre>=0A=
 * YAHOO.namespace("really.long.nested.namespace");=0A=
 * </pre>=0A=
 * This fails because "long" is a future reserved word in ECMAScript=0A=
 *=0A=
 * @method namespace=0A=
 * @static=0A=
 * @param  {String*} arguments 1-n namespaces to create =0A=
 * @return {Object}  A reference to the last namespace object created=0A=
 */=0A=
YAHOO.namespace =3D function() {=0A=
    var a=3Darguments, o=3Dnull, i, j, d;=0A=
    for (i=3D0; i<a.length; i=3Di+1) {=0A=
        d=3Da[i].split(".");=0A=
        o=3DYAHOO;=0A=
=0A=
        // YAHOO is implied, so it is ignored if it is included=0A=
        for (j=3D(d[0] =3D=3D "YAHOO") ? 1 : 0; j<d.length; j=3Dj+1) {=0A=
            o[d[j]]=3Do[d[j]] || {};=0A=
            o=3Do[d[j]];=0A=
        }=0A=
    }=0A=
=0A=
    return o;=0A=
};=0A=
=0A=
/**=0A=
 * Uses YAHOO.widget.Logger to output a log message, if the widget is=0A=
 * available.=0A=
 *=0A=
 * @method log=0A=
 * @static=0A=
 * @param  {String}  msg  The message to log.=0A=
 * @param  {String}  cat  The log category for the message.  Default=0A=
 *                        categories are "info", "warn", "error", time".=0A=
 *                        Custom categories can be used as well. (opt)=0A=
 * @param  {String}  src  The source of the the message (opt)=0A=
 * @return {Boolean}      True if the log operation was successful.=0A=
 */=0A=
YAHOO.log =3D function(msg, cat, src) {=0A=
    var l=3DYAHOO.widget.Logger;=0A=
    if(l && l.log) {=0A=
        return l.log(msg, cat, src);=0A=
    } else {=0A=
        return false;=0A=
    }=0A=
};=0A=
=0A=
=0A=
/**=0A=
 * Initializes the global by creating the default namespaces and applying=0A=
 * any new configuration information that is detected.=0A=
 * @method init=0A=
 * @static=0A=
 */=0A=
YAHOO.init =3D function() {=0A=
    this.namespace("util", "widget", "example");=0A=
    if (typeof YAHOO_config !=3D "undefined") {=0A=
        var =
l=3DYAHOO_config.listener,ls=3DYAHOO.env.listeners,unique=3Dtrue,i;=0A=
        if (l) {=0A=
            // if YAHOO is loaded multiple times we need to check to see =
if=0A=
            // this is a new config object.  If it is, add the new =
component=0A=
            // load listener to the stack=0A=
            for (i=3D0;i<ls.length;i=3Di+1) {=0A=
                if (ls[i]=3D=3Dl) {=0A=
                    unique=3Dfalse;=0A=
                    break;=0A=
                }=0A=
            }=0A=
            if (unique) {=0A=
                ls.push(l);=0A=
            }=0A=
        }=0A=
    }=0A=
};=0A=
=0A=
/**=0A=
 * Registers a module with the YAHOO object=0A=
 * @method register=0A=
 * @static=0A=
 * @param {String}   name    the name of the module (event, slider, etc)=0A=
 * @param {Function} mainClass a reference to class in the module.  This=0A=
 *                             class will be tagged with the version info=0A=
 *                             so that it will be possible to identify =
the=0A=
 *                             version that is in use when multiple =
versions=0A=
 *                             have loaded=0A=
 * @param {Object}   data      metadata object for the module.  =
Currently it=0A=
 *                             is expected to contain a "version" =
property=0A=
 *                             and a "build" property at minimum.=0A=
 */=0A=
YAHOO.register =3D function(name, mainClass, data) {=0A=
    var mods =3D YAHOO.env.modules;=0A=
    if (!mods[name]) {=0A=
        mods[name] =3D { versions:[], builds:[] };=0A=
    }=0A=
    var =
m=3Dmods[name],v=3Ddata.version,b=3Ddata.build,ls=3DYAHOO.env.listeners;=0A=
    m.name =3D name;=0A=
    m.version =3D v;=0A=
    m.build =3D b;=0A=
    m.versions.push(v);=0A=
    m.builds.push(b);=0A=
    m.mainClass =3D mainClass;=0A=
    // fire the module load listeners=0A=
    for (var i=3D0;i<ls.length;i=3Di+1) {=0A=
        ls[i](m);=0A=
    }=0A=
    // label the main class=0A=
    if (mainClass) {=0A=
        mainClass.VERSION =3D v;=0A=
        mainClass.BUILD =3D b;=0A=
    } else {=0A=
        YAHOO.log("mainClass is undefined for module " + name, "warn");=0A=
    }=0A=
};=0A=
=0A=
/**=0A=
 * YAHOO.env is used to keep track of what is known about the YUI =
library and=0A=
 * the browsing environment=0A=
 * @class YAHOO.env=0A=
 * @type Object=0A=
 * @static=0A=
 */=0A=
YAHOO.env =3D YAHOO.env || {=0A=
    /**=0A=
     * Keeps the version info for all YUI modules that have reported =
themselves=0A=
     * @property modules=0A=
     * @type Object[]=0A=
     */=0A=
    modules: [],=0A=
    =0A=
    /**=0A=
     * List of functions that should be executed every time a YUI module=0A=
     * reports itself.=0A=
     * @property listeners=0A=
     * @type Function[]=0A=
     */=0A=
    listeners: [],=0A=
    =0A=
    /**=0A=
     * Returns the version data for the specified module:=0A=
     *      <dl>=0A=
     *      <dt>name:</dt>      <dd>The name of the module</dd>=0A=
     *      <dt>version:</dt>   <dd>The version in use</dd>=0A=
     *      <dt>build:</dt>     <dd>The build number in use</dd>=0A=
     *      <dt>versions:</dt>  <dd>All versions that were =
registered</dd>=0A=
     *      <dt>builds:</dt>    <dd>All builds that were registered.</dd>=0A=
     *      <dt>mainClass:</dt> <dd>An object that was was stamped with =
the=0A=
     *                 current version and build. If =0A=
     *                 mainClass.VERSION !=3D version or mainClass.BUILD =
!=3D build,=0A=
     *                 multiple versions of pieces of the library have =
been=0A=
     *                 loaded, potentially causing issues.</dd>=0A=
     *       </dl>=0A=
     *=0A=
     * @method getVersion=0A=
     * @static=0A=
     * @param {String}  name the name of the module (event, slider, etc)=0A=
     * @return {Object} The version info=0A=
     */=0A=
    getVersion: function(name) {=0A=
        return YAHOO.env.modules[name] || null;=0A=
    }=0A=
};=0A=
=0A=
/**=0A=
 * Provides the language utilites and extensions used by the library=0A=
 * @class YAHOO.lang=0A=
 */=0A=
YAHOO.lang =3D {=0A=
    /**=0A=
     * Determines whether or not the provided object is an array=0A=
     * @method isArray=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    isArray: function(obj) { // frames lose type, so test constructor =
string=0A=
        if (obj && obj.constructor && =0A=
                   obj.constructor.toString().indexOf('Array') > -1) {=0A=
            return true;=0A=
        } else {=0A=
            return YAHOO.lang.isObject(obj) && obj.constructor =3D=3D =
Array;=0A=
        }=0A=
    },=0A=
=0A=
    /**=0A=
     * Determines whether or not the provided object is a boolean=0A=
     * @method isBoolean=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    isBoolean: function(obj) {=0A=
        return typeof obj =3D=3D 'boolean';=0A=
    },=0A=
    =0A=
    /**=0A=
     * Determines whether or not the provided object is a function=0A=
     * @method isFunction=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    isFunction: function(obj) {=0A=
        return typeof obj =3D=3D 'function';=0A=
    },=0A=
        =0A=
    /**=0A=
     * Determines whether or not the provided object is null=0A=
     * @method isNull=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    isNull: function(obj) {=0A=
        return obj =3D=3D=3D null;=0A=
    },=0A=
        =0A=
    /**=0A=
     * Determines whether or not the provided object is a legal number=0A=
     * @method isNumber=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    isNumber: function(obj) {=0A=
        return typeof obj =3D=3D 'number' && isFinite(obj);=0A=
    },=0A=
      =0A=
    /**=0A=
     * Determines whether or not the provided object is of type object=0A=
     * or function=0A=
     * @method isObject=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */  =0A=
    isObject: function(obj) {=0A=
        return obj && (typeof obj =3D=3D 'object' || =
YAHOO.lang.isFunction(obj));=0A=
    },=0A=
        =0A=
    /**=0A=
     * Determines whether or not the provided object is a string=0A=
     * @method isString=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    isString: function(obj) {=0A=
        return typeof obj =3D=3D 'string';=0A=
    },=0A=
        =0A=
    /**=0A=
     * Determines whether or not the provided object is undefined=0A=
     * @method isUndefined=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    isUndefined: function(obj) {=0A=
        return typeof obj =3D=3D 'undefined';=0A=
    },=0A=
    =0A=
    /**=0A=
     * Determines whether or not the property was added=0A=
     * to the object instance.  Returns false if the property is not =
present=0A=
     * in the object, or was inherited from the prototype.=0A=
     * This abstraction is provided to enable hasOwnProperty for Safari =
1.3.x.=0A=
     * There is a discrepancy between YAHOO.lang.hasOwnProperty and=0A=
     * Object.prototype.hasOwnProperty when the property is a primitive =
added to=0A=
     * both the instance AND prototype with the same value:=0A=
     * <pre>=0A=
     * var A =3D function() {};=0A=
     * A.prototype.foo =3D 'foo';=0A=
     * var a =3D new A();=0A=
     * a.foo =3D 'foo';=0A=
     * alert(a.hasOwnProperty('foo')); // true=0A=
     * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using =
fallback=0A=
     * </pre>=0A=
     * @method hasOwnProperty=0A=
     * @param {any} obj The object being testing=0A=
     * @return Boolean=0A=
     */=0A=
    hasOwnProperty: function(obj, prop) {=0A=
        if (Object.prototype.hasOwnProperty) {=0A=
            return obj.hasOwnProperty(prop);=0A=
        }=0A=
        =0A=
        return !YAHOO.lang.isUndefined(obj[prop]) && =0A=
                obj.constructor.prototype[prop] !=3D=3D obj[prop];=0A=
    },=0A=
        =0A=
    /**=0A=
     * Utility to set up the prototype, constructor and superclass =
properties to=0A=
     * support an inheritance strategy that can chain constructors and =
methods.=0A=
     *=0A=
     * @method extend=0A=
     * @static=0A=
     * @param {Function} subc   the object to modify=0A=
     * @param {Function} superc the object to inherit=0A=
     * @param {Object} overrides  additional properties/methods to add =
to the=0A=
     *                              subclass prototype.  These will =
override the=0A=
     *                              matching items obtained from the =
superclass =0A=
     *                              if present.=0A=
     */=0A=
    extend: function(subc, superc, overrides) {=0A=
        if (!superc||!subc) {=0A=
            throw new Error("YAHOO.lang.extend failed, please check that =
" +=0A=
                            "all dependencies are included.");=0A=
        }=0A=
        var F =3D function() {};=0A=
        F.prototype=3Dsuperc.prototype;=0A=
        subc.prototype=3Dnew F();=0A=
        subc.prototype.constructor=3Dsubc;=0A=
        subc.superclass=3Dsuperc.prototype;=0A=
        if (superc.prototype.constructor =3D=3D =
Object.prototype.constructor) {=0A=
            superc.prototype.constructor=3Dsuperc;=0A=
        }=0A=
    =0A=
        if (overrides) {=0A=
            for (var i in overrides) {=0A=
                subc.prototype[i]=3Doverrides[i];=0A=
            }=0A=
        }=0A=
    },=0A=
    =0A=
    /**=0A=
     * Applies all prototype properties in the supplier to the receiver =
if the=0A=
     * receiver does not have these properties yet.  Optionally, one or =
more=0A=
     * methods/properties can be specified (as additional parameters).  =
This=0A=
     * option will overwrite the property if receiver has it already.=0A=
     *=0A=
     * @method augment=0A=
     * @static=0A=
     * @param {Function} r  the object to receive the augmentation=0A=
     * @param {Function} s  the object that supplies the properties to =
augment=0A=
     * @param {String*}  arguments zero or more properties methods to =
augment the=0A=
     *                             receiver with.  If none specified, =
everything=0A=
     *                             in the supplier will be used unless =
it would=0A=
     *                             overwrite an existing property in the =
receiver=0A=
     */=0A=
    augment: function(r, s) {=0A=
        if (!s||!r) {=0A=
            throw new Error("YAHOO.lang.augment failed, please check =
that " +=0A=
                            "all dependencies are included.");=0A=
        }=0A=
        var rp=3Dr.prototype, sp=3Ds.prototype, a=3Darguments, i, p;=0A=
        if (a[2]) {=0A=
            for (i=3D2; i<a.length; i=3Di+1) {=0A=
                rp[a[i]] =3D sp[a[i]];=0A=
            }=0A=
        } else {=0A=
            for (p in sp) { =0A=
                if (!rp[p]) {=0A=
                    rp[p] =3D sp[p];=0A=
                }=0A=
            }=0A=
        }=0A=
    }=0A=
};=0A=
=0A=
YAHOO.init();=0A=
=0A=
/*=0A=
 * An alias for <a href=3D"YAHOO.lang.html">YAHOO.lang</a>=0A=
 * @class YAHOO.util.Lang=0A=
 */=0A=
YAHOO.util.Lang =3D YAHOO.lang;=0A=
=0A=
/**=0A=
 * An alias for <a =
href=3D"YAHOO.lang.html#augment">YAHOO.lang.augment</a>=0A=
 * @for YAHOO=0A=
 * @method augment=0A=
 * @static=0A=
 * @param {Function} r  the object to receive the augmentation=0A=
 * @param {Function} s  the object that supplies the properties to =
augment=0A=
 * @param {String*}  arguments zero or more properties methods to =
augment the=0A=
 *                             receiver with.  If none specified, =
everything=0A=
 *                             in the supplier will be used unless it =
would=0A=
 *                             overwrite an existing property in the =
receiver=0A=
 */=0A=
YAHOO.augment =3D YAHOO.lang.augment;=0A=
       =0A=
/**=0A=
 * An alias for <a href=3D"YAHOO.lang.html#extend">YAHOO.lang.extend</a>=0A=
 * @method extend=0A=
 * @static=0A=
 * @param {Function} subc   the object to modify=0A=
 * @param {Function} superc the object to inherit=0A=
 * @param {Object} overrides  additional properties/methods to add to the=0A=
 *                              subclass prototype.  These will override =
the=0A=
 *                              matching items obtained from the =
superclass =0A=
 *                              if present.=0A=
 */=0A=
YAHOO.extend =3D YAHOO.lang.extend;=0A=
=0A=
YAHOO.register("yahoo", YAHOO, {version: "2.2.2", build: "202"});=0A=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/event.js

/*=0A=
Copyright (c) 2007, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
version: 2.2.2=0A=
*/=0A=
=0A=
/**=0A=
 * The CustomEvent class lets you define events for your application=0A=
 * that can be subscribed to by one or more independent component.=0A=
 *=0A=
 * @param {String}  type The type of event, which is passed to the =
callback=0A=
 *                  when the event fires=0A=
 * @param {Object}  oScope The context the event will fire from.  "this" =
will=0A=
 *                  refer to this object in the callback.  Default =
value: =0A=
 *                  the window object.  The listener can override this.=0A=
 * @param {boolean} silent pass true to prevent the event from writing to=0A=
 *                  the debugsystem=0A=
 * @param {int}     signature the signature that the custom event =
subscriber=0A=
 *                  will receive. YAHOO.util.CustomEvent.LIST or =0A=
 *                  YAHOO.util.CustomEvent.FLAT.  The default is=0A=
 *                  YAHOO.util.CustomEvent.LIST.=0A=
 * @namespace YAHOO.util=0A=
 * @class CustomEvent=0A=
 * @constructor=0A=
 */=0A=
YAHOO.util.CustomEvent =3D function(type, oScope, silent, signature) {=0A=
=0A=
    /**=0A=
     * The type of event, returned to subscribers when the event fires=0A=
     * @property type=0A=
     * @type string=0A=
     */=0A=
    this.type =3D type;=0A=
=0A=
    /**=0A=
     * The scope the the event will fire from by default.  Defaults to =
the window =0A=
     * obj=0A=
     * @property scope=0A=
     * @type object=0A=
     */=0A=
    this.scope =3D oScope || window;=0A=
=0A=
    /**=0A=
     * By default all custom events are logged in the debug build, set =
silent=0A=
     * to true to disable debug outpu for this event.=0A=
     * @property silent=0A=
     * @type boolean=0A=
     */=0A=
    this.silent =3D silent;=0A=
=0A=
    /**=0A=
     * Custom events support two styles of arguments provided to the =
event=0A=
     * subscribers.  =0A=
     * <ul>=0A=
     * <li>YAHOO.util.CustomEvent.LIST: =0A=
     *   <ul>=0A=
     *   <li>param1: event name</li>=0A=
     *   <li>param2: array of arguments sent to fire</li>=0A=
     *   <li>param3: <optional> a custom object supplied by the =
subscriber</li>=0A=
     *   </ul>=0A=
     * </li>=0A=
     * <li>YAHOO.util.CustomEvent.FLAT=0A=
     *   <ul>=0A=
     *   <li>param1: the first argument passed to fire.  If you need to=0A=
     *           pass multiple parameters, use and array or object =
literal</li>=0A=
     *   <li>param2: <optional> a custom object supplied by the =
subscriber</li>=0A=
     *   </ul>=0A=
     * </li>=0A=
     * </ul>=0A=
     *   @property signature=0A=
     *   @type int=0A=
     */=0A=
    this.signature =3D signature || YAHOO.util.CustomEvent.LIST;=0A=
=0A=
    /**=0A=
     * The subscribers to this event=0A=
     * @property subscribers=0A=
     * @type Subscriber[]=0A=
     */=0A=
    this.subscribers =3D [];=0A=
=0A=
    if (!this.silent) {=0A=
    }=0A=
=0A=
    var onsubscribeType =3D "_YUICEOnSubscribe";=0A=
=0A=
    // Only add subscribe events for events that are not generated by =0A=
    // CustomEvent=0A=
    if (type !=3D=3D onsubscribeType) {=0A=
=0A=
        /**=0A=
         * Custom events provide a custom event that fires whenever =
there is=0A=
         * a new subscriber to the event.  This provides an opportunity =
to=0A=
         * handle the case where there is a non-repeating event that has=0A=
         * already fired has a new subscriber.  =0A=
         *=0A=
         * @event subscribeEvent=0A=
         * @type YAHOO.util.CustomEvent=0A=
         * @param {Function} fn The function to execute=0A=
         * @param {Object}   obj An object to be passed along when the =
event =0A=
         *                       fires=0A=
         * @param {boolean|Object}  override If true, the obj passed in =
becomes =0A=
         *                                   the execution scope of the =
listener.=0A=
         *                                   if an object, that object =
becomes the=0A=
         *                                   the execution scope.=0A=
         */=0A=
        this.subscribeEvent =3D =0A=
                new YAHOO.util.CustomEvent(onsubscribeType, this, true);=0A=
=0A=
    } =0A=
};=0A=
=0A=
/**=0A=
 * Subscriber listener sigature constant.  The LIST type returns three=0A=
 * parameters: the event type, the array of args passed to fire, and=0A=
 * the optional custom object=0A=
 * @property YAHOO.util.CustomEvent.LIST=0A=
 * @static=0A=
 * @type int=0A=
 */=0A=
YAHOO.util.CustomEvent.LIST =3D 0;=0A=
=0A=
/**=0A=
 * Subscriber listener sigature constant.  The FLAT type returns two=0A=
 * parameters: the first argument passed to fire and the optional =0A=
 * custom object=0A=
 * @property YAHOO.util.CustomEvent.FLAT=0A=
 * @static=0A=
 * @type int=0A=
 */=0A=
YAHOO.util.CustomEvent.FLAT =3D 1;=0A=
=0A=
YAHOO.util.CustomEvent.prototype =3D {=0A=
=0A=
    /**=0A=
     * Subscribes the caller to this event=0A=
     * @method subscribe=0A=
     * @param {Function} fn        The function to execute=0A=
     * @param {Object}   obj       An object to be passed along when the =
event =0A=
     *                             fires=0A=
     * @param {boolean|Object}  override If true, the obj passed in =
becomes =0A=
     *                                   the execution scope of the =
listener.=0A=
     *                                   if an object, that object =
becomes the=0A=
     *                                   the execution scope.=0A=
     */=0A=
    subscribe: function(fn, obj, override) {=0A=
=0A=
        if (!fn) {=0A=
throw new Error("Invalid callback for subscriber to '" + this.type + =
"'");=0A=
        }=0A=
=0A=
        if (this.subscribeEvent) {=0A=
            this.subscribeEvent.fire(fn, obj, override);=0A=
        }=0A=
=0A=
        this.subscribers.push( new YAHOO.util.Subscriber(fn, obj, =
override) );=0A=
    },=0A=
=0A=
    /**=0A=
     * Unsubscribes subscribers.=0A=
     * @method unsubscribe=0A=
     * @param {Function} fn  The subscribed function to remove, if not =
supplied=0A=
     *                       all will be removed=0A=
     * @param {Object}   obj  The custom object passed to subscribe.  =
This is=0A=
     *                        optional, but if supplied will be used to=0A=
     *                        disambiguate multiple listeners that are =
the same=0A=
     *                        (e.g., you subscribe many object using a =
function=0A=
     *                        that lives on the prototype)=0A=
     * @return {boolean} True if the subscriber was found and detached.=0A=
     */=0A=
    unsubscribe: function(fn, obj) {=0A=
=0A=
        if (!fn) {=0A=
            return this.unsubscribeAll();=0A=
        }=0A=
=0A=
        var found =3D false;=0A=
        for (var i=3D0, len=3Dthis.subscribers.length; i<len; ++i) {=0A=
            var s =3D this.subscribers[i];=0A=
            if (s && s.contains(fn, obj)) {=0A=
                this._delete(i);=0A=
                found =3D true;=0A=
            }=0A=
        }=0A=
=0A=
        return found;=0A=
    },=0A=
=0A=
    /**=0A=
     * Notifies the subscribers.  The callback functions will be executed=0A=
     * from the scope specified when the event was created, and with the =0A=
     * following parameters:=0A=
     *   <ul>=0A=
     *   <li>The type of event</li>=0A=
     *   <li>All of the arguments fire() was executed with as an =
array</li>=0A=
     *   <li>The custom object (if any) that was passed into the =
subscribe() =0A=
     *       method</li>=0A=
     *   </ul>=0A=
     * @method fire =0A=
     * @param {Object*} arguments an arbitrary set of parameters to pass =
to =0A=
     *                            the handler.=0A=
     * @return {boolean} false if one of the subscribers returned false, =0A=
     *                   true otherwise=0A=
     */=0A=
    fire: function() {=0A=
        var len=3Dthis.subscribers.length;=0A=
        if (!len && this.silent) {=0A=
            return true;=0A=
        }=0A=
=0A=
        var args=3D[], ret=3Dtrue, i;=0A=
=0A=
        for (i=3D0; i<arguments.length; ++i) {=0A=
            args.push(arguments[i]);=0A=
        }=0A=
=0A=
        var argslength =3D args.length;=0A=
=0A=
        if (!this.silent) {=0A=
        }=0A=
=0A=
        for (i=3D0; i<len; ++i) {=0A=
            var s =3D this.subscribers[i];=0A=
            if (s) {=0A=
                if (!this.silent) {=0A=
                }=0A=
=0A=
                var scope =3D s.getScope(this.scope);=0A=
=0A=
                if (this.signature =3D=3D YAHOO.util.CustomEvent.FLAT) {=0A=
                    var param =3D null;=0A=
                    if (args.length > 0) {=0A=
                        param =3D args[0];=0A=
                    }=0A=
                    ret =3D s.fn.call(scope, param, s.obj);=0A=
                } else {=0A=
                    ret =3D s.fn.call(scope, this.type, args, s.obj);=0A=
                }=0A=
                if (false =3D=3D=3D ret) {=0A=
                    if (!this.silent) {=0A=
                    }=0A=
=0A=
                    //break;=0A=
                    return false;=0A=
                }=0A=
            }=0A=
        }=0A=
=0A=
        return true;=0A=
    },=0A=
=0A=
    /**=0A=
     * Removes all listeners=0A=
     * @method unsubscribeAll=0A=
     * @return {int} The number of listeners unsubscribed=0A=
     */=0A=
    unsubscribeAll: function() {=0A=
        for (var i=3D0, len=3Dthis.subscribers.length; i<len; ++i) {=0A=
            this._delete(len - 1 - i);=0A=
        }=0A=
=0A=
        return i;=0A=
    },=0A=
=0A=
    /**=0A=
     * @method _delete=0A=
     * @private=0A=
     */=0A=
    _delete: function(index) {=0A=
        var s =3D this.subscribers[index];=0A=
        if (s) {=0A=
            delete s.fn;=0A=
            delete s.obj;=0A=
        }=0A=
=0A=
        // delete this.subscribers[index];=0A=
        this.subscribers.splice(index, 1);=0A=
    },=0A=
=0A=
    /**=0A=
     * @method toString=0A=
     */=0A=
    toString: function() {=0A=
         return "CustomEvent: " + "'" + this.type  + "', " + =0A=
             "scope: " + this.scope;=0A=
=0A=
    }=0A=
};=0A=
=0A=
/////////////////////////////////////////////////////////////////////=0A=
=0A=
/**=0A=
 * Stores the subscriber information to be used when the event fires.=0A=
 * @param {Function} fn       The function to execute=0A=
 * @param {Object}   obj      An object to be passed along when the =
event fires=0A=
 * @param {boolean}  override If true, the obj passed in becomes the =
execution=0A=
 *                            scope of the listener=0A=
 * @class Subscriber=0A=
 * @constructor=0A=
 */=0A=
YAHOO.util.Subscriber =3D function(fn, obj, override) {=0A=
=0A=
    /**=0A=
     * The callback that will be execute when the event fires=0A=
     * @property fn=0A=
     * @type function=0A=
     */=0A=
    this.fn =3D fn;=0A=
=0A=
    /**=0A=
     * An optional custom object that will passed to the callback when=0A=
     * the event fires=0A=
     * @property obj=0A=
     * @type object=0A=
     */=0A=
    this.obj =3D obj || null;=0A=
=0A=
    /**=0A=
     * The default execution scope for the event listener is defined =
when the=0A=
     * event is created (usually the object which contains the event).=0A=
     * By setting override to true, the execution scope becomes the =
custom=0A=
     * object passed in by the subscriber.  If override is an object, =
that =0A=
     * object becomes the scope.=0A=
     * @property override=0A=
     * @type boolean|object=0A=
     */=0A=
    this.override =3D override;=0A=
=0A=
};=0A=
=0A=
/**=0A=
 * Returns the execution scope for this listener.  If override was set =
to true=0A=
 * the custom obj will be the scope.  If override is an object, that is =
the=0A=
 * scope, otherwise the default scope will be used.=0A=
 * @method getScope=0A=
 * @param {Object} defaultScope the scope to use if this listener does =
not=0A=
 *                              override it.=0A=
 */=0A=
YAHOO.util.Subscriber.prototype.getScope =3D function(defaultScope) {=0A=
    if (this.override) {=0A=
        if (this.override =3D=3D=3D true) {=0A=
            return this.obj;=0A=
        } else {=0A=
            return this.override;=0A=
        }=0A=
    }=0A=
    return defaultScope;=0A=
};=0A=
=0A=
/**=0A=
 * Returns true if the fn and obj match this objects properties.=0A=
 * Used by the unsubscribe method to match the right subscriber.=0A=
 *=0A=
 * @method contains=0A=
 * @param {Function} fn the function to execute=0A=
 * @param {Object} obj an object to be passed along when the event fires=0A=
 * @return {boolean} true if the supplied arguments match this =0A=
 *                   subscriber's signature.=0A=
 */=0A=
YAHOO.util.Subscriber.prototype.contains =3D function(fn, obj) {=0A=
    if (obj) {=0A=
        return (this.fn =3D=3D fn && this.obj =3D=3D obj);=0A=
    } else {=0A=
        return (this.fn =3D=3D fn);=0A=
    }=0A=
};=0A=
=0A=
/**=0A=
 * @method toString=0A=
 */=0A=
YAHOO.util.Subscriber.prototype.toString =3D function() {=0A=
    return "Subscriber { obj: " + (this.obj || "")  + =0A=
           ", override: " +  (this.override || "no") + " }";=0A=
};=0A=
=0A=
/**=0A=
 * The Event Utility provides utilities for managing DOM Events and tools=0A=
 * for building event systems=0A=
 *=0A=
 * @module event=0A=
 * @title Event Utility=0A=
 * @namespace YAHOO.util=0A=
 * @requires yahoo=0A=
 */=0A=
=0A=
// The first instance of Event will win if it is loaded more than once.=0A=
// @TODO this needs to be changed so that only the state data that needs =
to=0A=
// be preserved is kept, while methods are overwritten/added as needed.=0A=
// This means that the module pattern can't be used.=0A=
if (!YAHOO.util.Event) {=0A=
=0A=
/**=0A=
 * The event utility provides functions to add and remove event =
listeners,=0A=
 * event cleansing.  It also tries to automatically remove listeners it=0A=
 * registers during the unload event.=0A=
 *=0A=
 * @class Event=0A=
 * @static=0A=
 */=0A=
    YAHOO.util.Event =3D function() {=0A=
=0A=
        /**=0A=
         * True after the onload event has fired=0A=
         * @property loadComplete=0A=
         * @type boolean=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var loadComplete =3D  false;=0A=
=0A=
        /**=0A=
         * True when the document is initially usable=0A=
         * @property DOMReady=0A=
         * @type boolean=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var DOMReady =3D false;=0A=
=0A=
        /**=0A=
         * Cache of wrapped listeners=0A=
         * @property listeners=0A=
         * @type array=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var listeners =3D [];=0A=
=0A=
        /**=0A=
         * User-defined unload function that will be fired before all =
events=0A=
         * are detached=0A=
         * @property unloadListeners=0A=
         * @type array=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var unloadListeners =3D [];=0A=
=0A=
        /**=0A=
         * Cache of DOM0 event handlers to work around issues with DOM2 =
events=0A=
         * in Safari=0A=
         * @property legacyEvents=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var legacyEvents =3D [];=0A=
=0A=
        /**=0A=
         * Listener stack for DOM0 events=0A=
         * @property legacyHandlers=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var legacyHandlers =3D [];=0A=
=0A=
        /**=0A=
         * The number of times to poll after window.onload.  This number =
is=0A=
         * increased if additional late-bound handlers are requested =
after=0A=
         * the page load.=0A=
         * @property retryCount=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var retryCount =3D 0;=0A=
=0A=
        /**=0A=
         * onAvailable listeners=0A=
         * @property onAvailStack=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var onAvailStack =3D [];=0A=
=0A=
        /**=0A=
         * Lookup table for legacy events=0A=
         * @property legacyMap=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var legacyMap =3D [];=0A=
=0A=
        /**=0A=
         * Counter for auto id generation=0A=
         * @property counter=0A=
         * @static=0A=
         * @private=0A=
         */=0A=
        var counter =3D 0;=0A=
        =0A=
        /**=0A=
         * addListener/removeListener can throw errors in unexpected =
scenarios.=0A=
         * These errors are suppressed, the method returns false, and =
this property=0A=
         * is set=0A=
         * @property lastError=0A=
         * @type Error=0A=
         */=0A=
        var lastError =3D null;=0A=
=0A=
        return {=0A=
=0A=
            /**=0A=
             * The number of times we should look for elements that are =
not=0A=
             * in the DOM at the time the event is requested after the =
document=0A=
             * has been loaded.  The default is 200@amp;50 ms, so it =
will poll=0A=
             * for 10 seconds or until all outstanding handlers are bound=0A=
             * (whichever comes first).=0A=
             * @property POLL_RETRYS=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            POLL_RETRYS: 200,=0A=
=0A=
            /**=0A=
             * The poll interval in milliseconds=0A=
             * @property POLL_INTERVAL=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            POLL_INTERVAL: 10,=0A=
=0A=
            /**=0A=
             * Element to bind, int constant=0A=
             * @property EL=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            EL: 0,=0A=
=0A=
            /**=0A=
             * Type of event, int constant=0A=
             * @property TYPE=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            TYPE: 1,=0A=
=0A=
            /**=0A=
             * Function to execute, int constant=0A=
             * @property FN=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            FN: 2,=0A=
=0A=
            /**=0A=
             * Function wrapped for scope correction and cleanup, int =
constant=0A=
             * @property WFN=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            WFN: 3,=0A=
=0A=
            /**=0A=
             * Object passed in by the user that will be returned as a =0A=
             * parameter to the callback, int constant=0A=
             * @property OBJ=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            OBJ: 3,=0A=
=0A=
            /**=0A=
             * Adjusted scope, either the element we are registering the =
event=0A=
             * on or the custom object passed in by the listener, int =
constant=0A=
             * @property ADJ_SCOPE=0A=
             * @type int=0A=
             * @static=0A=
             * @final=0A=
             */=0A=
            ADJ_SCOPE: 4,=0A=
=0A=
            /**=0A=
             * Safari detection is necessary to work around the =
preventDefault=0A=
             * bug that makes it so you can't cancel a href click from =
the =0A=
             * handler.  Since this function has been used outside of =
this=0A=
             * utility, it was changed to detect all KHTML browser to be =
more=0A=
             * friendly towards the non-Safari browsers that share the =
engine.=0A=
             * Internally, the preventDefault bug detection now uses the=0A=
             * webkit property.=0A=
             * @property isSafari=0A=
             * @private=0A=
             * @static=0A=
             * @deprecated=0A=
             */=0A=
            isSafari: (/KHTML/gi).test(navigator.userAgent),=0A=
            =0A=
            /**=0A=
             * If WebKit is detected, we keep track of the version =
number of=0A=
             * the engine.  The webkit property will contain a string =
with=0A=
             * the webkit version number if webkit is detected, null=0A=
             * otherwise.=0A=
             * Safari 1.3.2 (312.6): 312.8.1 <-- currently the latest=0A=
             *                       available on Mac OSX 10.3.=0A=
             * Safari 2.0.2: 416 <-- hasOwnProperty introduced=0A=
             * Safari 2.0.4: 418 <-- preventDefault fixed (I believe)=0A=
             * Safari 2.0.4 (419.3): 418.9.1 <-- current release=0A=
             *=0A=
             * http://developer.apple.com/internet/safari/uamatrix.html=0A=
             * @property webkit=0A=
             * @type string=0A=
             * @static=0A=
             */=0A=
            webkit: function() {=0A=
                var v=3Dnavigator.userAgent.match(/AppleWebKit\/([^ =
]*)/);=0A=
                if (v&&v[1]) {=0A=
                    return v[1];=0A=
                }=0A=
                return null;=0A=
            }(),=0A=
            =0A=
            /**=0A=
             * IE detection needed to properly calculate pageX and =
pageY.  =0A=
             * capabilities checking didn't seem to work because another =0A=
             * browser that does not provide the properties have the =
values =0A=
             * calculated in a different manner than IE.=0A=
             * @property isIE=0A=
             * @private=0A=
             * @static=0A=
             */=0A=
            isIE: (!this.webkit && !navigator.userAgent.match(/opera/gi) =
&& =0A=
                    navigator.userAgent.match(/msie/gi)),=0A=
=0A=
            /**=0A=
             * poll handle=0A=
             * @property _interval=0A=
             * @private=0A=
             */=0A=
            _interval: null,=0A=
=0A=
            /**=0A=
             * @method startInterval=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            startInterval: function() {=0A=
                if (!this._interval) {=0A=
                    var self =3D this;=0A=
                    var callback =3D function() { =
self._tryPreloadAttach(); };=0A=
                    this._interval =3D setInterval(callback, =
this.POLL_INTERVAL);=0A=
                }=0A=
            },=0A=
=0A=
            /**=0A=
             * Executes the supplied callback when the item with the =
supplied=0A=
             * id is found.  This is meant to be used to execute =
behavior as=0A=
             * soon as possible as the page loads.  If you use this =
after the=0A=
             * initial page load it will poll for a fixed time for the =
element.=0A=
             * The number of times it will poll and the frequency are=0A=
             * configurable.  By default it will poll for 10 seconds.=0A=
             *=0A=
             * @method onAvailable=0A=
             *=0A=
             * @param {string}   p_id the id of the element to look for.=0A=
             * @param {function} p_fn what to execute when the element =
is found.=0A=
             * @param {object}   p_obj an optional object to be passed =
back as=0A=
             *                   a parameter to p_fn.=0A=
             * @param {boolean}  p_override If set to true, p_fn will =
execute=0A=
             *                   in the scope of p_obj=0A=
             *=0A=
             * @static=0A=
             */=0A=
            onAvailable: function(p_id, p_fn, p_obj, p_override) {=0A=
                onAvailStack.push( { id:         p_id, =0A=
                                     fn:         p_fn, =0A=
                                     obj:        p_obj, =0A=
                                     override:   p_override, =0A=
                                     checkReady: false    } );=0A=
                retryCount =3D this.POLL_RETRYS;=0A=
                this.startInterval();=0A=
            },=0A=
=0A=
            /**=0A=
             * Executes the supplied callback when the DOM is first =
usable.=0A=
             *=0A=
             * @method onDOMReady=0A=
             *=0A=
             * @param {function} p_fn what to execute when the element =
is found.=0A=
             * @param {object}   p_obj an optional object to be passed =
back as=0A=
             *                   a parameter to p_fn.=0A=
             * @param {boolean}  p_scope If set to true, p_fn will =
execute=0A=
             *                   in the scope of p_obj, if set to an =
object it=0A=
             *                   will execute in the scope of that object=0A=
             *=0A=
             * @static=0A=
             */=0A=
            onDOMReady: function(p_fn, p_obj, p_override) {=0A=
                this.DOMReadyEvent.subscribe(p_fn, p_obj, p_override);=0A=
            },=0A=
=0A=
            /**=0A=
             * Works the same way as onAvailable, but additionally =
checks the=0A=
             * state of sibling elements to determine if the content of =
the=0A=
             * available element is safe to modify.=0A=
             *=0A=
             * @method onContentReady=0A=
             *=0A=
             * @param {string}   p_id the id of the element to look for.=0A=
             * @param {function} p_fn what to execute when the element =
is ready.=0A=
             * @param {object}   p_obj an optional object to be passed =
back as=0A=
             *                   a parameter to p_fn.=0A=
             * @param {boolean}  p_override If set to true, p_fn will =
execute=0A=
             *                   in the scope of p_obj=0A=
             *=0A=
             * @static=0A=
             */=0A=
            onContentReady: function(p_id, p_fn, p_obj, p_override) {=0A=
                onAvailStack.push( { id:         p_id, =0A=
                                     fn:         p_fn, =0A=
                                     obj:        p_obj, =0A=
                                     override:   p_override,=0A=
                                     checkReady: true      } );=0A=
=0A=
                retryCount =3D this.POLL_RETRYS;=0A=
                this.startInterval();=0A=
            },=0A=
=0A=
            /**=0A=
             * Appends an event handler=0A=
             *=0A=
             * @method addListener=0A=
             *=0A=
             * @param {Object}   el        The html element to assign =
the =0A=
             *                             event to=0A=
             * @param {String}   sType     The type of event to append=0A=
             * @param {Function} fn        The method the event invokes=0A=
             * @param {Object}   obj    An arbitrary object that will be =0A=
             *                             passed as a parameter to the =
handler=0A=
             * @param {boolean}  override  If true, the obj passed in =
becomes=0A=
             *                             the execution scope of the =
listener=0A=
             * @return {boolean} True if the action was successful or =
defered,=0A=
             *                        false if one or more of the =
elements =0A=
             *                        could not have the listener =
attached,=0A=
             *                        or if the operation throws an =
exception.=0A=
             * @static=0A=
             */=0A=
            addListener: function(el, sType, fn, obj, override) {=0A=
=0A=
=0A=
                if (!fn || !fn.call) {=0A=
                    return false;=0A=
                }=0A=
=0A=
                // The el argument can be an array of elements or =
element ids.=0A=
                if ( this._isValidCollection(el)) {=0A=
                    var ok =3D true;=0A=
                    for (var i=3D0,len=3Del.length; i<len; ++i) {=0A=
                        ok =3D this.on(el[i], =0A=
                                       sType, =0A=
                                       fn, =0A=
                                       obj, =0A=
                                       override) && ok;=0A=
                    }=0A=
                    return ok;=0A=
=0A=
                } else if (typeof el =3D=3D "string") {=0A=
                    var oEl =3D this.getEl(el);=0A=
                    // If the el argument is a string, we assume it is =0A=
                    // actually the id of the element.  If the page is =
loaded=0A=
                    // we convert el to the actual element, otherwise we =0A=
                    // defer attaching the event until onload event fires=0A=
=0A=
                    // check to see if we need to delay hooking up the =
event =0A=
                    // until after the page loads.=0A=
                    if (oEl) {=0A=
                        el =3D oEl;=0A=
                    } else {=0A=
                        // defer adding the event until the element is =
available=0A=
                        this.onAvailable(el, function() {=0A=
                           YAHOO.util.Event.on(el, sType, fn, obj, =
override);=0A=
                        });=0A=
=0A=
                        return true;=0A=
                    }=0A=
                }=0A=
=0A=
                // Element should be an html element or an array if we =
get =0A=
                // here.=0A=
                if (!el) {=0A=
                    return false;=0A=
                }=0A=
=0A=
                // we need to make sure we fire registered unload events =0A=
                // prior to automatically unhooking them.  So we hang on =
to =0A=
                // these instead of attaching them to the window and =
fire the=0A=
                // handles explicitly during our one unload event.=0A=
                if ("unload" =3D=3D sType && obj !=3D=3D this) {=0A=
                    unloadListeners[unloadListeners.length] =3D=0A=
                            [el, sType, fn, obj, override];=0A=
                    return true;=0A=
                }=0A=
=0A=
=0A=
                // if the user chooses to override the scope, we use the =
custom=0A=
                // object passed in, otherwise the executing scope will =
be the=0A=
                // HTML element that the event is registered on=0A=
                var scope =3D el;=0A=
                if (override) {=0A=
                    if (override =3D=3D=3D true) {=0A=
                        scope =3D obj;=0A=
                    } else {=0A=
                        scope =3D override;=0A=
                    }=0A=
                }=0A=
=0A=
                // wrap the function so we can return the obj object when=0A=
                // the event fires;=0A=
                var wrappedFn =3D function(e) {=0A=
                        return fn.call(scope, =
YAHOO.util.Event.getEvent(e), =0A=
                                obj);=0A=
                    };=0A=
=0A=
                var li =3D [el, sType, fn, wrappedFn, scope];=0A=
                var index =3D listeners.length;=0A=
                // cache the listener so we can try to automatically =
unload=0A=
                listeners[index] =3D li;=0A=
=0A=
                if (this.useLegacyEvent(el, sType)) {=0A=
                    var legacyIndex =3D this.getLegacyIndex(el, sType);=0A=
=0A=
                    // Add a new dom0 wrapper if one is not detected for =
this=0A=
                    // element=0A=
                    if ( legacyIndex =3D=3D -1 || =0A=
                                el !=3D legacyEvents[legacyIndex][0] ) {=0A=
=0A=
                        legacyIndex =3D legacyEvents.length;=0A=
                        legacyMap[el.id + sType] =3D legacyIndex;=0A=
=0A=
                        // cache the signature for the DOM0 event, and =0A=
                        // include the existing handler for the event, =
if any=0A=
                        legacyEvents[legacyIndex] =3D =0A=
                            [el, sType, el["on" + sType]];=0A=
                        legacyHandlers[legacyIndex] =3D [];=0A=
=0A=
                        el["on" + sType] =3D =0A=
                            function(e) {=0A=
                                YAHOO.util.Event.fireLegacyEvent(=0A=
                                    YAHOO.util.Event.getEvent(e), =
legacyIndex);=0A=
                            };=0A=
                    }=0A=
=0A=
                    // add a reference to the wrapped listener to our =
custom=0A=
                    // stack of events=0A=
                    //legacyHandlers[legacyIndex].push(index);=0A=
                    legacyHandlers[legacyIndex].push(li);=0A=
=0A=
                } else {=0A=
                    try {=0A=
                        this._simpleAdd(el, sType, wrappedFn, false);=0A=
                    } catch(ex) {=0A=
                        // handle an error trying to attach an event.  =
If it fails=0A=
                        // we need to clean up the cache=0A=
                        this.lastError =3D ex;=0A=
                        this.removeListener(el, sType, fn);=0A=
                        return false;=0A=
                    }=0A=
                }=0A=
=0A=
                return true;=0A=
                =0A=
            },=0A=
=0A=
            /**=0A=
             * When using legacy events, the handler is routed to this =
object=0A=
             * so we can fire our custom listener stack.=0A=
             * @method fireLegacyEvent=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            fireLegacyEvent: function(e, legacyIndex) {=0A=
                var ok=3Dtrue,le,lh,li,scope,ret;=0A=
                =0A=
                lh =3D legacyHandlers[legacyIndex];=0A=
                for (var i=3D0,len=3Dlh.length; i<len; ++i) {=0A=
                    li =3D lh[i];=0A=
                    if ( li && li[this.WFN] ) {=0A=
                        scope =3D li[this.ADJ_SCOPE];=0A=
                        ret =3D li[this.WFN].call(scope, e);=0A=
                        ok =3D (ok && ret);=0A=
                    }=0A=
                }=0A=
=0A=
                // Fire the original handler if we replaced one.  We =
fire this=0A=
                // after the other events to keep =
stopPropagation/preventDefault=0A=
                // that happened in the DOM0 handler from touching our =
DOM2=0A=
                // substitute=0A=
                le =3D legacyEvents[legacyIndex];=0A=
                if (le && le[2]) {=0A=
                    le[2](e);=0A=
                }=0A=
                =0A=
                return ok;=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the legacy event index that matches the supplied =0A=
             * signature=0A=
             * @method getLegacyIndex=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            getLegacyIndex: function(el, sType) {=0A=
                var key =3D this.generateId(el) + sType;=0A=
                if (typeof legacyMap[key] =3D=3D "undefined") { =0A=
                    return -1;=0A=
                } else {=0A=
                    return legacyMap[key];=0A=
                }=0A=
            },=0A=
=0A=
            /**=0A=
             * Logic that determines when we should automatically use =
legacy=0A=
             * events instead of DOM2 events.  Currently this is limited =
to old=0A=
             * Safari browsers with a broken preventDefault=0A=
             * @method useLegacyEvent=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            useLegacyEvent: function(el, sType) {=0A=
                if (this.webkit && ("click"=3D=3DsType || =
"dblclick"=3D=3DsType)) {=0A=
                    var v =3D parseInt(this.webkit, 10);=0A=
                    if (!isNaN(v) && v<418) {=0A=
                        return true;=0A=
                    }=0A=
                }=0A=
                return false;=0A=
            },=0A=
                    =0A=
            /**=0A=
             * Removes an event handler=0A=
             *=0A=
             * @method removeListener=0A=
             *=0A=
             * @param {Object} el the html element or the id of the =
element to =0A=
             * assign the event to.=0A=
             * @param {String} sType the type of event to remove.=0A=
             * @param {Function} fn the method the event invokes.  If fn =
is=0A=
             * undefined, then all event handlers for the type of event =
are =0A=
             * removed.=0A=
             * @return {boolean} true if the unbind was successful, =
false =0A=
             * otherwise.=0A=
             * @static=0A=
             */=0A=
            removeListener: function(el, sType, fn) {=0A=
                var i, len;=0A=
=0A=
                // The el argument can be a string=0A=
                if (typeof el =3D=3D "string") {=0A=
                    el =3D this.getEl(el);=0A=
                // The el argument can be an array of elements or =
element ids.=0A=
                } else if ( this._isValidCollection(el)) {=0A=
                    var ok =3D true;=0A=
                    for (i=3D0,len=3Del.length; i<len; ++i) {=0A=
                        ok =3D ( this.removeListener(el[i], sType, fn) =
&& ok );=0A=
                    }=0A=
                    return ok;=0A=
                }=0A=
=0A=
                if (!fn || !fn.call) {=0A=
                    //return false;=0A=
                    return this.purgeElement(el, false, sType);=0A=
                }=0A=
=0A=
=0A=
                if ("unload" =3D=3D sType) {=0A=
=0A=
                    for (i=3D0, len=3DunloadListeners.length; i<len; =
i++) {=0A=
                        var li =3D unloadListeners[i];=0A=
                        if (li && =0A=
                            li[0] =3D=3D el && =0A=
                            li[1] =3D=3D sType && =0A=
                            li[2] =3D=3D fn) {=0A=
                                unloadListeners.splice(i, 1);=0A=
                                return true;=0A=
                        }=0A=
                    }=0A=
=0A=
                    return false;=0A=
                }=0A=
=0A=
                var cacheItem =3D null;=0A=
=0A=
                // The index is a hidden parameter; needed to remove it =
from=0A=
                // the method signature because it was tempting users to=0A=
                // try and take advantage of it, which is not possible.=0A=
                var index =3D arguments[3];=0A=
  =0A=
                if ("undefined" =3D=3D typeof index) {=0A=
                    index =3D this._getCacheIndex(el, sType, fn);=0A=
                }=0A=
=0A=
                if (index >=3D 0) {=0A=
                    cacheItem =3D listeners[index];=0A=
                }=0A=
=0A=
                if (!el || !cacheItem) {=0A=
                    return false;=0A=
                }=0A=
=0A=
=0A=
                if (this.useLegacyEvent(el, sType)) {=0A=
                    var legacyIndex =3D this.getLegacyIndex(el, sType);=0A=
                    var llist =3D legacyHandlers[legacyIndex];=0A=
                    if (llist) {=0A=
                        for (i=3D0, len=3Dllist.length; i<len; ++i) {=0A=
                            li =3D llist[i];=0A=
                            if (li && =0A=
                                li[this.EL] =3D=3D el && =0A=
                                li[this.TYPE] =3D=3D sType && =0A=
                                li[this.FN] =3D=3D fn) {=0A=
                                    llist.splice(i, 1);=0A=
                                    break;=0A=
                            }=0A=
                        }=0A=
                    }=0A=
=0A=
                } else {=0A=
                    try {=0A=
                        this._simpleRemove(el, sType, =
cacheItem[this.WFN], false);=0A=
                    } catch(ex) {=0A=
                        this.lastError =3D ex;=0A=
                        return false;=0A=
                    }=0A=
                }=0A=
=0A=
                // removed the wrapped handler=0A=
                delete listeners[index][this.WFN];=0A=
                delete listeners[index][this.FN];=0A=
                listeners.splice(index, 1);=0A=
=0A=
                return true;=0A=
=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the event's target element=0A=
             * @method getTarget=0A=
             * @param {Event} ev the event=0A=
             * @param {boolean} resolveTextNode when set to true the =
target's=0A=
             *                  parent will be returned if the target is =
a =0A=
             *                  text node.  @deprecated, the text node is=0A=
             *                  now resolved automatically=0A=
             * @return {HTMLElement} the event's target=0A=
             * @static=0A=
             */=0A=
            getTarget: function(ev, resolveTextNode) {=0A=
                var t =3D ev.target || ev.srcElement;=0A=
                return this.resolveTextNode(t);=0A=
            },=0A=
=0A=
            /**=0A=
             * In some cases, some browsers will return a text node =
inside=0A=
             * the actual element that was targeted.  This normalizes the=0A=
             * return value for getTarget and getRelatedTarget.=0A=
             * @method resolveTextNode=0A=
             * @param {HTMLElement} node node to resolve=0A=
             * @return {HTMLElement} the normized node=0A=
             * @static=0A=
             */=0A=
            resolveTextNode: function(node) {=0A=
                // if (node && node.nodeName && =0A=
                        // "#TEXT" =3D=3D node.nodeName.toUpperCase()) {=0A=
                if (node && 3 =3D=3D node.nodeType) {=0A=
                    return node.parentNode;=0A=
                } else {=0A=
                    return node;=0A=
                }=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the event's pageX=0A=
             * @method getPageX=0A=
             * @param {Event} ev the event=0A=
             * @return {int} the event's pageX=0A=
             * @static=0A=
             */=0A=
            getPageX: function(ev) {=0A=
                var x =3D ev.pageX;=0A=
                if (!x && 0 !=3D=3D x) {=0A=
                    x =3D ev.clientX || 0;=0A=
=0A=
                    if ( this.isIE ) {=0A=
                        x +=3D this._getScrollLeft();=0A=
                    }=0A=
                }=0A=
=0A=
                return x;=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the event's pageY=0A=
             * @method getPageY=0A=
             * @param {Event} ev the event=0A=
             * @return {int} the event's pageY=0A=
             * @static=0A=
             */=0A=
            getPageY: function(ev) {=0A=
                var y =3D ev.pageY;=0A=
                if (!y && 0 !=3D=3D y) {=0A=
                    y =3D ev.clientY || 0;=0A=
=0A=
                    if ( this.isIE ) {=0A=
                        y +=3D this._getScrollTop();=0A=
                    }=0A=
                }=0A=
=0A=
=0A=
                return y;=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the pageX and pageY properties as an indexed =
array.=0A=
             * @method getXY=0A=
             * @param {Event} ev the event=0A=
             * @return {[x, y]} the pageX and pageY properties of the =
event=0A=
             * @static=0A=
             */=0A=
            getXY: function(ev) {=0A=
                return [this.getPageX(ev), this.getPageY(ev)];=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the event's related target =0A=
             * @method getRelatedTarget=0A=
             * @param {Event} ev the event=0A=
             * @return {HTMLElement} the event's relatedTarget=0A=
             * @static=0A=
             */=0A=
            getRelatedTarget: function(ev) {=0A=
                var t =3D ev.relatedTarget;=0A=
                if (!t) {=0A=
                    if (ev.type =3D=3D "mouseout") {=0A=
                        t =3D ev.toElement;=0A=
                    } else if (ev.type =3D=3D "mouseover") {=0A=
                        t =3D ev.fromElement;=0A=
                    }=0A=
                }=0A=
=0A=
                return this.resolveTextNode(t);=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the time of the event.  If the time is not =
included, the=0A=
             * event is modified using the current time.=0A=
             * @method getTime=0A=
             * @param {Event} ev the event=0A=
             * @return {Date} the time of the event=0A=
             * @static=0A=
             */=0A=
            getTime: function(ev) {=0A=
                if (!ev.time) {=0A=
                    var t =3D new Date().getTime();=0A=
                    try {=0A=
                        ev.time =3D t;=0A=
                    } catch(ex) { =0A=
                        this.lastError =3D ex;=0A=
                        return t;=0A=
                    }=0A=
                }=0A=
=0A=
                return ev.time;=0A=
            },=0A=
=0A=
            /**=0A=
             * Convenience method for stopPropagation + preventDefault=0A=
             * @method stopEvent=0A=
             * @param {Event} ev the event=0A=
             * @static=0A=
             */=0A=
            stopEvent: function(ev) {=0A=
                this.stopPropagation(ev);=0A=
                this.preventDefault(ev);=0A=
            },=0A=
=0A=
            /**=0A=
             * Stops event propagation=0A=
             * @method stopPropagation=0A=
             * @param {Event} ev the event=0A=
             * @static=0A=
             */=0A=
            stopPropagation: function(ev) {=0A=
                if (ev.stopPropagation) {=0A=
                    ev.stopPropagation();=0A=
                } else {=0A=
                    ev.cancelBubble =3D true;=0A=
                }=0A=
            },=0A=
=0A=
            /**=0A=
             * Prevents the default behavior of the event=0A=
             * @method preventDefault=0A=
             * @param {Event} ev the event=0A=
             * @static=0A=
             */=0A=
            preventDefault: function(ev) {=0A=
                if (ev.preventDefault) {=0A=
                    ev.preventDefault();=0A=
                } else {=0A=
                    ev.returnValue =3D false;=0A=
                }=0A=
            },=0A=
             =0A=
            /**=0A=
             * Finds the event in the window object, the caller's =
arguments, or=0A=
             * in the arguments of another method in the callstack.  =
This is=0A=
             * executed automatically for events registered through the =
event=0A=
             * manager, so the implementer should not normally need to =
execute=0A=
             * this function at all.=0A=
             * @method getEvent=0A=
             * @param {Event} e the event parameter from the handler=0A=
             * @return {Event} the event =0A=
             * @static=0A=
             */=0A=
            getEvent: function(e) {=0A=
                var ev =3D e || window.event;=0A=
=0A=
                if (!ev) {=0A=
                    var c =3D this.getEvent.caller;=0A=
                    while (c) {=0A=
                        ev =3D c.arguments[0];=0A=
                        if (ev && Event =3D=3D ev.constructor) {=0A=
                            break;=0A=
                        }=0A=
                        c =3D c.caller;=0A=
                    }=0A=
                }=0A=
=0A=
                return ev;=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the charcode for an event=0A=
             * @method getCharCode=0A=
             * @param {Event} ev the event=0A=
             * @return {int} the event's charCode=0A=
             * @static=0A=
             */=0A=
            getCharCode: function(ev) {=0A=
                return ev.charCode || ev.keyCode || 0;=0A=
            },=0A=
=0A=
            /**=0A=
             * Locating the saved event handler data by function ref=0A=
             *=0A=
             * @method _getCacheIndex=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _getCacheIndex: function(el, sType, fn) {=0A=
                for (var i=3D0,len=3Dlisteners.length; i<len; ++i) {=0A=
                    var li =3D listeners[i];=0A=
                    if ( li                 && =0A=
                         li[this.FN] =3D=3D fn  && =0A=
                         li[this.EL] =3D=3D el  && =0A=
                         li[this.TYPE] =3D=3D sType ) {=0A=
                        return i;=0A=
                    }=0A=
                }=0A=
=0A=
                return -1;=0A=
            },=0A=
=0A=
            /**=0A=
             * Generates an unique ID for the element if it does not =
already =0A=
             * have one.=0A=
             * @method generateId=0A=
             * @param el the element to create the id for=0A=
             * @return {string} the resulting id of the element=0A=
             * @static=0A=
             */=0A=
            generateId: function(el) {=0A=
                var id =3D el.id;=0A=
=0A=
                if (!id) {=0A=
                    id =3D "yuievtautoid-" + counter;=0A=
                    ++counter;=0A=
                    el.id =3D id;=0A=
                }=0A=
=0A=
                return id;=0A=
            },=0A=
=0A=
=0A=
            /**=0A=
             * We want to be able to use getElementsByTagName as a =
collection=0A=
             * to attach a group of events to.  Unfortunately, different =0A=
             * browsers return different types of collections.  This =
function=0A=
             * tests to determine if the object is array-like.  It will =
also =0A=
             * fail if the object is an array, but is empty.=0A=
             * @method _isValidCollection=0A=
             * @param o the object to test=0A=
             * @return {boolean} true if the object is array-like and =
populated=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _isValidCollection: function(o) {=0A=
                return ( o                    && // o is something=0A=
                         o.length             && // o is indexed=0A=
                         typeof o !=3D "string" && // o is not a string=0A=
                         !o.tagName           && // o is not an HTML =
element=0A=
                         !o.alert             && // o is not a window=0A=
                         typeof o[0] !=3D "undefined" );=0A=
=0A=
            },=0A=
=0A=
            /**=0A=
             * @private=0A=
             * @property elCache=0A=
             * DOM element cache=0A=
             * @static=0A=
             * @deprecated Elements are not cached any longer=0A=
             */=0A=
            elCache: {},=0A=
=0A=
            /**=0A=
             * We cache elements bound by id because when the unload =
event =0A=
             * fires, we can no longer use document.getElementById=0A=
             * @method getEl=0A=
             * @static=0A=
             * @private=0A=
             * @deprecated Elements are not cached any longer=0A=
             */=0A=
            getEl: function(id) {=0A=
                return document.getElementById(id);=0A=
            },=0A=
=0A=
            /**=0A=
             * Clears the element cache=0A=
             * @deprecated Elements are not cached any longer=0A=
             * @method clearCache=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            clearCache: function() { },=0A=
=0A=
            /**=0A=
             * Custom event the fires when the dom is initially usable=0A=
             * @event DOMReadyEvent=0A=
             */=0A=
            DOMReadyEvent: new YAHOO.util.CustomEvent("DOMReady", this),=0A=
=0A=
            /**=0A=
             * hook up any deferred listeners=0A=
             * @method _load=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _load: function(e) {=0A=
                if (!loadComplete) {=0A=
                    loadComplete =3D true;=0A=
                    var EU =3D YAHOO.util.Event;=0A=
=0A=
                    // just in case DOMReady did not go off for some =
reason=0A=
                    EU._ready();=0A=
=0A=
                    // Remove the listener to assist with the IE memory =
issue, but not=0A=
                    // for other browsers because FF 1.0x does not like =
it.=0A=
                    if (this.isIE) {=0A=
                        EU._simpleRemove(window, "load", EU._load);=0A=
                    }=0A=
                }=0A=
            },=0A=
=0A=
            /**=0A=
             * Fires the DOMReady event listeners the first time the =
document is=0A=
             * usable.=0A=
             * @method _ready=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _ready: function(e) {=0A=
                if (!DOMReady) {=0A=
                    DOMReady=3Dtrue;=0A=
                    var EU =3D YAHOO.util.Event;=0A=
=0A=
                    // Fire the content ready custom event=0A=
                    EU.DOMReadyEvent.fire();=0A=
=0A=
                    // Remove the DOMContentLoaded (FF/Opera)=0A=
                    EU._simpleRemove(document, "DOMContentLoaded", =
EU._ready);=0A=
                }=0A=
            },=0A=
=0A=
            /**=0A=
             * Polling function that runs before the onload event fires, =0A=
             * attempting to attach to DOM Nodes as soon as they are =0A=
             * available=0A=
             * @method _tryPreloadAttach=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _tryPreloadAttach: function() {=0A=
=0A=
                if (this.locked) {=0A=
                    return false;=0A=
                }=0A=
=0A=
=0A=
                if (this.isIE && !DOMReady) {=0A=
                    return false;=0A=
                }=0A=
=0A=
                this.locked =3D true;=0A=
=0A=
=0A=
                // keep trying until after the page is loaded.  We need =
to =0A=
                // check the page load state prior to trying to bind the =0A=
                // elements so that we can be certain all elements have =
been =0A=
                // tested appropriately=0A=
                var tryAgain =3D !loadComplete;=0A=
                if (!tryAgain) {=0A=
                    tryAgain =3D (retryCount > 0);=0A=
                }=0A=
=0A=
                // onAvailable=0A=
                var notAvail =3D [];=0A=
=0A=
                var executeItem =3D function (el, item) {=0A=
                    var scope =3D el;=0A=
                    if (item.override) {=0A=
                        if (item.override =3D=3D=3D true) {=0A=
                            scope =3D item.obj;=0A=
                        } else {=0A=
                            scope =3D item.override;=0A=
                        }=0A=
                    }=0A=
                    item.fn.call(scope, item.obj);=0A=
                };=0A=
=0A=
                var i,len,item,el;=0A=
=0A=
                // onAvailable=0A=
                for (i=3D0,len=3DonAvailStack.length; i<len; ++i) {=0A=
                    item =3D onAvailStack[i];=0A=
                    if (item && !item.checkReady) {=0A=
                        el =3D this.getEl(item.id);=0A=
                        if (el) {=0A=
                            executeItem(el, item);=0A=
                            onAvailStack[i] =3D null;=0A=
                        } else {=0A=
                            notAvail.push(item);=0A=
                        }=0A=
                    }=0A=
                }=0A=
=0A=
                // onContentReady=0A=
                for (i=3D0,len=3DonAvailStack.length; i<len; ++i) {=0A=
                    item =3D onAvailStack[i];=0A=
                    if (item && item.checkReady) {=0A=
                        el =3D this.getEl(item.id);=0A=
=0A=
                        if (el) {=0A=
                            // The element is available, but not =
necessarily ready=0A=
                            // @todo should we test =
parentNode.nextSibling?=0A=
                            if (loadComplete || el.nextSibling) {=0A=
                                executeItem(el, item);=0A=
                                onAvailStack[i] =3D null;=0A=
                            }=0A=
                        } else {=0A=
                            notAvail.push(item);=0A=
                        }=0A=
                    }=0A=
                }=0A=
=0A=
                retryCount =3D (notAvail.length =3D=3D=3D 0) ? 0 : =
retryCount - 1;=0A=
=0A=
                if (tryAgain) {=0A=
                    // we may need to strip the nulled out items here=0A=
                    this.startInterval();=0A=
                } else {=0A=
                    clearInterval(this._interval);=0A=
                    this._interval =3D null;=0A=
                }=0A=
=0A=
                this.locked =3D false;=0A=
=0A=
                return true;=0A=
=0A=
            },=0A=
=0A=
            /**=0A=
             * Removes all listeners attached to the given element via =
addListener.=0A=
             * Optionally, the node's children can also be purged.=0A=
             * Optionally, you can specify a specific type of event to =
remove.=0A=
             * @method purgeElement=0A=
             * @param {HTMLElement} el the element to purge=0A=
             * @param {boolean} recurse recursively purge this element's =
children=0A=
             * as well.  Use with caution.=0A=
             * @param {string} sType optional type of listener to purge. =
If=0A=
             * left out, all listeners will be removed=0A=
             * @static=0A=
             */=0A=
            purgeElement: function(el, recurse, sType) {=0A=
                var elListeners =3D this.getListeners(el, sType);=0A=
                if (elListeners) {=0A=
                    for (var i=3D0,len=3DelListeners.length; i<len ; =
++i) {=0A=
                        var l =3D elListeners[i];=0A=
                        // can't use the index on the changing collection=0A=
                        //this.removeListener(el, l.type, l.fn, l.index);=0A=
                        this.removeListener(el, l.type, l.fn);=0A=
                    }=0A=
                }=0A=
=0A=
                if (recurse && el && el.childNodes) {=0A=
                    for (i=3D0,len=3Del.childNodes.length; i<len ; ++i) {=0A=
                        this.purgeElement(el.childNodes[i], recurse, =
sType);=0A=
                    }=0A=
                }=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns all listeners attached to the given element via =
addListener.=0A=
             * Optionally, you can specify a specific type of event to =
return.=0A=
             * @method getListeners=0A=
             * @param el {HTMLElement} the element to inspect =0A=
             * @param sType {string} optional type of listener to =
return. If=0A=
             * left out, all listeners will be returned=0A=
             * @return {Object} the listener. Contains the following =
fields:=0A=
             * &nbsp;&nbsp;type:   (string)   the type of event=0A=
             * &nbsp;&nbsp;fn:     (function) the callback supplied to =
addListener=0A=
             * &nbsp;&nbsp;obj:    (object)   the custom object supplied =
to addListener=0A=
             * &nbsp;&nbsp;adjust: (boolean)  whether or not to adjust =
the default scope=0A=
             * &nbsp;&nbsp;index:  (int)      its position in the Event =
util listener cache=0A=
             * @static=0A=
             */           =0A=
            getListeners: function(el, sType) {=0A=
                var results=3D[], searchLists;=0A=
                if (!sType) {=0A=
                    searchLists =3D [listeners, unloadListeners];=0A=
                } else if (sType =3D=3D "unload") {=0A=
                    searchLists =3D [unloadListeners];=0A=
                } else {=0A=
                    searchLists =3D [listeners];=0A=
                }=0A=
=0A=
                for (var j=3D0;j<searchLists.length; ++j) {=0A=
                    var searchList =3D searchLists[j];=0A=
                    if (searchList && searchList.length > 0) {=0A=
                        for (var i=3D0,len=3DsearchList.length; i<len ; =
++i) {=0A=
                            var l =3D searchList[i];=0A=
                            if ( l  && l[this.EL] =3D=3D=3D el && =0A=
                                    (!sType || sType =3D=3D=3D =
l[this.TYPE]) ) {=0A=
                                results.push({=0A=
                                    type:   l[this.TYPE],=0A=
                                    fn:     l[this.FN],=0A=
                                    obj:    l[this.OBJ],=0A=
                                    adjust: l[this.ADJ_SCOPE],=0A=
                                    index:  i=0A=
                                });=0A=
                            }=0A=
                        }=0A=
                    }=0A=
                }=0A=
=0A=
                return (results.length) ? results : null;=0A=
            },=0A=
=0A=
            /**=0A=
             * Removes all listeners registered by pe.event.  Called =0A=
             * automatically during the unload event.=0A=
             * @method _unload=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _unload: function(e) {=0A=
=0A=
                var EU =3D YAHOO.util.Event, i, j, l, len, index;=0A=
=0A=
                for (i=3D0,len=3DunloadListeners.length; i<len; ++i) {=0A=
                    l =3D unloadListeners[i];=0A=
                    if (l) {=0A=
                        var scope =3D window;=0A=
                        if (l[EU.ADJ_SCOPE]) {=0A=
                            if (l[EU.ADJ_SCOPE] =3D=3D=3D true) {=0A=
                                scope =3D l[EU.OBJ];=0A=
                            } else {=0A=
                                scope =3D l[EU.ADJ_SCOPE];=0A=
                            }=0A=
                        }=0A=
                        l[EU.FN].call(scope, EU.getEvent(e), l[EU.OBJ] );=0A=
                        unloadListeners[i] =3D null;=0A=
                        l=3Dnull;=0A=
                        scope=3Dnull;=0A=
                    }=0A=
                }=0A=
=0A=
                unloadListeners =3D null;=0A=
=0A=
                if (listeners && listeners.length > 0) {=0A=
                    j =3D listeners.length;=0A=
                    while (j) {=0A=
                        index =3D j-1;=0A=
                        l =3D listeners[index];=0A=
                        if (l) {=0A=
                            EU.removeListener(l[EU.EL], l[EU.TYPE], =0A=
                                    l[EU.FN], index);=0A=
                        } =0A=
                        j =3D j - 1;=0A=
                    }=0A=
                    l=3Dnull;=0A=
=0A=
                    EU.clearCache();=0A=
                }=0A=
=0A=
                for (i=3D0,len=3DlegacyEvents.length; i<len; ++i) {=0A=
                    // dereference the element=0A=
                    //delete legacyEvents[i][0];=0A=
                    legacyEvents[i][0] =3D null;=0A=
=0A=
                    // delete the array item=0A=
                    //delete legacyEvents[i];=0A=
                    legacyEvents[i] =3D null;=0A=
                }=0A=
=0A=
                legacyEvents =3D null;=0A=
=0A=
                EU._simpleRemove(window, "unload", EU._unload);=0A=
=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns scrollLeft=0A=
             * @method _getScrollLeft=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _getScrollLeft: function() {=0A=
                return this._getScroll()[1];=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns scrollTop=0A=
             * @method _getScrollTop=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _getScrollTop: function() {=0A=
                return this._getScroll()[0];=0A=
            },=0A=
=0A=
            /**=0A=
             * Returns the scrollTop and scrollLeft.  Used to calculate =
the =0A=
             * pageX and pageY in Internet Explorer=0A=
             * @method _getScroll=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _getScroll: function() {=0A=
                var dd =3D document.documentElement, db =3D =
document.body;=0A=
                if (dd && (dd.scrollTop || dd.scrollLeft)) {=0A=
                    return [dd.scrollTop, dd.scrollLeft];=0A=
                } else if (db) {=0A=
                    return [db.scrollTop, db.scrollLeft];=0A=
                } else {=0A=
                    return [0, 0];=0A=
                }=0A=
            },=0A=
            =0A=
            /**=0A=
             * Used by old versions of CustomEvent, restored for =
backwards=0A=
             * compatibility=0A=
             * @method regCE=0A=
             * @private=0A=
             */=0A=
            regCE: function() {=0A=
                // does nothing=0A=
            },=0A=
=0A=
            /**=0A=
             * Adds a DOM event directly without the caching, cleanup, =
scope adj, etc=0A=
             *=0A=
             * @method _simpleAdd=0A=
             * @param {HTMLElement} el      the element to bind the =
handler to=0A=
             * @param {string}      sType   the type of event handler=0A=
             * @param {function}    fn      the callback to invoke=0A=
             * @param {boolen}      capture capture or bubble phase=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _simpleAdd: function () {=0A=
                if (window.addEventListener) {=0A=
                    return function(el, sType, fn, capture) {=0A=
                        el.addEventListener(sType, fn, (capture));=0A=
                    };=0A=
                } else if (window.attachEvent) {=0A=
                    return function(el, sType, fn, capture) {=0A=
                        el.attachEvent("on" + sType, fn);=0A=
                    };=0A=
                } else {=0A=
                    return function(){};=0A=
                }=0A=
            }(),=0A=
=0A=
            /**=0A=
             * Basic remove listener=0A=
             *=0A=
             * @method _simpleRemove=0A=
             * @param {HTMLElement} el      the element to bind the =
handler to=0A=
             * @param {string}      sType   the type of event handler=0A=
             * @param {function}    fn      the callback to invoke=0A=
             * @param {boolen}      capture capture or bubble phase=0A=
             * @static=0A=
             * @private=0A=
             */=0A=
            _simpleRemove: function() {=0A=
                if (window.removeEventListener) {=0A=
                    return function (el, sType, fn, capture) {=0A=
                        el.removeEventListener(sType, fn, (capture));=0A=
                    };=0A=
                } else if (window.detachEvent) {=0A=
                    return function (el, sType, fn) {=0A=
                        el.detachEvent("on" + sType, fn);=0A=
                    };=0A=
                } else {=0A=
                    return function(){};=0A=
                }=0A=
            }()=0A=
        };=0A=
=0A=
    }();=0A=
=0A=
    (function() {=0A=
        var EU =3D YAHOO.util.Event;=0A=
=0A=
        /**=0A=
         * YAHOO.util.Event.on is an alias for addListener=0A=
         * @method on=0A=
         * @see addListener=0A=
         * @static=0A=
         */=0A=
        EU.on =3D EU.addListener;=0A=
=0A=
        /////////////////////////////////////////////////////////////=0A=
        // DOMReady=0A=
        // based on work by: Dean Edwards/John Resig/Matthias Miller =0A=
=0A=
        // Internet Explorer: use the readyState of a defered script.=0A=
        // This isolates what appears to be a safe moment to manipulate=0A=
        // the DOM prior to when the document's readyState suggests=0A=
        // it is safe to do so.=0A=
        if (EU.isIE) {=0A=
	=0A=
            document.write(=0A=
'<scr' + 'ipt id=3D"_yui_eu_dr" defer=3D"true" src=3D"//:"></script>');=0A=
        =0A=
            var el =3D document.getElementById("_yui_eu_dr");=0A=
            el.onreadystatechange =3D function() {=0A=
                if ("complete" =3D=3D this.readyState) {=0A=
                    this.parentNode.removeChild(this);=0A=
                    YAHOO.util.Event._ready();=0A=
                }=0A=
            };=0A=
=0A=
            el=3Dnull;=0A=
=0A=
            // Process onAvailable/onContentReady items when when the =0A=
            // DOM is ready.=0A=
            YAHOO.util.Event.onDOMReady(=0A=
                    YAHOO.util.Event._tryPreloadAttach,=0A=
                    YAHOO.util.Event, true);=0A=
        =0A=
        // Safari: The document's readyState in Safari currently will=0A=
        // change to loaded/complete before images are loaded.=0A=
        } else if (EU.webkit) {=0A=
=0A=
            EU._drwatch =3D setInterval(function(){=0A=
                var rs=3Ddocument.readyState;=0A=
                if ("loaded" =3D=3D rs || "complete" =3D=3D rs) {=0A=
                    clearInterval(EU._drwatch);=0A=
                    EU._drwatch =3D null;=0A=
                    EU._ready();=0A=
                }=0A=
            }, EU.POLL_INTERVAL); =0A=
=0A=
        // FireFox and Opera: These browsers provide a event for this=0A=
        // moment.=0A=
        } else {=0A=
=0A=
            EU._simpleAdd(document, "DOMContentLoaded", EU._ready);=0A=
=0A=
        }=0A=
        /////////////////////////////////////////////////////////////=0A=
=0A=
        EU._simpleAdd(window, "load", EU._load);=0A=
        EU._simpleAdd(window, "unload", EU._unload);=0A=
        EU._tryPreloadAttach();=0A=
    })();=0A=
}=0A=
/**=0A=
 * EventProvider is designed to be used with YAHOO.augment to wrap =0A=
 * CustomEvents in an interface that allows events to be subscribed to =0A=
 * and fired by name.  This makes it possible for implementing code to=0A=
 * subscribe to an event that either has not been created yet, or will=0A=
 * not be created at all.=0A=
 *=0A=
 * @Class EventProvider=0A=
 */=0A=
YAHOO.util.EventProvider =3D function() { };=0A=
=0A=
YAHOO.util.EventProvider.prototype =3D {=0A=
=0A=
    /**=0A=
     * Private storage of custom events=0A=
     * @property __yui_events=0A=
     * @type Object[]=0A=
     * @private=0A=
     */=0A=
    __yui_events: null,=0A=
=0A=
    /**=0A=
     * Private storage of custom event subscribers=0A=
     * @property __yui_subscribers=0A=
     * @type Object[]=0A=
     * @private=0A=
     */=0A=
    __yui_subscribers: null,=0A=
    =0A=
    /**=0A=
     * Subscribe to a CustomEvent by event type=0A=
     *=0A=
     * @method subscribe=0A=
     * @param p_type     {string}   the type, or name of the event=0A=
     * @param p_fn       {function} the function to exectute when the =
event fires=0A=
     * @param p_obj=0A=
     * @param p_obj      {Object}   An object to be passed along when =
the event =0A=
     *                              fires=0A=
     * @param p_override {boolean}  If true, the obj passed in becomes =
the =0A=
     *                              execution scope of the listener=0A=
     */=0A=
    subscribe: function(p_type, p_fn, p_obj, p_override) {=0A=
=0A=
        this.__yui_events =3D this.__yui_events || {};=0A=
        var ce =3D this.__yui_events[p_type];=0A=
=0A=
        if (ce) {=0A=
            ce.subscribe(p_fn, p_obj, p_override);=0A=
        } else {=0A=
            this.__yui_subscribers =3D this.__yui_subscribers || {};=0A=
            var subs =3D this.__yui_subscribers;=0A=
            if (!subs[p_type]) {=0A=
                subs[p_type] =3D [];=0A=
            }=0A=
            subs[p_type].push(=0A=
                { fn: p_fn, obj: p_obj, override: p_override } );=0A=
        }=0A=
    },=0A=
=0A=
    /**=0A=
     * Unsubscribes one or more listeners the from the specified event=0A=
     * @method unsubscribe=0A=
     * @param p_type {string}   The type, or name of the event=0A=
     * @param p_fn   {Function} The subscribed function to unsubscribe, =
if not=0A=
     *                          supplied, all subscribers will be =
removed.=0A=
     * @param p_obj  {Object}   The custom object passed to subscribe.  =
This is=0A=
     *                        optional, but if supplied will be used to=0A=
     *                        disambiguate multiple listeners that are =
the same=0A=
     *                        (e.g., you subscribe many object using a =
function=0A=
     *                        that lives on the prototype)=0A=
     * @return {boolean} true if the subscriber was found and detached.=0A=
     */=0A=
    unsubscribe: function(p_type, p_fn, p_obj) {=0A=
        this.__yui_events =3D this.__yui_events || {};=0A=
        var ce =3D this.__yui_events[p_type];=0A=
        if (ce) {=0A=
            return ce.unsubscribe(p_fn, p_obj);=0A=
        } else {=0A=
            return false;=0A=
        }=0A=
    },=0A=
    =0A=
    /**=0A=
     * Removes all listeners from the specified event=0A=
     * @method unsubscribeAll=0A=
     * @param p_type {string}   The type, or name of the event=0A=
     */=0A=
    unsubscribeAll: function(p_type) {=0A=
        return this.unsubscribe(p_type);=0A=
    },=0A=
=0A=
    /**=0A=
     * Creates a new custom event of the specified type.  If a custom =
event=0A=
     * by that name already exists, it will not be re-created.  In either=0A=
     * case the custom event is returned. =0A=
     *=0A=
     * @method createEvent=0A=
     *=0A=
     * @param p_type {string} the type, or name of the event=0A=
     * @param p_config {object} optional config params.  Valid =
properties are:=0A=
     *=0A=
     *  <ul>=0A=
     *    <li>=0A=
     *      scope: defines the default execution scope.  If not defined=0A=
     *      the default scope will be this instance.=0A=
     *    </li>=0A=
     *    <li>=0A=
     *      silent: if true, the custom event will not generate log =
messages.=0A=
     *      This is false by default.=0A=
     *    </li>=0A=
     *    <li>=0A=
     *      onSubscribeCallback: specifies a callback to execute when the=0A=
     *      event has a new subscriber.  This will fire immediately for=0A=
     *      each queued subscriber if any exist prior to the creation of=0A=
     *      the event.=0A=
     *    </li>=0A=
     *  </ul>=0A=
     *=0A=
     *  @return {CustomEvent} the custom event=0A=
     *=0A=
     */=0A=
    createEvent: function(p_type, p_config) {=0A=
=0A=
        this.__yui_events =3D this.__yui_events || {};=0A=
        var opts =3D p_config || {};=0A=
        var events =3D this.__yui_events;=0A=
=0A=
        if (events[p_type]) {=0A=
        } else {=0A=
=0A=
            var scope  =3D opts.scope  || this;=0A=
            var silent =3D opts.silent || null;=0A=
=0A=
            var ce =3D new YAHOO.util.CustomEvent(p_type, scope, silent,=0A=
                    YAHOO.util.CustomEvent.FLAT);=0A=
            events[p_type] =3D ce;=0A=
=0A=
            if (opts.onSubscribeCallback) {=0A=
                ce.subscribeEvent.subscribe(opts.onSubscribeCallback);=0A=
            }=0A=
=0A=
            this.__yui_subscribers =3D this.__yui_subscribers || {};=0A=
            var qs =3D this.__yui_subscribers[p_type];=0A=
=0A=
            if (qs) {=0A=
                for (var i=3D0; i<qs.length; ++i) {=0A=
                    ce.subscribe(qs[i].fn, qs[i].obj, qs[i].override);=0A=
                }=0A=
            }=0A=
        }=0A=
=0A=
        return events[p_type];=0A=
    },=0A=
=0A=
=0A=
   /**=0A=
     * Fire a custom event by name.  The callback functions will be =
executed=0A=
     * from the scope specified when the event was created, and with the =0A=
     * following parameters:=0A=
     *   <ul>=0A=
     *   <li>The first argument fire() was executed with</li>=0A=
     *   <li>The custom object (if any) that was passed into the =
subscribe() =0A=
     *       method</li>=0A=
     *   </ul>=0A=
     * @method fireEvent=0A=
     * @param p_type    {string}  the type, or name of the event=0A=
     * @param arguments {Object*} an arbitrary set of parameters to pass =
to =0A=
     *                            the handler.=0A=
     * @return {boolean} the return value from CustomEvent.fire, or null =
if =0A=
     *                   the custom event does not exist.=0A=
     */=0A=
    fireEvent: function(p_type, arg1, arg2, etc) {=0A=
=0A=
        this.__yui_events =3D this.__yui_events || {};=0A=
        var ce =3D this.__yui_events[p_type];=0A=
=0A=
        if (ce) {=0A=
            var args =3D [];=0A=
            for (var i=3D1; i<arguments.length; ++i) {=0A=
                args.push(arguments[i]);=0A=
            }=0A=
            return ce.fire.apply(ce, args);=0A=
        } else {=0A=
            return null;=0A=
        }=0A=
    },=0A=
=0A=
    /**=0A=
     * Returns true if the custom event of the provided type has been =
created=0A=
     * with createEvent.=0A=
     * @method hasEvent=0A=
     * @param type {string} the type, or name of the event=0A=
     */=0A=
    hasEvent: function(type) {=0A=
        if (this.__yui_events) {=0A=
            if (this.__yui_events[type]) {=0A=
                return true;=0A=
            }=0A=
        }=0A=
        return false;=0A=
    }=0A=
=0A=
};=0A=
=0A=
/**=0A=
* KeyListener is a utility that provides an easy interface for listening =
for=0A=
* keydown/keyup events fired against DOM elements.=0A=
* @namespace YAHOO.util=0A=
* @class KeyListener=0A=
* @constructor=0A=
* @param {HTMLElement} attachTo The element or element ID to which the =
key =0A=
*                               event should be attached=0A=
* @param {String}      attachTo The element or element ID to which the =
key=0A=
*                               event should be attached=0A=
* @param {Object}      keyData  The object literal representing the =
key(s) =0A=
*                               to detect. Possible attributes are =0A=
*                               shift(boolean), alt(boolean), =
ctrl(boolean) =0A=
*                               and keys(either an int or an array of =
ints =0A=
*                               representing keycodes).=0A=
* @param {Function}    handler  The CustomEvent handler to fire when the =0A=
*                               key event is detected=0A=
* @param {Object}      handler  An object literal representing the =
handler. =0A=
* @param {String}      event    Optional. The event (keydown or keyup) =
to =0A=
*                               listen for. Defaults automatically to =
keydown.=0A=
*/=0A=
YAHOO.util.KeyListener =3D function(attachTo, keyData, handler, event) {=0A=
    if (!attachTo) {=0A=
    } else if (!keyData) {=0A=
    } else if (!handler) {=0A=
    } =0A=
    =0A=
    if (!event) {=0A=
        event =3D YAHOO.util.KeyListener.KEYDOWN;=0A=
    }=0A=
=0A=
    /**=0A=
    * The CustomEvent fired internally when a key is pressed=0A=
    * @event keyEvent=0A=
    * @private=0A=
    * @param {Object} keyData The object literal representing the key(s) =
to =0A=
    *                         detect. Possible attributes are =
shift(boolean), =0A=
    *                         alt(boolean), ctrl(boolean) and =
keys(either an =0A=
    *                         int or an array of ints representing =
keycodes).=0A=
    */=0A=
    var keyEvent =3D new YAHOO.util.CustomEvent("keyPressed");=0A=
    =0A=
    /**=0A=
    * The CustomEvent fired when the KeyListener is enabled via the =
enable() =0A=
    * function=0A=
    * @event enabledEvent=0A=
    * @param {Object} keyData The object literal representing the key(s) =
to =0A=
    *                         detect. Possible attributes are =
shift(boolean), =0A=
    *                         alt(boolean), ctrl(boolean) and =
keys(either an =0A=
    *                         int or an array of ints representing =
keycodes).=0A=
    */=0A=
    this.enabledEvent =3D new YAHOO.util.CustomEvent("enabled");=0A=
=0A=
    /**=0A=
    * The CustomEvent fired when the KeyListener is disabled via the =0A=
    * disable() function=0A=
    * @event disabledEvent=0A=
    * @param {Object} keyData The object literal representing the key(s) =
to =0A=
    *                         detect. Possible attributes are =
shift(boolean), =0A=
    *                         alt(boolean), ctrl(boolean) and =
keys(either an =0A=
    *                         int or an array of ints representing =
keycodes).=0A=
    */=0A=
    this.disabledEvent =3D new YAHOO.util.CustomEvent("disabled");=0A=
=0A=
    if (typeof attachTo =3D=3D 'string') {=0A=
        attachTo =3D document.getElementById(attachTo);=0A=
    }=0A=
=0A=
    if (typeof handler =3D=3D 'function') {=0A=
        keyEvent.subscribe(handler);=0A=
    } else {=0A=
        keyEvent.subscribe(handler.fn, handler.scope, =
handler.correctScope);=0A=
    }=0A=
=0A=
    /**=0A=
    * Handles the key event when a key is pressed.=0A=
    * @method handleKeyPress=0A=
    * @param {DOMEvent} e   The keypress DOM event=0A=
    * @param {Object}   obj The DOM event scope object=0A=
    * @private=0A=
    */=0A=
    function handleKeyPress(e, obj) {=0A=
        if (! keyData.shift) {  =0A=
            keyData.shift =3D false; =0A=
        }=0A=
        if (! keyData.alt) {    =0A=
            keyData.alt =3D false;=0A=
        }=0A=
        if (! keyData.ctrl) {=0A=
            keyData.ctrl =3D false;=0A=
        }=0A=
=0A=
        // check held down modifying keys first=0A=
        if (e.shiftKey =3D=3D keyData.shift && =0A=
            e.altKey   =3D=3D keyData.alt &&=0A=
            e.ctrlKey  =3D=3D keyData.ctrl) { // if we pass this, all =
modifiers match=0A=
            =0A=
            var dataItem;=0A=
            var keyPressed;=0A=
=0A=
            if (keyData.keys instanceof Array) {=0A=
                for (var i=3D0;i<keyData.keys.length;i++) {=0A=
                    dataItem =3D keyData.keys[i];=0A=
=0A=
                    if (dataItem =3D=3D e.charCode ) {=0A=
                        keyEvent.fire(e.charCode, e);=0A=
                        break;=0A=
                    } else if (dataItem =3D=3D e.keyCode) {=0A=
                        keyEvent.fire(e.keyCode, e);=0A=
                        break;=0A=
                    }=0A=
                }=0A=
            } else {=0A=
                dataItem =3D keyData.keys;=0A=
                if (dataItem =3D=3D e.charCode ) {=0A=
                    keyEvent.fire(e.charCode, e);=0A=
                } else if (dataItem =3D=3D e.keyCode) {=0A=
                    keyEvent.fire(e.keyCode, e);=0A=
                }=0A=
            }=0A=
        }=0A=
    }=0A=
=0A=
    /**=0A=
    * Enables the KeyListener by attaching the DOM event listeners to =
the =0A=
    * target DOM element=0A=
    * @method enable=0A=
    */=0A=
    this.enable =3D function() {=0A=
        if (! this.enabled) {=0A=
            YAHOO.util.Event.addListener(attachTo, event, =
handleKeyPress);=0A=
            this.enabledEvent.fire(keyData);=0A=
        }=0A=
        /**=0A=
        * Boolean indicating the enabled/disabled state of the Tooltip=0A=
        * @property enabled=0A=
        * @type Boolean=0A=
        */=0A=
        this.enabled =3D true;=0A=
    };=0A=
=0A=
    /**=0A=
    * Disables the KeyListener by removing the DOM event listeners from =
the =0A=
    * target DOM element=0A=
    * @method disable=0A=
    */=0A=
    this.disable =3D function() {=0A=
        if (this.enabled) {=0A=
            YAHOO.util.Event.removeListener(attachTo, event, =
handleKeyPress);=0A=
            this.disabledEvent.fire(keyData);=0A=
        }=0A=
        this.enabled =3D false;=0A=
    };=0A=
=0A=
    /**=0A=
    * Returns a String representation of the object.=0A=
    * @method toString=0A=
    * @return {String}  The string representation of the KeyListener=0A=
    */ =0A=
    this.toString =3D function() {=0A=
        return "KeyListener [" + keyData.keys + "] " + attachTo.tagName =
+ =0A=
                (attachTo.id ? "[" + attachTo.id + "]" : "");=0A=
    };=0A=
=0A=
};=0A=
=0A=
/**=0A=
* Constant representing the DOM "keydown" event.=0A=
* @property YAHOO.util.KeyListener.KEYDOWN=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.util.KeyListener.KEYDOWN =3D "keydown";=0A=
=0A=
/**=0A=
* Constant representing the DOM "keyup" event.=0A=
* @property YAHOO.util.KeyListener.KEYUP=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.util.KeyListener.KEYUP =3D "keyup";=0A=
YAHOO.register("event", YAHOO.util.Event, {version: "2.2.2", build: =
"202"});=0A=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/dom.js

/*=0A=
Copyright (c) 2007, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
version: 2.2.2=0A=
*/=0A=
/*=0A=
Copyright (c) 2006, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
*/=0A=
=0A=
/**=0A=
 * The dom module provides helper methods for manipulating Dom elements.=0A=
 * @module dom=0A=
 *=0A=
 */=0A=
=0A=
(function() {=0A=
    var Y =3D YAHOO.util,     // internal shorthand=0A=
        getStyle,           // for load time browser branching=0A=
        setStyle,           // ditto=0A=
        id_counter =3D 0,     // for use with generateId=0A=
        propertyCache =3D {}; // for faster hyphen converts=0A=
    =0A=
    // brower detection=0A=
    var ua =3D navigator.userAgent.toLowerCase(),=0A=
        isOpera =3D (ua.indexOf('opera') > -1),=0A=
        isSafari =3D (ua.indexOf('safari') > -1),=0A=
        isGecko =3D (!isOpera && !isSafari && ua.indexOf('gecko') > -1),=0A=
        isIE =3D (!isOpera && ua.indexOf('msie') > -1); =0A=
    =0A=
    // regex cache=0A=
    var patterns =3D {=0A=
        HYPHEN: /(-[a-z])/i, // to normalize get/setStyle=0A=
        ROOT_TAG: /body|html/i // body for quirks mode, html for =
standards=0A=
    };=0A=
=0A=
    var toCamel =3D function(property) {=0A=
        if ( !patterns.HYPHEN.test(property) ) {=0A=
            return property; // no hyphens=0A=
        }=0A=
        =0A=
        if (propertyCache[property]) { // already converted=0A=
            return propertyCache[property];=0A=
        }=0A=
       =0A=
        var converted =3D property;=0A=
 =0A=
        while( patterns.HYPHEN.exec(converted) ) {=0A=
            converted =3D converted.replace(RegExp.$1,=0A=
                    RegExp.$1.substr(1).toUpperCase());=0A=
        }=0A=
        =0A=
        propertyCache[property] =3D converted;=0A=
        return converted;=0A=
        //return property.replace(/-([a-z])/gi, function(m0, m1) {return =
m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug=0A=
    };=0A=
    =0A=
    // branching at load instead of runtime=0A=
    if (document.defaultView && document.defaultView.getComputedStyle) { =
// W3C DOM method=0A=
        getStyle =3D function(el, property) {=0A=
            var value =3D null;=0A=
            =0A=
            if (property =3D=3D 'float') { // fix reserved word=0A=
                property =3D 'cssFloat';=0A=
            }=0A=
=0A=
            var computed =3D document.defaultView.getComputedStyle(el, =
'');=0A=
            if (computed) { // test computed before touching for safari=0A=
                value =3D computed[toCamel(property)];=0A=
            }=0A=
            =0A=
            return el.style[property] || value;=0A=
        };=0A=
    } else if (document.documentElement.currentStyle && isIE) { // IE =
method=0A=
        getStyle =3D function(el, property) {                         =0A=
            switch( toCamel(property) ) {=0A=
                case 'opacity' :// IE opacity uses filter=0A=
                    var val =3D 100;=0A=
                    try { // will error if no DXImageTransform=0A=
                        val =3D =
el.filters['DXImageTransform.Microsoft.Alpha'].opacity;=0A=
=0A=
                    } catch(e) {=0A=
                        try { // make sure its in the document=0A=
                            val =3D el.filters('alpha').opacity;=0A=
                        } catch(e) {=0A=
                        }=0A=
                    }=0A=
                    return val / 100;=0A=
                    break;=0A=
                case 'float': // fix reserved word=0A=
                    property =3D 'styleFloat'; // fall through=0A=
                default: =0A=
                    // test currentStyle before touching=0A=
                    var value =3D el.currentStyle ? =
el.currentStyle[property] : null;=0A=
                    return ( el.style[property] || value );=0A=
            }=0A=
        };=0A=
    } else { // default to inline only=0A=
        getStyle =3D function(el, property) { return el.style[property]; =
};=0A=
    }=0A=
    =0A=
    if (isIE) {=0A=
        setStyle =3D function(el, property, val) {=0A=
            switch (property) {=0A=
                case 'opacity':=0A=
                    if ( YAHOO.lang.isString(el.style.filter) ) { // in =
case not appended=0A=
                        el.style.filter =3D 'alpha(opacity=3D' + val * =
100 + ')';=0A=
                        =0A=
                        if (!el.currentStyle || =
!el.currentStyle.hasLayout) {=0A=
                            el.style.zoom =3D 1; // when no layout or =
cant tell=0A=
                        }=0A=
                    }=0A=
                    break;=0A=
                case 'float':=0A=
                    property =3D 'styleFloat';=0A=
                default:=0A=
                el.style[property] =3D val;=0A=
            }=0A=
        };=0A=
    } else {=0A=
        setStyle =3D function(el, property, val) {=0A=
            if (property =3D=3D 'float') {=0A=
                property =3D 'cssFloat';=0A=
            }=0A=
            el.style[property] =3D val;=0A=
        };=0A=
    }=0A=
    =0A=
    /**=0A=
     * Provides helper methods for DOM elements.=0A=
     * @namespace YAHOO.util=0A=
     * @class Dom=0A=
     */=0A=
    YAHOO.util.Dom =3D {=0A=
        /**=0A=
         * Returns an HTMLElement reference.=0A=
         * @method get=0A=
         * @param {String | HTMLElement |Array} el Accepts a string to =
use as an ID for getting a DOM reference, an actual DOM reference, or an =
Array of IDs and/or HTMLElements.=0A=
         * @return {HTMLElement | Array} A DOM reference to an HTML =
element or an array of HTMLElements.=0A=
         */=0A=
        get: function(el) {=0A=
            if ( YAHOO.lang.isString(el) ) { // ID =0A=
                return document.getElementById(el);=0A=
            }=0A=
            =0A=
            if ( YAHOO.lang.isArray(el) ) { // Array of IDs and/or =
HTMLElements=0A=
                var c =3D [];=0A=
                for (var i =3D 0, len =3D el.length; i < len; ++i) {=0A=
                    c[c.length] =3D Y.Dom.get(el[i]);=0A=
                }=0A=
                =0A=
                return c;=0A=
            }=0A=
=0A=
            if (el) { // assuming HTMLElement or HTMLCollection, just =
pass back =0A=
                return el;=0A=
            }=0A=
=0A=
            return null; // el is likely null or undefined =0A=
        },=0A=
    =0A=
        /**=0A=
         * Normalizes currentStyle and ComputedStyle.=0A=
         * @method getStyle=0A=
         * @param {String | HTMLElement |Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements.=0A=
         * @param {String} property The style property whose value is =
returned.=0A=
         * @return {String | Array} The current value of the style =
property for the element(s).=0A=
         */=0A=
        getStyle: function(el, property) {=0A=
            property =3D toCamel(property);=0A=
            =0A=
            var f =3D function(element) {=0A=
                return getStyle(element, property);=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
    =0A=
        /**=0A=
         * Wrapper for setting style properties of HTMLElements.  =
Normalizes "opacity" across modern browsers.=0A=
         * @method setStyle=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements.=0A=
         * @param {String} property The style property to be set.=0A=
         * @param {String} val The value to apply to the given property.=0A=
         */=0A=
        setStyle: function(el, property, val) {=0A=
            property =3D toCamel(property);=0A=
            =0A=
            var f =3D function(element) {=0A=
                setStyle(element, property, val);=0A=
                =0A=
            };=0A=
            =0A=
            Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Gets the current position of an element based on page =
coordinates.  Element must be part of the DOM tree to have page =
coordinates (display:none or elements not appended return false).=0A=
         * @method getXY=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements=0A=
         * @return {Array} The XY position of the element(s)=0A=
         */=0A=
        getXY: function(el) {=0A=
            var f =3D function(el) {=0A=
    =0A=
            // has to be part of document to have pageXY=0A=
                if ( (el.parentNode =3D=3D=3D null || el.offsetParent =
=3D=3D=3D null ||=0A=
                        this.getStyle(el, 'display') =3D=3D 'none') && =
el !=3D document.body) {=0A=
                    return false;=0A=
                }=0A=
                =0A=
                var parentNode =3D null;=0A=
                var pos =3D [];=0A=
                var box;=0A=
                =0A=
                if (el.getBoundingClientRect) { // IE=0A=
                    box =3D el.getBoundingClientRect();=0A=
                    var doc =3D document;=0A=
                    if ( !this.inDocument(el) && parent.document !=3D =
document) {// might be in a frame, need to get its scroll=0A=
                        doc =3D parent.document;=0A=
=0A=
                        if ( !this.isAncestor(doc.documentElement, el) ) =
{=0A=
                            return false;                      =0A=
                        }=0A=
=0A=
                    }=0A=
=0A=
                    var scrollTop =3D =
Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);=0A=
                    var scrollLeft =3D =
Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);=0A=
                    =0A=
                    return [box.left + scrollLeft, box.top + scrollTop];=0A=
                }=0A=
                else { // safari, opera, & gecko=0A=
                    pos =3D [el.offsetLeft, el.offsetTop];=0A=
                    parentNode =3D el.offsetParent;=0A=
=0A=
                    // safari: if el is abs or any parent is abs, =
subtract body offsets=0A=
                    var hasAbs =3D this.getStyle(el, 'position') =3D=3D =
'absolute';=0A=
=0A=
                    if (parentNode !=3D el) {=0A=
                        while (parentNode) {=0A=
                            pos[0] +=3D parentNode.offsetLeft;=0A=
                            pos[1] +=3D parentNode.offsetTop;=0A=
                            if (isSafari && !hasAbs && =0A=
                                    this.getStyle(parentNode,'position') =
=3D=3D 'absolute' ) {=0A=
                                hasAbs =3D true; // we need to offset if =
any parent is absolutely positioned=0A=
                            }=0A=
                            parentNode =3D parentNode.offsetParent;=0A=
                        }=0A=
                    }=0A=
=0A=
                    if (isSafari && hasAbs) { //safari doubles in this =
case=0A=
                        pos[0] -=3D document.body.offsetLeft;=0A=
                        pos[1] -=3D document.body.offsetTop;=0A=
                    } =0A=
                }=0A=
                =0A=
                parentNode =3D el.parentNode;=0A=
=0A=
                // account for any scrolled ancestors=0A=
                while ( parentNode.tagName && =
!patterns.ROOT_TAG.test(parentNode.tagName) ) =0A=
                {=0A=
                   // work around opera inline scrollLeft/Top bug=0A=
                   if (Y.Dom.getStyle(parentNode, 'display') !=3D =
'inline') { =0A=
                        pos[0] -=3D parentNode.scrollLeft;=0A=
                        pos[1] -=3D parentNode.scrollTop;=0A=
                    }=0A=
                    =0A=
                    parentNode =3D parentNode.parentNode; =0A=
                }=0A=
        =0A=
                =0A=
                return pos;=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Gets the current X position of an element based on page =
coordinates.  The element must be part of the DOM tree to have page =
coordinates (display:none or elements not appended return false).=0A=
         * @method getX=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements=0A=
         * @return {String | Array} The X position of the element(s)=0A=
         */=0A=
        getX: function(el) {=0A=
            var f =3D function(el) {=0A=
                return Y.Dom.getXY(el)[0];=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Gets the current Y position of an element based on page =
coordinates.  Element must be part of the DOM tree to have page =
coordinates (display:none or elements not appended return false).=0A=
         * @method getY=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements=0A=
         * @return {String | Array} The Y position of the element(s)=0A=
         */=0A=
        getY: function(el) {=0A=
            var f =3D function(el) {=0A=
                return Y.Dom.getXY(el)[1];=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Set the position of an html element in page coordinates, =
regardless of how the element is positioned.=0A=
         * The element(s) must be part of the DOM tree to have page =
coordinates (display:none or elements not appended return false).=0A=
         * @method setXY=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements=0A=
         * @param {Array} pos Contains X & Y values for new position =
(coordinates are page-based)=0A=
         * @param {Boolean} noRetry By default we try and set the =
position a second time if the first fails=0A=
         */=0A=
        setXY: function(el, pos, noRetry) {=0A=
            var f =3D function(el) {=0A=
                var style_pos =3D this.getStyle(el, 'position');=0A=
                if (style_pos =3D=3D 'static') { // default to relative=0A=
                    this.setStyle(el, 'position', 'relative');=0A=
                    style_pos =3D 'relative';=0A=
                }=0A=
=0A=
                var pageXY =3D this.getXY(el);=0A=
                if (pageXY =3D=3D=3D false) { // has to be part of doc =
to have pageXY=0A=
                    return false; =0A=
                }=0A=
                =0A=
                var delta =3D [ // assuming pixels; if not we will have =
to retry=0A=
                    parseInt( this.getStyle(el, 'left'), 10 ),=0A=
                    parseInt( this.getStyle(el, 'top'), 10 )=0A=
                ];=0A=
            =0A=
                if ( isNaN(delta[0]) ) {// in case of 'auto'=0A=
                    delta[0] =3D (style_pos =3D=3D 'relative') ? 0 : =
el.offsetLeft;=0A=
                } =0A=
                if ( isNaN(delta[1]) ) { // in case of 'auto'=0A=
                    delta[1] =3D (style_pos =3D=3D 'relative') ? 0 : =
el.offsetTop;=0A=
                } =0A=
        =0A=
                if (pos[0] !=3D=3D null) { el.style.left =3D pos[0] - =
pageXY[0] + delta[0] + 'px'; }=0A=
                if (pos[1] !=3D=3D null) { el.style.top =3D pos[1] - =
pageXY[1] + delta[1] + 'px'; }=0A=
              =0A=
                if (!noRetry) {=0A=
                    var newXY =3D this.getXY(el);=0A=
=0A=
                    // if retry is true, try one more time if we miss =0A=
                   if ( (pos[0] !=3D=3D null && newXY[0] !=3D pos[0]) || =0A=
                        (pos[1] !=3D=3D null && newXY[1] !=3D pos[1]) ) {=0A=
                       this.setXY(el, pos, true);=0A=
                   }=0A=
                }        =0A=
        =0A=
            };=0A=
            =0A=
            Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Set the X position of an html element in page coordinates, =
regardless of how the element is positioned.=0A=
         * The element must be part of the DOM tree to have page =
coordinates (display:none or elements not appended return false).=0A=
         * @method setX=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements.=0A=
         * @param {Int} x The value to use as the X coordinate for the =
element(s).=0A=
         */=0A=
        setX: function(el, x) {=0A=
            Y.Dom.setXY(el, [x, null]);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Set the Y position of an html element in page coordinates, =
regardless of how the element is positioned.=0A=
         * The element must be part of the DOM tree to have page =
coordinates (display:none or elements not appended return false).=0A=
         * @method setY=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements.=0A=
         * @param {Int} x To use as the Y coordinate for the element(s).=0A=
         */=0A=
        setY: function(el, y) {=0A=
            Y.Dom.setXY(el, [null, y]);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns the region position of the given element.=0A=
         * The element must be part of the DOM tree to have a region =
(display:none or elements not appended return false).=0A=
         * @method getRegion=0A=
         * @param {String | HTMLElement | Array} el Accepts a string to =
use as an ID, an actual DOM reference, or an Array of IDs and/or =
HTMLElements.=0A=
         * @return {Region | Array} A Region or array of Region =
instances containing "top, left, bottom, right" member data.=0A=
         */=0A=
        getRegion: function(el) {=0A=
            var f =3D function(el) {=0A=
                var region =3D new Y.Region.getRegion(el);=0A=
                return region;=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns the width of the client (viewport).=0A=
         * @method getClientWidth=0A=
         * @deprecated Now using getViewportWidth.  This interface left =
intact for back compat.=0A=
         * @return {Int} The width of the viewable area of the page.=0A=
         */=0A=
        getClientWidth: function() {=0A=
            return Y.Dom.getViewportWidth();=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns the height of the client (viewport).=0A=
         * @method getClientHeight=0A=
         * @deprecated Now using getViewportHeight.  This interface left =
intact for back compat.=0A=
         * @return {Int} The height of the viewable area of the page.=0A=
         */=0A=
        getClientHeight: function() {=0A=
            return Y.Dom.getViewportHeight();=0A=
        },=0A=
=0A=
        /**=0A=
         * Returns a array of HTMLElements with the given class.=0A=
         * For optimized performance, include a tag and/or root node =
when possible.=0A=
         * @method getElementsByClassName=0A=
         * @param {String} className The class name to match against=0A=
         * @param {String} tag (optional) The tag name of the elements =
being collected=0A=
         * @param {String | HTMLElement} root (optional) The HTMLElement =
or an ID to use as the starting point =0A=
         * @return {Array} An array of elements that have the given =
class name=0A=
         */=0A=
        getElementsByClassName: function(className, tag, root) {=0A=
            var method =3D function(el) { return Y.Dom.hasClass(el, =
className); };=0A=
            return Y.Dom.getElementsBy(method, tag, root);=0A=
        },=0A=
=0A=
        /**=0A=
         * Determines whether an HTMLElement has the given className.=0A=
         * @method hasClass=0A=
         * @param {String | HTMLElement | Array} el The element or =
collection to test=0A=
         * @param {String} className the class name to search for=0A=
         * @return {Boolean | Array} A boolean value or array of boolean =
values=0A=
         */=0A=
        hasClass: function(el, className) {=0A=
            var re =3D new RegExp('(?:^|\\s+)' + className + =
'(?:\\s+|$)');=0A=
            =0A=
            var f =3D function(el) {=0A=
                return re.test(el.className);=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
    =0A=
        /**=0A=
         * Adds a class name to a given element or collection of =
elements.=0A=
         * @method addClass         =0A=
         * @param {String | HTMLElement | Array} el The element or =
collection to add the class to=0A=
         * @param {String} className the class name to add to the class =
attribute=0A=
         */=0A=
        addClass: function(el, className) {=0A=
            var f =3D function(el) {=0A=
                if (this.hasClass(el, className)) { return; } // already =
present=0A=
                =0A=
                =0A=
                el.className =3D [el.className, className].join(' ');=0A=
            };=0A=
            =0A=
            Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
    =0A=
        /**=0A=
         * Removes a class name from a given element or collection of =
elements.=0A=
         * @method removeClass         =0A=
         * @param {String | HTMLElement | Array} el The element or =
collection to remove the class from=0A=
         * @param {String} className the class name to remove from the =
class attribute=0A=
         */=0A=
        removeClass: function(el, className) {=0A=
            var re =3D new RegExp('(?:^|\\s+)' + className + =
'(?:\\s+|$)', 'g');=0A=
=0A=
            var f =3D function(el) {=0A=
                if (!this.hasClass(el, className)) {=0A=
                    return; // not present=0A=
                }                 =0A=
=0A=
                =0A=
                var c =3D el.className;=0A=
                el.className =3D c.replace(re, ' ');=0A=
                if ( this.hasClass(el, className) ) { // in case of =
multiple adjacent=0A=
                    this.removeClass(el, className);=0A=
                }=0A=
                =0A=
            };=0A=
            =0A=
            Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Replace a class with another class for a given element or =
collection of elements.=0A=
         * If no oldClassName is present, the newClassName is simply =
added.=0A=
         * @method replaceClass  =0A=
         * @param {String | HTMLElement | Array} el The element or =
collection to remove the class from=0A=
         * @param {String} oldClassName the class name to be replaced=0A=
         * @param {String} newClassName the class name that will be =
replacing the old class name=0A=
         */=0A=
        replaceClass: function(el, oldClassName, newClassName) {=0A=
            if (oldClassName =3D=3D=3D newClassName) { // avoid infinite =
loop=0A=
                return false;=0A=
            }=0A=
            =0A=
            var re =3D new RegExp('(?:^|\\s+)' + oldClassName + =
'(?:\\s+|$)', 'g');=0A=
=0A=
            var f =3D function(el) {=0A=
            =0A=
                if ( !this.hasClass(el, oldClassName) ) {=0A=
                    this.addClass(el, newClassName); // just add it if =
nothing to replace=0A=
                    return; // note return=0A=
                }=0A=
            =0A=
                el.className =3D el.className.replace(re, ' ' + =
newClassName + ' ');=0A=
=0A=
                if ( this.hasClass(el, oldClassName) ) { // in case of =
multiple adjacent=0A=
                    this.replaceClass(el, oldClassName, newClassName);=0A=
                }=0A=
            };=0A=
            =0A=
            Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Generates a unique ID=0A=
         * @method generateId  =0A=
         * @param {String | HTMLElement | Array} el (optional) An =
optional element array of elements to add an ID to (no ID is added if =
one is already present).=0A=
         * @param {String} prefix (optional) an optional prefix to use =
(defaults to "yui-gen").=0A=
         * @return {String | Array} The generated ID, or array of =
generated IDs (or original ID if already present on an element)=0A=
         */=0A=
        generateId: function(el, prefix) {=0A=
            prefix =3D prefix || 'yui-gen';=0A=
            el =3D el || {};=0A=
            =0A=
            var f =3D function(el) {=0A=
                if (el) {=0A=
                    el =3D Y.Dom.get(el);=0A=
                } else {=0A=
                    el =3D {}; // just generating ID in this case=0A=
                }=0A=
                =0A=
                if (!el.id) {=0A=
                    el.id =3D prefix + id_counter++; =0A=
                } // dont override existing=0A=
                =0A=
                =0A=
                return el.id;=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Determines whether an HTMLElement is an ancestor of another =
HTML element in the DOM hierarchy.=0A=
         * @method isAncestor=0A=
         * @param {String | HTMLElement} haystack The possible ancestor=0A=
         * @param {String | HTMLElement} needle The possible descendent=0A=
         * @return {Boolean} Whether or not the haystack is an ancestor =
of needle=0A=
         */=0A=
        isAncestor: function(haystack, needle) {=0A=
            haystack =3D Y.Dom.get(haystack);=0A=
            if (!haystack || !needle) { return false; }=0A=
            =0A=
            var f =3D function(needle) {=0A=
                if (haystack.contains && !isSafari) { // safari =
"contains" is broken=0A=
                    return haystack.contains(needle);=0A=
                }=0A=
                else if ( haystack.compareDocumentPosition ) {=0A=
                    return !!(haystack.compareDocumentPosition(needle) & =
16);=0A=
                }=0A=
                else { // loop up and test each parent=0A=
                    var parent =3D needle.parentNode;=0A=
                    =0A=
                    while (parent) {=0A=
                        if (parent =3D=3D haystack) {=0A=
                            return true;=0A=
                        }=0A=
                        else if (!parent.tagName || =
parent.tagName.toUpperCase() =3D=3D 'HTML') {=0A=
                            return false;=0A=
                        }=0A=
                        =0A=
                        parent =3D parent.parentNode;=0A=
                    }=0A=
                    return false;=0A=
                }     =0A=
            };=0A=
            =0A=
            return Y.Dom.batch(needle, f, Y.Dom, true);      =0A=
        },=0A=
        =0A=
        /**=0A=
         * Determines whether an HTMLElement is present in the current =
document.=0A=
         * @method inDocument         =0A=
         * @param {String | HTMLElement} el The element to search for=0A=
         * @return {Boolean} Whether or not the element is present in =
the current document=0A=
         */=0A=
        inDocument: function(el) {=0A=
            var f =3D function(el) {=0A=
                return this.isAncestor(document.documentElement, el);=0A=
            };=0A=
            =0A=
            return Y.Dom.batch(el, f, Y.Dom, true);=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns a array of HTMLElements that pass the test applied by =
supplied boolean method.=0A=
         * For optimized performance, include a tag and/or root node =
when possible.=0A=
         * @method getElementsBy=0A=
         * @param {Function} method - A boolean method for testing =
elements which receives the element as its only argument.=0A=
=0A=
         * @param {String} tag (optional) The tag name of the elements =
being collected=0A=
         * @param {String | HTMLElement} root (optional) The HTMLElement =
or an ID to use as the starting point =0A=
         * @return {Array} Array of HTMLElements=0A=
         */=0A=
        getElementsBy: function(method, tag, root) {=0A=
            tag =3D tag || '*';=0A=
            =0A=
            var nodes =3D [];=0A=
            =0A=
            if (root) {=0A=
                root =3D Y.Dom.get(root);=0A=
                if (!root) { // if no root node, then no children=0A=
                    return nodes;=0A=
                }=0A=
            } else {=0A=
                root =3D document;=0A=
            }=0A=
            =0A=
            var elements =3D root.getElementsByTagName(tag);=0A=
            =0A=
            if ( !elements.length && (tag =3D=3D '*' && root.all) ) {=0A=
                elements =3D root.all; // IE < 6=0A=
            }=0A=
            =0A=
            for (var i =3D 0, len =3D elements.length; i < len; ++i) {=0A=
                if ( method(elements[i]) ) { nodes[nodes.length] =3D =
elements[i]; }=0A=
            }=0A=
=0A=
            =0A=
            return nodes;=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns an array of elements that have had the supplied =
method applied.=0A=
         * The method is called with the element(s) as the first arg, =
and the optional param as the second ( method(el, o) ).=0A=
         * @method batch=0A=
         * @param {String | HTMLElement | Array} el (optional) An =
element or array of elements to apply the method to=0A=
         * @param {Function} method The method to apply to the element(s)=0A=
         * @param {Any} o (optional) An optional arg that is passed to =
the supplied method=0A=
         * @param {Boolean} override (optional) Whether or not to =
override the scope of "method" with "o"=0A=
         * @return {HTMLElement | Array} The element(s) with the method =
applied=0A=
         */=0A=
        batch: function(el, method, o, override) {=0A=
            var id =3D el;=0A=
            el =3D Y.Dom.get(el);=0A=
            =0A=
            var scope =3D (override) ? o : window;=0A=
            =0A=
            if (!el || el.tagName || !el.length) { // is null or not a =
collection (tagName for SELECT and others that can be both an element =
and a collection)=0A=
                if (!el) {=0A=
                    return false;=0A=
                }=0A=
                return method.call(scope, el, o);=0A=
            } =0A=
            =0A=
            var collection =3D [];=0A=
            =0A=
            for (var i =3D 0, len =3D el.length; i < len; ++i) {=0A=
                if (!el[i]) {=0A=
                    id =3D el[i];=0A=
                }=0A=
                collection[collection.length] =3D method.call(scope, =
el[i], o);=0A=
            }=0A=
            =0A=
            return collection;=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns the height of the document.=0A=
         * @method getDocumentHeight=0A=
         * @return {Int} The height of the actual document (which =
includes the body and its margin).=0A=
         */=0A=
        getDocumentHeight: function() {=0A=
            var scrollHeight =3D (document.compatMode !=3D 'CSS1Compat') =
? document.body.scrollHeight : document.documentElement.scrollHeight;=0A=
=0A=
            var h =3D Math.max(scrollHeight, Y.Dom.getViewportHeight());=0A=
            return h;=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns the width of the document.=0A=
         * @method getDocumentWidth=0A=
         * @return {Int} The width of the actual document (which =
includes the body and its margin).=0A=
         */=0A=
        getDocumentWidth: function() {=0A=
            var scrollWidth =3D (document.compatMode !=3D 'CSS1Compat') =
? document.body.scrollWidth : document.documentElement.scrollWidth;=0A=
            var w =3D Math.max(scrollWidth, Y.Dom.getViewportWidth());=0A=
            return w;=0A=
        },=0A=
=0A=
        /**=0A=
         * Returns the current height of the viewport.=0A=
         * @method getViewportHeight=0A=
         * @return {Int} The height of the viewable area of the page =
(excludes scrollbars).=0A=
         */=0A=
        getViewportHeight: function() {=0A=
            var height =3D self.innerHeight; // Safari, Opera=0A=
            var mode =3D document.compatMode;=0A=
        =0A=
            if ( (mode || isIE) && !isOpera ) { // IE, Gecko=0A=
                height =3D (mode =3D=3D 'CSS1Compat') ?=0A=
                        document.documentElement.clientHeight : // =
Standards=0A=
                        document.body.clientHeight; // Quirks=0A=
            }=0A=
        =0A=
            return height;=0A=
        },=0A=
        =0A=
        /**=0A=
         * Returns the current width of the viewport.=0A=
         * @method getViewportWidth=0A=
         * @return {Int} The width of the viewable area of the page =
(excludes scrollbars).=0A=
         */=0A=
        =0A=
        getViewportWidth: function() {=0A=
            var width =3D self.innerWidth;  // Safari=0A=
            var mode =3D document.compatMode;=0A=
            =0A=
            if (mode || isIE) { // IE, Gecko, Opera=0A=
                width =3D (mode =3D=3D 'CSS1Compat') ?=0A=
                        document.documentElement.clientWidth : // =
Standards=0A=
                        document.body.clientWidth; // Quirks=0A=
            }=0A=
            return width;=0A=
        }=0A=
    };=0A=
})();=0A=
/**=0A=
 * A region is a representation of an object on a grid.  It is defined=0A=
 * by the top, right, bottom, left extents, so is rectangular by =
default.  If =0A=
 * other shapes are required, this class could be extended to support it.=0A=
 * @namespace YAHOO.util=0A=
 * @class Region=0A=
 * @param {Int} t the top extent=0A=
 * @param {Int} r the right extent=0A=
 * @param {Int} b the bottom extent=0A=
 * @param {Int} l the left extent=0A=
 * @constructor=0A=
 */=0A=
YAHOO.util.Region =3D function(t, r, b, l) {=0A=
=0A=
    /**=0A=
     * The region's top extent=0A=
     * @property top=0A=
     * @type Int=0A=
     */=0A=
    this.top =3D t;=0A=
    =0A=
    /**=0A=
     * The region's top extent as index, for symmetry with set/getXY=0A=
     * @property 1=0A=
     * @type Int=0A=
     */=0A=
    this[1] =3D t;=0A=
=0A=
    /**=0A=
     * The region's right extent=0A=
     * @property right=0A=
     * @type int=0A=
     */=0A=
    this.right =3D r;=0A=
=0A=
    /**=0A=
     * The region's bottom extent=0A=
     * @property bottom=0A=
     * @type Int=0A=
     */=0A=
    this.bottom =3D b;=0A=
=0A=
    /**=0A=
     * The region's left extent=0A=
     * @property left=0A=
     * @type Int=0A=
     */=0A=
    this.left =3D l;=0A=
    =0A=
    /**=0A=
     * The region's left extent as index, for symmetry with set/getXY=0A=
     * @property 0=0A=
     * @type Int=0A=
     */=0A=
    this[0] =3D l;=0A=
};=0A=
=0A=
/**=0A=
 * Returns true if this region contains the region passed in=0A=
 * @method contains=0A=
 * @param  {Region}  region The region to evaluate=0A=
 * @return {Boolean}        True if the region is contained with this =
region, =0A=
 *                          else false=0A=
 */=0A=
YAHOO.util.Region.prototype.contains =3D function(region) {=0A=
    return ( region.left   >=3D this.left   && =0A=
             region.right  <=3D this.right  && =0A=
             region.top    >=3D this.top    && =0A=
             region.bottom <=3D this.bottom    );=0A=
=0A=
};=0A=
=0A=
/**=0A=
 * Returns the area of the region=0A=
 * @method getArea=0A=
 * @return {Int} the region's area=0A=
 */=0A=
YAHOO.util.Region.prototype.getArea =3D function() {=0A=
    return ( (this.bottom - this.top) * (this.right - this.left) );=0A=
};=0A=
=0A=
/**=0A=
 * Returns the region where the passed in region overlaps with this one=0A=
 * @method intersect=0A=
 * @param  {Region} region The region that intersects=0A=
 * @return {Region}        The overlap region, or null if there is no =
overlap=0A=
 */=0A=
YAHOO.util.Region.prototype.intersect =3D function(region) {=0A=
    var t =3D Math.max( this.top,    region.top    );=0A=
    var r =3D Math.min( this.right,  region.right  );=0A=
    var b =3D Math.min( this.bottom, region.bottom );=0A=
    var l =3D Math.max( this.left,   region.left   );=0A=
    =0A=
    if (b >=3D t && r >=3D l) {=0A=
        return new YAHOO.util.Region(t, r, b, l);=0A=
    } else {=0A=
        return null;=0A=
    }=0A=
};=0A=
=0A=
/**=0A=
 * Returns the region representing the smallest region that can contain =
both=0A=
 * the passed in region and this region.=0A=
 * @method union=0A=
 * @param  {Region} region The region that to create the union with=0A=
 * @return {Region}        The union region=0A=
 */=0A=
YAHOO.util.Region.prototype.union =3D function(region) {=0A=
    var t =3D Math.min( this.top,    region.top    );=0A=
    var r =3D Math.max( this.right,  region.right  );=0A=
    var b =3D Math.max( this.bottom, region.bottom );=0A=
    var l =3D Math.min( this.left,   region.left   );=0A=
=0A=
    return new YAHOO.util.Region(t, r, b, l);=0A=
};=0A=
=0A=
/**=0A=
 * toString=0A=
 * @method toString=0A=
 * @return string the region properties=0A=
 */=0A=
YAHOO.util.Region.prototype.toString =3D function() {=0A=
    return ( "Region {"    +=0A=
             "top: "       + this.top    + =0A=
             ", right: "   + this.right  + =0A=
             ", bottom: "  + this.bottom + =0A=
             ", left: "    + this.left   + =0A=
             "}" );=0A=
};=0A=
=0A=
/**=0A=
 * Returns a region that is occupied by the DOM element=0A=
 * @method getRegion=0A=
 * @param  {HTMLElement} el The element=0A=
 * @return {Region}         The region that the element occupies=0A=
 * @static=0A=
 */=0A=
YAHOO.util.Region.getRegion =3D function(el) {=0A=
    var p =3D YAHOO.util.Dom.getXY(el);=0A=
=0A=
    var t =3D p[1];=0A=
    var r =3D p[0] + el.offsetWidth;=0A=
    var b =3D p[1] + el.offsetHeight;=0A=
    var l =3D p[0];=0A=
=0A=
    return new YAHOO.util.Region(t, r, b, l);=0A=
};=0A=
=0A=
/////////////////////////////////////////////////////////////////////////=
////=0A=
=0A=
=0A=
/**=0A=
 * A point is a region that is special in that it represents a single =
point on =0A=
 * the grid.=0A=
 * @namespace YAHOO.util=0A=
 * @class Point=0A=
 * @param {Int} x The X position of the point=0A=
 * @param {Int} y The Y position of the point=0A=
 * @constructor=0A=
 * @extends YAHOO.util.Region=0A=
 */=0A=
YAHOO.util.Point =3D function(x, y) {=0A=
   if (x instanceof Array) { // accept output from Dom.getXY=0A=
      y =3D x[1];=0A=
      x =3D x[0];=0A=
   }=0A=
   =0A=
    /**=0A=
     * The X position of the point, which is also the right, left and =
index zero (for Dom.getXY symmetry)=0A=
     * @property x=0A=
     * @type Int=0A=
     */=0A=
=0A=
    this.x =3D this.right =3D this.left =3D this[0] =3D x;=0A=
     =0A=
    /**=0A=
     * The Y position of the point, which is also the top, bottom and =
index one (for Dom.getXY symmetry)=0A=
     * @property y=0A=
     * @type Int=0A=
     */=0A=
    this.y =3D this.top =3D this.bottom =3D this[1] =3D y;=0A=
};=0A=
=0A=
YAHOO.util.Point.prototype =3D new YAHOO.util.Region();=0A=
=0A=
YAHOO.register("dom", YAHOO.util.Dom, {version: "2.2.2", build: "202"});=0A=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/animation.js

/*=0A=
Copyright (c) 2007, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
version: 2.2.2=0A=
*/=0A=
/*=0A=
Copyright (c) 2006, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
*/=0A=
=0A=
/**=0A=
 * The animation module provides allows effects to be added to =
HTMLElements.=0A=
 * @module animation=0A=
 * @requires yahoo, event, dom=0A=
 */=0A=
=0A=
/**=0A=
 *=0A=
 * Base animation class that provides the interface for building =
animated effects.=0A=
 * <p>Usage: var myAnim =3D new YAHOO.util.Anim(el, { width: { from: 10, =
to: 100 } }, 1, YAHOO.util.Easing.easeOut);</p>=0A=
 * @class Anim=0A=
 * @namespace YAHOO.util=0A=
 * @requires YAHOO.util.AnimMgr=0A=
 * @requires YAHOO.util.Easing=0A=
 * @requires YAHOO.util.Dom=0A=
 * @requires YAHOO.util.Event=0A=
 * @requires YAHOO.util.CustomEvent=0A=
 * @constructor=0A=
 * @param {String | HTMLElement} el Reference to the element that will =
be animated=0A=
 * @param {Object} attributes The attribute(s) to be animated.  =0A=
 * Each attribute is an object with at minimum a "to" or "by" member =
defined.  =0A=
 * Additional optional members are "from" (defaults to current value), =
"units" (defaults to "px").  =0A=
 * All attribute names use camelCase.=0A=
 * @param {Number} duration (optional, defaults to 1 second) Length of =
animation (frames or seconds), defaults to time-based=0A=
 * @param {Function} method (optional, defaults to =
YAHOO.util.Easing.easeNone) Computes the values that are applied to the =
attributes per frame (generally a YAHOO.util.Easing method)=0A=
 */=0A=
=0A=
YAHOO.util.Anim =3D function(el, attributes, duration, method) {=0A=
    if (el) {=0A=
        this.init(el, attributes, duration, method); =0A=
    }=0A=
};=0A=
=0A=
YAHOO.util.Anim.prototype =3D {=0A=
    /**=0A=
     * Provides a readable name for the Anim instance.=0A=
     * @method toString=0A=
     * @return {String}=0A=
     */=0A=
    toString: function() {=0A=
        var el =3D this.getEl();=0A=
        var id =3D el.id || el.tagName;=0A=
        return ("Anim " + id);=0A=
    },=0A=
    =0A=
    patterns: { // cached for performance=0A=
        noNegatives:        /width|height|opacity|padding/i, // keep at =
zero or above=0A=
        offsetAttribute:  /^((width|height)|(top|left))$/, // use =
offsetValue as default=0A=
        defaultUnit:        /width|height|top$|bottom$|left$|right$/i, =
// use 'px' by default=0A=
        offsetUnit:         /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may =
return these, so convert these to offset=0A=
    },=0A=
    =0A=
    /**=0A=
     * Returns the value computed by the animation's "method".=0A=
     * @method doMethod=0A=
     * @param {String} attr The name of the attribute.=0A=
     * @param {Number} start The value this attribute should start from =
for this animation.=0A=
     * @param {Number} end  The value this attribute should end at for =
this animation.=0A=
     * @return {Number} The Value to be applied to the attribute.=0A=
     */=0A=
    doMethod: function(attr, start, end) {=0A=
        return this.method(this.currentFrame, start, end - start, =
this.totalFrames);=0A=
    },=0A=
    =0A=
    /**=0A=
     * Applies a value to an attribute.=0A=
     * @method setAttribute=0A=
     * @param {String} attr The name of the attribute.=0A=
     * @param {Number} val The value to be applied to the attribute.=0A=
     * @param {String} unit The unit ('px', '%', etc.) of the value.=0A=
     */=0A=
    setAttribute: function(attr, val, unit) {=0A=
        if ( this.patterns.noNegatives.test(attr) ) {=0A=
            val =3D (val > 0) ? val : 0;=0A=
        }=0A=
=0A=
        YAHOO.util.Dom.setStyle(this.getEl(), attr, val + unit);=0A=
    },                        =0A=
    =0A=
    /**=0A=
     * Returns current value of the attribute.=0A=
     * @method getAttribute=0A=
     * @param {String} attr The name of the attribute.=0A=
     * @return {Number} val The current value of the attribute.=0A=
     */=0A=
    getAttribute: function(attr) {=0A=
        var el =3D this.getEl();=0A=
        var val =3D YAHOO.util.Dom.getStyle(el, attr);=0A=
=0A=
        if (val !=3D=3D 'auto' && !this.patterns.offsetUnit.test(val)) {=0A=
            return parseFloat(val);=0A=
        }=0A=
        =0A=
        var a =3D this.patterns.offsetAttribute.exec(attr) || [];=0A=
        var pos =3D !!( a[3] ); // top or left=0A=
        var box =3D !!( a[2] ); // width or height=0A=
        =0A=
        // use offsets for width/height and abs pos top/left=0A=
        if ( box || (YAHOO.util.Dom.getStyle(el, 'position') =3D=3D =
'absolute' && pos) ) {=0A=
            val =3D el['offset' + a[0].charAt(0).toUpperCase() + =
a[0].substr(1)];=0A=
        } else { // default to zero for other 'auto'=0A=
            val =3D 0;=0A=
        }=0A=
=0A=
        return val;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Returns the unit to use when none is supplied.=0A=
     * @method getDefaultUnit=0A=
     * @param {attr} attr The name of the attribute.=0A=
     * @return {String} The default unit to be used.=0A=
     */=0A=
    getDefaultUnit: function(attr) {=0A=
         if ( this.patterns.defaultUnit.test(attr) ) {=0A=
            return 'px';=0A=
         }=0A=
         =0A=
         return '';=0A=
    },=0A=
        =0A=
    /**=0A=
     * Sets the actual values to be used during the animation.  Should =
only be needed for subclass use.=0A=
     * @method setRuntimeAttribute=0A=
     * @param {Object} attr The attribute object=0A=
     * @private =0A=
     */=0A=
    setRuntimeAttribute: function(attr) {=0A=
        var start;=0A=
        var end;=0A=
        var attributes =3D this.attributes;=0A=
=0A=
        this.runtimeAttributes[attr] =3D {};=0A=
        =0A=
        var isset =3D function(prop) {=0A=
            return (typeof prop !=3D=3D 'undefined');=0A=
        };=0A=
        =0A=
        if ( !isset(attributes[attr]['to']) && =
!isset(attributes[attr]['by']) ) {=0A=
            return false; // note return; nothing to animate to=0A=
        }=0A=
        =0A=
        start =3D ( isset(attributes[attr]['from']) ) ? =
attributes[attr]['from'] : this.getAttribute(attr);=0A=
=0A=
        // To beats by, per SMIL 2.1 spec=0A=
        if ( isset(attributes[attr]['to']) ) {=0A=
            end =3D attributes[attr]['to'];=0A=
        } else if ( isset(attributes[attr]['by']) ) {=0A=
            if (start.constructor =3D=3D Array) {=0A=
                end =3D [];=0A=
                for (var i =3D 0, len =3D start.length; i < len; ++i) {=0A=
                    end[i] =3D start[i] + attributes[attr]['by'][i];=0A=
                }=0A=
            } else {=0A=
                end =3D start + attributes[attr]['by'];=0A=
            }=0A=
        }=0A=
        =0A=
        this.runtimeAttributes[attr].start =3D start;=0A=
        this.runtimeAttributes[attr].end =3D end;=0A=
=0A=
        // set units if needed=0A=
        this.runtimeAttributes[attr].unit =3D ( =
isset(attributes[attr].unit) ) ? attributes[attr]['unit'] : =
this.getDefaultUnit(attr);=0A=
    },=0A=
=0A=
    /**=0A=
     * Constructor for Anim instance.=0A=
     * @method init=0A=
     * @param {String | HTMLElement} el Reference to the element that =
will be animated=0A=
     * @param {Object} attributes The attribute(s) to be animated.  =0A=
     * Each attribute is an object with at minimum a "to" or "by" member =
defined.  =0A=
     * Additional optional members are "from" (defaults to current =
value), "units" (defaults to "px").  =0A=
     * All attribute names use camelCase.=0A=
     * @param {Number} duration (optional, defaults to 1 second) Length =
of animation (frames or seconds), defaults to time-based=0A=
     * @param {Function} method (optional, defaults to =
YAHOO.util.Easing.easeNone) Computes the values that are applied to the =
attributes per frame (generally a YAHOO.util.Easing method)=0A=
     */ =0A=
    init: function(el, attributes, duration, method) {=0A=
        /**=0A=
         * Whether or not the animation is running.=0A=
         * @property isAnimated=0A=
         * @private=0A=
         * @type Boolean=0A=
         */=0A=
        var isAnimated =3D false;=0A=
        =0A=
        /**=0A=
         * A Date object that is created when the animation begins.=0A=
         * @property startTime=0A=
         * @private=0A=
         * @type Date=0A=
         */=0A=
        var startTime =3D null;=0A=
        =0A=
        /**=0A=
         * The number of frames this animation was able to execute.=0A=
         * @property actualFrames=0A=
         * @private=0A=
         * @type Int=0A=
         */=0A=
        var actualFrames =3D 0; =0A=
=0A=
        /**=0A=
         * The element to be animated.=0A=
         * @property el=0A=
         * @private=0A=
         * @type HTMLElement=0A=
         */=0A=
        el =3D YAHOO.util.Dom.get(el);=0A=
        =0A=
        /**=0A=
         * The collection of attributes to be animated.  =0A=
         * Each attribute must have at least a "to" or "by" defined in =
order to animate.  =0A=
         * If "to" is supplied, the animation will end with the =
attribute at that value.  =0A=
         * If "by" is supplied, the animation will end at that value =
plus its starting value. =0A=
         * If both are supplied, "to" is used, and "by" is ignored. =0A=
         * Optional additional member include "from" (the value the =
attribute should start animating from, defaults to current value), and =
"unit" (the units to apply to the values).=0A=
         * @property attributes=0A=
         * @type Object=0A=
         */=0A=
        this.attributes =3D attributes || {};=0A=
        =0A=
        /**=0A=
         * The length of the animation.  Defaults to "1" (second).=0A=
         * @property duration=0A=
         * @type Number=0A=
         */=0A=
        this.duration =3D duration || 1;=0A=
        =0A=
        /**=0A=
         * The method that will provide values to the attribute(s) =
during the animation. =0A=
         * Defaults to "YAHOO.util.Easing.easeNone".=0A=
         * @property method=0A=
         * @type Function=0A=
         */=0A=
        this.method =3D method || YAHOO.util.Easing.easeNone;=0A=
=0A=
        /**=0A=
         * Whether or not the duration should be treated as seconds.=0A=
         * Defaults to true.=0A=
         * @property useSeconds=0A=
         * @type Boolean=0A=
         */=0A=
        this.useSeconds =3D true; // default to seconds=0A=
        =0A=
        /**=0A=
         * The location of the current animation on the timeline.=0A=
         * In time-based animations, this is used by AnimMgr to ensure =
the animation finishes on time.=0A=
         * @property currentFrame=0A=
         * @type Int=0A=
         */=0A=
        this.currentFrame =3D 0;=0A=
        =0A=
        /**=0A=
         * The total number of frames to be executed.=0A=
         * In time-based animations, this is used by AnimMgr to ensure =
the animation finishes on time.=0A=
         * @property totalFrames=0A=
         * @type Int=0A=
         */=0A=
        this.totalFrames =3D YAHOO.util.AnimMgr.fps;=0A=
        =0A=
        =0A=
        /**=0A=
         * Returns a reference to the animated element.=0A=
         * @method getEl=0A=
         * @return {HTMLElement}=0A=
         */=0A=
        this.getEl =3D function() { return el; };=0A=
        =0A=
        /**=0A=
         * Checks whether the element is currently animated.=0A=
         * @method isAnimated=0A=
         * @return {Boolean} current value of isAnimated.     =0A=
         */=0A=
        this.isAnimated =3D function() {=0A=
            return isAnimated;=0A=
        };=0A=
        =0A=
        /**=0A=
         * Returns the animation start time.=0A=
         * @method getStartTime=0A=
         * @return {Date} current value of startTime.      =0A=
         */=0A=
        this.getStartTime =3D function() {=0A=
            return startTime;=0A=
        };        =0A=
        =0A=
        this.runtimeAttributes =3D {};=0A=
        =0A=
        =0A=
        =0A=
        /**=0A=
         * Starts the animation by registering it with the animation =
manager. =0A=
         * @method animate  =0A=
         */=0A=
        this.animate =3D function() {=0A=
            if ( this.isAnimated() ) {=0A=
                return false;=0A=
            }=0A=
            =0A=
            this.currentFrame =3D 0;=0A=
            =0A=
            this.totalFrames =3D ( this.useSeconds ) ? =
Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration;=0A=
    =0A=
            YAHOO.util.AnimMgr.registerElement(this);=0A=
        };=0A=
          =0A=
        /**=0A=
         * Stops the animation.  Normally called by AnimMgr when =
animation completes.=0A=
         * @method stop=0A=
         * @param {Boolean} finish (optional) If true, animation will =
jump to final frame.=0A=
         */ =0A=
        this.stop =3D function(finish) {=0A=
            if (finish) {=0A=
                 this.currentFrame =3D this.totalFrames;=0A=
                 this._onTween.fire();=0A=
            }=0A=
            YAHOO.util.AnimMgr.stop(this);=0A=
        };=0A=
        =0A=
        var onStart =3D function() {            =0A=
            this.onStart.fire();=0A=
            =0A=
            this.runtimeAttributes =3D {};=0A=
            for (var attr in this.attributes) {=0A=
                this.setRuntimeAttribute(attr);=0A=
            }=0A=
            =0A=
            isAnimated =3D true;=0A=
            actualFrames =3D 0;=0A=
            startTime =3D new Date(); =0A=
        };=0A=
        =0A=
        /**=0A=
         * Feeds the starting and ending values for each animated =
attribute to doMethod once per frame, then applies the resulting value =
to the attribute(s).=0A=
         * @private=0A=
         */=0A=
         =0A=
        var onTween =3D function() {=0A=
            var data =3D {=0A=
                duration: new Date() - this.getStartTime(),=0A=
                currentFrame: this.currentFrame=0A=
            };=0A=
            =0A=
            data.toString =3D function() {=0A=
                return (=0A=
                    'duration: ' + data.duration +=0A=
                    ', currentFrame: ' + data.currentFrame=0A=
                );=0A=
            };=0A=
            =0A=
            this.onTween.fire(data);=0A=
            =0A=
            var runtimeAttributes =3D this.runtimeAttributes;=0A=
            =0A=
            for (var attr in runtimeAttributes) {=0A=
                this.setAttribute(attr, this.doMethod(attr, =
runtimeAttributes[attr].start, runtimeAttributes[attr].end), =
runtimeAttributes[attr].unit); =0A=
            }=0A=
            =0A=
            actualFrames +=3D 1;=0A=
        };=0A=
        =0A=
        var onComplete =3D function() {=0A=
            var actual_duration =3D (new Date() - startTime) / 1000 ;=0A=
            =0A=
            var data =3D {=0A=
                duration: actual_duration,=0A=
                frames: actualFrames,=0A=
                fps: actualFrames / actual_duration=0A=
            };=0A=
            =0A=
            data.toString =3D function() {=0A=
                return (=0A=
                    'duration: ' + data.duration +=0A=
                    ', frames: ' + data.frames +=0A=
                    ', fps: ' + data.fps=0A=
                );=0A=
            };=0A=
            =0A=
            isAnimated =3D false;=0A=
            actualFrames =3D 0;=0A=
            this.onComplete.fire(data);=0A=
        };=0A=
        =0A=
        /**=0A=
         * Custom event that fires after onStart, useful in subclassing=0A=
         * @private=0A=
         */    =0A=
        this._onStart =3D new YAHOO.util.CustomEvent('_start', this, =
true);=0A=
=0A=
        /**=0A=
         * Custom event that fires when animation begins=0A=
         * Listen via subscribe method (e.g. =
myAnim.onStart.subscribe(someFunction)=0A=
         * @event onStart=0A=
         */    =0A=
        this.onStart =3D new YAHOO.util.CustomEvent('start', this);=0A=
        =0A=
        /**=0A=
         * Custom event that fires between each frame=0A=
         * Listen via subscribe method (e.g. =
myAnim.onTween.subscribe(someFunction)=0A=
         * @event onTween=0A=
         */=0A=
        this.onTween =3D new YAHOO.util.CustomEvent('tween', this);=0A=
        =0A=
        /**=0A=
         * Custom event that fires after onTween=0A=
         * @private=0A=
         */=0A=
        this._onTween =3D new YAHOO.util.CustomEvent('_tween', this, =
true);=0A=
        =0A=
        /**=0A=
         * Custom event that fires when animation ends=0A=
         * Listen via subscribe method (e.g. =
myAnim.onComplete.subscribe(someFunction)=0A=
         * @event onComplete=0A=
         */=0A=
        this.onComplete =3D new YAHOO.util.CustomEvent('complete', this);=0A=
        /**=0A=
         * Custom event that fires after onComplete=0A=
         * @private=0A=
         */=0A=
        this._onComplete =3D new YAHOO.util.CustomEvent('_complete', =
this, true);=0A=
=0A=
        this._onStart.subscribe(onStart);=0A=
        this._onTween.subscribe(onTween);=0A=
        this._onComplete.subscribe(onComplete);=0A=
    }=0A=
};=0A=
=0A=
/**=0A=
 * Handles animation queueing and threading.=0A=
 * Used by Anim and subclasses.=0A=
 * @class AnimMgr=0A=
 * @namespace YAHOO.util=0A=
 */=0A=
YAHOO.util.AnimMgr =3D new function() {=0A=
    /** =0A=
     * Reference to the animation Interval.=0A=
     * @property thread=0A=
     * @private=0A=
     * @type Int=0A=
     */=0A=
    var thread =3D null;=0A=
    =0A=
    /** =0A=
     * The current queue of registered animation objects.=0A=
     * @property queue=0A=
     * @private=0A=
     * @type Array=0A=
     */    =0A=
    var queue =3D [];=0A=
=0A=
    /** =0A=
     * The number of active animations.=0A=
     * @property tweenCount=0A=
     * @private=0A=
     * @type Int=0A=
     */        =0A=
    var tweenCount =3D 0;=0A=
=0A=
    /** =0A=
     * Base frame rate (frames per second). =0A=
     * Arbitrarily high for better x-browser calibration (slower =
browsers drop more frames).=0A=
     * @property fps=0A=
     * @type Int=0A=
     * =0A=
     */=0A=
    this.fps =3D 1000;=0A=
=0A=
    /** =0A=
     * Interval delay in milliseconds, defaults to fastest possible.=0A=
     * @property delay=0A=
     * @type Int=0A=
     * =0A=
     */=0A=
    this.delay =3D 1;=0A=
=0A=
    /**=0A=
     * Adds an animation instance to the animation queue.=0A=
     * All animation instances must be registered in order to animate.=0A=
     * @method registerElement=0A=
     * @param {object} tween The Anim instance to be be registered=0A=
     */=0A=
    this.registerElement =3D function(tween) {=0A=
        queue[queue.length] =3D tween;=0A=
        tweenCount +=3D 1;=0A=
        tween._onStart.fire();=0A=
        this.start();=0A=
    };=0A=
    =0A=
    /**=0A=
     * removes an animation instance from the animation queue.=0A=
     * All animation instances must be registered in order to animate.=0A=
     * @method unRegister=0A=
     * @param {object} tween The Anim instance to be be registered=0A=
     * @param {Int} index The index of the Anim instance=0A=
     * @private=0A=
     */=0A=
    this.unRegister =3D function(tween, index) {=0A=
        tween._onComplete.fire();=0A=
        index =3D index || getIndex(tween);=0A=
        if (index !=3D -1) {=0A=
            queue.splice(index, 1);=0A=
        }=0A=
        =0A=
        tweenCount -=3D 1;=0A=
        if (tweenCount <=3D 0) {=0A=
            this.stop();=0A=
        }=0A=
    };=0A=
    =0A=
    /**=0A=
     * Starts the animation thread.=0A=
	* Only one thread can run at a time.=0A=
     * @method start=0A=
     */    =0A=
    this.start =3D function() {=0A=
        if (thread =3D=3D=3D null) {=0A=
            thread =3D setInterval(this.run, this.delay);=0A=
        }=0A=
    };=0A=
=0A=
    /**=0A=
     * Stops the animation thread or a specific animation instance.=0A=
     * @method stop=0A=
     * @param {object} tween A specific Anim instance to stop (optional)=0A=
     * If no instance given, Manager stops thread and all animations.=0A=
     */    =0A=
    this.stop =3D function(tween) {=0A=
        if (!tween) {=0A=
            clearInterval(thread);=0A=
            =0A=
            for (var i =3D 0, len =3D queue.length; i < len; ++i) {=0A=
                if ( queue[0].isAnimated() ) {=0A=
                    this.unRegister(queue[0], 0);  =0A=
                }=0A=
            }=0A=
=0A=
            queue =3D [];=0A=
            thread =3D null;=0A=
            tweenCount =3D 0;=0A=
        }=0A=
        else {=0A=
            this.unRegister(tween);=0A=
        }=0A=
    };=0A=
    =0A=
    /**=0A=
     * Called per Interval to handle each animation frame.=0A=
     * @method run=0A=
     */    =0A=
    this.run =3D function() {=0A=
        for (var i =3D 0, len =3D queue.length; i < len; ++i) {=0A=
            var tween =3D queue[i];=0A=
            if ( !tween || !tween.isAnimated() ) { continue; }=0A=
=0A=
            if (tween.currentFrame < tween.totalFrames || =
tween.totalFrames =3D=3D=3D null)=0A=
            {=0A=
                tween.currentFrame +=3D 1;=0A=
                =0A=
                if (tween.useSeconds) {=0A=
                    correctFrame(tween);=0A=
                }=0A=
                tween._onTween.fire();          =0A=
            }=0A=
            else { YAHOO.util.AnimMgr.stop(tween, i); }=0A=
        }=0A=
    };=0A=
    =0A=
    var getIndex =3D function(anim) {=0A=
        for (var i =3D 0, len =3D queue.length; i < len; ++i) {=0A=
            if (queue[i] =3D=3D anim) {=0A=
                return i; // note return;=0A=
            }=0A=
        }=0A=
        return -1;=0A=
    };=0A=
    =0A=
    /**=0A=
     * On the fly frame correction to keep animation on time.=0A=
     * @method correctFrame=0A=
     * @private=0A=
     * @param {Object} tween The Anim instance being corrected.=0A=
     */=0A=
    var correctFrame =3D function(tween) {=0A=
        var frames =3D tween.totalFrames;=0A=
        var frame =3D tween.currentFrame;=0A=
        var expected =3D (tween.currentFrame * tween.duration * 1000 / =
tween.totalFrames);=0A=
        var elapsed =3D (new Date() - tween.getStartTime());=0A=
        var tweak =3D 0;=0A=
        =0A=
        if (elapsed < tween.duration * 1000) { // check if falling behind=0A=
            tweak =3D Math.round((elapsed / expected - 1) * =
tween.currentFrame);=0A=
        } else { // went over duration, so jump to end=0A=
            tweak =3D frames - (frame + 1); =0A=
        }=0A=
        if (tweak > 0 && isFinite(tweak)) { // adjust if needed=0A=
            if (tween.currentFrame + tweak >=3D frames) {// dont go past =
last frame=0A=
                tweak =3D frames - (frame + 1);=0A=
            }=0A=
            =0A=
            tween.currentFrame +=3D tweak;      =0A=
        }=0A=
    };=0A=
};=0A=
/**=0A=
 * Used to calculate Bezier splines for any number of control points.=0A=
 * @class Bezier=0A=
 * @namespace YAHOO.util=0A=
 *=0A=
 */=0A=
YAHOO.util.Bezier =3D new function() {=0A=
    /**=0A=
     * Get the current position of the animated element based on t.=0A=
     * Each point is an array of "x" and "y" values (0 =3D x, 1 =3D y)=0A=
     * At least 2 points are required (start and end).=0A=
     * First point is start. Last point is end.=0A=
     * Additional control points are optional.     =0A=
     * @method getPosition=0A=
     * @param {Array} points An array containing Bezier points=0A=
     * @param {Number} t A number between 0 and 1 which is the basis for =
determining current position=0A=
     * @return {Array} An array containing int x and y member data=0A=
     */=0A=
    this.getPosition =3D function(points, t) {  =0A=
        var n =3D points.length;=0A=
        var tmp =3D [];=0A=
=0A=
        for (var i =3D 0; i < n; ++i){=0A=
            tmp[i] =3D [points[i][0], points[i][1]]; // save input=0A=
        }=0A=
        =0A=
        for (var j =3D 1; j < n; ++j) {=0A=
            for (i =3D 0; i < n - j; ++i) {=0A=
                tmp[i][0] =3D (1 - t) * tmp[i][0] + t * tmp[parseInt(i + =
1, 10)][0];=0A=
                tmp[i][1] =3D (1 - t) * tmp[i][1] + t * tmp[parseInt(i + =
1, 10)][1]; =0A=
            }=0A=
        }=0A=
    =0A=
        return [ tmp[0][0], tmp[0][1] ]; =0A=
    =0A=
    };=0A=
};=0A=
(function() {=0A=
/**=0A=
 * Anim subclass for color transitions.=0A=
 * <p>Usage: <code>var myAnim =3D new Y.ColorAnim(el, { backgroundColor: =
{ from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut);</code> Color =
values can be specified with either 112233, #112233, =0A=
 * [255,255,255], or rgb(255,255,255)</p>=0A=
 * @class ColorAnim=0A=
 * @namespace YAHOO.util=0A=
 * @requires YAHOO.util.Anim=0A=
 * @requires YAHOO.util.AnimMgr=0A=
 * @requires YAHOO.util.Easing=0A=
 * @requires YAHOO.util.Bezier=0A=
 * @requires YAHOO.util.Dom=0A=
 * @requires YAHOO.util.Event=0A=
 * @constructor=0A=
 * @extends YAHOO.util.Anim=0A=
 * @param {HTMLElement | String} el Reference to the element that will =
be animated=0A=
 * @param {Object} attributes The attribute(s) to be animated.=0A=
 * Each attribute is an object with at minimum a "to" or "by" member =
defined.=0A=
 * Additional optional members are "from" (defaults to current value), =
"units" (defaults to "px").=0A=
 * All attribute names use camelCase.=0A=
 * @param {Number} duration (optional, defaults to 1 second) Length of =
animation (frames or seconds), defaults to time-based=0A=
 * @param {Function} method (optional, defaults to =
YAHOO.util.Easing.easeNone) Computes the values that are applied to the =
attributes per frame (generally a YAHOO.util.Easing method)=0A=
 */=0A=
    YAHOO.util.ColorAnim =3D function(el, attributes, duration,  method) =
{=0A=
        YAHOO.util.ColorAnim.superclass.constructor.call(this, el, =
attributes, duration, method);=0A=
    };=0A=
    =0A=
    YAHOO.extend(YAHOO.util.ColorAnim, YAHOO.util.Anim);=0A=
    =0A=
    // shorthand=0A=
    var Y =3D YAHOO.util;=0A=
    var superclass =3D Y.ColorAnim.superclass;=0A=
    var proto =3D Y.ColorAnim.prototype;=0A=
    =0A=
    proto.toString =3D function() {=0A=
        var el =3D this.getEl();=0A=
        var id =3D el.id || el.tagName;=0A=
        return ("ColorAnim " + id);=0A=
    };=0A=
=0A=
    proto.patterns.color =3D /color$/i;=0A=
    proto.patterns.rgb            =3D =
/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;=0A=
    proto.patterns.hex            =3D =
/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;=0A=
    proto.patterns.hex3          =3D =
/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;=0A=
    proto.patterns.transparent =3D /^transparent|rgba\(0, 0, 0, 0\)$/; =
// need rgba for safari=0A=
    =0A=
    /**=0A=
     * Attempts to parse the given string and return a 3-tuple.=0A=
     * @method parseColor=0A=
     * @param {String} s The string to parse.=0A=
     * @return {Array} The 3-tuple of rgb values.=0A=
     */=0A=
    proto.parseColor =3D function(s) {=0A=
        if (s.length =3D=3D 3) { return s; }=0A=
    =0A=
        var c =3D this.patterns.hex.exec(s);=0A=
        if (c && c.length =3D=3D 4) {=0A=
            return [ parseInt(c[1], 16), parseInt(c[2], 16), =
parseInt(c[3], 16) ];=0A=
        }=0A=
    =0A=
        c =3D this.patterns.rgb.exec(s);=0A=
        if (c && c.length =3D=3D 4) {=0A=
            return [ parseInt(c[1], 10), parseInt(c[2], 10), =
parseInt(c[3], 10) ];=0A=
        }=0A=
    =0A=
        c =3D this.patterns.hex3.exec(s);=0A=
        if (c && c.length =3D=3D 4) {=0A=
            return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], =
16), parseInt(c[3] + c[3], 16) ];=0A=
        }=0A=
        =0A=
        return null;=0A=
    };=0A=
=0A=
    proto.getAttribute =3D function(attr) {=0A=
        var el =3D this.getEl();=0A=
        if (  this.patterns.color.test(attr) ) {=0A=
            var val =3D YAHOO.util.Dom.getStyle(el, attr);=0A=
            =0A=
            if (this.patterns.transparent.test(val)) { // bgcolor default=0A=
                var parent =3D el.parentNode; // try and get from an =
ancestor=0A=
                val =3D Y.Dom.getStyle(parent, attr);=0A=
            =0A=
                while (parent && this.patterns.transparent.test(val)) {=0A=
                    parent =3D parent.parentNode;=0A=
                    val =3D Y.Dom.getStyle(parent, attr);=0A=
                    if (parent.tagName.toUpperCase() =3D=3D 'HTML') {=0A=
                        val =3D '#fff';=0A=
                    }=0A=
                }=0A=
            }=0A=
        } else {=0A=
            val =3D superclass.getAttribute.call(this, attr);=0A=
        }=0A=
=0A=
        return val;=0A=
    };=0A=
    =0A=
    proto.doMethod =3D function(attr, start, end) {=0A=
        var val;=0A=
    =0A=
        if ( this.patterns.color.test(attr) ) {=0A=
            val =3D [];=0A=
            for (var i =3D 0, len =3D start.length; i < len; ++i) {=0A=
                val[i] =3D superclass.doMethod.call(this, attr, =
start[i], end[i]);=0A=
            }=0A=
            =0A=
            val =3D =
'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+'=
)';=0A=
        }=0A=
        else {=0A=
            val =3D superclass.doMethod.call(this, attr, start, end);=0A=
        }=0A=
=0A=
        return val;=0A=
    };=0A=
=0A=
    proto.setRuntimeAttribute =3D function(attr) {=0A=
        superclass.setRuntimeAttribute.call(this, attr);=0A=
        =0A=
        if ( this.patterns.color.test(attr) ) {=0A=
            var attributes =3D this.attributes;=0A=
            var start =3D =
this.parseColor(this.runtimeAttributes[attr].start);=0A=
            var end =3D =
this.parseColor(this.runtimeAttributes[attr].end);=0A=
            // fix colors if going "by"=0A=
            if ( typeof attributes[attr]['to'] =3D=3D=3D 'undefined' && =
typeof attributes[attr]['by'] !=3D=3D 'undefined' ) {=0A=
                end =3D this.parseColor(attributes[attr].by);=0A=
            =0A=
                for (var i =3D 0, len =3D start.length; i < len; ++i) {=0A=
                    end[i] =3D start[i] + end[i];=0A=
                }=0A=
            }=0A=
            =0A=
            this.runtimeAttributes[attr].start =3D start;=0A=
            this.runtimeAttributes[attr].end =3D end;=0A=
        }=0A=
    };=0A=
})();=0A=
/*=0A=
TERMS OF USE - EASING EQUATIONS=0A=
Open source under the BSD License.=0A=
Copyright 2001 Robert Penner All rights reserved.=0A=
=0A=
Redistribution and use in source and binary forms, with or without =
modification, are permitted provided that the following conditions are =
met:=0A=
=0A=
 * Redistributions of source code must retain the above copyright =
notice, this list of conditions and the following disclaimer.=0A=
 * Redistributions in binary form must reproduce the above copyright =
notice, this list of conditions and the following disclaimer in the =
documentation and/or other materials provided with the distribution.=0A=
 * Neither the name of the author nor the names of contributors may be =
used to endorse or promote products derived from this software without =
specific prior written permission.=0A=
=0A=
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS =
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED =
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A =
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER =
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, =
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, =
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR =
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF =
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING =
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS =
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.=0A=
*/=0A=
=0A=
/**=0A=
 * Singleton that determines how an animation proceeds from start to end.=0A=
 * @class Easing=0A=
 * @namespace YAHOO.util=0A=
*/=0A=
=0A=
YAHOO.util.Easing =3D {=0A=
=0A=
    /**=0A=
     * Uniform speed between points.=0A=
     * @method easeNone=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    easeNone: function (t, b, c, d) {=0A=
    	return c*t/d + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Begins slowly and accelerates towards end. (quadratic)=0A=
     * @method easeIn=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    easeIn: function (t, b, c, d) {=0A=
    	return c*(t/=3Dd)*t + b;=0A=
    },=0A=
=0A=
    /**=0A=
     * Begins quickly and decelerates towards end.  (quadratic)=0A=
     * @method easeOut=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    easeOut: function (t, b, c, d) {=0A=
    	return -c *(t/=3Dd)*(t-2) + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Begins slowly and decelerates towards end. (quadratic)=0A=
     * @method easeBoth=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    easeBoth: function (t, b, c, d) {=0A=
    	if ((t/=3Dd/2) < 1) {=0A=
            return c/2*t*t + b;=0A=
        }=0A=
        =0A=
    	return -c/2 * ((--t)*(t-2) - 1) + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Begins slowly and accelerates towards end. (quartic)=0A=
     * @method easeInStrong=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    easeInStrong: function (t, b, c, d) {=0A=
    	return c*(t/=3Dd)*t*t*t + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Begins quickly and decelerates towards end.  (quartic)=0A=
     * @method easeOutStrong=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    easeOutStrong: function (t, b, c, d) {=0A=
    	return -c * ((t=3Dt/d-1)*t*t*t - 1) + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Begins slowly and decelerates towards end. (quartic)=0A=
     * @method easeBothStrong=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    easeBothStrong: function (t, b, c, d) {=0A=
    	if ((t/=3Dd/2) < 1) {=0A=
            return c/2*t*t*t*t + b;=0A=
        }=0A=
        =0A=
    	return -c/2 * ((t-=3D2)*t*t*t - 2) + b;=0A=
    },=0A=
=0A=
    /**=0A=
     * Snap in elastic effect.=0A=
     * @method elasticIn=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @param {Number} a Amplitude (optional)=0A=
     * @param {Number} p Period (optional)=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
=0A=
    elasticIn: function (t, b, c, d, a, p) {=0A=
    	if (t =3D=3D 0) {=0A=
            return b;=0A=
        }=0A=
        if ( (t /=3D d) =3D=3D 1 ) {=0A=
            return b+c;=0A=
        }=0A=
        if (!p) {=0A=
            p=3Dd*.3;=0A=
        }=0A=
        =0A=
    	if (!a || a < Math.abs(c)) {=0A=
            a =3D c; =0A=
            var s =3D p/4;=0A=
        }=0A=
    	else {=0A=
            var s =3D p/(2*Math.PI) * Math.asin (c/a);=0A=
        }=0A=
        =0A=
    	return -(a*Math.pow(2,10*(t-=3D1)) * Math.sin( =
(t*d-s)*(2*Math.PI)/p )) + b;=0A=
    },=0A=
=0A=
    /**=0A=
     * Snap out elastic effect.=0A=
     * @method elasticOut=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @param {Number} a Amplitude (optional)=0A=
     * @param {Number} p Period (optional)=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    elasticOut: function (t, b, c, d, a, p) {=0A=
    	if (t =3D=3D 0) {=0A=
            return b;=0A=
        }=0A=
        if ( (t /=3D d) =3D=3D 1 ) {=0A=
            return b+c;=0A=
        }=0A=
        if (!p) {=0A=
            p=3Dd*.3;=0A=
        }=0A=
        =0A=
    	if (!a || a < Math.abs(c)) {=0A=
            a =3D c;=0A=
            var s =3D p / 4;=0A=
        }=0A=
    	else {=0A=
            var s =3D p/(2*Math.PI) * Math.asin (c/a);=0A=
        }=0A=
        =0A=
    	return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c =
+ b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Snap both elastic effect.=0A=
     * @method elasticBoth=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @param {Number} a Amplitude (optional)=0A=
     * @param {Number} p Period (optional)=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    elasticBoth: function (t, b, c, d, a, p) {=0A=
    	if (t =3D=3D 0) {=0A=
            return b;=0A=
        }=0A=
        =0A=
        if ( (t /=3D d/2) =3D=3D 2 ) {=0A=
            return b+c;=0A=
        }=0A=
        =0A=
        if (!p) {=0A=
            p =3D d*(.3*1.5);=0A=
        }=0A=
        =0A=
    	if ( !a || a < Math.abs(c) ) {=0A=
            a =3D c; =0A=
            var s =3D p/4;=0A=
        }=0A=
    	else {=0A=
            var s =3D p/(2*Math.PI) * Math.asin (c/a);=0A=
        }=0A=
        =0A=
    	if (t < 1) {=0A=
            return -.5*(a*Math.pow(2,10*(t-=3D1)) * =0A=
                    Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;=0A=
        }=0A=
    	return a*Math.pow(2,-10*(t-=3D1)) * =0A=
                Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
     * Backtracks slightly, then reverses direction and moves to end.=0A=
     * @method backIn=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @param {Number} s Overshoot (optional)=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    backIn: function (t, b, c, d, s) {=0A=
    	if (typeof s =3D=3D 'undefined') {=0A=
            s =3D 1.70158;=0A=
        }=0A=
    	return c*(t/=3Dd)*t*((s+1)*t - s) + b;=0A=
    },=0A=
=0A=
    /**=0A=
     * Overshoots end, then reverses and comes back to end.=0A=
     * @method backOut=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @param {Number} s Overshoot (optional)=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    backOut: function (t, b, c, d, s) {=0A=
    	if (typeof s =3D=3D 'undefined') {=0A=
            s =3D 1.70158;=0A=
        }=0A=
    	return c*((t=3Dt/d-1)*t*((s+1)*t + s) + 1) + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Backtracks slightly, then reverses direction, overshoots end, =0A=
     * then reverses and comes back to end.=0A=
     * @method backBoth=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @param {Number} s Overshoot (optional)=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    backBoth: function (t, b, c, d, s) {=0A=
    	if (typeof s =3D=3D 'undefined') {=0A=
            s =3D 1.70158; =0A=
        }=0A=
        =0A=
    	if ((t /=3D d/2 ) < 1) {=0A=
            return c/2*(t*t*(((s*=3D(1.525))+1)*t - s)) + b;=0A=
        }=0A=
    	return c/2*((t-=3D2)*t*(((s*=3D(1.525))+1)*t + s) + 2) + b;=0A=
    },=0A=
=0A=
    /**=0A=
     * Bounce off of start.=0A=
     * @method bounceIn=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    bounceIn: function (t, b, c, d) {=0A=
    	return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Bounces off end.=0A=
     * @method bounceOut=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    bounceOut: function (t, b, c, d) {=0A=
    	if ((t/=3Dd) < (1/2.75)) {=0A=
    		return c*(7.5625*t*t) + b;=0A=
    	} else if (t < (2/2.75)) {=0A=
    		return c*(7.5625*(t-=3D(1.5/2.75))*t + .75) + b;=0A=
    	} else if (t < (2.5/2.75)) {=0A=
    		return c*(7.5625*(t-=3D(2.25/2.75))*t + .9375) + b;=0A=
    	}=0A=
        return c*(7.5625*(t-=3D(2.625/2.75))*t + .984375) + b;=0A=
    },=0A=
    =0A=
    /**=0A=
     * Bounces off start and end.=0A=
     * @method bounceBoth=0A=
     * @param {Number} t Time value used to compute current value=0A=
     * @param {Number} b Starting value=0A=
     * @param {Number} c Delta between start and end values=0A=
     * @param {Number} d Total length of animation=0A=
     * @return {Number} The computed value for the current animation =
frame=0A=
     */=0A=
    bounceBoth: function (t, b, c, d) {=0A=
    	if (t < d/2) {=0A=
            return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b;=0A=
        }=0A=
    	return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b;=0A=
    }=0A=
};=0A=
=0A=
(function() {=0A=
/**=0A=
 * Anim subclass for moving elements along a path defined by the =
"points" =0A=
 * member of "attributes".  All "points" are arrays with x, y =
coordinates.=0A=
 * <p>Usage: <code>var myAnim =3D new YAHOO.util.Motion(el, { points: { =
to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>=0A=
 * @class Motion=0A=
 * @namespace YAHOO.util=0A=
 * @requires YAHOO.util.Anim=0A=
 * @requires YAHOO.util.AnimMgr=0A=
 * @requires YAHOO.util.Easing=0A=
 * @requires YAHOO.util.Bezier=0A=
 * @requires YAHOO.util.Dom=0A=
 * @requires YAHOO.util.Event=0A=
 * @requires YAHOO.util.CustomEvent =0A=
 * @constructor=0A=
 * @extends YAHOO.util.Anim=0A=
 * @param {String | HTMLElement} el Reference to the element that will =
be animated=0A=
 * @param {Object} attributes The attribute(s) to be animated.  =0A=
 * Each attribute is an object with at minimum a "to" or "by" member =
defined.  =0A=
 * Additional optional members are "from" (defaults to current value), =
"units" (defaults to "px").  =0A=
 * All attribute names use camelCase.=0A=
 * @param {Number} duration (optional, defaults to 1 second) Length of =
animation (frames or seconds), defaults to time-based=0A=
 * @param {Function} method (optional, defaults to =
YAHOO.util.Easing.easeNone) Computes the values that are applied to the =
attributes per frame (generally a YAHOO.util.Easing method)=0A=
 */=0A=
    YAHOO.util.Motion =3D function(el, attributes, duration,  method) {=0A=
        if (el) { // dont break existing subclasses not using =
YAHOO.extend=0A=
            YAHOO.util.Motion.superclass.constructor.call(this, el, =
attributes, duration, method);=0A=
        }=0A=
    };=0A=
=0A=
    YAHOO.extend(YAHOO.util.Motion, YAHOO.util.ColorAnim);=0A=
    =0A=
    // shorthand=0A=
    var Y =3D YAHOO.util;=0A=
    var superclass =3D Y.Motion.superclass;=0A=
    var proto =3D Y.Motion.prototype;=0A=
=0A=
    proto.toString =3D function() {=0A=
        var el =3D this.getEl();=0A=
        var id =3D el.id || el.tagName;=0A=
        return ("Motion " + id);=0A=
    };=0A=
    =0A=
    proto.patterns.points =3D /^points$/i;=0A=
    =0A=
    proto.setAttribute =3D function(attr, val, unit) {=0A=
        if (  this.patterns.points.test(attr) ) {=0A=
            unit =3D unit || 'px';=0A=
            superclass.setAttribute.call(this, 'left', val[0], unit);=0A=
            superclass.setAttribute.call(this, 'top', val[1], unit);=0A=
        } else {=0A=
            superclass.setAttribute.call(this, attr, val, unit);=0A=
        }=0A=
    };=0A=
=0A=
    proto.getAttribute =3D function(attr) {=0A=
        if (  this.patterns.points.test(attr) ) {=0A=
            var val =3D [=0A=
                superclass.getAttribute.call(this, 'left'),=0A=
                superclass.getAttribute.call(this, 'top')=0A=
            ];=0A=
        } else {=0A=
            val =3D superclass.getAttribute.call(this, attr);=0A=
        }=0A=
=0A=
        return val;=0A=
    };=0A=
=0A=
    proto.doMethod =3D function(attr, start, end) {=0A=
        var val =3D null;=0A=
=0A=
        if ( this.patterns.points.test(attr) ) {=0A=
            var t =3D this.method(this.currentFrame, 0, 100, =
this.totalFrames) / 100;				=0A=
            val =3D Y.Bezier.getPosition(this.runtimeAttributes[attr], =
t);=0A=
        } else {=0A=
            val =3D superclass.doMethod.call(this, attr, start, end);=0A=
        }=0A=
        return val;=0A=
    };=0A=
=0A=
    proto.setRuntimeAttribute =3D function(attr) {=0A=
        if ( this.patterns.points.test(attr) ) {=0A=
            var el =3D this.getEl();=0A=
            var attributes =3D this.attributes;=0A=
            var start;=0A=
            var control =3D attributes['points']['control'] || [];=0A=
            var end;=0A=
            var i, len;=0A=
            =0A=
            if (control.length > 0 && !(control[0] instanceof Array) ) { =
// could be single point or array of points=0A=
                control =3D [control];=0A=
            } else { // break reference to attributes.points.control=0A=
                var tmp =3D []; =0A=
                for (i =3D 0, len =3D control.length; i< len; ++i) {=0A=
                    tmp[i] =3D control[i];=0A=
                }=0A=
                control =3D tmp;=0A=
            }=0A=
=0A=
            if (Y.Dom.getStyle(el, 'position') =3D=3D 'static') { // =
default to relative=0A=
                Y.Dom.setStyle(el, 'position', 'relative');=0A=
            }=0A=
    =0A=
            if ( isset(attributes['points']['from']) ) {=0A=
                Y.Dom.setXY(el, attributes['points']['from']); // set =
position to from point=0A=
            } =0A=
            else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to =
current position=0A=
            =0A=
            start =3D this.getAttribute('points'); // get actual top & =
left=0A=
            =0A=
            // TO beats BY, per SMIL 2.1 spec=0A=
            if ( isset(attributes['points']['to']) ) {=0A=
                end =3D translateValues.call(this, =
attributes['points']['to'], start);=0A=
                =0A=
                var pageXY =3D Y.Dom.getXY(this.getEl());=0A=
                for (i =3D 0, len =3D control.length; i < len; ++i) {=0A=
                    control[i] =3D translateValues.call(this, =
control[i], start);=0A=
                }=0A=
=0A=
                =0A=
            } else if ( isset(attributes['points']['by']) ) {=0A=
                end =3D [ start[0] + attributes['points']['by'][0], =
start[1] + attributes['points']['by'][1] ];=0A=
                =0A=
                for (i =3D 0, len =3D control.length; i < len; ++i) {=0A=
                    control[i] =3D [ start[0] + control[i][0], start[1] =
+ control[i][1] ];=0A=
                }=0A=
            }=0A=
=0A=
            this.runtimeAttributes[attr] =3D [start];=0A=
            =0A=
            if (control.length > 0) {=0A=
                this.runtimeAttributes[attr] =3D =
this.runtimeAttributes[attr].concat(control); =0A=
            }=0A=
=0A=
            =
this.runtimeAttributes[attr][this.runtimeAttributes[attr].length] =3D =
end;=0A=
        }=0A=
        else {=0A=
            superclass.setRuntimeAttribute.call(this, attr);=0A=
        }=0A=
    };=0A=
    =0A=
    var translateValues =3D function(val, start) {=0A=
        var pageXY =3D Y.Dom.getXY(this.getEl());=0A=
        val =3D [ val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + =
start[1] ];=0A=
=0A=
        return val; =0A=
    };=0A=
    =0A=
    var isset =3D function(prop) {=0A=
        return (typeof prop !=3D=3D 'undefined');=0A=
    };=0A=
})();=0A=
(function() {=0A=
/**=0A=
 * Anim subclass for scrolling elements to a position defined by the =
"scroll"=0A=
 * member of "attributes".  All "scroll" members are arrays with x, y =
scroll positions.=0A=
 * <p>Usage: <code>var myAnim =3D new YAHOO.util.Scroll(el, { scroll: { =
to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p>=0A=
 * @class Scroll=0A=
 * @namespace YAHOO.util=0A=
 * @requires YAHOO.util.Anim=0A=
 * @requires YAHOO.util.AnimMgr=0A=
 * @requires YAHOO.util.Easing=0A=
 * @requires YAHOO.util.Bezier=0A=
 * @requires YAHOO.util.Dom=0A=
 * @requires YAHOO.util.Event=0A=
 * @requires YAHOO.util.CustomEvent =0A=
 * @extends YAHOO.util.Anim=0A=
 * @constructor=0A=
 * @param {String or HTMLElement} el Reference to the element that will =
be animated=0A=
 * @param {Object} attributes The attribute(s) to be animated.  =0A=
 * Each attribute is an object with at minimum a "to" or "by" member =
defined.  =0A=
 * Additional optional members are "from" (defaults to current value), =
"units" (defaults to "px").  =0A=
 * All attribute names use camelCase.=0A=
 * @param {Number} duration (optional, defaults to 1 second) Length of =
animation (frames or seconds), defaults to time-based=0A=
 * @param {Function} method (optional, defaults to =
YAHOO.util.Easing.easeNone) Computes the values that are applied to the =
attributes per frame (generally a YAHOO.util.Easing method)=0A=
 */=0A=
    YAHOO.util.Scroll =3D function(el, attributes, duration,  method) {=0A=
        if (el) { // dont break existing subclasses not using =
YAHOO.extend=0A=
            YAHOO.util.Scroll.superclass.constructor.call(this, el, =
attributes, duration, method);=0A=
        }=0A=
    };=0A=
=0A=
    YAHOO.extend(YAHOO.util.Scroll, YAHOO.util.ColorAnim);=0A=
    =0A=
    // shorthand=0A=
    var Y =3D YAHOO.util;=0A=
    var superclass =3D Y.Scroll.superclass;=0A=
    var proto =3D Y.Scroll.prototype;=0A=
=0A=
    proto.toString =3D function() {=0A=
        var el =3D this.getEl();=0A=
        var id =3D el.id || el.tagName;=0A=
        return ("Scroll " + id);=0A=
    };=0A=
=0A=
    proto.doMethod =3D function(attr, start, end) {=0A=
        var val =3D null;=0A=
    =0A=
        if (attr =3D=3D 'scroll') {=0A=
            val =3D [=0A=
                this.method(this.currentFrame, start[0], end[0] - =
start[0], this.totalFrames),=0A=
                this.method(this.currentFrame, start[1], end[1] - =
start[1], this.totalFrames)=0A=
            ];=0A=
            =0A=
        } else {=0A=
            val =3D superclass.doMethod.call(this, attr, start, end);=0A=
        }=0A=
        return val;=0A=
    };=0A=
=0A=
    proto.getAttribute =3D function(attr) {=0A=
        var val =3D null;=0A=
        var el =3D this.getEl();=0A=
        =0A=
        if (attr =3D=3D 'scroll') {=0A=
            val =3D [ el.scrollLeft, el.scrollTop ];=0A=
        } else {=0A=
            val =3D superclass.getAttribute.call(this, attr);=0A=
        }=0A=
        =0A=
        return val;=0A=
    };=0A=
=0A=
    proto.setAttribute =3D function(attr, val, unit) {=0A=
        var el =3D this.getEl();=0A=
        =0A=
        if (attr =3D=3D 'scroll') {=0A=
            el.scrollLeft =3D val[0];=0A=
            el.scrollTop =3D val[1];=0A=
        } else {=0A=
            superclass.setAttribute.call(this, attr, val, unit);=0A=
        }=0A=
    };=0A=
})();=0A=
YAHOO.register("animation", YAHOO.util.Anim, {version: "2.2.2", build: =
"202"});=0A=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/container_core.js

/*=0A=
Copyright (c) 2007, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
version: 2.2.2=0A=
*/=0A=
/**=0A=
* Config is a utility used within an Object to allow the implementer to =
maintain a list of local configuration properties and listen for changes =
to those properties dynamically using CustomEvent. The initial values =
are also maintained so that the configuration can be reset at any given =
point to its initial state.=0A=
* @namespace YAHOO.util=0A=
* @class Config=0A=
* @constructor=0A=
* @param {Object}	owner	The owner Object to which this Config Object =
belongs=0A=
*/=0A=
YAHOO.util.Config =3D function(owner) {=0A=
	if (owner) {=0A=
		this.init(owner);=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
 * Constant representing the CustomEvent type for the config changed =
event.=0A=
 * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT=0A=
 * @private=0A=
 * @static=0A=
 * @final=0A=
 */=0A=
YAHOO.util.Config.CONFIG_CHANGED_EVENT =3D "configChanged";=0A=
=0A=
/**=0A=
 * Constant representing the boolean type string=0A=
 * @property YAHOO.util.Config.BOOLEAN_TYPE=0A=
 * @private=0A=
 * @static=0A=
 * @final=0A=
 */=0A=
YAHOO.util.Config.BOOLEAN_TYPE =3D "boolean";=0A=
=0A=
YAHOO.util.Config.prototype =3D {=0A=
	=0A=
	/**=0A=
	* Object reference to the owner of this Config Object=0A=
	* @property owner=0A=
	* @type Object=0A=
	*/=0A=
	owner : null,=0A=
=0A=
	/**=0A=
	* Boolean flag that specifies whether a queue is currently being =
executed=0A=
	* @property queueInProgress=0A=
	* @type Boolean=0A=
	*/=0A=
	queueInProgress : false,=0A=
=0A=
	/**=0A=
	* Maintains the local collection of configuration property objects and =
their specified values=0A=
	* @property config=0A=
	* @private=0A=
	* @type Object=0A=
	*/ =0A=
	config : null,=0A=
=0A=
	/**=0A=
	* Maintains the local collection of configuration property objects as =
they were initially applied.=0A=
	* This object is used when resetting a property.=0A=
	* @property initialConfig=0A=
	* @private=0A=
	* @type Object=0A=
	*/ =0A=
	initialConfig : null,=0A=
=0A=
	/**=0A=
	* Maintains the local, normalized CustomEvent queue=0A=
	* @property eventQueue=0A=
	* @private=0A=
	* @type Object=0A=
	*/ =0A=
	eventQueue : null,=0A=
=0A=
	/**=0A=
	* Custom Event, notifying subscribers when Config properties are set =
(setProperty is called without the silent flag=0A=
	* @event configChangedEvent=0A=
	*/=0A=
	configChangedEvent : null,=0A=
=0A=
	/**=0A=
	* Validates that the value passed in is a Boolean.=0A=
	* @method checkBoolean=0A=
	* @param	{Object}	val	The value to validate=0A=
	* @return	{Boolean}	true, if the value is valid=0A=
	*/	=0A=
	checkBoolean: function(val) {=0A=
		return (typeof val =3D=3D YAHOO.util.Config.BOOLEAN_TYPE);=0A=
	},=0A=
=0A=
	/**=0A=
	* Validates that the value passed in is a number.=0A=
	* @method checkNumber=0A=
	* @param	{Object}	val	The value to validate=0A=
	* @return	{Boolean}	true, if the value is valid=0A=
	*/=0A=
	checkNumber: function(val) {=0A=
		return (!isNaN(val));=0A=
	},=0A=
=0A=
	/**=0A=
	* Fires a configuration property event using the specified value. =0A=
	* @method fireEvent=0A=
	* @private=0A=
	* @param {String}	key			The configuration property's name=0A=
	* @param {value}	Object		The value of the correct type for the property=0A=
	*/ =0A=
	fireEvent : function( key, value ) {=0A=
		var property =3D this.config[key];=0A=
=0A=
		if (property && property.event) {=0A=
			property.event.fire(value);=0A=
		}	=0A=
	},=0A=
=0A=
	/**=0A=
	* Adds a property to the Config Object's private config hash.=0A=
	* @method addProperty=0A=
	* @param {String}	key	The configuration property's name=0A=
	* @param {Object}	propertyObject	The Object containing all of this =
property's arguments=0A=
	*/=0A=
	addProperty : function( key, propertyObject ) {=0A=
		key =3D key.toLowerCase();=0A=
=0A=
		this.config[key] =3D propertyObject;=0A=
=0A=
		propertyObject.event =3D new YAHOO.util.CustomEvent(key, this.owner);=0A=
		propertyObject.key =3D key;=0A=
=0A=
		if (propertyObject.handler) {=0A=
			propertyObject.event.subscribe(propertyObject.handler, this.owner);=0A=
		}=0A=
=0A=
		this.setProperty(key, propertyObject.value, true);=0A=
		=0A=
		if (! propertyObject.suppressEvent) {=0A=
			this.queueProperty(key, propertyObject.value);=0A=
		}=0A=
		=0A=
	},=0A=
=0A=
	/**=0A=
	* Returns a key-value configuration map of the values currently set in =
the Config Object.=0A=
	* @method getConfig=0A=
	* @return {Object} The current config, represented in a key-value map=0A=
	*/=0A=
	getConfig : function() {=0A=
		var cfg =3D {};=0A=
			=0A=
		for (var prop in this.config) {=0A=
			var property =3D this.config[prop];=0A=
			if (property && property.event) {=0A=
				cfg[prop] =3D property.value;=0A=
			}=0A=
		}=0A=
		=0A=
		return cfg;=0A=
	},=0A=
=0A=
	/**=0A=
	* Returns the value of specified property.=0A=
	* @method getProperty=0A=
	* @param {String} key	The name of the property=0A=
	* @return {Object}		The value of the specified property=0A=
	*/=0A=
	getProperty : function(key) {=0A=
		var property =3D this.config[key.toLowerCase()];=0A=
		if (property && property.event) {=0A=
			return property.value;=0A=
		} else {=0A=
			return undefined;=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Resets the specified property's value to its initial value.=0A=
	* @method resetProperty=0A=
	* @param {String} key	The name of the property=0A=
	* @return {Boolean} True is the property was reset, false if not=0A=
	*/=0A=
	resetProperty : function(key) {=0A=
		key =3D key.toLowerCase();=0A=
=0A=
		var property =3D this.config[key];=0A=
		if (property && property.event) {=0A=
			if (this.initialConfig[key] && =
!YAHOO.lang.isUndefined(this.initialConfig[key]))	{=0A=
				this.setProperty(key, this.initialConfig[key]);=0A=
			}=0A=
			return true;=0A=
		} else {=0A=
			return false;=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Sets the value of a property. If the silent property is passed as =
true, the property's event will not be fired.=0A=
	* @method setProperty=0A=
	* @param {String} key		The name of the property=0A=
	* @param {String} value		The value to set the property to=0A=
	* @param {Boolean} silent	Whether the value should be set silently, =
without firing the property event.=0A=
	* @return {Boolean}			True, if the set was successful, false if it =
failed.=0A=
	*/=0A=
	setProperty : function(key, value, silent) {=0A=
		key =3D key.toLowerCase();=0A=
=0A=
		if (this.queueInProgress && ! silent) {=0A=
			this.queueProperty(key,value); // Currently running through a =
queue... =0A=
			return true;=0A=
		} else {=0A=
			var property =3D this.config[key];=0A=
			if (property && property.event) {=0A=
				if (property.validator && ! property.validator(value)) { // validator=0A=
					return false;=0A=
				} else {=0A=
					property.value =3D value;=0A=
					if (! silent) {=0A=
						this.fireEvent(key, value);=0A=
						this.configChangedEvent.fire([key, value]);=0A=
					}=0A=
					return true;=0A=
				}=0A=
			} else {=0A=
				return false;=0A=
			}=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Sets the value of a property and queues its event to execute. If the =
event is already scheduled to execute, it is=0A=
	* moved from its current position to the end of the queue.=0A=
	* @method queueProperty=0A=
	* @param {String} key	The name of the property=0A=
	* @param {String} value	The value to set the property to=0A=
	* @return {Boolean}		true, if the set was successful, false if it =
failed.=0A=
	*/	=0A=
	queueProperty : function(key, value) {=0A=
		key =3D key.toLowerCase();=0A=
=0A=
		var property =3D this.config[key];=0A=
							=0A=
		if (property && property.event) {=0A=
			if (!YAHOO.lang.isUndefined(value) && property.validator && ! =
property.validator(value)) { // validator=0A=
				return false;=0A=
			} else {=0A=
=0A=
				if (!YAHOO.lang.isUndefined(value)) {=0A=
					property.value =3D value;=0A=
				} else {=0A=
					value =3D property.value;=0A=
				}=0A=
=0A=
				var foundDuplicate =3D false;=0A=
				var iLen =3D this.eventQueue.length;=0A=
				for (var i=3D0; i < iLen; i++) {=0A=
					var queueItem =3D this.eventQueue[i];=0A=
=0A=
					if (queueItem) {=0A=
						var queueItemKey =3D queueItem[0];=0A=
						var queueItemValue =3D queueItem[1];=0A=
						=0A=
						if (queueItemKey =3D=3D key) {=0A=
							// found a dupe... push to end of queue, null current item, and =
break=0A=
							this.eventQueue[i] =3D null;=0A=
							this.eventQueue.push([key, (!YAHOO.lang.isUndefined(value) ? =
value : queueItemValue)]);=0A=
							foundDuplicate =3D true;=0A=
							break;=0A=
						}=0A=
					}=0A=
				}=0A=
				=0A=
				if (! foundDuplicate && !YAHOO.lang.isUndefined(value)) { // this is =
a refire, or a new property in the queue=0A=
					this.eventQueue.push([key, value]);=0A=
				}=0A=
			}=0A=
=0A=
			if (property.supercedes) {=0A=
				var sLen =3D property.supercedes.length;=0A=
				for (var s=3D0; s < sLen; s++) {=0A=
					var supercedesCheck =3D property.supercedes[s];=0A=
					var qLen =3D this.eventQueue.length;=0A=
					for (var q=3D0; q < qLen; q++) {=0A=
						var queueItemCheck =3D this.eventQueue[q];=0A=
=0A=
						if (queueItemCheck) {=0A=
							var queueItemCheckKey =3D queueItemCheck[0];=0A=
							var queueItemCheckValue =3D queueItemCheck[1];=0A=
							=0A=
							if ( queueItemCheckKey =3D=3D supercedesCheck.toLowerCase() ) {=0A=
								this.eventQueue.push([queueItemCheckKey, queueItemCheckValue]);=0A=
								this.eventQueue[q] =3D null;=0A=
								break;=0A=
							}=0A=
						}=0A=
					}=0A=
				}=0A=
			}=0A=
=0A=
			return true;=0A=
		} else {=0A=
			return false;=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Fires the event for a property using the property's current value.=0A=
	* @method refireEvent=0A=
	* @param {String} key	The name of the property=0A=
	*/=0A=
	refireEvent : function(key) {=0A=
		key =3D key.toLowerCase();=0A=
=0A=
		var property =3D this.config[key];=0A=
		if (property && property.event && =
!YAHOO.lang.isUndefined(property.value)) {=0A=
			if (this.queueInProgress) {=0A=
				this.queueProperty(key);=0A=
			} else {=0A=
				this.fireEvent(key, property.value);=0A=
			}=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Applies a key-value Object literal to the configuration, replacing =
any existing values, and queueing the property events.=0A=
	* Although the values will be set, fireQueue() must be called for their =
associated events to execute.=0A=
	* @method applyConfig=0A=
	* @param {Object}	userConfig	The configuration Object literal=0A=
	* @param {Boolean}	init		When set to true, the initialConfig will be =
set to the userConfig passed in, so that calling a reset will reset the =
properties to the passed values.=0A=
	*/=0A=
	applyConfig : function(userConfig, init) {=0A=
		if (init) {=0A=
			this.initialConfig =3D userConfig;=0A=
		}=0A=
		for (var prop in userConfig) {=0A=
			this.queueProperty(prop, userConfig[prop]);=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Refires the events for all configuration properties using their =
current values.=0A=
	* @method refresh=0A=
	*/=0A=
	refresh : function() {=0A=
		for (var prop in this.config) {=0A=
			this.refireEvent(prop);=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Fires the normalized list of queued property change events=0A=
	* @method fireQueue=0A=
	*/=0A=
	fireQueue : function() {=0A=
		this.queueInProgress =3D true;=0A=
		for (var i=3D0;i<this.eventQueue.length;i++) {=0A=
			var queueItem =3D this.eventQueue[i];=0A=
			if (queueItem) {=0A=
				var key =3D queueItem[0];=0A=
				var value =3D queueItem[1];=0A=
				=0A=
				var property =3D this.config[key];=0A=
				property.value =3D value;=0A=
=0A=
				this.fireEvent(key,value);=0A=
			}=0A=
		}=0A=
		=0A=
		this.queueInProgress =3D false;=0A=
		this.eventQueue =3D [];=0A=
	},=0A=
=0A=
	/**=0A=
	* Subscribes an external handler to the change event for any given =
property. =0A=
	* @method subscribeToConfigEvent=0A=
	* @param {String}	key			The property name=0A=
	* @param {Function}	handler		The handler function to use subscribe to =
the property's event=0A=
	* @param {Object}	obj			The Object to use for scoping the event handler =
(see CustomEvent documentation)=0A=
	* @param {Boolean}	override	Optional. If true, will override "this" =
within the handler to map to the scope Object passed into the method.=0A=
	* @return {Boolean}				True, if the subscription was successful, =
otherwise false.=0A=
	*/	=0A=
	subscribeToConfigEvent : function(key, handler, obj, override) {=0A=
		var property =3D this.config[key.toLowerCase()];=0A=
		if (property && property.event) {=0A=
			if (! YAHOO.util.Config.alreadySubscribed(property.event, handler, =
obj)) {=0A=
				property.event.subscribe(handler, obj, override);=0A=
			}=0A=
			return true;=0A=
		} else {=0A=
			return false;=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Unsubscribes an external handler from the change event for any given =
property. =0A=
	* @method unsubscribeFromConfigEvent=0A=
	* @param {String}	key			The property name=0A=
	* @param {Function}	handler		The handler function to use subscribe to =
the property's event=0A=
	* @param {Object}	obj			The Object to use for scoping the event handler =
(see CustomEvent documentation)=0A=
	* @return {Boolean}				True, if the unsubscription was successful, =
otherwise false.=0A=
	*/=0A=
	unsubscribeFromConfigEvent : function(key, handler, obj) {=0A=
		var property =3D this.config[key.toLowerCase()];=0A=
		if (property && property.event) {=0A=
			return property.event.unsubscribe(handler, obj);=0A=
		} else {=0A=
			return false;=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Returns a string representation of the Config object=0A=
	* @method toString=0A=
	* @return {String}	The Config object in string format.=0A=
	*/=0A=
	toString : function() {=0A=
		var output =3D "Config";=0A=
		if (this.owner) {=0A=
			output +=3D " [" + this.owner.toString() + "]";=0A=
		}=0A=
		return output;=0A=
	},=0A=
=0A=
	/**=0A=
	* Returns a string representation of the Config object's current =
CustomEvent queue=0A=
	* @method outputEventQueue=0A=
	* @return {String}	The string list of CustomEvents currently queued for =
execution=0A=
	*/=0A=
	outputEventQueue : function() {=0A=
		var output =3D "";=0A=
		for (var q=3D0;q<this.eventQueue.length;q++) {=0A=
			var queueItem =3D this.eventQueue[q];=0A=
			if (queueItem) {=0A=
				output +=3D queueItem[0] + "=3D" + queueItem[1] + ", ";=0A=
			}=0A=
		}=0A=
		return output;=0A=
	}=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Initializes the configuration Object and all of its local members.=0A=
* @method init=0A=
* @param {Object}	owner	The owner Object to which this Config Object =
belongs=0A=
*/=0A=
YAHOO.util.Config.prototype.init =3D function(owner) {=0A=
	this.owner =3D owner;=0A=
	this.configChangedEvent =3D new =
YAHOO.util.CustomEvent(YAHOO.util.CONFIG_CHANGED_EVENT, this);=0A=
	this.queueInProgress =3D false;=0A=
	this.config =3D {};=0A=
	this.initialConfig =3D {};=0A=
	this.eventQueue =3D [];=0A=
};=0A=
=0A=
/**=0A=
* Checks to determine if a particular function/Object pair are already =
subscribed to the specified CustomEvent=0A=
* @method YAHOO.util.Config.alreadySubscribed=0A=
* @static=0A=
* @param {YAHOO.util.CustomEvent} evt	The CustomEvent for which to check =
the subscriptions=0A=
* @param {Function}	fn	The function to look for in the subscribers list=0A=
* @param {Object}	obj	The execution scope Object for the subscription=0A=
* @return {Boolean}	true, if the function/Object pair is already =
subscribed to the CustomEvent passed in=0A=
*/=0A=
YAHOO.util.Config.alreadySubscribed =3D function(evt, fn, obj) {=0A=
	for (var e=3D0;e<evt.subscribers.length;e++) {=0A=
		var subsc =3D evt.subscribers[e];=0A=
		if (subsc && subsc.obj =3D=3D obj && subsc.fn =3D=3D fn) {=0A=
			return true;=0A=
		}=0A=
	}=0A=
	return false;=0A=
};=0A=
/**=0A=
*  The Container family of components is designed to enable developers =
to create different kinds of content-containing modules on the web. =
Module and Overlay are the most basic containers, and they can be used =
directly or extended to build custom containers. Also part of the =
Container family are four UI controls that extend Module and Overlay: =
Tooltip, Panel, Dialog, and SimpleDialog.=0A=
* @module container=0A=
* @title Container=0A=
* @requires yahoo,dom,event,dragdrop,animation=0A=
*/=0A=
=0A=
/**=0A=
* Module is a JavaScript representation of the Standard Module Format. =
Standard Module Format is a simple standard for markup containers where =
child nodes representing the header, body, and footer of the content are =
denoted using the CSS classes "hd", "bd", and "ft" respectively. Module =
is the base class for all other classes in the YUI Container package.=0A=
* @namespace YAHOO.widget=0A=
* @class Module=0A=
* @constructor=0A=
* @param {String} el			The element ID representing the Module <em>OR</em>=0A=
* @param {HTMLElement} el		The element representing the Module=0A=
* @param {Object} userConfig	The configuration Object literal containing =
the configuration that should be set for this module. See configuration =
documentation for more details.=0A=
*/=0A=
YAHOO.widget.Module =3D function(el, userConfig) {=0A=
	if (el) {=0A=
		this.init(el, userConfig);=0A=
	} else {=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* Constant representing the prefix path to use for non-secure images=0A=
* @property YAHOO.widget.Module.IMG_ROOT=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Module.IMG_ROOT =3D null;=0A=
=0A=
/**=0A=
* Constant representing the prefix path to use for securely served images=0A=
* @property YAHOO.widget.Module.IMG_ROOT_SSL=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Module.IMG_ROOT_SSL =3D null;=0A=
=0A=
/**=0A=
* Constant for the default CSS class name that represents a Module=0A=
* @property YAHOO.widget.Module.CSS_MODULE=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Module.CSS_MODULE =3D "yui-module";=0A=
=0A=
/**=0A=
* Constant representing the module header=0A=
* @property YAHOO.widget.Module.CSS_HEADER=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Module.CSS_HEADER =3D "hd";=0A=
=0A=
/**=0A=
* Constant representing the module body=0A=
* @property YAHOO.widget.Module.CSS_BODY=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Module.CSS_BODY =3D "bd";=0A=
=0A=
/**=0A=
* Constant representing the module footer=0A=
* @property YAHOO.widget.Module.CSS_FOOTER=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Module.CSS_FOOTER =3D "ft";=0A=
=0A=
/**=0A=
* Constant representing the url for the "src" attribute of the iframe =
used to monitor changes to the browser's base font size=0A=
* @property YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL =3D "javascript:false;";=0A=
=0A=
/**=0A=
* Singleton CustomEvent fired when the font size is changed in the =
browser.=0A=
* Opera's "zoom" functionality currently does not support text size =
detection.=0A=
* @event YAHOO.widget.Module.textResizeEvent=0A=
*/=0A=
YAHOO.widget.Module.textResizeEvent =3D new =
YAHOO.util.CustomEvent("textResize");=0A=
=0A=
/**=0A=
* Constant representing the name of the Module's events=0A=
* @property YAHOO.widget.Module._EVENT_TYPES=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.Module._EVENT_TYPES =3D {=0A=
=0A=
    "BEFORE_INIT": "beforeInit",=0A=
    "INIT": "init",=0A=
    "APPEND": "append",=0A=
    "BEFORE_RENDER": "beforeRender",=0A=
    "RENDER": "render",=0A=
    "CHANGE_HEADER": "changeHeader",=0A=
    "CHANGE_BODY": "changeBody",=0A=
    "CHANGE_FOOTER": "changeFooter",=0A=
    "CHANGE_CONTENT": "changeContent",=0A=
    "DESTORY": "destroy",=0A=
    "BEFORE_SHOW": "beforeShow",=0A=
    "SHOW": "show",=0A=
    "BEFORE_HIDE": "beforeHide",=0A=
    "HIDE": "hide"=0A=
=0A=
};=0A=
    =0A=
/**=0A=
* Constant representing the Module's configuration properties=0A=
* @property YAHOO.widget.Module._DEFAULT_CONFIG=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.Module._DEFAULT_CONFIG =3D {=0A=
=0A=
    "VISIBLE": { =0A=
        key: "visible", =0A=
        value: true, =0A=
        validator: YAHOO.lang.isBoolean =0A=
    },=0A=
=0A=
    "EFFECT": { =0A=
        key: "effect", =0A=
        suppressEvent:true, =0A=
        supercedes:["visible"] =0A=
    },=0A=
=0A=
    "MONITOR_RESIZE": { =0A=
        key: "monitorresize", =0A=
        value:true  =0A=
    }=0A=
=0A=
};=0A=
=0A=
=0A=
YAHOO.widget.Module.prototype =3D {=0A=
=0A=
	/**=0A=
	* The class's constructor function=0A=
	* @property contructor=0A=
	* @type Function=0A=
	*/=0A=
	constructor : YAHOO.widget.Module,=0A=
=0A=
	/**=0A=
	* The main module element that contains the header, body, and footer=0A=
	* @property element=0A=
	* @type HTMLElement=0A=
	*/=0A=
	element : null,=0A=
=0A=
	/**=0A=
	* The header element, denoted with CSS class "hd"=0A=
	* @property header=0A=
	* @type HTMLElement=0A=
	*/=0A=
	header : null,=0A=
=0A=
	/**=0A=
	* The body element, denoted with CSS class "bd"=0A=
	* @property body=0A=
	* @type HTMLElement=0A=
	*/=0A=
	body : null,=0A=
=0A=
	/**=0A=
	* The footer element, denoted with CSS class "ft"=0A=
	* @property footer=0A=
	* @type HTMLElement=0A=
	*/=0A=
	footer : null,=0A=
=0A=
	/**=0A=
	* The id of the element=0A=
	* @property id=0A=
	* @type String=0A=
	*/=0A=
	id : null,=0A=
=0A=
	/**=0A=
	* The String representing the image root=0A=
	* @property imageRoot=0A=
	* @type String=0A=
	*/=0A=
	imageRoot : YAHOO.widget.Module.IMG_ROOT,=0A=
=0A=
	/**=0A=
	* Initializes the custom events for Module which are fired =
automatically at appropriate times by the Module class.=0A=
	* @method initEvents=0A=
	*/=0A=
	initEvents : function() {=0A=
=0A=
        var EVENT_TYPES =3D YAHOO.widget.Module._EVENT_TYPES;=0A=
=0A=
		/**=0A=
		* CustomEvent fired prior to class initalization.=0A=
		* @event beforeInitEvent=0A=
		* @param {class} classRef	class reference of the initializing class, =
such as this.beforeInitEvent.fire(YAHOO.widget.Module)=0A=
		*/=0A=
		this.beforeInitEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_INIT, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired after class initalization.=0A=
		* @event initEvent=0A=
		* @param {class} classRef	class reference of the initializing class, =
such as this.beforeInitEvent.fire(YAHOO.widget.Module)=0A=
		*/		=0A=
		this.initEvent =3D new YAHOO.util.CustomEvent(EVENT_TYPES.INIT, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired when the Module is appended to the DOM=0A=
		* @event appendEvent=0A=
		*/=0A=
		this.appendEvent =3D new YAHOO.util.CustomEvent(EVENT_TYPES.APPEND, =
this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired before the Module is rendered=0A=
		* @event beforeRenderEvent=0A=
		*/=0A=
		this.beforeRenderEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_RENDER, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired after the Module is rendered=0A=
		* @event renderEvent=0A=
		*/=0A=
		this.renderEvent =3D new YAHOO.util.CustomEvent(EVENT_TYPES.RENDER, =
this);=0A=
	=0A=
		/**=0A=
		* CustomEvent fired when the header content of the Module is modified=0A=
		* @event changeHeaderEvent=0A=
		* @param {String/HTMLElement} content	String/element representing the =
new header content=0A=
		*/=0A=
		this.changeHeaderEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_HEADER, this);=0A=
		=0A=
		/**=0A=
		* CustomEvent fired when the body content of the Module is modified=0A=
		* @event changeBodyEvent=0A=
		* @param {String/HTMLElement} content	String/element representing the =
new body content=0A=
		*/		=0A=
		this.changeBodyEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_BODY, this);=0A=
		=0A=
		/**=0A=
		* CustomEvent fired when the footer content of the Module is modified=0A=
		* @event changeFooterEvent=0A=
		* @param {String/HTMLElement} content	String/element representing the =
new footer content=0A=
		*/=0A=
		this.changeFooterEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_FOOTER, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired when the content of the Module is modified=0A=
		* @event changeContentEvent=0A=
		*/=0A=
		this.changeContentEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.CHANGE_CONTENT, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired when the Module is destroyed=0A=
		* @event destroyEvent=0A=
		*/=0A=
		this.destroyEvent =3D new YAHOO.util.CustomEvent(EVENT_TYPES.DESTORY, =
this);=0A=
		=0A=
		/**=0A=
		* CustomEvent fired before the Module is shown=0A=
		* @event beforeShowEvent=0A=
		*/=0A=
		this.beforeShowEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_SHOW, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired after the Module is shown=0A=
		* @event showEvent=0A=
		*/=0A=
		this.showEvent =3D new YAHOO.util.CustomEvent(EVENT_TYPES.SHOW, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired before the Module is hidden=0A=
		* @event beforeHideEvent=0A=
		*/=0A=
		this.beforeHideEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_HIDE, this);=0A=
=0A=
		/**=0A=
		* CustomEvent fired after the Module is hidden=0A=
		* @event hideEvent=0A=
		*/=0A=
		this.hideEvent =3D new YAHOO.util.CustomEvent(EVENT_TYPES.HIDE, this);=0A=
	}, =0A=
=0A=
	/**=0A=
	* String representing the current user-agent platform=0A=
	* @property platform=0A=
	* @type String=0A=
	*/=0A=
	platform : function() {=0A=
					var ua =3D navigator.userAgent.toLowerCase();=0A=
					if (ua.indexOf("windows") !=3D -1 || ua.indexOf("win32") !=3D -1) {=0A=
						return "windows";=0A=
					} else if (ua.indexOf("macintosh") !=3D -1) {=0A=
						return "mac";=0A=
					} else {=0A=
						return false;=0A=
					}=0A=
				}(),=0A=
=0A=
	/**=0A=
	* String representing the current user-agent browser=0A=
	* @property browser=0A=
	* @type String=0A=
	*/=0A=
	browser : function() {=0A=
			var ua =3D navigator.userAgent.toLowerCase();=0A=
				  if (ua.indexOf('opera')!=3D-1) { // Opera (check first in case of =
spoof)=0A=
					 return 'opera';=0A=
				  } else if (ua.indexOf('msie 7')!=3D-1) { // IE7=0A=
					 return 'ie7';=0A=
				  } else if (ua.indexOf('msie') !=3D-1) { // IE=0A=
					 return 'ie';=0A=
				  } else if (ua.indexOf('safari')!=3D-1) { // Safari (check before =
Gecko because it includes "like Gecko")=0A=
					 return 'safari';=0A=
				  } else if (ua.indexOf('gecko') !=3D -1) { // Gecko=0A=
					 return 'gecko';=0A=
				  } else {=0A=
					 return false;=0A=
				  }=0A=
			}(),=0A=
=0A=
	/**=0A=
	* Boolean representing whether or not the current browsing context is =
secure (https)=0A=
	* @property isSecure=0A=
	* @type Boolean=0A=
	*/=0A=
	isSecure : function() {=0A=
		if (window.location.href.toLowerCase().indexOf("https") =3D=3D=3D 0) {=0A=
			return true;=0A=
		} else {=0A=
			return false;=0A=
		}=0A=
	}(),=0A=
=0A=
	/**=0A=
	* Initializes the custom events for Module which are fired =
automatically at appropriate times by the Module class.=0A=
	*/=0A=
	initDefaultConfig : function() {=0A=
		// Add properties //=0A=
=0A=
    	var DEFAULT_CONFIG =3D YAHOO.widget.Module._DEFAULT_CONFIG;=0A=
=0A=
		/**=0A=
		* Specifies whether the Module is visible on the page.=0A=
		* @config visible=0A=
		* @type Boolean=0A=
		* @default true=0A=
		*/=0A=
		this.cfg.addProperty(=0A=
		          DEFAULT_CONFIG.VISIBLE.key, =0A=
		          {=0A=
		              handler: this.configVisible, =0A=
		              value: DEFAULT_CONFIG.VISIBLE.value, =0A=
		              validator: DEFAULT_CONFIG.VISIBLE.validator=0A=
                  }=0A=
              );=0A=
=0A=
		/**=0A=
		* Object or array of objects representing the ContainerEffect classes =
that are active for animating the container.=0A=
		* @config effect=0A=
		* @type Object=0A=
		* @default null=0A=
		*/=0A=
		this.cfg.addProperty(=0A=
                    DEFAULT_CONFIG.EFFECT.key, =0A=
                    {=0A=
                        suppressEvent: =
DEFAULT_CONFIG.EFFECT.suppressEvent, =0A=
                        supercedes: DEFAULT_CONFIG.EFFECT.supercedes=0A=
                    }=0A=
                );=0A=
=0A=
		/**=0A=
		* Specifies whether to create a special proxy iframe to monitor for =
user font resizing in the document=0A=
		* @config monitorresize=0A=
		* @type Boolean=0A=
		* @default true=0A=
		*/=0A=
		this.cfg.addProperty(=0A=
		          DEFAULT_CONFIG.MONITOR_RESIZE.key,=0A=
		          {=0A=
		              handler: this.configMonitorResize,=0A=
		              value: DEFAULT_CONFIG.MONITOR_RESIZE.value=0A=
                  }=0A=
              );=0A=
		=0A=
	},=0A=
=0A=
	/**=0A=
	* The Module class's initialization method, which is executed for =
Module and all of its subclasses. This method is automatically called by =
the constructor, and  sets up all DOM references for pre-existing =
markup, and creates required markup if it is not already present.=0A=
	* @method init=0A=
	* @param {String}	el	The element ID representing the Module <em>OR</em>=0A=
	* @param {HTMLElement}	el	The element representing the Module=0A=
	* @param {Object}	userConfig	The configuration Object literal =
containing the configuration that should be set for this module. See =
configuration documentation for more details.=0A=
	*/=0A=
	init : function(el, userConfig) {=0A=
=0A=
		this.initEvents();=0A=
=0A=
		this.beforeInitEvent.fire(YAHOO.widget.Module);=0A=
=0A=
		/**=0A=
		* The Module's Config object used for monitoring configuration =
properties.=0A=
		* @property cfg=0A=
		* @type YAHOO.util.Config=0A=
		*/=0A=
		this.cfg =3D new YAHOO.util.Config(this);=0A=
=0A=
		if (this.isSecure) {=0A=
			this.imageRoot =3D YAHOO.widget.Module.IMG_ROOT_SSL;=0A=
		}=0A=
=0A=
		if (typeof el =3D=3D "string") {=0A=
			var elId =3D el;=0A=
=0A=
			el =3D document.getElementById(el);=0A=
			if (! el) {=0A=
				el =3D document.createElement("div");=0A=
				el.id =3D elId;=0A=
			}=0A=
		}=0A=
=0A=
		this.element =3D el;=0A=
=0A=
		if (el.id) {=0A=
			this.id =3D el.id;=0A=
		}=0A=
=0A=
		var childNodes =3D this.element.childNodes;=0A=
=0A=
		if (childNodes) {=0A=
			for (var i=3D0;i<childNodes.length;i++) {=0A=
				var child =3D childNodes[i];=0A=
				switch (child.className) {=0A=
					case YAHOO.widget.Module.CSS_HEADER:=0A=
						this.header =3D child;=0A=
						break;=0A=
					case YAHOO.widget.Module.CSS_BODY:=0A=
						this.body =3D child;=0A=
						break;=0A=
					case YAHOO.widget.Module.CSS_FOOTER:=0A=
						this.footer =3D child;=0A=
						break;=0A=
				}=0A=
			}=0A=
		}=0A=
=0A=
		this.initDefaultConfig();=0A=
=0A=
		YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Module.CSS_MODULE);=0A=
=0A=
		if (userConfig) {=0A=
			this.cfg.applyConfig(userConfig, true);=0A=
		}=0A=
=0A=
		// Subscribe to the fireQueue() method of Config so that any queued =
configuration changes are=0A=
		// excecuted upon render of the Module=0A=
		if (! YAHOO.util.Config.alreadySubscribed(this.renderEvent, =
this.cfg.fireQueue, this.cfg)) {=0A=
			this.renderEvent.subscribe(this.cfg.fireQueue, this.cfg, true);=0A=
		}=0A=
=0A=
		this.initEvent.fire(YAHOO.widget.Module);=0A=
	},=0A=
=0A=
	/**=0A=
	* Initialized an empty IFRAME that is placed out of the visible area =
that can be used to detect text resize.=0A=
	* @method initResizeMonitor=0A=
	*/=0A=
	initResizeMonitor : function() {=0A=
=0A=
        if(this.browser !=3D "opera") {=0A=
=0A=
            var resizeMonitor =3D =
document.getElementById("_yuiResizeMonitor");=0A=
=0A=
            if (! resizeMonitor) {=0A=
=0A=
                resizeMonitor =3D document.createElement("iframe");=0A=
=0A=
                var bIE =3D (this.browser.indexOf("ie") =3D=3D=3D 0);=0A=
=0A=
                if(this.isSecure && =
YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL && bIE) {=0A=
                   resizeMonitor.src =3D =
YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL;=0A=
                }=0A=
=0A=
                resizeMonitor.id =3D "_yuiResizeMonitor";=0A=
                resizeMonitor.style.visibility =3D "hidden";=0A=
=0A=
                document.body.appendChild(resizeMonitor);=0A=
=0A=
                resizeMonitor.style.width =3D "10em";=0A=
                resizeMonitor.style.height =3D "10em";=0A=
                resizeMonitor.style.position =3D "absolute";=0A=
=0A=
                var nLeft =3D -1 * resizeMonitor.offsetWidth;=0A=
                var nTop =3D -1 * resizeMonitor.offsetHeight;=0A=
=0A=
                resizeMonitor.style.top =3D nTop + "px";=0A=
                resizeMonitor.style.left =3D nLeft + "px";=0A=
                resizeMonitor.style.borderStyle =3D "none";=0A=
                resizeMonitor.style.borderWidth =3D "0";=0A=
                YAHOO.util.Dom.setStyle(resizeMonitor, "opacity", "0");=0A=
=0A=
                resizeMonitor.style.visibility =3D "visible";=0A=
=0A=
                if(!bIE) {=0A=
=0A=
                    var doc =3D resizeMonitor.contentWindow.document;=0A=
=0A=
                    doc.open();=0A=
                    doc.close();=0A=
=0A=
                }=0A=
            }=0A=
=0A=
			var fireTextResize =3D function() {=0A=
				YAHOO.widget.Module.textResizeEvent.fire();=0A=
			};=0A=
=0A=
            if(resizeMonitor && resizeMonitor.contentWindow) {=0A=
                this.resizeMonitor =3D resizeMonitor;=0A=
=0A=
				YAHOO.widget.Module.textResizeEvent.subscribe(this.onDomResize, =
this, true);=0A=
=0A=
				if (! YAHOO.widget.Module.textResizeInitialized) {=0A=
					if (! =
YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow, "resize", =
fireTextResize)) {=0A=
						// This will fail in IE if document.domain has changed, so we must =
change the listener to=0A=
						// use the resizeMonitor element instead=0A=
						YAHOO.util.Event.addListener(this.resizeMonitor, "resize", =
fireTextResize);=0A=
					}=0A=
					YAHOO.widget.Module.textResizeInitialized =3D true;=0A=
				}=0A=
            }=0A=
=0A=
        }=0A=
=0A=
	},=0A=
=0A=
	/**=0A=
	* Event handler fired when the resize monitor element is resized.=0A=
	* @method onDomResize=0A=
	* @param {DOMEvent} e	The DOM resize event=0A=
	* @param {Object} obj	The scope object passed to the handler=0A=
	*/=0A=
	onDomResize : function(e, obj) {=0A=
=0A=
        var nLeft =3D -1 * this.resizeMonitor.offsetWidth,=0A=
            nTop =3D -1 * this.resizeMonitor.offsetHeight;=0A=
=0A=
        this.resizeMonitor.style.top =3D nTop + "px";=0A=
        this.resizeMonitor.style.left =3D  nLeft + "px";=0A=
=0A=
	},=0A=
=0A=
	/**=0A=
	* Sets the Module's header content to the HTML specified, or appends =
the passed element to the header. If no header is present, one will be =
automatically created.=0A=
	* @method setHeader=0A=
	* @param {String}	headerContent	The HTML used to set the header =
<em>OR</em>=0A=
	* @param {HTMLElement}	headerContent	The HTMLElement to append to the =
header=0A=
	*/=0A=
	setHeader : function(headerContent) {=0A=
		if (! this.header) {=0A=
			this.header =3D document.createElement("div");=0A=
			this.header.className =3D YAHOO.widget.Module.CSS_HEADER;=0A=
		}=0A=
=0A=
		if (typeof headerContent =3D=3D "string") {=0A=
			this.header.innerHTML =3D headerContent;=0A=
		} else {=0A=
			this.header.innerHTML =3D "";=0A=
			this.header.appendChild(headerContent);=0A=
		}=0A=
=0A=
		this.changeHeaderEvent.fire(headerContent);=0A=
		this.changeContentEvent.fire();=0A=
	},=0A=
=0A=
	/**=0A=
	* Appends the passed element to the header. If no header is present, =
one will be automatically created.=0A=
	* @method appendToHeader=0A=
	* @param {HTMLElement}	element	The element to append to the header=0A=
	*/=0A=
	appendToHeader : function(element) {=0A=
		if (! this.header) {=0A=
			this.header =3D document.createElement("div");=0A=
			this.header.className =3D YAHOO.widget.Module.CSS_HEADER;=0A=
		}=0A=
=0A=
		this.header.appendChild(element);=0A=
		this.changeHeaderEvent.fire(element);=0A=
		this.changeContentEvent.fire();=0A=
	},=0A=
=0A=
	/**=0A=
	* Sets the Module's body content to the HTML specified, or appends the =
passed element to the body. If no body is present, one will be =
automatically created.=0A=
	* @method setBody=0A=
	* @param {String}	bodyContent	The HTML used to set the body <em>OR</em>=0A=
	* @param {HTMLElement}	bodyContent	The HTMLElement to append to the body=0A=
	*/=0A=
	setBody : function(bodyContent) {=0A=
		if (! this.body) {=0A=
			this.body =3D document.createElement("div");=0A=
			this.body.className =3D YAHOO.widget.Module.CSS_BODY;=0A=
		}=0A=
=0A=
		if (typeof bodyContent =3D=3D "string")=0A=
		{=0A=
			this.body.innerHTML =3D bodyContent;=0A=
		} else {=0A=
			this.body.innerHTML =3D "";=0A=
			this.body.appendChild(bodyContent);=0A=
		}=0A=
=0A=
		this.changeBodyEvent.fire(bodyContent);=0A=
		this.changeContentEvent.fire();=0A=
	},=0A=
=0A=
	/**=0A=
	* Appends the passed element to the body. If no body is present, one =
will be automatically created.=0A=
	* @method appendToBody=0A=
	* @param {HTMLElement}	element	The element to append to the body=0A=
	*/=0A=
	appendToBody : function(element) {=0A=
		if (! this.body) {=0A=
			this.body =3D document.createElement("div");=0A=
			this.body.className =3D YAHOO.widget.Module.CSS_BODY;=0A=
		}=0A=
=0A=
		this.body.appendChild(element);=0A=
		this.changeBodyEvent.fire(element);=0A=
		this.changeContentEvent.fire();=0A=
	},=0A=
=0A=
	/**=0A=
	* Sets the Module's footer content to the HTML specified, or appends =
the passed element to the footer. If no footer is present, one will be =
automatically created.=0A=
	* @method setFooter=0A=
	* @param {String}	footerContent	The HTML used to set the footer =
<em>OR</em>=0A=
	* @param {HTMLElement}	footerContent	The HTMLElement to append to the =
footer=0A=
	*/=0A=
	setFooter : function(footerContent) {=0A=
		if (! this.footer) {=0A=
			this.footer =3D document.createElement("div");=0A=
			this.footer.className =3D YAHOO.widget.Module.CSS_FOOTER;=0A=
		}=0A=
=0A=
		if (typeof footerContent =3D=3D "string") {=0A=
			this.footer.innerHTML =3D footerContent;=0A=
		} else {=0A=
			this.footer.innerHTML =3D "";=0A=
			this.footer.appendChild(footerContent);=0A=
		}=0A=
=0A=
		this.changeFooterEvent.fire(footerContent);=0A=
		this.changeContentEvent.fire();=0A=
	},=0A=
=0A=
	/**=0A=
	* Appends the passed element to the footer. If no footer is present, =
one will be automatically created.=0A=
	* @method appendToFooter=0A=
	* @param {HTMLElement}	element	The element to append to the footer=0A=
	*/=0A=
	appendToFooter : function(element) {=0A=
		if (! this.footer) {=0A=
			this.footer =3D document.createElement("div");=0A=
			this.footer.className =3D YAHOO.widget.Module.CSS_FOOTER;=0A=
		}=0A=
=0A=
		this.footer.appendChild(element);=0A=
		this.changeFooterEvent.fire(element);=0A=
		this.changeContentEvent.fire();=0A=
	},=0A=
=0A=
	/**=0A=
	* Renders the Module by inserting the elements that are not already in =
the main Module into their correct places. Optionally appends the Module =
to the specified node prior to the render's execution. NOTE: For Modules =
without existing markup, the appendToNode argument is REQUIRED. If this =
argument is ommitted and the current element is not present in the =
document, the function will return false, indicating that the render was =
a failure.=0A=
	* @method render=0A=
	* @param {String}	appendToNode	The element id to which the Module =
should be appended to prior to rendering <em>OR</em>=0A=
	* @param {HTMLElement}	appendToNode	The element to which the Module =
should be appended to prior to rendering=0A=
	* @param {HTMLElement}	moduleElement	OPTIONAL. The element that =
represents the actual Standard Module container.=0A=
	* @return {Boolean} Success or failure of the render=0A=
	*/=0A=
	render : function(appendToNode, moduleElement) {=0A=
		this.beforeRenderEvent.fire();=0A=
=0A=
		if (! moduleElement) {=0A=
			moduleElement =3D this.element;=0A=
		}=0A=
=0A=
		var me =3D this;=0A=
		var appendTo =3D function(element) {=0A=
			if (typeof element =3D=3D "string") {=0A=
				element =3D document.getElementById(element);=0A=
			}=0A=
=0A=
			if (element) {=0A=
				element.appendChild(me.element);=0A=
				me.appendEvent.fire();=0A=
			}=0A=
		};=0A=
=0A=
		if (appendToNode) {=0A=
			appendTo(appendToNode);=0A=
		} else { // No node was passed in. If the element is not pre-marked =
up, this fails=0A=
			if (! YAHOO.util.Dom.inDocument(this.element)) {=0A=
				return false;=0A=
			}=0A=
		}=0A=
=0A=
		// Need to get everything into the DOM if it isn't already=0A=
=0A=
		if (this.header && ! YAHOO.util.Dom.inDocument(this.header)) {=0A=
			// There is a header, but it's not in the DOM yet... need to add it=0A=
			var firstChild =3D moduleElement.firstChild;=0A=
			if (firstChild) { // Insert before first child if exists=0A=
				moduleElement.insertBefore(this.header, firstChild);=0A=
			} else { // Append to empty body because there are no children=0A=
				moduleElement.appendChild(this.header);=0A=
			}=0A=
		}=0A=
=0A=
		if (this.body && ! YAHOO.util.Dom.inDocument(this.body)) {=0A=
			// There is a body, but it's not in the DOM yet... need to add it=0A=
			if (this.footer && YAHOO.util.Dom.isAncestor(this.moduleElement, =
this.footer)) { // Insert before footer if exists in DOM=0A=
				moduleElement.insertBefore(this.body, this.footer);=0A=
			} else { // Append to element because there is no footer=0A=
				moduleElement.appendChild(this.body);=0A=
			}=0A=
		}=0A=
=0A=
		if (this.footer && ! YAHOO.util.Dom.inDocument(this.footer)) {=0A=
			// There is a footer, but it's not in the DOM yet... need to add it=0A=
			moduleElement.appendChild(this.footer);=0A=
		}=0A=
=0A=
		this.renderEvent.fire();=0A=
		return true;=0A=
	},=0A=
=0A=
	/**=0A=
	* Removes the Module element from the DOM and sets all child elements =
to null.=0A=
	* @method destroy=0A=
	*/=0A=
	destroy : function() {=0A=
		var parent;=0A=
=0A=
		if (this.element) {=0A=
			YAHOO.util.Event.purgeElement(this.element, true);=0A=
			parent =3D this.element.parentNode;=0A=
		}=0A=
		if (parent) {=0A=
			parent.removeChild(this.element);=0A=
		}=0A=
=0A=
		this.element =3D null;=0A=
		this.header =3D null;=0A=
		this.body =3D null;=0A=
		this.footer =3D null;=0A=
=0A=
		for (var e in this) {=0A=
			if (e instanceof YAHOO.util.CustomEvent) {=0A=
				e.unsubscribeAll();=0A=
			}=0A=
		}=0A=
=0A=
		YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, =
this);=0A=
=0A=
		this.destroyEvent.fire();=0A=
	},=0A=
=0A=
	/**=0A=
	* Shows the Module element by setting the visible configuration =
property to true. Also fires two events: beforeShowEvent prior to the =
visibility change, and showEvent after.=0A=
	* @method show=0A=
	*/=0A=
	show : function() {=0A=
		this.cfg.setProperty("visible", true);=0A=
	},=0A=
=0A=
	/**=0A=
	* Hides the Module element by setting the visible configuration =
property to false. Also fires two events: beforeHideEvent prior to the =
visibility change, and hideEvent after.=0A=
	* @method hide=0A=
	*/=0A=
	hide : function() {=0A=
		this.cfg.setProperty("visible", false);=0A=
	},=0A=
=0A=
	// BUILT-IN EVENT HANDLERS FOR MODULE //=0A=
=0A=
	/**=0A=
	* Default event handler for changing the visibility property of a =
Module. By default, this is achieved by switching the "display" style =
between "block" and "none".=0A=
	* This method is responsible for firing showEvent and hideEvent.=0A=
	* @param {String} type	The CustomEvent type (usually the property name)=0A=
	* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
	* @param {Object} obj	The scope object. For configuration handlers, =
this will usually equal the owner.=0A=
	* @method configVisible=0A=
	*/=0A=
	configVisible : function(type, args, obj) {=0A=
		var visible =3D args[0];=0A=
		if (visible) {=0A=
			this.beforeShowEvent.fire();=0A=
			YAHOO.util.Dom.setStyle(this.element, "display", "block");=0A=
			this.showEvent.fire();=0A=
		} else {=0A=
			this.beforeHideEvent.fire();=0A=
			YAHOO.util.Dom.setStyle(this.element, "display", "none");=0A=
			this.hideEvent.fire();=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Default event handler for the "monitorresize" configuration property=0A=
	* @param {String} type	The CustomEvent type (usually the property name)=0A=
	* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
	* @param {Object} obj	The scope object. For configuration handlers, =
this will usually equal the owner.=0A=
	* @method configMonitorResize=0A=
	*/=0A=
	configMonitorResize : function(type, args, obj) {=0A=
		var monitor =3D args[0];=0A=
		if (monitor) {=0A=
			this.initResizeMonitor();=0A=
		} else {=0A=
			YAHOO.widget.Module.textResizeEvent.unsubscribe(this.onDomResize, =
this, true);=0A=
			this.resizeMonitor =3D null;=0A=
		}=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* Returns a String representation of the Object.=0A=
* @method toString=0A=
* @return {String}	The string representation of the Module=0A=
*/=0A=
YAHOO.widget.Module.prototype.toString =3D function() {=0A=
	return "Module " + this.id;=0A=
};=0A=
/**=0A=
* Overlay is a Module that is absolutely positioned above the page flow. =
It has convenience methods for positioning and sizing, as well as =
options for controlling zIndex and constraining the Overlay's position =
to the current visible viewport. Overlay also contains a dynamicly =
generated IFRAME which is placed beneath it for Internet Explorer 6 and =
5.x so that it will be properly rendered above SELECT elements.=0A=
* @namespace YAHOO.widget=0A=
* @class Overlay=0A=
* @extends YAHOO.widget.Module=0A=
* @param {String}	el	The element ID representing the Overlay <em>OR</em>=0A=
* @param {HTMLElement}	el	The element representing the Overlay=0A=
* @param {Object}	userConfig	The configuration object literal containing =
10/23/2006the configuration that should be set for this Overlay. See =
configuration documentation for more details.=0A=
* @constructor=0A=
*/=0A=
YAHOO.widget.Overlay =3D function(el, userConfig) {=0A=
	YAHOO.widget.Overlay.superclass.constructor.call(this, el, userConfig);=0A=
};=0A=
=0A=
YAHOO.extend(YAHOO.widget.Overlay, YAHOO.widget.Module);=0A=
=0A=
/**=0A=
* Constant representing the name of the Overlay's events=0A=
* @property YAHOO.widget.Overlay._EVENT_TYPES=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.Overlay._EVENT_TYPES =3D {=0A=
=0A=
    "BEFORE_MOVE": "beforeMove",=0A=
    "MOVE": "move"=0A=
=0A=
};=0A=
=0A=
/**=0A=
* Constant representing the Overlay's configuration properties=0A=
* @property YAHOO.widget.Overlay._DEFAULT_CONFIG=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.Overlay._DEFAULT_CONFIG =3D {=0A=
=0A=
    "X": { =0A=
        key: "x", =0A=
        validator:YAHOO.lang.isNumber, =0A=
        suppressEvent:true, supercedes:["iframe"] =0A=
    },=0A=
=0A=
    "Y": { =0A=
        key: "y", =0A=
        validator:YAHOO.lang.isNumber, =0A=
        suppressEvent:true, supercedes:["iframe"] =0A=
    },=0A=
=0A=
    "XY": { =0A=
        key: "xy", =0A=
        suppressEvent:true, =0A=
        supercedes:["iframe"] =0A=
    },=0A=
=0A=
    "CONTEXT": { =0A=
        key: "context", =0A=
        suppressEvent:true, =0A=
        supercedes:["iframe"] =0A=
    },=0A=
=0A=
    "FIXED_CENTER": { =0A=
        key: "fixedcenter", =0A=
        value:false, =0A=
        validator:YAHOO.lang.isBoolean, =0A=
        supercedes:["iframe","visible"] =0A=
    },=0A=
=0A=
    "WIDTH": { =0A=
        key: "width", =0A=
        suppressEvent:true, =0A=
        supercedes:["iframe"] =0A=
    }, =0A=
=0A=
    "HEIGHT": { =0A=
        key: "height", =0A=
        suppressEvent:true, =0A=
        supercedes:["iframe"] =0A=
    }, =0A=
=0A=
    "ZINDEX": { =0A=
        key: "zindex", =0A=
        value:null =0A=
    }, =0A=
=0A=
    "CONSTRAIN_TO_VIEWPORT": { =0A=
        key: "constraintoviewport", =0A=
        value:false, =0A=
        validator:YAHOO.lang.isBoolean, =0A=
        supercedes:["iframe","x","y","xy"] =0A=
    }, =0A=
=0A=
    "IFRAME": { =0A=
        key: "iframe", =0A=
        value:(YAHOO.widget.Module.prototype.browser =3D=3D "ie" ? true =
: false), =0A=
        validator:YAHOO.lang.isBoolean, =0A=
        supercedes:["zIndex"] =0A=
    }=0A=
=0A=
};=0A=
=0A=
/**=0A=
* The URL that will be placed in the iframe=0A=
* @property YAHOO.widget.Overlay.IFRAME_SRC=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Overlay.IFRAME_SRC =3D "javascript:false;";=0A=
=0A=
/**=0A=
* Constant representing the top left corner of an element, used for =
configuring the context element alignment=0A=
* @property YAHOO.widget.Overlay.TOP_LEFT=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Overlay.TOP_LEFT =3D "tl";=0A=
=0A=
/**=0A=
* Constant representing the top right corner of an element, used for =
configuring the context element alignment=0A=
* @property YAHOO.widget.Overlay.TOP_RIGHT=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Overlay.TOP_RIGHT =3D "tr";=0A=
=0A=
/**=0A=
* Constant representing the top bottom left corner of an element, used =
for configuring the context element alignment=0A=
* @property YAHOO.widget.Overlay.BOTTOM_LEFT=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Overlay.BOTTOM_LEFT =3D "bl";=0A=
=0A=
/**=0A=
* Constant representing the bottom right corner of an element, used for =
configuring the context element alignment=0A=
* @property YAHOO.widget.Overlay.BOTTOM_RIGHT=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Overlay.BOTTOM_RIGHT =3D "br";=0A=
=0A=
/**=0A=
* Constant representing the default CSS class used for an Overlay=0A=
* @property YAHOO.widget.Overlay.CSS_OVERLAY=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.Overlay.CSS_OVERLAY =3D "yui-overlay";=0A=
=0A=
/**=0A=
* The Overlay initialization method, which is executed for Overlay and =
all of its subclasses. This method is automatically called by the =
constructor, and  sets up all DOM references for pre-existing markup, =
and creates required markup if it is not already present.=0A=
* @method init=0A=
* @param {String}	el	The element ID representing the Overlay <em>OR</em>=0A=
* @param {HTMLElement}	el	The element representing the Overlay=0A=
* @param {Object}	userConfig	The configuration object literal containing =
the configuration that should be set for this Overlay. See configuration =
documentation for more details.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.init =3D function(el, userConfig) {=0A=
	YAHOO.widget.Overlay.superclass.init.call(this, el/*, userConfig*/);  =
// Note that we don't pass the user config in here yet because we only =
want it executed once, at the lowest subclass level=0A=
=0A=
	this.beforeInitEvent.fire(YAHOO.widget.Overlay);=0A=
=0A=
	YAHOO.util.Dom.addClass(this.element, YAHOO.widget.Overlay.CSS_OVERLAY);=0A=
=0A=
	if (userConfig) {=0A=
		this.cfg.applyConfig(userConfig, true);=0A=
	}=0A=
=0A=
	if (this.platform =3D=3D "mac" && this.browser =3D=3D "gecko") {=0A=
		if (! =
YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrol=
lbars,this)) {=0A=
			this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);=0A=
		}=0A=
		if (! =
YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrol=
lbars,this)) {=0A=
			this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);=0A=
		}=0A=
	}=0A=
=0A=
	this.initEvent.fire(YAHOO.widget.Overlay);=0A=
=0A=
};=0A=
=0A=
/**=0A=
* Initializes the custom events for Overlay which are fired =
automatically at appropriate times by the Overlay class.=0A=
* @method initEvents=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.initEvents =3D function() {=0A=
	YAHOO.widget.Overlay.superclass.initEvents.call(this);=0A=
=0A=
    var EVENT_TYPES =3D YAHOO.widget.Overlay._EVENT_TYPES;=0A=
=0A=
	/**=0A=
	* CustomEvent fired before the Overlay is moved.=0A=
	* @event beforeMoveEvent=0A=
	* @param {Number} x	x coordinate=0A=
	* @param {Number} y	y coordinate=0A=
	*/=0A=
	this.beforeMoveEvent =3D new =
YAHOO.util.CustomEvent(EVENT_TYPES.BEFORE_MOVE, this);=0A=
=0A=
	/**=0A=
	* CustomEvent fired after the Overlay is moved.=0A=
	* @event moveEvent=0A=
	* @param {Number} x	x coordinate=0A=
	* @param {Number} y	y coordinate=0A=
	*/=0A=
	this.moveEvent =3D new YAHOO.util.CustomEvent(EVENT_TYPES.MOVE, this);=0A=
};=0A=
=0A=
/**=0A=
* Initializes the class's configurable properties which can be changed =
using the Overlay's Config object (cfg).=0A=
* @method initDefaultConfig=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.initDefaultConfig =3D function() {=0A=
	YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);=0A=
=0A=
=0A=
	// Add overlay config properties //=0A=
=0A=
    var DEFAULT_CONFIG =3D YAHOO.widget.Overlay._DEFAULT_CONFIG;=0A=
=0A=
	/**=0A=
	* The absolute x-coordinate position of the Overlay=0A=
	* @config x=0A=
	* @type Number=0A=
	* @default null=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.X.key, =0A=
	           { =0A=
	               handler: this.configX, =0A=
	               validator: DEFAULT_CONFIG.X.validator, =0A=
	               suppressEvent: DEFAULT_CONFIG.X.suppressEvent, =0A=
	               supercedes: DEFAULT_CONFIG.X.supercedes=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* The absolute y-coordinate position of the Overlay=0A=
	* @config y=0A=
	* @type Number=0A=
	* @default null=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.Y.key,=0A=
	           {=0A=
	               handler: this.configY, =0A=
	               validator: DEFAULT_CONFIG.Y.validator, =0A=
	               suppressEvent: DEFAULT_CONFIG.Y.suppressEvent, =0A=
	               supercedes: DEFAULT_CONFIG.Y.supercedes=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* An array with the absolute x and y positions of the Overlay=0A=
	* @config xy=0A=
	* @type Number[]=0A=
	* @default null=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.XY.key,=0A=
	           {=0A=
	               handler: this.configXY, =0A=
	               suppressEvent: DEFAULT_CONFIG.XY.suppressEvent, =0A=
	               supercedes: DEFAULT_CONFIG.XY.supercedes=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* The array of context arguments for context-sensitive positioning. The =
format is: [id or element, element corner, context corner]. For example, =
setting this property to ["img1", "tl", "bl"] would align the Overlay's =
top left corner to the context element's bottom left corner.=0A=
	* @config context=0A=
	* @type Array=0A=
	* @default null=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.CONTEXT.key,=0A=
	           {=0A=
	               handler: this.configContext, =0A=
	               suppressEvent: DEFAULT_CONFIG.CONTEXT.suppressEvent, =0A=
	               supercedes: DEFAULT_CONFIG.CONTEXT.supercedes=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* True if the Overlay should be anchored to the center of the viewport.=0A=
	* @config fixedcenter=0A=
	* @type Boolean=0A=
	* @default false=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
               DEFAULT_CONFIG.FIXED_CENTER.key, =0A=
               {=0A=
                    handler: this.configFixedCenter,=0A=
                    value: DEFAULT_CONFIG.FIXED_CENTER.value, =0A=
                    validator: DEFAULT_CONFIG.FIXED_CENTER.validator, =0A=
                    supercedes: DEFAULT_CONFIG.FIXED_CENTER.supercedes=0A=
                }=0A=
            );=0A=
=0A=
	/**=0A=
	* CSS width of the Overlay.=0A=
	* @config width=0A=
	* @type String=0A=
	* @default null=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.WIDTH.key,=0A=
	           {=0A=
	               handler: this.configWidth, =0A=
	               suppressEvent: DEFAULT_CONFIG.WIDTH.suppressEvent, =0A=
	               supercedes: DEFAULT_CONFIG.WIDTH.supercedes=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* CSS height of the Overlay.=0A=
	* @config height=0A=
	* @type String=0A=
	* @default null=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.HEIGHT.key, =0A=
	           {=0A=
	               handler: this.configHeight, =0A=
	               suppressEvent: DEFAULT_CONFIG.HEIGHT.suppressEvent, =0A=
	               supercedes: DEFAULT_CONFIG.HEIGHT.supercedes=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* CSS z-index of the Overlay.=0A=
	* @config zIndex=0A=
	* @type Number=0A=
	* @default null=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.ZINDEX.key, =0A=
	           {=0A=
	               handler: this.configzIndex,=0A=
	               value: DEFAULT_CONFIG.ZINDEX.value=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* True if the Overlay should be prevented from being positioned out of =
the viewport.=0A=
	* @config constraintoviewport=0A=
	* @type Boolean=0A=
	* @default false=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key, =0A=
	           {=0A=
	               handler: this.configConstrainToViewport, =0A=
	               value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value, =0A=
	               validator: =
DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator, =0A=
	               supercedes: =
DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes=0A=
               }=0A=
           );=0A=
=0A=
	/**=0A=
	* True if the Overlay should have an IFRAME shim (for correcting the =
select z-index bug in IE6 and below).=0A=
	* @config iframe=0A=
	* @type Boolean=0A=
	* @default true for IE6 and below, false for all others=0A=
	*/=0A=
	this.cfg.addProperty(=0A=
	           DEFAULT_CONFIG.IFRAME.key, =0A=
	           {=0A=
	               handler: this.configIframe, =0A=
	               value: DEFAULT_CONFIG.IFRAME.value, =0A=
	               validator: DEFAULT_CONFIG.IFRAME.validator, =0A=
	               supercedes: DEFAULT_CONFIG.IFRAME.supercedes=0A=
	           }=0A=
           );=0A=
=0A=
};=0A=
=0A=
/**=0A=
* Moves the Overlay to the specified position. This function is =
identical to calling this.cfg.setProperty("xy", [x,y]);=0A=
* @method moveTo=0A=
* @param {Number}	x	The Overlay's new x position=0A=
* @param {Number}	y	The Overlay's new y position=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.moveTo =3D function(x, y) {=0A=
	this.cfg.setProperty("xy",[x,y]);=0A=
};=0A=
=0A=
/**=0A=
* Adds a special CSS class to the Overlay when Mac/Gecko is in use, to =
work around a Gecko bug where=0A=
* scrollbars cannot be hidden. See =
https://bugzilla.mozilla.org/show_bug.cgi?id=3D187435=0A=
* @method hideMacGeckoScrollbars=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars =3D function() {=0A=
	YAHOO.util.Dom.removeClass(this.element, "show-scrollbars");=0A=
	YAHOO.util.Dom.addClass(this.element, "hide-scrollbars");=0A=
};=0A=
=0A=
/**=0A=
* Removes a special CSS class from the Overlay when Mac/Gecko is in use, =
to work around a Gecko bug where=0A=
* scrollbars cannot be hidden. See =
https://bugzilla.mozilla.org/show_bug.cgi?id=3D187435=0A=
* @method showMacGeckoScrollbars=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars =3D function() {=0A=
	YAHOO.util.Dom.removeClass(this.element, "hide-scrollbars");=0A=
	YAHOO.util.Dom.addClass(this.element, "show-scrollbars");=0A=
};=0A=
=0A=
// BEGIN BUILT-IN PROPERTY EVENT HANDLERS //=0A=
=0A=
/**=0A=
* The default event handler fired when the "visible" property is =
changed. This method is responsible for firing showEvent and hideEvent.=0A=
* @method configVisible=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configVisible =3D function(type, args, =
obj) {=0A=
	var visible =3D args[0];=0A=
	var currentVis =3D YAHOO.util.Dom.getStyle(this.element, "visibility");=0A=
=0A=
	if (currentVis =3D=3D "inherit") {=0A=
		var e =3D this.element.parentNode;=0A=
		while (e.nodeType !=3D 9 && e.nodeType !=3D 11) {=0A=
			currentVis =3D YAHOO.util.Dom.getStyle(e, "visibility");=0A=
			if (currentVis !=3D "inherit") { break; }=0A=
			e =3D e.parentNode;=0A=
		}=0A=
		if (currentVis =3D=3D "inherit") {=0A=
			currentVis =3D "visible";=0A=
		}=0A=
	}=0A=
=0A=
	var effect =3D this.cfg.getProperty("effect");=0A=
=0A=
	var effectInstances =3D [];=0A=
	if (effect) {=0A=
		if (effect instanceof Array) {=0A=
			for (var i=3D0;i<effect.length;i++) {=0A=
				var eff =3D effect[i];=0A=
				effectInstances[effectInstances.length] =3D eff.effect(this, =
eff.duration);=0A=
			}=0A=
		} else {=0A=
			effectInstances[effectInstances.length] =3D effect.effect(this, =
effect.duration);=0A=
		}=0A=
	}=0A=
=0A=
	var isMacGecko =3D (this.platform =3D=3D "mac" && this.browser =3D=3D =
"gecko");=0A=
=0A=
	if (visible) { // Show=0A=
		if (isMacGecko) {=0A=
			this.showMacGeckoScrollbars();=0A=
		}=0A=
=0A=
		if (effect) { // Animate in=0A=
			if (visible) { // Animate in if not showing=0A=
				if (currentVis !=3D "visible" || currentVis =3D=3D=3D "") {=0A=
					this.beforeShowEvent.fire();=0A=
					for (var j=3D0;j<effectInstances.length;j++) {=0A=
						var ei =3D effectInstances[j];=0A=
						if (j =3D=3D=3D 0 && ! =
YAHOO.util.Config.alreadySubscribed(ei.animateInCompleteEvent,this.showEv=
ent.fire,this.showEvent)) {=0A=
							=
ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,tr=
ue); // Delegate showEvent until end of animateInComplete=0A=
						}=0A=
						ei.animateIn();=0A=
					}=0A=
				}=0A=
			}=0A=
		} else { // Show=0A=
			if (currentVis !=3D "visible" || currentVis =3D=3D=3D "") {=0A=
				this.beforeShowEvent.fire();=0A=
				YAHOO.util.Dom.setStyle(this.element, "visibility", "visible");=0A=
				this.cfg.refireEvent("iframe");=0A=
				this.showEvent.fire();=0A=
			}=0A=
		}=0A=
=0A=
	} else { // Hide=0A=
		if (isMacGecko) {=0A=
			this.hideMacGeckoScrollbars();=0A=
		}=0A=
=0A=
		if (effect) { // Animate out if showing=0A=
			if (currentVis =3D=3D "visible") {=0A=
				this.beforeHideEvent.fire();=0A=
				for (var k=3D0;k<effectInstances.length;k++) {=0A=
					var h =3D effectInstances[k];=0A=
					if (k =3D=3D=3D 0 && ! =
YAHOO.util.Config.alreadySubscribed(h.animateOutCompleteEvent,this.hideEv=
ent.fire,this.hideEvent)) {=0A=
						=
h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,tr=
ue); // Delegate hideEvent until end of animateOutComplete=0A=
					}=0A=
					h.animateOut();=0A=
				}=0A=
			} else if (currentVis =3D=3D=3D "") {=0A=
				YAHOO.util.Dom.setStyle(this.element, "visibility", "hidden");=0A=
			}=0A=
		} else { // Simple hide=0A=
			if (currentVis =3D=3D "visible" || currentVis =3D=3D=3D "") {=0A=
				this.beforeHideEvent.fire();=0A=
				YAHOO.util.Dom.setStyle(this.element, "visibility", "hidden");=0A=
				this.cfg.refireEvent("iframe");=0A=
				this.hideEvent.fire();=0A=
			}=0A=
		}=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* Center event handler used for centering on scroll/resize, but only if =
the Overlay is visible=0A=
* @method doCenterOnDOMEvent=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent =3D function() {=0A=
	if (this.cfg.getProperty("visible")) {=0A=
		this.center();=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "fixedcenter" property is =
changed.=0A=
* @method configFixedCenter=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configFixedCenter =3D function(type, =
args, obj) {=0A=
	var val =3D args[0];=0A=
=0A=
	if (val) {=0A=
		this.center();=0A=
=0A=
		if (! YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent, =
this.center, this)) {=0A=
			this.beforeShowEvent.subscribe(this.center, this, true);=0A=
		}=0A=
=0A=
		if (! =
YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEven=
t, this.doCenterOnDOMEvent, this)) {=0A=
			=
YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,=
 this, true);=0A=
		}=0A=
=0A=
		if (! =
YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEven=
t, this.doCenterOnDOMEvent, this)) {=0A=
			YAHOO.widget.Overlay.windowScrollEvent.subscribe( =
this.doCenterOnDOMEvent, this, true);=0A=
		}=0A=
	} else {=0A=
		=
YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEven=
t, this);=0A=
		=
YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEven=
t, this);=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "height" property is changed.=0A=
* @method configHeight=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configHeight =3D function(type, args, =
obj) {=0A=
	var height =3D args[0];=0A=
	var el =3D this.element;=0A=
	YAHOO.util.Dom.setStyle(el, "height", height);=0A=
	this.cfg.refireEvent("iframe");=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "width" property is changed.=0A=
* @method configWidth=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configWidth =3D function(type, args, obj) =
{=0A=
	var width =3D args[0];=0A=
	var el =3D this.element;=0A=
	YAHOO.util.Dom.setStyle(el, "width", width);=0A=
	this.cfg.refireEvent("iframe");=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "zIndex" property is changed.=0A=
* @method configzIndex=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configzIndex =3D function(type, args, =
obj) {=0A=
	var zIndex =3D args[0];=0A=
=0A=
	var el =3D this.element;=0A=
=0A=
	if (! zIndex) {=0A=
		zIndex =3D YAHOO.util.Dom.getStyle(el, "zIndex");=0A=
		if (! zIndex || isNaN(zIndex)) {=0A=
			zIndex =3D 0;=0A=
		}=0A=
	}=0A=
=0A=
	if (this.iframe) {=0A=
		if (zIndex <=3D 0) {=0A=
			zIndex =3D 1;=0A=
		}=0A=
		YAHOO.util.Dom.setStyle(this.iframe, "zIndex", (zIndex-1));=0A=
	}=0A=
=0A=
	YAHOO.util.Dom.setStyle(el, "zIndex", zIndex);=0A=
	this.cfg.setProperty("zIndex", zIndex, true);=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "xy" property is changed.=0A=
* @method configXY=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configXY =3D function(type, args, obj) {=0A=
	var pos =3D args[0];=0A=
	var x =3D pos[0];=0A=
	var y =3D pos[1];=0A=
=0A=
	this.cfg.setProperty("x", x);=0A=
	this.cfg.setProperty("y", y);=0A=
=0A=
	this.beforeMoveEvent.fire([x,y]);=0A=
=0A=
	x =3D this.cfg.getProperty("x");=0A=
	y =3D this.cfg.getProperty("y");=0A=
=0A=
=0A=
	this.cfg.refireEvent("iframe");=0A=
	this.moveEvent.fire([x,y]);=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "x" property is changed.=0A=
* @method configX=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configX =3D function(type, args, obj) {=0A=
	var x =3D args[0];=0A=
	var y =3D this.cfg.getProperty("y");=0A=
=0A=
	this.cfg.setProperty("x", x, true);=0A=
	this.cfg.setProperty("y", y, true);=0A=
=0A=
	this.beforeMoveEvent.fire([x,y]);=0A=
=0A=
	x =3D this.cfg.getProperty("x");=0A=
	y =3D this.cfg.getProperty("y");=0A=
=0A=
	YAHOO.util.Dom.setX(this.element, x, true);=0A=
=0A=
	this.cfg.setProperty("xy", [x, y], true);=0A=
=0A=
	this.cfg.refireEvent("iframe");=0A=
	this.moveEvent.fire([x, y]);=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "y" property is changed.=0A=
* @method configY=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configY =3D function(type, args, obj) {=0A=
	var x =3D this.cfg.getProperty("x");=0A=
	var y =3D args[0];=0A=
=0A=
	this.cfg.setProperty("x", x, true);=0A=
	this.cfg.setProperty("y", y, true);=0A=
=0A=
	this.beforeMoveEvent.fire([x,y]);=0A=
=0A=
	x =3D this.cfg.getProperty("x");=0A=
	y =3D this.cfg.getProperty("y");=0A=
=0A=
	YAHOO.util.Dom.setY(this.element, y, true);=0A=
=0A=
	this.cfg.setProperty("xy", [x, y], true);=0A=
=0A=
	this.cfg.refireEvent("iframe");=0A=
	this.moveEvent.fire([x, y]);=0A=
};=0A=
=0A=
/**=0A=
* Shows the iframe shim, if it has been enabled=0A=
* @method showIframe=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.showIframe =3D function() {=0A=
	if (this.iframe) {=0A=
		this.iframe.style.display =3D "block";=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* Hides the iframe shim, if it has been enabled=0A=
* @method hideIframe=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.hideIframe =3D function() {=0A=
	if (this.iframe) {=0A=
		this.iframe.style.display =3D "none";=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "iframe" property is changed.=0A=
* @method configIframe=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configIframe =3D function(type, args, =
obj) {=0A=
=0A=
	var val =3D args[0];=0A=
=0A=
	if (val) { // IFRAME shim is enabled=0A=
=0A=
		if (! YAHOO.util.Config.alreadySubscribed(this.showEvent, =
this.showIframe, this)) {=0A=
			this.showEvent.subscribe(this.showIframe, this, true);=0A=
		}=0A=
		if (! YAHOO.util.Config.alreadySubscribed(this.hideEvent, =
this.hideIframe, this)) {=0A=
			this.hideEvent.subscribe(this.hideIframe, this, true);=0A=
		}=0A=
=0A=
		var x =3D this.cfg.getProperty("x");=0A=
		var y =3D this.cfg.getProperty("y");=0A=
=0A=
		if (! x || ! y) {=0A=
			this.syncPosition();=0A=
			x =3D this.cfg.getProperty("x");=0A=
			y =3D this.cfg.getProperty("y");=0A=
		}=0A=
=0A=
=0A=
		if (! isNaN(x) && ! isNaN(y)) {=0A=
			if (! this.iframe) {=0A=
				this.iframe =3D document.createElement("iframe");=0A=
				if (this.isSecure) {=0A=
					this.iframe.src =3D YAHOO.widget.Overlay.IFRAME_SRC;=0A=
				}=0A=
=0A=
				var parent =3D this.element.parentNode;=0A=
				if (parent) {=0A=
					parent.appendChild(this.iframe);=0A=
				} else {=0A=
					document.body.appendChild(this.iframe);=0A=
				}=0A=
=0A=
				YAHOO.util.Dom.setStyle(this.iframe, "position", "absolute");=0A=
				YAHOO.util.Dom.setStyle(this.iframe, "border", "none");=0A=
				YAHOO.util.Dom.setStyle(this.iframe, "margin", "0");=0A=
				YAHOO.util.Dom.setStyle(this.iframe, "padding", "0");=0A=
				YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");=0A=
				if (this.cfg.getProperty("visible")) {=0A=
					this.showIframe();=0A=
				} else {=0A=
					this.hideIframe();=0A=
				}=0A=
			}=0A=
=0A=
			var iframeDisplay =3D YAHOO.util.Dom.getStyle(this.iframe, "display");=0A=
=0A=
			if (iframeDisplay =3D=3D "none") {=0A=
				this.iframe.style.display =3D "block";=0A=
			}=0A=
=0A=
			YAHOO.util.Dom.setXY(this.iframe, [x,y]);=0A=
=0A=
			var width =3D this.element.clientWidth;=0A=
			var height =3D this.element.clientHeight;=0A=
=0A=
			YAHOO.util.Dom.setStyle(this.iframe, "width", (width+2) + "px");=0A=
			YAHOO.util.Dom.setStyle(this.iframe, "height", (height+2) + "px");=0A=
=0A=
			if (iframeDisplay =3D=3D "none") {=0A=
				this.iframe.style.display =3D "none";=0A=
			}=0A=
		}=0A=
	} else {=0A=
		if (this.iframe) {=0A=
			this.iframe.style.display =3D "none";=0A=
		}=0A=
		this.showEvent.unsubscribe(this.showIframe, this);=0A=
		this.hideEvent.unsubscribe(this.hideIframe, this);=0A=
	}=0A=
};=0A=
=0A=
=0A=
/**=0A=
* The default event handler fired when the "constraintoviewport" =
property is changed.=0A=
* @method configConstrainToViewport=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configConstrainToViewport =3D =
function(type, args, obj) {=0A=
	var val =3D args[0];=0A=
	if (val) {=0A=
		if (! YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent, =
this.enforceConstraints, this)) {=0A=
			this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);=0A=
		}=0A=
	} else {=0A=
		this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* The default event handler fired when the "context" property is changed.=0A=
* @method configContext=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.configContext =3D function(type, args, =
obj) {=0A=
	var contextArgs =3D args[0];=0A=
=0A=
	if (contextArgs) {=0A=
		var contextEl =3D contextArgs[0];=0A=
		var elementMagnetCorner =3D contextArgs[1];=0A=
		var contextMagnetCorner =3D contextArgs[2];=0A=
=0A=
		if (contextEl) {=0A=
			if (typeof contextEl =3D=3D "string") {=0A=
				this.cfg.setProperty("context", =
[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorn=
er], true);=0A=
			}=0A=
=0A=
			if (elementMagnetCorner && contextMagnetCorner) {=0A=
				this.align(elementMagnetCorner, contextMagnetCorner);=0A=
			}=0A=
		}=0A=
	}=0A=
};=0A=
=0A=
=0A=
// END BUILT-IN PROPERTY EVENT HANDLERS //=0A=
=0A=
/**=0A=
* Aligns the Overlay to its context element using the specified corner =
points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, =
and BOTTOM_RIGHT.=0A=
* @method align=0A=
* @param {String} elementAlign		The String representing the corner of =
the Overlay that should be aligned to the context element=0A=
* @param {String} contextAlign		The corner of the context element that =
the elementAlign corner should stick to.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.align =3D function(elementAlign, =
contextAlign) {=0A=
	var contextArgs =3D this.cfg.getProperty("context");=0A=
	if (contextArgs) {=0A=
		var context =3D contextArgs[0];=0A=
=0A=
		var element =3D this.element;=0A=
		var me =3D this;=0A=
=0A=
		if (! elementAlign) {=0A=
			elementAlign =3D contextArgs[1];=0A=
		}=0A=
=0A=
		if (! contextAlign) {=0A=
			contextAlign =3D contextArgs[2];=0A=
		}=0A=
=0A=
		if (element && context) {=0A=
			var contextRegion =3D YAHOO.util.Dom.getRegion(context);=0A=
=0A=
			var doAlign =3D function(v,h) {=0A=
				switch (elementAlign) {=0A=
					case YAHOO.widget.Overlay.TOP_LEFT:=0A=
						me.moveTo(h,v);=0A=
						break;=0A=
					case YAHOO.widget.Overlay.TOP_RIGHT:=0A=
						me.moveTo(h-element.offsetWidth,v);=0A=
						break;=0A=
					case YAHOO.widget.Overlay.BOTTOM_LEFT:=0A=
						me.moveTo(h,v-element.offsetHeight);=0A=
						break;=0A=
					case YAHOO.widget.Overlay.BOTTOM_RIGHT:=0A=
						me.moveTo(h-element.offsetWidth,v-element.offsetHeight);=0A=
						break;=0A=
				}=0A=
			};=0A=
=0A=
			switch (contextAlign) {=0A=
				case YAHOO.widget.Overlay.TOP_LEFT:=0A=
					doAlign(contextRegion.top, contextRegion.left);=0A=
					break;=0A=
				case YAHOO.widget.Overlay.TOP_RIGHT:=0A=
					doAlign(contextRegion.top, contextRegion.right);=0A=
					break;=0A=
				case YAHOO.widget.Overlay.BOTTOM_LEFT:=0A=
					doAlign(contextRegion.bottom, contextRegion.left);=0A=
					break;=0A=
				case YAHOO.widget.Overlay.BOTTOM_RIGHT:=0A=
					doAlign(contextRegion.bottom, contextRegion.right);=0A=
					break;=0A=
			}=0A=
		}=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* The default event handler executed when the moveEvent is fired, if the =
"constraintoviewport" is set to true.=0A=
* @method enforceConstraints=0A=
* @param {String} type	The CustomEvent type (usually the property name)=0A=
* @param {Object[]}	args	The CustomEvent arguments. For configuration =
handlers, args[0] will equal the newly applied value for the property.=0A=
* @param {Object} obj	The scope object. For configuration handlers, this =
will usually equal the owner.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.enforceConstraints =3D function(type, =
args, obj) {=0A=
	var pos =3D args[0];=0A=
=0A=
	var x =3D pos[0];=0A=
	var y =3D pos[1];=0A=
=0A=
	var offsetHeight =3D this.element.offsetHeight;=0A=
	var offsetWidth =3D this.element.offsetWidth;=0A=
=0A=
	var viewPortWidth =3D YAHOO.util.Dom.getViewportWidth();=0A=
	var viewPortHeight =3D YAHOO.util.Dom.getViewportHeight();=0A=
=0A=
	var scrollX =3D document.documentElement.scrollLeft || =
document.body.scrollLeft;=0A=
	var scrollY =3D document.documentElement.scrollTop || =
document.body.scrollTop;=0A=
=0A=
	var topConstraint =3D scrollY + 10;=0A=
	var leftConstraint =3D scrollX + 10;=0A=
	var bottomConstraint =3D scrollY + viewPortHeight - offsetHeight - 10;=0A=
	var rightConstraint =3D scrollX + viewPortWidth - offsetWidth - 10;=0A=
=0A=
	if (x < leftConstraint) {=0A=
		x =3D leftConstraint;=0A=
	} else if (x > rightConstraint) {=0A=
		x =3D rightConstraint;=0A=
	}=0A=
=0A=
	if (y < topConstraint) {=0A=
		y =3D topConstraint;=0A=
	} else if (y > bottomConstraint) {=0A=
		y =3D bottomConstraint;=0A=
	}=0A=
=0A=
	this.cfg.setProperty("x", x, true);=0A=
	this.cfg.setProperty("y", y, true);=0A=
	this.cfg.setProperty("xy", [x,y], true);=0A=
};=0A=
=0A=
/**=0A=
* Centers the container in the viewport.=0A=
* @method center=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.center =3D function() {=0A=
	var scrollX =3D document.documentElement.scrollLeft || =
document.body.scrollLeft;=0A=
	var scrollY =3D document.documentElement.scrollTop || =
document.body.scrollTop;=0A=
=0A=
	var viewPortWidth =3D YAHOO.util.Dom.getClientWidth();=0A=
	var viewPortHeight =3D YAHOO.util.Dom.getClientHeight();=0A=
=0A=
	var elementWidth =3D this.element.offsetWidth;=0A=
	var elementHeight =3D this.element.offsetHeight;=0A=
=0A=
	var x =3D (viewPortWidth / 2) - (elementWidth / 2) + scrollX;=0A=
	var y =3D (viewPortHeight / 2) - (elementHeight / 2) + scrollY;=0A=
=0A=
	this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);=0A=
=0A=
	this.cfg.refireEvent("iframe");=0A=
};=0A=
=0A=
/**=0A=
* Synchronizes the Panel's "xy", "x", and "y" properties with the =
Panel's position in the DOM. This is primarily used to update position =
information during drag & drop.=0A=
* @method syncPosition=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.syncPosition =3D function() {=0A=
	var pos =3D YAHOO.util.Dom.getXY(this.element);=0A=
	this.cfg.setProperty("x", pos[0], true);=0A=
	this.cfg.setProperty("y", pos[1], true);=0A=
	this.cfg.setProperty("xy", pos, true);=0A=
};=0A=
=0A=
/**=0A=
* Event handler fired when the resize monitor element is resized.=0A=
* @method onDomResize=0A=
* @param {DOMEvent} e	The resize DOM event=0A=
* @param {Object} obj	The scope object=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.onDomResize =3D function(e, obj) {=0A=
	YAHOO.widget.Overlay.superclass.onDomResize.call(this, e, obj);=0A=
	var me =3D this;=0A=
	setTimeout(function() {=0A=
		me.syncPosition();=0A=
		me.cfg.refireEvent("iframe");=0A=
		me.cfg.refireEvent("context");=0A=
	}, 0);=0A=
};=0A=
=0A=
/**=0A=
* Removes the Overlay element from the DOM and sets all child elements =
to null.=0A=
* @method destroy=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.destroy =3D function() {=0A=
	if (this.iframe) {=0A=
		this.iframe.parentNode.removeChild(this.iframe);=0A=
	}=0A=
=0A=
	this.iframe =3D null;=0A=
=0A=
	=
YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEven=
t, this);=0A=
	=
YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEven=
t, this);=0A=
=0A=
	YAHOO.widget.Overlay.superclass.destroy.call(this);=0A=
};=0A=
=0A=
/**=0A=
* Returns a String representation of the object.=0A=
* @method toString=0A=
* @return {String} The string representation of the Overlay.=0A=
*/=0A=
YAHOO.widget.Overlay.prototype.toString =3D function() {=0A=
	return "Overlay " + this.id;=0A=
};=0A=
=0A=
/**=0A=
* A singleton CustomEvent used for reacting to the DOM event for window =
scroll=0A=
* @event YAHOO.widget.Overlay.windowScrollEvent=0A=
*/=0A=
YAHOO.widget.Overlay.windowScrollEvent =3D new =
YAHOO.util.CustomEvent("windowScroll");=0A=
=0A=
/**=0A=
* A singleton CustomEvent used for reacting to the DOM event for window =
resize=0A=
* @event YAHOO.widget.Overlay.windowResizeEvent=0A=
*/=0A=
YAHOO.widget.Overlay.windowResizeEvent =3D new =
YAHOO.util.CustomEvent("windowResize");=0A=
=0A=
/**=0A=
* The DOM event handler used to fire the CustomEvent for window scroll=0A=
* @method YAHOO.widget.Overlay.windowScrollHandler=0A=
* @static=0A=
* @param {DOMEvent} e The DOM scroll event=0A=
*/=0A=
YAHOO.widget.Overlay.windowScrollHandler =3D function(e) {=0A=
	if (YAHOO.widget.Module.prototype.browser =3D=3D "ie" || =
YAHOO.widget.Module.prototype.browser =3D=3D "ie7") {=0A=
		if (! window.scrollEnd) {=0A=
			window.scrollEnd =3D -1;=0A=
		}=0A=
		clearTimeout(window.scrollEnd);=0A=
		window.scrollEnd =3D setTimeout(function() { =
YAHOO.widget.Overlay.windowScrollEvent.fire(); }, 1);=0A=
	} else {=0A=
		YAHOO.widget.Overlay.windowScrollEvent.fire();=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* The DOM event handler used to fire the CustomEvent for window resize=0A=
* @method YAHOO.widget.Overlay.windowResizeHandler=0A=
* @static=0A=
* @param {DOMEvent} e The DOM resize event=0A=
*/=0A=
YAHOO.widget.Overlay.windowResizeHandler =3D function(e) {=0A=
	if (YAHOO.widget.Module.prototype.browser =3D=3D "ie" || =
YAHOO.widget.Module.prototype.browser =3D=3D "ie7") {=0A=
		if (! window.resizeEnd) {=0A=
			window.resizeEnd =3D -1;=0A=
		}=0A=
		clearTimeout(window.resizeEnd);=0A=
		window.resizeEnd =3D setTimeout(function() { =
YAHOO.widget.Overlay.windowResizeEvent.fire(); }, 100);=0A=
	} else {=0A=
		YAHOO.widget.Overlay.windowResizeEvent.fire();=0A=
	}=0A=
};=0A=
=0A=
/**=0A=
* A boolean that indicated whether the window resize and scroll events =
have already been subscribed to.=0A=
* @property YAHOO.widget.Overlay._initialized=0A=
* @private=0A=
* @type Boolean=0A=
*/=0A=
YAHOO.widget.Overlay._initialized =3D null;=0A=
=0A=
if (YAHOO.widget.Overlay._initialized =3D=3D=3D null) {=0A=
	YAHOO.util.Event.addListener(window, "scroll", =
YAHOO.widget.Overlay.windowScrollHandler);=0A=
	YAHOO.util.Event.addListener(window, "resize", =
YAHOO.widget.Overlay.windowResizeHandler);=0A=
=0A=
	YAHOO.widget.Overlay._initialized =3D true;=0A=
}=0A=
/**=0A=
* OverlayManager is used for maintaining the focus status of multiple =
Overlays.* @namespace YAHOO.widget=0A=
* @namespace YAHOO.widget=0A=
* @class OverlayManager=0A=
* @constructor=0A=
* @param {Array}	overlays	Optional. A collection of Overlays to register =
with the manager.=0A=
* @param {Object}	userConfig		The object literal representing the user =
configuration of the OverlayManager=0A=
*/=0A=
YAHOO.widget.OverlayManager =3D function(userConfig) {=0A=
	this.init(userConfig);=0A=
};=0A=
=0A=
/**=0A=
* The CSS class representing a focused Overlay=0A=
* @property YAHOO.widget.OverlayManager.CSS_FOCUSED=0A=
* @static=0A=
* @final=0A=
* @type String=0A=
*/=0A=
YAHOO.widget.OverlayManager.CSS_FOCUSED =3D "focused";=0A=
=0A=
YAHOO.widget.OverlayManager.prototype =3D {=0A=
	/**=0A=
	* The class's constructor function=0A=
	* @property contructor=0A=
	* @type Function=0A=
	*/=0A=
	constructor : YAHOO.widget.OverlayManager,=0A=
=0A=
	/**=0A=
	* The array of Overlays that are currently registered=0A=
	* @property overlays=0A=
	* @type YAHOO.widget.Overlay[]=0A=
	*/=0A=
	overlays : null,=0A=
=0A=
	/**=0A=
	* Initializes the default configuration of the OverlayManager=0A=
	* @method initDefaultConfig=0A=
	*/=0A=
	initDefaultConfig : function() {=0A=
		/**=0A=
		* The collection of registered Overlays in use by the OverlayManager=0A=
		* @config overlays=0A=
		* @type YAHOO.widget.Overlay[]=0A=
		* @default null=0A=
		*/=0A=
		this.cfg.addProperty("overlays", { suppressEvent:true } );=0A=
=0A=
		/**=0A=
		* The default DOM event that should be used to focus an Overlay=0A=
		* @config focusevent=0A=
		* @type String=0A=
		* @default "mousedown"=0A=
		*/=0A=
		this.cfg.addProperty("focusevent", { value:"mousedown" } );=0A=
	},=0A=
=0A=
	/**=0A=
	* Initializes the OverlayManager=0A=
	* @method init=0A=
	* @param {YAHOO.widget.Overlay[]}	overlays	Optional. A collection of =
Overlays to register with the manager.=0A=
	* @param {Object}	userConfig		The object literal representing the user =
configuration of the OverlayManager=0A=
	*/=0A=
	init : function(userConfig) {=0A=
		/**=0A=
		* The OverlayManager's Config object used for monitoring configuration =
properties.=0A=
		* @property cfg=0A=
		* @type YAHOO.util.Config=0A=
		*/=0A=
		this.cfg =3D new YAHOO.util.Config(this);=0A=
=0A=
		this.initDefaultConfig();=0A=
=0A=
		if (userConfig) {=0A=
			this.cfg.applyConfig(userConfig, true);=0A=
		}=0A=
		this.cfg.fireQueue();=0A=
=0A=
		/**=0A=
		* The currently activated Overlay=0A=
		* @property activeOverlay=0A=
		* @private=0A=
		* @type YAHOO.widget.Overlay=0A=
		*/=0A=
		var activeOverlay =3D null;=0A=
=0A=
		/**=0A=
		* Returns the currently focused Overlay=0A=
		* @method getActive=0A=
		* @return {YAHOO.widget.Overlay}	The currently focused Overlay=0A=
		*/=0A=
		this.getActive =3D function() {=0A=
			return activeOverlay;=0A=
		};=0A=
=0A=
		/**=0A=
		* Focuses the specified Overlay=0A=
		* @method focus=0A=
		* @param {YAHOO.widget.Overlay} overlay	The Overlay to focus=0A=
		* @param {String} overlay	The id of the Overlay to focus=0A=
		*/=0A=
		this.focus =3D function(overlay) {=0A=
=0A=
			var o =3D this.find(overlay);=0A=
=0A=
			if (o) {=0A=
=0A=
                if (activeOverlay !=3D o) {=0A=
=0A=
                    if(activeOverlay) {=0A=
    =0A=
                        activeOverlay.blur();=0A=
    =0A=
                    }=0A=
    =0A=
                    activeOverlay =3D o;=0A=
    =0A=
                    YAHOO.util.Dom.addClass(activeOverlay.element, =
YAHOO.widget.OverlayManager.CSS_FOCUSED);=0A=
    =0A=
                    this.overlays.sort(this.compareZIndexDesc);=0A=
    =0A=
                    var topZIndex =3D =
YAHOO.util.Dom.getStyle(this.overlays[0].element, "zIndex");=0A=
    =0A=
                    if (! isNaN(topZIndex) && this.overlays[0] !=3D =
overlay) {=0A=
    =0A=
                        activeOverlay.cfg.setProperty("zIndex", =
(parseInt(topZIndex, 10) + 2));=0A=
    =0A=
                    }=0A=
    =0A=
                    this.overlays.sort(this.compareZIndexDesc);=0A=
    =0A=
                    o.focusEvent.fire();=0A=
                =0A=
                }=0A=
=0A=
			}=0A=
=0A=
		};=0A=
=0A=
		/**=0A=
		* Removes the specified Overlay from the manager=0A=
		* @method remove=0A=
		* @param {YAHOO.widget.Overlay}	overlay	The Overlay to remove=0A=
		* @param {String} overlay	The id of the Overlay to remove=0A=
		*/=0A=
		this.remove =3D function(overlay) {=0A=
			var o =3D this.find(overlay);=0A=
			if (o) {=0A=
				var originalZ =3D YAHOO.util.Dom.getStyle(o.element, "zIndex");=0A=
				o.cfg.setProperty("zIndex", -1000, true);=0A=
				this.overlays.sort(this.compareZIndexDesc);=0A=
				this.overlays =3D this.overlays.slice(0, this.overlays.length-1);=0A=
=0A=
                o.hideEvent.unsubscribe(o.blur);=0A=
                o.destroyEvent.unsubscribe(this._onOverlayDestroy, o);=0A=
=0A=
                if (o.element) {=0A=
=0A=
        			YAHOO.util.Event.removeListener(o.element, =
this.cfg.getProperty("focusevent"), this._onOverlayElementFocus);=0A=
=0A=
                }=0A=
=0A=
				o.cfg.setProperty("zIndex", originalZ, true);=0A=
				o.cfg.setProperty("manager", null);=0A=
=0A=
                o.focusEvent.unsubscribeAll();=0A=
                o.blurEvent.unsubscribeAll();=0A=
=0A=
				o.focusEvent =3D null;=0A=
				o.blurEvent =3D null;=0A=
=0A=
				o.focus =3D null;=0A=
				o.blur =3D null;=0A=
			}=0A=
		};=0A=
=0A=
		/**=0A=
		* Removes focus from all registered Overlays in the manager=0A=
		* @method blurAll=0A=
		*/=0A=
		this.blurAll =3D function() {=0A=
			for (var o=3D0;o<this.overlays.length;o++) {=0A=
                this.overlays[o].blur();=0A=
			}=0A=
		};=0A=
=0A=
=0A=
        this._onOverlayBlur =3D function(p_sType, p_aArgs) {=0A=
            activeOverlay =3D null;=0A=
        };=0A=
=0A=
=0A=
		var overlays =3D this.cfg.getProperty("overlays");=0A=
=0A=
		if (! this.overlays) {=0A=
			this.overlays =3D [];=0A=
		}=0A=
=0A=
		if (overlays) {=0A=
			this.register(overlays);=0A=
			this.overlays.sort(this.compareZIndexDesc);=0A=
		}=0A=
	},=0A=
=0A=
=0A=
    /**=0A=
    * @method _onOverlayElementFocus=0A=
    * @description Event handler for the DOM event that is used to focus =0A=
    * the Overlay instance as specified by the "focusevent" =0A=
    * configuration property.=0A=
    * @private=0A=
    * @param {Event} p_oEvent Object representing the DOM event object =
passed =0A=
    * back by the event utility (YAHOO.util.Event).=0A=
    */=0A=
    _onOverlayElementFocus: function(p_oEvent) {=0A=
    =0A=
        var oTarget =3D YAHOO.util.Event.getTarget(p_oEvent),=0A=
            oClose =3D this.close;=0A=
=0A=
        =0A=
        if (=0A=
            oClose && =0A=
            (=0A=
                oTarget =3D=3D oClose ||  =0A=
                YAHOO.util.Dom.isAncestor(oClose, oTarget)=0A=
            )=0A=
        ) {=0A=
        =0A=
            this.blur();=0A=
        =0A=
        }=0A=
        else {=0A=
        =0A=
            this.focus();=0A=
        =0A=
        }=0A=
    =0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method _onOverlayDestroy=0A=
    * @description "destroy" event handler for the Overlay.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.Overlay} p_oOverlay Object representing the =
menu that =0A=
    * fired the event.=0A=
    */=0A=
    _onOverlayDestroy: function(p_sType, p_aArgs, p_oOverlay) {=0A=
=0A=
        this.remove(p_oOverlay);=0A=
    =0A=
    },=0A=
=0A=
	/**=0A=
	* Registers an Overlay or an array of Overlays with the manager. Upon =
registration, the Overlay receives functions for focus and blur, along =
with CustomEvents for each.=0A=
	* @method register=0A=
	* @param {YAHOO.widget.Overlay}	overlay		An Overlay to register with =
the manager.=0A=
	* @param {YAHOO.widget.Overlay[]}	overlay		An array of Overlays to =
register with the manager.=0A=
	* @return	{Boolean}	True if any Overlays are registered.=0A=
	*/=0A=
	register : function(overlay) {=0A=
		if (overlay instanceof YAHOO.widget.Overlay) {=0A=
			overlay.cfg.addProperty("manager", { value:this } );=0A=
=0A=
			overlay.focusEvent =3D new YAHOO.util.CustomEvent("focus", overlay);=0A=
			overlay.blurEvent =3D new YAHOO.util.CustomEvent("blur", overlay);=0A=
=0A=
			var mgr=3Dthis;=0A=
=0A=
			overlay.focus =3D function() {=0A=
				mgr.focus(this);=0A=
			};=0A=
=0A=
			overlay.blur =3D function() {=0A=
                if(mgr.getActive() =3D=3D this) {=0A=
                    YAHOO.util.Dom.removeClass(this.element, =
YAHOO.widget.OverlayManager.CSS_FOCUSED);=0A=
                    this.blurEvent.fire();=0A=
				}=0A=
			};=0A=
=0A=
            overlay.blurEvent.subscribe(mgr._onOverlayBlur);=0A=
=0A=
            overlay.hideEvent.subscribe(overlay.blur);=0A=
            =0A=
            overlay.destroyEvent.subscribe(this._onOverlayDestroy, =
overlay, this);=0A=
=0A=
			YAHOO.util.Event.addListener(overlay.element, =
this.cfg.getProperty("focusevent"), this._onOverlayElementFocus, null, =
overlay);=0A=
=0A=
			var zIndex =3D YAHOO.util.Dom.getStyle(overlay.element, "zIndex");=0A=
			if (! isNaN(zIndex)) {=0A=
				overlay.cfg.setProperty("zIndex", parseInt(zIndex, 10));=0A=
			} else {=0A=
				overlay.cfg.setProperty("zIndex", 0);=0A=
			}=0A=
=0A=
			this.overlays.push(overlay);=0A=
			return true;=0A=
		} else if (overlay instanceof Array) {=0A=
			var regcount =3D 0;=0A=
			for (var i=3D0;i<overlay.length;i++) {=0A=
				if (this.register(overlay[i])) {=0A=
					regcount++;=0A=
				}=0A=
			}=0A=
			if (regcount > 0) {=0A=
				return true;=0A=
			}=0A=
		} else {=0A=
			return false;=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Attempts to locate an Overlay by instance or ID.=0A=
	* @method find=0A=
	* @param {YAHOO.widget.Overlay}	overlay		An Overlay to locate within =
the manager=0A=
	* @param {String}	overlay		An Overlay id to locate within the manager=0A=
	* @return	{YAHOO.widget.Overlay}	The requested Overlay, if found, or =
null if it cannot be located.=0A=
	*/=0A=
	find : function(overlay) {=0A=
		if (overlay instanceof YAHOO.widget.Overlay) {=0A=
			for (var o=3D0;o<this.overlays.length;o++) {=0A=
				if (this.overlays[o] =3D=3D overlay) {=0A=
					return this.overlays[o];=0A=
				}=0A=
			}=0A=
		} else if (typeof overlay =3D=3D "string") {=0A=
			for (var p=3D0;p<this.overlays.length;p++) {=0A=
				if (this.overlays[p].id =3D=3D overlay) {=0A=
					return this.overlays[p];=0A=
				}=0A=
			}=0A=
		}=0A=
		return null;=0A=
	},=0A=
=0A=
	/**=0A=
	* Used for sorting the manager's Overlays by z-index.=0A=
	* @method compareZIndexDesc=0A=
	* @private=0A=
	* @return {Number}	0, 1, or -1, depending on where the Overlay should =
fall in the stacking order.=0A=
	*/=0A=
	compareZIndexDesc : function(o1, o2) {=0A=
		var zIndex1 =3D o1.cfg.getProperty("zIndex");=0A=
		var zIndex2 =3D o2.cfg.getProperty("zIndex");=0A=
=0A=
		if (zIndex1 > zIndex2) {=0A=
			return -1;=0A=
		} else if (zIndex1 < zIndex2) {=0A=
			return 1;=0A=
		} else {=0A=
			return 0;=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Shows all Overlays in the manager.=0A=
	* @method showAll=0A=
	*/=0A=
	showAll : function() {=0A=
		for (var o=3D0;o<this.overlays.length;o++) {=0A=
			this.overlays[o].show();=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Hides all Overlays in the manager.=0A=
	* @method hideAll=0A=
	*/=0A=
	hideAll : function() {=0A=
		for (var o=3D0;o<this.overlays.length;o++) {=0A=
			this.overlays[o].hide();=0A=
		}=0A=
	},=0A=
=0A=
	/**=0A=
	* Returns a string representation of the object.=0A=
	* @method toString=0A=
	* @return {String}	The string representation of the OverlayManager=0A=
	*/=0A=
	toString : function() {=0A=
		return "OverlayManager";=0A=
	}=0A=
=0A=
};=0A=
/**=0A=
* ContainerEffect encapsulates animation transitions that are executed =
when an Overlay is shown or hidden.=0A=
* @namespace YAHOO.widget=0A=
* @class ContainerEffect=0A=
* @constructor=0A=
* @param {YAHOO.widget.Overlay}	overlay		The Overlay that the animation =
should be associated with=0A=
* @param {Object}	attrIn		The object literal representing the animation =
arguments to be used for the animate-in transition. The arguments for =
this literal are: attributes(object, see YAHOO.util.Anim for =
description), duration(Number), and method(i.e. =
YAHOO.util.Easing.easeIn).=0A=
* @param {Object}	attrOut		The object literal representing the animation =
arguments to be used for the animate-out transition. The arguments for =
this literal are: attributes(object, see YAHOO.util.Anim for =
description), duration(Number), and method(i.e. =
YAHOO.util.Easing.easeIn).=0A=
* @param {HTMLElement}	targetElement	Optional. The target element that =
should be animated during the transition. Defaults to overlay.element.=0A=
* @param {class}	Optional. The animation class to instantiate. Defaults =
to YAHOO.util.Anim. Other options include YAHOO.util.Motion.=0A=
*/=0A=
YAHOO.widget.ContainerEffect =3D function(overlay, attrIn, attrOut, =
targetElement, animClass) {=0A=
	if (! animClass) {=0A=
		animClass =3D YAHOO.util.Anim;=0A=
	}=0A=
=0A=
	/**=0A=
	* The overlay to animate=0A=
	* @property overlay=0A=
	* @type YAHOO.widget.Overlay=0A=
	*/=0A=
	this.overlay =3D overlay;=0A=
	/**=0A=
	* The animation attributes to use when transitioning into view=0A=
	* @property attrIn=0A=
	* @type Object=0A=
	*/=0A=
	this.attrIn =3D attrIn;=0A=
	/**=0A=
	* The animation attributes to use when transitioning out of view=0A=
	* @property attrOut=0A=
	* @type Object=0A=
	*/=0A=
	this.attrOut =3D attrOut;=0A=
	/**=0A=
	* The target element to be animated=0A=
	* @property targetElement=0A=
	* @type HTMLElement=0A=
	*/=0A=
	this.targetElement =3D targetElement || overlay.element;=0A=
	/**=0A=
	* The animation class to use for animating the overlay=0A=
	* @property animClass=0A=
	* @type class=0A=
	*/=0A=
	this.animClass =3D animClass;=0A=
};=0A=
=0A=
/**=0A=
* Initializes the animation classes and events.=0A=
* @method init=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.init =3D function() {=0A=
	this.beforeAnimateInEvent =3D new =
YAHOO.util.CustomEvent("beforeAnimateIn", this);=0A=
	this.beforeAnimateOutEvent =3D new =
YAHOO.util.CustomEvent("beforeAnimateOut", this);=0A=
=0A=
	this.animateInCompleteEvent =3D new =
YAHOO.util.CustomEvent("animateInComplete", this);=0A=
	this.animateOutCompleteEvent =3D new =
YAHOO.util.CustomEvent("animateOutComplete", this);=0A=
=0A=
	this.animIn =3D new this.animClass(this.targetElement, =
this.attrIn.attributes, this.attrIn.duration, this.attrIn.method);=0A=
	this.animIn.onStart.subscribe(this.handleStartAnimateIn, this);=0A=
	this.animIn.onTween.subscribe(this.handleTweenAnimateIn, this);=0A=
	this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn, this);=0A=
=0A=
	this.animOut =3D new this.animClass(this.targetElement, =
this.attrOut.attributes, this.attrOut.duration, this.attrOut.method);=0A=
	this.animOut.onStart.subscribe(this.handleStartAnimateOut, this);=0A=
	this.animOut.onTween.subscribe(this.handleTweenAnimateOut, this);=0A=
	this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut, this);=0A=
};=0A=
=0A=
/**=0A=
* Triggers the in-animation.=0A=
* @method animateIn=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.animateIn =3D function() {=0A=
	this.beforeAnimateInEvent.fire();=0A=
	this.animIn.animate();=0A=
};=0A=
=0A=
/**=0A=
* Triggers the out-animation.=0A=
* @method animateOut=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.animateOut =3D function() {=0A=
	this.beforeAnimateOutEvent.fire();=0A=
	this.animOut.animate();=0A=
};=0A=
=0A=
/**=0A=
* The default onStart handler for the in-animation.=0A=
* @method handleStartAnimateIn=0A=
* @param {String} type	The CustomEvent type=0A=
* @param {Object[]}	args	The CustomEvent arguments=0A=
* @param {Object} obj	The scope object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn =3D =
function(type, args, obj) { };=0A=
/**=0A=
* The default onTween handler for the in-animation.=0A=
* @method handleTweenAnimateIn=0A=
* @param {String} type	The CustomEvent type=0A=
* @param {Object[]}	args	The CustomEvent arguments=0A=
* @param {Object} obj	The scope object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn =3D =
function(type, args, obj) { };=0A=
/**=0A=
* The default onComplete handler for the in-animation.=0A=
* @method handleCompleteAnimateIn=0A=
* @param {String} type	The CustomEvent type=0A=
* @param {Object[]}	args	The CustomEvent arguments=0A=
* @param {Object} obj	The scope object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn =3D =
function(type, args, obj) { };=0A=
=0A=
/**=0A=
* The default onStart handler for the out-animation.=0A=
* @method handleStartAnimateOut=0A=
* @param {String} type	The CustomEvent type=0A=
* @param {Object[]}	args	The CustomEvent arguments=0A=
* @param {Object} obj	The scope object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut =3D =
function(type, args, obj) { };=0A=
/**=0A=
* The default onTween handler for the out-animation.=0A=
* @method handleTweenAnimateOut=0A=
* @param {String} type	The CustomEvent type=0A=
* @param {Object[]}	args	The CustomEvent arguments=0A=
* @param {Object} obj	The scope object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut =3D =
function(type, args, obj) { };=0A=
/**=0A=
* The default onComplete handler for the out-animation.=0A=
* @method handleCompleteAnimateOut=0A=
* @param {String} type	The CustomEvent type=0A=
* @param {Object[]}	args	The CustomEvent arguments=0A=
* @param {Object} obj	The scope object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut =3D =
function(type, args, obj) { };=0A=
=0A=
/**=0A=
* Returns a string representation of the object.=0A=
* @method toString=0A=
* @return {String}	The string representation of the ContainerEffect=0A=
*/=0A=
YAHOO.widget.ContainerEffect.prototype.toString =3D function() {=0A=
	var output =3D "ContainerEffect";=0A=
	if (this.overlay) {=0A=
		output +=3D " [" + this.overlay.toString() + "]";=0A=
	}=0A=
	return output;=0A=
};=0A=
=0A=
/**=0A=
* A pre-configured ContainerEffect instance that can be used for fading =
an overlay in and out.=0A=
* @method FADE=0A=
* @static=0A=
* @param {Overlay}	overlay	The Overlay object to animate=0A=
* @param {Number}	dur	The duration of the animation=0A=
* @return {ContainerEffect}	The configured ContainerEffect object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.FADE =3D function(overlay, dur) {=0A=
	var fade =3D new YAHOO.widget.ContainerEffect(overlay, { =
attributes:{opacity: {from:0, to:1}}, duration:dur, =
method:YAHOO.util.Easing.easeIn }, { attributes:{opacity: {to:0}}, =
duration:dur, method:YAHOO.util.Easing.easeOut}, overlay.element );=0A=
=0A=
	fade.handleStartAnimateIn =3D function(type,args,obj) {=0A=
		YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");=0A=
=0A=
		if (! obj.overlay.underlay) {=0A=
			obj.overlay.cfg.refireEvent("underlay");=0A=
		}=0A=
=0A=
		if (obj.overlay.underlay) {=0A=
			obj.initialUnderlayOpacity =3D =
YAHOO.util.Dom.getStyle(obj.overlay.underlay, "opacity");=0A=
			obj.overlay.underlay.style.filter =3D null;=0A=
		}=0A=
=0A=
		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");=0A=
		YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 0);=0A=
	};=0A=
=0A=
	fade.handleCompleteAnimateIn =3D function(type,args,obj) {=0A=
		YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");=0A=
=0A=
		if (obj.overlay.element.style.filter) {=0A=
			obj.overlay.element.style.filter =3D null;=0A=
		}=0A=
=0A=
		if (obj.overlay.underlay) {=0A=
			YAHOO.util.Dom.setStyle(obj.overlay.underlay, "opacity", =
obj.initialUnderlayOpacity);=0A=
		}=0A=
=0A=
		obj.overlay.cfg.refireEvent("iframe");=0A=
		obj.animateInCompleteEvent.fire();=0A=
	};=0A=
=0A=
	fade.handleStartAnimateOut =3D function(type, args, obj) {=0A=
		YAHOO.util.Dom.addClass(obj.overlay.element, "hide-select");=0A=
=0A=
		if (obj.overlay.underlay) {=0A=
			obj.overlay.underlay.style.filter =3D null;=0A=
		}=0A=
	};=0A=
=0A=
	fade.handleCompleteAnimateOut =3D  function(type, args, obj) {=0A=
		YAHOO.util.Dom.removeClass(obj.overlay.element, "hide-select");=0A=
		if (obj.overlay.element.style.filter) {=0A=
			obj.overlay.element.style.filter =3D null;=0A=
		}=0A=
		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");=0A=
		YAHOO.util.Dom.setStyle(obj.overlay.element, "opacity", 1);=0A=
=0A=
		obj.overlay.cfg.refireEvent("iframe");=0A=
=0A=
		obj.animateOutCompleteEvent.fire();=0A=
	};=0A=
=0A=
	fade.init();=0A=
	return fade;=0A=
};=0A=
=0A=
=0A=
/**=0A=
* A pre-configured ContainerEffect instance that can be used for sliding =
an overlay in and out.=0A=
* @method SLIDE=0A=
* @static=0A=
* @param {Overlay}	overlay	The Overlay object to animate=0A=
* @param {Number}	dur	The duration of the animation=0A=
* @return {ContainerEffect}	The configured ContainerEffect object=0A=
*/=0A=
YAHOO.widget.ContainerEffect.SLIDE =3D function(overlay, dur) {=0A=
	var x =3D overlay.cfg.getProperty("x") || =
YAHOO.util.Dom.getX(overlay.element);=0A=
	var y =3D overlay.cfg.getProperty("y") || =
YAHOO.util.Dom.getY(overlay.element);=0A=
=0A=
	var clientWidth =3D YAHOO.util.Dom.getClientWidth();=0A=
	var offsetWidth =3D overlay.element.offsetWidth;=0A=
=0A=
	var slide =3D new YAHOO.widget.ContainerEffect(overlay, {=0A=
															attributes:{ points: { to:[x, y] } },=0A=
															duration:dur,=0A=
															method:YAHOO.util.Easing.easeIn=0A=
														},=0A=
														{=0A=
															attributes:{ points: { to:[(clientWidth+25), y] } },=0A=
															duration:dur,=0A=
															method:YAHOO.util.Easing.easeOut=0A=
														},=0A=
														overlay.element,=0A=
														YAHOO.util.Motion);=0A=
=0A=
=0A=
	slide.handleStartAnimateIn =3D function(type,args,obj) {=0A=
		obj.overlay.element.style.left =3D (-25-offsetWidth) + "px";=0A=
		obj.overlay.element.style.top  =3D y + "px";=0A=
	};=0A=
=0A=
	slide.handleTweenAnimateIn =3D function(type, args, obj) {=0A=
=0A=
=0A=
		var pos =3D YAHOO.util.Dom.getXY(obj.overlay.element);=0A=
=0A=
		var currentX =3D pos[0];=0A=
		var currentY =3D pos[1];=0A=
=0A=
		if (YAHOO.util.Dom.getStyle(obj.overlay.element, "visibility") =3D=3D =
"hidden" && currentX < x) {=0A=
			YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "visible");=0A=
		}=0A=
=0A=
		obj.overlay.cfg.setProperty("xy", [currentX,currentY], true);=0A=
		obj.overlay.cfg.refireEvent("iframe");=0A=
	};=0A=
=0A=
	slide.handleCompleteAnimateIn =3D function(type, args, obj) {=0A=
		obj.overlay.cfg.setProperty("xy", [x,y], true);=0A=
		obj.startX =3D x;=0A=
		obj.startY =3D y;=0A=
		obj.overlay.cfg.refireEvent("iframe");=0A=
		obj.animateInCompleteEvent.fire();=0A=
	};=0A=
=0A=
	slide.handleStartAnimateOut =3D function(type, args, obj) {=0A=
		var vw =3D YAHOO.util.Dom.getViewportWidth();=0A=
=0A=
		var pos =3D YAHOO.util.Dom.getXY(obj.overlay.element);=0A=
=0A=
		var yso =3D pos[1];=0A=
=0A=
		var currentTo =3D obj.animOut.attributes.points.to;=0A=
		obj.animOut.attributes.points.to =3D [(vw+25), yso];=0A=
	};=0A=
=0A=
	slide.handleTweenAnimateOut =3D function(type, args, obj) {=0A=
		var pos =3D YAHOO.util.Dom.getXY(obj.overlay.element);=0A=
=0A=
		var xto =3D pos[0];=0A=
		var yto =3D pos[1];=0A=
=0A=
		obj.overlay.cfg.setProperty("xy", [xto,yto], true);=0A=
		obj.overlay.cfg.refireEvent("iframe");=0A=
	};=0A=
=0A=
	slide.handleCompleteAnimateOut =3D function(type, args, obj) {=0A=
		YAHOO.util.Dom.setStyle(obj.overlay.element, "visibility", "hidden");=0A=
=0A=
		obj.overlay.cfg.setProperty("xy", [x,y]);=0A=
		obj.animateOutCompleteEvent.fire();=0A=
	};=0A=
=0A=
	slide.init();=0A=
	return slide;=0A=
};=0A=
YAHOO.register("container_core", YAHOO.widget.Module, {version: "2.2.2", =
build: "202"});=0A=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/menu.js

/*=0A=
Copyright (c) 2007, Yahoo! Inc. All rights reserved.=0A=
Code licensed under the BSD License:=0A=
http://developer.yahoo.net/yui/license.txt=0A=
version: 2.2.2=0A=
*/=0A=
=0A=
=0A=
/**=0A=
* @module menu=0A=
* @description <p>The Menu family of components features a collection of =0A=
* controls that make it easy to add menus to your website or web =
application.  =0A=
* With the Menu Controls you can create website fly-out menus, =
customized =0A=
* context menus, or application-style menu bars with just a small amount =
of =0A=
* scripting.</p><p>The Menu family of controls features:</p>=0A=
* <ul>=0A=
*    <li>Screen-reader accessibility.</li>=0A=
*    <li>Keyboard and mouse navigation.</li>=0A=
*    <li>A rich event model that provides access to all of a menu's =0A=
*    interesting moments.</li>=0A=
*    <li>Support for =0A=
*    <a =
href=3D"http://en.wikipedia.org/wiki/Progressive_Enhancement">Progressive=0A=
*    Enhancement</a>; Menus can be created from simple, =0A=
*    semantic markup on the page or purely through JavaScript.</li>=0A=
* </ul>=0A=
* @title Menu=0A=
* @namespace YAHOO.widget=0A=
* @requires Event, Dom, Container=0A=
*/=0A=
(function() {=0A=
=0A=
var Dom =3D YAHOO.util.Dom,=0A=
    Event =3D YAHOO.util.Event;=0A=
=0A=
=0A=
/**=0A=
* Singleton that manages a collection of all menus and menu items.  =
Listens for =0A=
* DOM events at the document level and dispatches the events to the =0A=
* corresponding menu or menu item.=0A=
*=0A=
* @namespace YAHOO.widget=0A=
* @class MenuManager=0A=
* @static=0A=
*/=0A=
YAHOO.widget.MenuManager =3D function() {=0A=
=0A=
    // Private member variables=0A=
=0A=
=0A=
    // Flag indicating if the DOM event handlers have been attached=0A=
=0A=
    var m_bInitializedEventHandlers =3D false,=0A=
=0A=
=0A=
        // Collection of menus=0A=
=0A=
        m_oMenus =3D {},=0A=
    =0A=
    =0A=
        //  Collection of menu items =0A=
=0A=
        m_oItems =3D {},=0A=
=0A=
=0A=
        // Collection of visible menus=0A=
    =0A=
        m_oVisibleMenus =3D {},=0A=
=0A=
=0A=
        // Map of DOM event types to their equivalent CustomEvent types=0A=
    =0A=
        m_oEventTypes =3D  {=0A=
            "click": "clickEvent",=0A=
            "mousedown": "mouseDownEvent",=0A=
            "mouseup": "mouseUpEvent",=0A=
            "mouseover": "mouseOverEvent",=0A=
            "mouseout": "mouseOutEvent",=0A=
            "keydown": "keyDownEvent",=0A=
            "keyup": "keyUpEvent",=0A=
            "keypress": "keyPressEvent"=0A=
        },=0A=
=0A=
=0A=
        m_oFocusedMenuItem =3D null;=0A=
=0A=
=0A=
=0A=
=0A=
    // Private methods=0A=
=0A=
=0A=
    /**=0A=
    * @method addItem=0A=
    * @description Adds an item to the collection of known menu items.=0A=
    * @private=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object specifying the =
MenuItem =0A=
    * instance to be added.=0A=
    */=0A=
    function addItem(p_oItem) {=0A=
=0A=
        var sId =3D p_oItem.id;=0A=
=0A=
        if(p_oItem && m_oItems[sId] !=3D p_oItem) {=0A=
    =0A=
            m_oItems[sId] =3D p_oItem;=0A=
=0A=
            p_oItem.destroyEvent.subscribe(onItemDestroy);=0A=
=0A=
=0A=
        }=0A=
    =0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method removeItem=0A=
    * @description Removes an item from the collection of known menu =
items.=0A=
    * @private=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object specifying the =
MenuItem =0A=
    * instance to be removed.=0A=
    */=0A=
    function removeItem(p_oItem) {=0A=
    =0A=
        var sId =3D p_oItem.id;=0A=
=0A=
        if(sId && m_oItems[sId]) {=0A=
=0A=
            delete m_oItems[sId];=0A=
=0A=
=0A=
        }=0A=
    =0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method getMenuRootElement=0A=
    * @description Finds the root DIV node of a menu or the root LI node =
of a =0A=
    * menu item.=0A=
    * @private=0A=
    * @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-58190037">HTMLElement</a>} p_oElement Object =
specifying =0A=
    * an HTML element.=0A=
    */=0A=
    function getMenuRootElement(p_oElement) {=0A=
    =0A=
        var oParentNode;=0A=
=0A=
        if(p_oElement && p_oElement.tagName) {=0A=
        =0A=
            switch(p_oElement.tagName.toUpperCase()) {=0A=
                    =0A=
                case "DIV":=0A=
    =0A=
                    oParentNode =3D p_oElement.parentNode;=0A=
    =0A=
                    // Check if the DIV is the inner "body" node of a =
menu=0A=
=0A=
                    if(=0A=
                        (=0A=
                            Dom.hasClass(p_oElement, "hd") ||=0A=
                            Dom.hasClass(p_oElement, "bd") ||=0A=
                            Dom.hasClass(p_oElement, "ft")=0A=
                        )=0A=
                        && =0A=
                        oParentNode && =0A=
                        oParentNode.tagName && =0A=
                        oParentNode.tagName.toUpperCase() =3D=3D "DIV"=0A=
                    ) {=0A=
                    =0A=
                        return oParentNode;=0A=
                    =0A=
                    }=0A=
                    else {=0A=
                    =0A=
                        return p_oElement;=0A=
                    =0A=
                    }=0A=
                =0A=
                break;=0A=
=0A=
                case "LI":=0A=
    =0A=
                    return p_oElement;=0A=
=0A=
                default:=0A=
    =0A=
                    oParentNode =3D p_oElement.parentNode;=0A=
    =0A=
                    if(oParentNode) {=0A=
                    =0A=
                        return getMenuRootElement(oParentNode);=0A=
                    =0A=
                    }=0A=
                =0A=
                break;=0A=
            =0A=
            }=0A=
=0A=
        }=0A=
        =0A=
    }=0A=
=0A=
=0A=
=0A=
    // Private event handlers=0A=
=0A=
=0A=
    /**=0A=
    * @method onDOMEvent=0A=
    * @description Generic, global event handler for all of a menu's =
DOM-based =0A=
    * events.  This listens for events against the document object.  If =
the =0A=
    * target of a given event is a member of a menu or menu item's DOM, =
the =0A=
    * instance's corresponding Custom Event is fired.=0A=
    * @private=0A=
    * @param {Event} p_oEvent Object representing the DOM event object =
passed =0A=
    * back by the event utility (YAHOO.util.Event).=0A=
    */=0A=
    function onDOMEvent(p_oEvent) {=0A=
=0A=
        // Get the target node of the DOM event=0A=
    =0A=
        var oTarget =3D Event.getTarget(p_oEvent),=0A=
=0A=
=0A=
        // See if the target of the event was a menu, or a menu item=0A=
=0A=
            oElement =3D getMenuRootElement(oTarget),=0A=
            oMenuItem,=0A=
            oMenu; =0A=
=0A=
=0A=
        if(oElement) {=0A=
=0A=
            var sTagName =3D oElement.tagName.toUpperCase();=0A=
    =0A=
            if(sTagName =3D=3D "LI") {=0A=
        =0A=
                var sId =3D oElement.id;=0A=
        =0A=
                if(sId && m_oItems[sId]) {=0A=
        =0A=
                    oMenuItem =3D m_oItems[sId];=0A=
                    oMenu =3D oMenuItem.parent;=0A=
        =0A=
                }=0A=
            =0A=
            }=0A=
            else if(sTagName =3D=3D "DIV") {=0A=
            =0A=
                if(oElement.id) {=0A=
                =0A=
                    oMenu =3D m_oMenus[oElement.id];=0A=
                =0A=
                }=0A=
            =0A=
            }=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(oMenu) {=0A=
=0A=
            var sCustomEventType =3D m_oEventTypes[p_oEvent.type];=0A=
=0A=
=0A=
            // Fire the Custom Event that corresponds the current DOM =
event    =0A=
    =0A=
            if(oMenuItem && !oMenuItem.cfg.getProperty("disabled")) {=0A=
=0A=
                oMenuItem[sCustomEventType].fire(p_oEvent);              =
     =0A=
=0A=
=0A=
                if (p_oEvent.type =3D=3D "keyup" || p_oEvent.type =3D=3D =
"mousedown") {=0A=
=0A=
                    if (m_oFocusedMenuItem !=3D oMenuItem) {=0A=
                    =0A=
                        if(m_oFocusedMenuItem) {=0A=
=0A=
                            m_oFocusedMenuItem.blurEvent.fire();=0A=
                        =0A=
                        }=0A=
=0A=
                        oMenuItem.focusEvent.fire();=0A=
                    =0A=
                    }=0A=
                =0A=
                }=0A=
=0A=
            }=0A=
    =0A=
            oMenu[sCustomEventType].fire(p_oEvent, oMenuItem);=0A=
        =0A=
        }=0A=
        else if(p_oEvent.type =3D=3D "mousedown") {=0A=
=0A=
            if(m_oFocusedMenuItem) {=0A=
=0A=
                m_oFocusedMenuItem.blurEvent.fire();=0A=
=0A=
                m_oFocusedMenuItem =3D null;=0A=
=0A=
            }=0A=
=0A=
=0A=
            /*=0A=
                If the target of the event wasn't a menu, hide all =0A=
                dynamically positioned menus=0A=
            */=0A=
            =0A=
            for(var i in m_oMenus) {=0A=
    =0A=
                if(YAHOO.lang.hasOwnProperty(m_oMenus,i)) {=0A=
    =0A=
                    oMenu =3D m_oMenus[i];=0A=
    =0A=
                    if(=0A=
                        oMenu.cfg.getProperty("clicktohide") && =0A=
                        oMenu.cfg.getProperty("position") =3D=3D =
"dynamic"=0A=
                    ) {=0A=
    =0A=
                        oMenu.hide();=0A=
    =0A=
                    }=0A=
                    else {=0A=
=0A=
                        oMenu.clearActiveItem(true);=0A=
    =0A=
                    }=0A=
    =0A=
                }=0A=
    =0A=
            } =0A=
=0A=
        }=0A=
        else if(p_oEvent.type =3D=3D "keyup") { =0A=
=0A=
            if(m_oFocusedMenuItem) {=0A=
=0A=
                m_oFocusedMenuItem.blurEvent.fire();=0A=
=0A=
                m_oFocusedMenuItem =3D null;=0A=
=0A=
            }=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method onMenuDestroy=0A=
    * @description "destroy" event handler for a menu.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    */=0A=
    function onMenuDestroy(p_sType, p_aArgs) {=0A=
=0A=
        if(m_oMenus[this.id]) {=0A=
=0A=
            delete m_oMenus[this.id];=0A=
=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method onMenuFocus=0A=
    * @description "focus" event handler for a MenuItem instance.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    */=0A=
    function onMenuFocus(p_sType, p_aArgs) {=0A=
=0A=
        var oItem =3D p_aArgs[0];=0A=
        =0A=
        if (oItem) {=0A=
=0A=
            m_oFocusedMenuItem =3D oItem;=0A=
        =0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method onMenuBlur=0A=
    * @description "blur" event handler for a MenuItem instance.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    */=0A=
    function onMenuBlur(p_sType, p_aArgs) {=0A=
=0A=
        m_oFocusedMenuItem =3D null;=0A=
=0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method onItemDestroy=0A=
    * @description "destroy" event handler for a MenuItem instance.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    */=0A=
    function onItemDestroy(p_sType, p_aArgs) {=0A=
=0A=
        var sId =3D this.id;=0A=
=0A=
        if(sId && m_oItems[sId]) {=0A=
=0A=
            delete m_oItems[sId];=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method onMenuVisibleConfigChange=0A=
    * @description Event handler for when the "visible" configuration =
property =0A=
    * of a Menu instance changes.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    */=0A=
    function onMenuVisibleConfigChange(p_sType, p_aArgs) {=0A=
=0A=
        var bVisible =3D p_aArgs[0];=0A=
        =0A=
        if(bVisible) {=0A=
=0A=
            m_oVisibleMenus[this.id] =3D this;=0A=
            =0A=
        =0A=
        }=0A=
        else if(m_oVisibleMenus[this.id]) {=0A=
        =0A=
            delete m_oVisibleMenus[this.id];=0A=
            =0A=
        =0A=
        }=0A=
    =0A=
    }=0A=
=0A=
=0A=
    /**=0A=
    * @method onItemAdded=0A=
    * @description "itemadded" event handler for a Menu instance.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    */=0A=
    function onItemAdded(p_sType, p_aArgs) {=0A=
    =0A=
        addItem(p_aArgs[0]);=0A=
    =0A=
    }=0A=
    =0A=
=0A=
    /**=0A=
    * @method onItemRemoved=0A=
    * @description "itemremoved" event handler for a Menu instance.=0A=
    * @private=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    */=0A=
    function onItemRemoved(p_sType, p_aArgs) {=0A=
=0A=
        removeItem(p_aArgs[0]);=0A=
    =0A=
    }=0A=
=0A=
=0A=
=0A=
    return {=0A=
=0A=
        // Privileged methods=0A=
=0A=
=0A=
        /**=0A=
        * @method addMenu=0A=
        * @description Adds a menu to the collection of known menus.=0A=
        * @param {YAHOO.widget.Menu} p_oMenu Object specifying the Menu  =0A=
        * instance to be added.=0A=
        */=0A=
        addMenu: function(p_oMenu) {=0A=
    =0A=
            if(p_oMenu && p_oMenu.id && !m_oMenus[p_oMenu.id]) {=0A=
    =0A=
                m_oMenus[p_oMenu.id] =3D p_oMenu;=0A=
            =0A=
        =0A=
                if(!m_bInitializedEventHandlers) {=0A=
        =0A=
                    var oDoc =3D document;=0A=
            =0A=
                    Event.on(oDoc, "mouseover", onDOMEvent, this, true);=0A=
                    Event.on(oDoc, "mouseout", onDOMEvent, this, true);=0A=
                    Event.on(oDoc, "mousedown", onDOMEvent, this, true);=0A=
                    Event.on(oDoc, "mouseup", onDOMEvent, this, true);=0A=
                    Event.on(oDoc, "click", onDOMEvent, this, true);=0A=
                    Event.on(oDoc, "keydown", onDOMEvent, this, true);=0A=
                    Event.on(oDoc, "keyup", onDOMEvent, this, true);=0A=
                    Event.on(oDoc, "keypress", onDOMEvent, this, true);=0A=
=0A=
=0A=
                    m_bInitializedEventHandlers =3D true;=0A=
                    =0A=
        =0A=
                }=0A=
        =0A=
                p_oMenu.destroyEvent.subscribe(onMenuDestroy);=0A=
                =0A=
                p_oMenu.cfg.subscribeToConfigEvent(=0A=
                    "visible", =0A=
                    onMenuVisibleConfigChange=0A=
                );=0A=
        =0A=
                p_oMenu.itemAddedEvent.subscribe(onItemAdded);=0A=
                p_oMenu.itemRemovedEvent.subscribe(onItemRemoved);=0A=
                p_oMenu.focusEvent.subscribe(onMenuFocus);=0A=
                p_oMenu.blurEvent.subscribe(onMenuBlur);=0A=
    =0A=
    =0A=
            }=0A=
    =0A=
        },=0A=
=0A=
    =0A=
        /**=0A=
        * @method removeMenu=0A=
        * @description Removes a menu from the collection of known menus.=0A=
        * @param {YAHOO.widget.Menu} p_oMenu Object specifying the Menu  =0A=
        * instance to be removed.=0A=
        */=0A=
        removeMenu: function(p_oMenu) {=0A=
    =0A=
            if(p_oMenu && m_oMenus[p_oMenu.id]) {=0A=
    =0A=
                delete m_oMenus[p_oMenu.id];=0A=
    =0A=
    =0A=
            }=0A=
    =0A=
        },=0A=
    =0A=
    =0A=
        /**=0A=
        * @method hideVisible=0A=
        * @description Hides all visible, dynamically positioned menus.=0A=
        */=0A=
        hideVisible: function() {=0A=
    =0A=
            var oMenu;=0A=
    =0A=
            for(var i in m_oVisibleMenus) {=0A=
    =0A=
                if(YAHOO.lang.hasOwnProperty(m_oVisibleMenus,i)) {=0A=
    =0A=
                    oMenu =3D m_oVisibleMenus[i];=0A=
    =0A=
                    if(oMenu.cfg.getProperty("position") =3D=3D =
"dynamic") {=0A=
    =0A=
                        oMenu.hide();=0A=
    =0A=
                    }=0A=
    =0A=
                }=0A=
    =0A=
            }        =0A=
        =0A=
        },=0A=
=0A=
=0A=
        /**=0A=
        * @method getMenus=0A=
        * @description Returns an array of all menus registered with the =0A=
        * menu manger.=0A=
        * @return {Array}=0A=
        */=0A=
        getMenus: function() {=0A=
        =0A=
            return m_oMenus;=0A=
        =0A=
        },=0A=
=0A=
=0A=
        /**=0A=
        * @method getMenu=0A=
        * @description Returns a menu with the specified id.=0A=
        * @param {String} p_sId String specifying the id of the menu to=0A=
        * be retrieved.=0A=
        * @return {YAHOO.widget.Menu}=0A=
        */=0A=
        getMenu: function(p_sId) {=0A=
    =0A=
            if(m_oMenus[p_sId]) {=0A=
            =0A=
                return m_oMenus[p_sId];=0A=
            =0A=
            }=0A=
        =0A=
        },=0A=
=0A=
=0A=
        /**=0A=
        * @method getFocusedMenuItem=0A=
        * @description Returns a reference to the menu item that =
currently =0A=
        * has focus.=0A=
        * @return {YAHOO.widget.MenuItem}=0A=
        */=0A=
        getFocusedMenuItem: function() {=0A=
=0A=
            return m_oFocusedMenuItem;=0A=
=0A=
        },=0A=
=0A=
=0A=
        /**=0A=
        * @method getFocusedMenu=0A=
        * @description Returns a reference to the menu that currently =
has focus.=0A=
        * @return {YAHOO.widget.Menu}=0A=
        */=0A=
        getFocusedMenu: function() {=0A=
=0A=
            if(m_oFocusedMenuItem) {=0A=
=0A=
                return (m_oFocusedMenuItem.parent.getRoot());=0A=
            =0A=
            }=0A=
=0A=
        },=0A=
=0A=
    =0A=
        /**=0A=
        * @method toString=0A=
        * @description Returns a string representing the menu manager.=0A=
        * @return {String}=0A=
        */=0A=
        toString: function() {=0A=
        =0A=
            return ("MenuManager");=0A=
        =0A=
        }=0A=
=0A=
    };=0A=
=0A=
}();=0A=
=0A=
})();=0A=
=0A=
=0A=
=0A=
/**=0A=
* The Menu class creates a container that holds a vertical list =
representing =0A=
* a set of options or commands.  Menu is the base class for all =0A=
* menu containers. =0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;div&#62;</code> element of the menu.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;select&#62;</code> element to be used as the data source =0A=
* for the menu.=0A=
* @param {<a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
* level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object =0A=
* specifying the <code>&#60;div&#62;</code> element of the menu.=0A=
* @param {<a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
* level-one-html.html#ID-94282980">HTMLSelectElement</a>} p_oElement =0A=
* Object specifying the <code>&#60;select&#62;</code> element to be used =
as =0A=
* the data source for the menu.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the menu. See configuration class documentation for =0A=
* more details.=0A=
* @namespace YAHOO.widget=0A=
* @class Menu=0A=
* @constructor=0A=
* @extends YAHOO.widget.Overlay=0A=
*/=0A=
(function() {=0A=
=0A=
var Dom =3D YAHOO.util.Dom,=0A=
    Event =3D YAHOO.util.Event,=0A=
    CustomEvent =3D YAHOO.util.CustomEvent,=0A=
    Lang =3D YAHOO.lang;=0A=
=0A=
=0A=
YAHOO.widget.Menu =3D function(p_oElement, p_oConfig) {=0A=
=0A=
    if(p_oConfig) {=0A=
=0A=
        this.parent =3D p_oConfig.parent;=0A=
        this.lazyLoad =3D p_oConfig.lazyLoad || p_oConfig.lazyload;=0A=
        this.itemData =3D p_oConfig.itemData || p_oConfig.itemdata;=0A=
=0A=
    }=0A=
=0A=
=0A=
    YAHOO.widget.Menu.superclass.constructor.call(=0A=
        this, =0A=
        p_oElement, =0A=
        p_oConfig=0A=
    );=0A=
=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Constant representing the name of the Menu's events=0A=
* @property YAHOO.widget.Menu._EVENT_TYPES=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.Menu._EVENT_TYPES =3D {=0A=
=0A=
    "MOUSE_OVER": "mouseover",=0A=
    "MOUSE_OUT": "mouseout",=0A=
    "MOUSE_DOWN": "mousedown",=0A=
    "MOUSE_UP": "mouseup",=0A=
    "CLICK": "click",=0A=
    "KEY_PRESS": "keypress",=0A=
    "KEY_DOWN": "keydown",=0A=
    "KEY_UP": "keyup",=0A=
    "FOCUS": "focus",=0A=
    "BLUR": "blur",=0A=
    "ITEM_ADDED": "itemAdded",=0A=
    "ITEM_REMOVED": "itemRemoved"=0A=
=0A=
};=0A=
=0A=
=0A=
=0A=
/**=0A=
* @method _checkPosition=0A=
* @description Checks to make sure that the value of the "position" =
property =0A=
* is one of the supported strings. Returns true if the position is =
supported.=0A=
* @private=0A=
* @param {Object} p_sPosition String specifying the position of the menu.=0A=
* @return {Boolean}=0A=
*/=0A=
YAHOO.widget.Menu._checkPosition =3D function(p_sPosition) {=0A=
=0A=
    if(typeof p_sPosition =3D=3D "string") {=0A=
=0A=
        var sPosition =3D p_sPosition.toLowerCase();=0A=
=0A=
        return ("dynamic,static".indexOf(sPosition) !=3D -1);=0A=
=0A=
    }=0A=
=0A=
};=0A=
=0A=
=0A=
=0A=
/**=0A=
* Constant representing the Menu's configuration properties=0A=
* @property YAHOO.widget.Menu._DEFAULT_CONFIG=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.Menu._DEFAULT_CONFIG =3D {=0A=
=0A=
    "VISIBLE": { =0A=
        key: "visible", =0A=
        value: false, =0A=
        validator: Lang.isBoolean=0A=
    }, =0A=
=0A=
    "CONSTRAIN_TO_VIEWPORT": {=0A=
        key: "constraintoviewport", =0A=
        value: true, =0A=
        validator: Lang.isBoolean, =0A=
        supercedes: ["iframe","x","y","xy"]=0A=
    }, =0A=
=0A=
    "POSITION": { =0A=
        key: "position", =0A=
        value: "dynamic", =0A=
        validator: YAHOO.widget.Menu._checkPosition, =0A=
        supercedes: ["visible"] =0A=
    }, =0A=
=0A=
    "SUBMENU_ALIGNMENT": { =0A=
        key: "submenualignment", =0A=
        value: ["tl","tr"]=0A=
    },=0A=
=0A=
    "AUTO_SUBMENU_DISPLAY": { =0A=
        key: "autosubmenudisplay", =0A=
        value: true, =0A=
        validator: Lang.isBoolean =0A=
    }, =0A=
=0A=
    "SHOW_DELAY": { =0A=
        key: "showdelay", =0A=
        value: 250, =0A=
        validator: Lang.isNumber =0A=
    }, =0A=
=0A=
    "HIDE_DELAY": { =0A=
        key: "hidedelay", =0A=
        value: 0, =0A=
        validator: Lang.isNumber, =0A=
        suppressEvent: true=0A=
    }, =0A=
=0A=
    "SUBMENU_HIDE_DELAY": { =0A=
        key: "submenuhidedelay", =0A=
        value: 250, =0A=
        validator: Lang.isNumber=0A=
    }, =0A=
=0A=
    "CLICK_TO_HIDE": { =0A=
        key: "clicktohide", =0A=
        value: true, =0A=
        validator: Lang.isBoolean=0A=
    },=0A=
=0A=
    "CONTAINER": { =0A=
        key: "container"=0A=
    }, =0A=
=0A=
    "MAX_HEIGHT": { =0A=
        key: "maxheight", =0A=
        value: 0, =0A=
        validator: Lang.isNumber=0A=
    }, =0A=
=0A=
    "CLASS_NAME": { =0A=
        key: "classname", =0A=
        value: null, =0A=
        validator: Lang.isString=0A=
    }=0A=
=0A=
};=0A=
=0A=
=0A=
YAHOO.lang.extend(YAHOO.widget.Menu, YAHOO.widget.Overlay, {=0A=
=0A=
=0A=
// Constants=0A=
=0A=
=0A=
/**=0A=
* @property CSS_CLASS_NAME=0A=
* @description String representing the CSS class(es) to be applied to =
the =0A=
* menu's <code>&#60;div&#62;</code> element.=0A=
* @default "yuimenu"=0A=
* @final=0A=
* @type String=0A=
*/=0A=
CSS_CLASS_NAME: "yuimenu",=0A=
=0A=
=0A=
/**=0A=
* @property ITEM_TYPE=0A=
* @description Object representing the type of menu item to instantiate =
and =0A=
* add when parsing the child nodes (either <code>&#60;li&#62;</code> =
element, =0A=
* <code>&#60;optgroup&#62;</code> element or =
<code>&#60;option&#62;</code>) =0A=
* of the menu's source HTML element.=0A=
* @default YAHOO.widget.MenuItem=0A=
* @final=0A=
* @type YAHOO.widget.MenuItem=0A=
*/=0A=
ITEM_TYPE: null,=0A=
=0A=
=0A=
/**=0A=
* @property GROUP_TITLE_TAG_NAME=0A=
* @description String representing the tagname of the HTML element used =
to =0A=
* title the menu's item groups.=0A=
* @default H6=0A=
* @final=0A=
* @type String=0A=
*/=0A=
GROUP_TITLE_TAG_NAME: "h6",=0A=
=0A=
=0A=
=0A=
// Private properties=0A=
=0A=
=0A=
/** =0A=
* @property _nHideDelayId=0A=
* @description Number representing the time-out setting used to cancel =
the =0A=
* hiding of a menu.=0A=
* @default null=0A=
* @private=0A=
* @type Number=0A=
*/=0A=
_nHideDelayId: null,=0A=
=0A=
=0A=
/** =0A=
* @property _nShowDelayId=0A=
* @description Number representing the time-out setting used to cancel =
the =0A=
* showing of a menu.=0A=
* @default null=0A=
* @private=0A=
* @type Number=0A=
*/=0A=
_nShowDelayId: null,=0A=
=0A=
=0A=
/** =0A=
* @property _nSubmenuHideDelayId=0A=
* @description Number representing the time-out setting used to cancel =
the =0A=
* hiding of a submenu.=0A=
* @default null=0A=
* @private=0A=
* @type Number=0A=
*/=0A=
_nSubmenuHideDelayId: null,=0A=
=0A=
=0A=
/** =0A=
* @property _nBodyScrollId=0A=
* @description Number representing the time-out setting used to cancel =
the =0A=
* scrolling of the menu's body element.=0A=
* @default null=0A=
* @private=0A=
* @type Number=0A=
*/=0A=
_nBodyScrollId: null,=0A=
=0A=
=0A=
/** =0A=
* @property _bHideDelayEventHandlersAssigned=0A=
* @description Boolean indicating if the "mouseover" and "mouseout" =
event =0A=
* handlers used for hiding the menu via a call to "window.setTimeout" =
have =0A=
* already been assigned.=0A=
* @default false=0A=
* @private=0A=
* @type Boolean=0A=
*/=0A=
_bHideDelayEventHandlersAssigned: false,=0A=
=0A=
=0A=
/**=0A=
* @property _bHandledMouseOverEvent=0A=
* @description Boolean indicating the current state of the menu's =0A=
* "mouseover" event.=0A=
* @default false=0A=
* @private=0A=
* @type Boolean=0A=
*/=0A=
_bHandledMouseOverEvent: false,=0A=
=0A=
=0A=
/**=0A=
* @property _bHandledMouseOutEvent=0A=
* @description Boolean indicating the current state of the menu's=0A=
* "mouseout" event.=0A=
* @default false=0A=
* @private=0A=
* @type Boolean=0A=
*/=0A=
_bHandledMouseOutEvent: false,=0A=
=0A=
=0A=
/**=0A=
* @property _aGroupTitleElements=0A=
* @description Array of HTML element used to title groups of menu items.=0A=
* @default []=0A=
* @private=0A=
* @type Array=0A=
*/=0A=
_aGroupTitleElements: null,=0A=
=0A=
=0A=
/**=0A=
* @property _aItemGroups=0A=
* @description Multi-dimensional Array representing the menu items as =
they=0A=
* are grouped in the menu.=0A=
* @default []=0A=
* @private=0A=
* @type Array=0A=
*/=0A=
_aItemGroups: null,=0A=
=0A=
=0A=
/**=0A=
* @property _aListElements=0A=
* @description Array of <code>&#60;ul&#62;</code> elements, each of =
which is =0A=
* the parent node for each item's <code>&#60;li&#62;</code> element.=0A=
* @default []=0A=
* @private=0A=
* @type Array=0A=
*/=0A=
_aListElements: null,=0A=
=0A=
=0A=
/**=0A=
* @property _nCurrentMouseX=0A=
* @description The current x coordinate of the mouse inside the area of =0A=
* the menu.=0A=
* @default 0=0A=
* @private=0A=
* @type Number=0A=
*/=0A=
_nCurrentMouseX: 0,=0A=
=0A=
=0A=
/**=0A=
* @property _nMaxHeight=0A=
* @description The original value of the "maxheight" configuration =
property =0A=
* as set by the user.=0A=
* @default -1=0A=
* @private=0A=
* @type Number=0A=
*/=0A=
_nMaxHeight: -1,=0A=
=0A=
=0A=
/**=0A=
* @property _bStopMouseEventHandlers=0A=
* @description Stops "mouseover," "mouseout," and "mousemove" event =
handlers =0A=
* from executing.=0A=
* @default false=0A=
* @private=0A=
* @type Boolean=0A=
*/=0A=
_bStopMouseEventHandlers: false,=0A=
=0A=
=0A=
/**=0A=
* @property _sClassName=0A=
* @description The current value of the "classname" configuration =
attribute.=0A=
* @default null=0A=
* @private=0A=
* @type String=0A=
*/=0A=
_sClassName: null,=0A=
=0A=
=0A=
=0A=
// Public properties=0A=
=0A=
=0A=
/**=0A=
* @property lazyLoad=0A=
* @description Boolean indicating if the menu's "lazy load" feature is =0A=
* enabled.  If set to "true," initialization and rendering of the menu's =0A=
* items will be deferred until the first time it is made visible.  This =0A=
* property should be set via the constructor using the configuration =0A=
* object literal.=0A=
* @default false=0A=
* @type Boolean=0A=
*/=0A=
lazyLoad: false,=0A=
=0A=
=0A=
/**=0A=
* @property itemData=0A=
* @description Array of items to be added to the menu.  The array can =
contain =0A=
* strings representing the text for each item to be created, object =
literals =0A=
* representing the menu item configuration properties, or MenuItem =
instances.  =0A=
* This property should be set via the constructor using the =
configuration =0A=
* object literal.=0A=
* @default null=0A=
* @type Array=0A=
*/=0A=
itemData: null,=0A=
=0A=
=0A=
/**=0A=
* @property activeItem=0A=
* @description Object reference to the item in the menu that has is =
selected.=0A=
* @default null=0A=
* @type YAHOO.widget.MenuItem=0A=
*/=0A=
activeItem: null,=0A=
=0A=
=0A=
/**=0A=
* @property parent=0A=
* @description Object reference to the menu's parent menu or menu item.  =0A=
* This property can be set via the constructor using the configuration =0A=
* object literal.=0A=
* @default null=0A=
* @type YAHOO.widget.MenuItem=0A=
*/=0A=
parent: null,=0A=
=0A=
=0A=
/**=0A=
* @property srcElement=0A=
* @description Object reference to the HTML element (either =0A=
* <code>&#60;select&#62;</code> or <code>&#60;div&#62;</code>) used to =0A=
* create the menu.=0A=
* @default null=0A=
* @type <a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
* level-one-html.html#ID-94282980">HTMLSelectElement</a>|<a =0A=
* =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.=0A=
* html#ID-22445964">HTMLDivElement</a>=0A=
*/=0A=
srcElement: null,=0A=
=0A=
=0A=
=0A=
// Events=0A=
=0A=
=0A=
/**=0A=
* @event mouseOverEvent=0A=
* @description Fires when the mouse has entered the menu.  Passes back =0A=
* the DOM Event object as an argument.=0A=
*/=0A=
mouseOverEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event mouseOutEvent=0A=
* @description Fires when the mouse has left the menu.  Passes back the =
DOM =0A=
* Event object as an argument.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
mouseOutEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event mouseDownEvent=0A=
* @description Fires when the user mouses down on the menu.  Passes back =
the =0A=
* DOM Event object as an argument.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
mouseDownEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event mouseUpEvent=0A=
* @description Fires when the user releases a mouse button while the =
mouse is =0A=
* over the menu.  Passes back the DOM Event object as an argument.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
mouseUpEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event clickEvent=0A=
* @description Fires when the user clicks the on the menu.  Passes back =
the =0A=
* DOM Event object as an argument.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
clickEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event keyPressEvent=0A=
* @description Fires when the user presses an alphanumeric key when one =
of the=0A=
* menu's items has focus.  Passes back the DOM Event object as an =
argument.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
keyPressEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event keyDownEvent=0A=
* @description Fires when the user presses a key when one of the menu's =
items =0A=
* has focus.  Passes back the DOM Event object as an argument.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
keyDownEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event keyUpEvent=0A=
* @description Fires when the user releases a key when one of the menu's =
items =0A=
* has focus.  Passes back the DOM Event object as an argument.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
keyUpEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event itemAddedEvent=0A=
* @description Fires when an item is added to the menu.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
itemAddedEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @event itemRemovedEvent=0A=
* @description Fires when an item is removed to the menu.=0A=
* @type YAHOO.util.CustomEvent=0A=
*/=0A=
itemRemovedEvent: null,=0A=
=0A=
=0A=
/**=0A=
* @method init=0A=
* @description The Menu class's initialization method. This method is =0A=
* automatically called by the constructor, and sets up all DOM =
references =0A=
* for pre-existing markup, and creates required markup if it is not =0A=
* already present.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;div&#62;</code> element of the menu.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;select&#62;</code> element to be used as the data source =0A=
* for the menu.=0A=
* @param {<a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
* level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object =0A=
* specifying the <code>&#60;div&#62;</code> element of the menu.=0A=
* @param {<a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
* level-one-html.html#ID-94282980">HTMLSelectElement</a>} p_oElement =0A=
* Object specifying the <code>&#60;select&#62;</code> element to be used =
as =0A=
* the data source for the menu.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the menu. See configuration class documentation for =0A=
* more details.=0A=
*/=0A=
init: function(p_oElement, p_oConfig) {=0A=
=0A=
    this._aItemGroups =3D [];=0A=
    this._aListElements =3D [];=0A=
    this._aGroupTitleElements =3D [];=0A=
=0A=
    if(!this.ITEM_TYPE) {=0A=
=0A=
        this.ITEM_TYPE =3D YAHOO.widget.MenuItem;=0A=
=0A=
    }=0A=
=0A=
=0A=
    var oElement;=0A=
=0A=
    if(typeof p_oElement =3D=3D "string") {=0A=
=0A=
        oElement =3D document.getElementById(p_oElement);=0A=
=0A=
    }=0A=
    else if(p_oElement.tagName) {=0A=
=0A=
        oElement =3D p_oElement;=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(oElement && oElement.tagName) {=0A=
=0A=
        switch(oElement.tagName.toUpperCase()) {=0A=
    =0A=
            case "DIV":=0A=
=0A=
                this.srcElement =3D oElement;=0A=
=0A=
                if(!oElement.id) {=0A=
=0A=
                    oElement.setAttribute("id", Dom.generateId());=0A=
=0A=
                }=0A=
=0A=
=0A=
                /* =0A=
                    Note: we don't pass the user config in here yet =0A=
                    because we only want it executed once, at the lowest =0A=
                    subclass level.=0A=
                */ =0A=
            =0A=
                YAHOO.widget.Menu.superclass.init.call(this, oElement);=0A=
=0A=
                this.beforeInitEvent.fire(YAHOO.widget.Menu);=0A=
=0A=
=0A=
    =0A=
            break;=0A=
    =0A=
            case "SELECT":=0A=
    =0A=
                this.srcElement =3D oElement;=0A=
=0A=
    =0A=
                /*=0A=
                    The source element is not something that we can use =0A=
                    outright, so we need to create a new Overlay=0A=
=0A=
                    Note: we don't pass the user config in here yet =0A=
                    because we only want it executed once, at the lowest =0A=
                    subclass level.=0A=
                */ =0A=
=0A=
                YAHOO.widget.Menu.superclass.init.call(this, =
Dom.generateId());=0A=
=0A=
                this.beforeInitEvent.fire(YAHOO.widget.Menu);=0A=
=0A=
=0A=
=0A=
            break;=0A=
=0A=
        }=0A=
=0A=
    }=0A=
    else {=0A=
=0A=
        /* =0A=
            Note: we don't pass the user config in here yet =0A=
            because we only want it executed once, at the lowest =0A=
            subclass level.=0A=
        */ =0A=
    =0A=
        YAHOO.widget.Menu.superclass.init.call(this, p_oElement);=0A=
=0A=
        this.beforeInitEvent.fire(YAHOO.widget.Menu);=0A=
=0A=
=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(this.element) {=0A=
=0A=
        var oEl =3D this.element;=0A=
=0A=
        Dom.addClass(oEl, this.CSS_CLASS_NAME);=0A=
=0A=
=0A=
        // Subscribe to Custom Events=0A=
=0A=
        this.initEvent.subscribe(this._onInit, this, true);=0A=
        this.beforeRenderEvent.subscribe(this._onBeforeRender, this, =
true);=0A=
        this.renderEvent.subscribe(this._onRender);=0A=
        this.beforeShowEvent.subscribe(this._onBeforeShow, this, true);=0A=
        this.showEvent.subscribe(this._onShow, this, true);=0A=
        this.beforeHideEvent.subscribe(this._onBeforeHide, this, true);=0A=
        this.hideEvent.subscribe(this._onHide, this, true);=0A=
        this.mouseOverEvent.subscribe(this._onMouseOver, this, true);=0A=
        this.mouseOutEvent.subscribe(this._onMouseOut, this, true);=0A=
        this.clickEvent.subscribe(this._onClick, this, true);=0A=
        this.keyDownEvent.subscribe(this._onKeyDown, this, true);=0A=
        this.keyPressEvent.subscribe(this._onKeyPress, this, true);=0A=
=0A=
        YAHOO.widget.Module.textResizeEvent.subscribe(=0A=
            this._onTextResize, =0A=
            this, =0A=
            true=0A=
        );=0A=
=0A=
=0A=
        if(p_oConfig) {=0A=
    =0A=
            this.cfg.applyConfig(p_oConfig, true);=0A=
    =0A=
        }=0A=
=0A=
=0A=
        // Register the Menu instance with the MenuManager=0A=
=0A=
        YAHOO.widget.MenuManager.addMenu(this);=0A=
        =0A=
=0A=
        this.initEvent.fire(YAHOO.widget.Menu);=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Private methods=0A=
=0A=
=0A=
/**=0A=
* @method _initSubTree=0A=
* @description Iterates the childNodes of the source element to find =
nodes =0A=
* used to instantiate menu and menu items.=0A=
* @private=0A=
*/=0A=
_initSubTree: function() {=0A=
=0A=
    var oNode;=0A=
=0A=
    if(this.srcElement.tagName.toUpperCase() =3D=3D "DIV") {=0A=
=0A=
        /*=0A=
            Populate the collection of item groups and item=0A=
            group titles=0A=
        */=0A=
=0A=
        oNode =3D this.body.firstChild;=0A=
=0A=
        var nGroup =3D 0,=0A=
            sGroupTitleTagName =3D =
this.GROUP_TITLE_TAG_NAME.toUpperCase();=0A=
=0A=
        do {=0A=
=0A=
            if(oNode && oNode.tagName) {=0A=
=0A=
                switch(oNode.tagName.toUpperCase()) {=0A=
=0A=
                    case sGroupTitleTagName:=0A=
                    =0A=
                        this._aGroupTitleElements[nGroup] =3D oNode;=0A=
=0A=
                    break;=0A=
=0A=
                    case "UL":=0A=
=0A=
                        this._aListElements[nGroup] =3D oNode;=0A=
                        this._aItemGroups[nGroup] =3D [];=0A=
                        nGroup++;=0A=
=0A=
                    break;=0A=
=0A=
                }=0A=
            =0A=
            }=0A=
=0A=
        }=0A=
        while((oNode =3D oNode.nextSibling));=0A=
=0A=
=0A=
        /*=0A=
            Apply the "first-of-type" class to the first UL to mimic =0A=
            the "first-of-type" CSS3 psuedo class.=0A=
        */=0A=
=0A=
        if(this._aListElements[0]) {=0A=
=0A=
            Dom.addClass(this._aListElements[0], "first-of-type");=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    oNode =3D null;=0A=
=0A=
=0A=
    if(this.srcElement.tagName) {=0A=
=0A=
        var sSrcElementTagName =3D this.srcElement.tagName.toUpperCase();=0A=
=0A=
=0A=
        switch(sSrcElementTagName) {=0A=
    =0A=
            case "DIV":=0A=
    =0A=
                if(this._aListElements.length > 0) {=0A=
    =0A=
    =0A=
                    var i =3D this._aListElements.length - 1;=0A=
    =0A=
                    do {=0A=
    =0A=
                        oNode =3D this._aListElements[i].firstChild;=0A=
        =0A=
    =0A=
                        do {=0A=
        =0A=
                            if(=0A=
                                oNode && =0A=
                                oNode.tagName && =0A=
                                oNode.tagName.toUpperCase() =3D=3D "LI"=0A=
                            ) {=0A=
        =0A=
=0A=
                                this.addItem(=0A=
                                        new this.ITEM_TYPE(=0A=
                                            oNode, =0A=
                                            { parent: this }=0A=
                                        ), =0A=
                                        i=0A=
                                    );=0A=
    =0A=
                            }=0A=
                =0A=
                        }=0A=
                        while((oNode =3D oNode.nextSibling));=0A=
                =0A=
                    }=0A=
                    while(i--);=0A=
    =0A=
                }=0A=
    =0A=
            break;=0A=
    =0A=
            case "SELECT":=0A=
    =0A=
    =0A=
                oNode =3D this.srcElement.firstChild;=0A=
    =0A=
                do {=0A=
    =0A=
                    if(oNode && oNode.tagName) {=0A=
                    =0A=
                        switch(oNode.tagName.toUpperCase()) {=0A=
        =0A=
                            case "OPTGROUP":=0A=
                            case "OPTION":=0A=
        =0A=
        =0A=
                                this.addItem(=0A=
                                        new this.ITEM_TYPE(=0A=
                                                oNode, =0A=
                                                { parent: this }=0A=
                                            )=0A=
                                        );=0A=
        =0A=
                            break;=0A=
        =0A=
                        }=0A=
=0A=
                    }=0A=
    =0A=
                }=0A=
                while((oNode =3D oNode.nextSibling));=0A=
    =0A=
            break;=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _getFirstEnabledItem=0A=
* @description Returns the first enabled item in the menu.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
* @private=0A=
*/=0A=
_getFirstEnabledItem: function() {=0A=
=0A=
    var aItems =3D this.getItems(),=0A=
        nItems =3D aItems.length,=0A=
        oItem;=0A=
    =0A=
    for(var i=3D0; i<nItems; i++) {=0A=
=0A=
        oItem =3D aItems[i];=0A=
=0A=
        if(=0A=
            oItem && =0A=
            !oItem.cfg.getProperty("disabled") && =0A=
            oItem.element.style.display !=3D "none"=0A=
        ) {=0A=
=0A=
            return oItem;=0A=
=0A=
        }=0A=
    =0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _addItemToGroup=0A=
* @description Adds a menu item to a group.=0A=
* @private=0A=
* @param {Number} p_nGroupIndex Number indicating the group to which the =0A=
* item belongs.=0A=
* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the =
MenuItem =0A=
* instance to be added to the menu.=0A=
* @param {String} p_oItem String specifying the text of the item to be =
added =0A=
* to the menu.=0A=
* @param {Object} p_oItem Object literal containing a set of menu item =0A=
* configuration properties.=0A=
* @param {Number} p_nItemIndex Optional. Number indicating the index at =0A=
* which the menu item should be added.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
*/=0A=
_addItemToGroup: function(p_nGroupIndex, p_oItem, p_nItemIndex) {=0A=
=0A=
    var oItem;=0A=
=0A=
    if(p_oItem instanceof this.ITEM_TYPE) {=0A=
=0A=
        oItem =3D p_oItem;=0A=
        oItem.parent =3D this;=0A=
=0A=
    }=0A=
    else if(typeof p_oItem =3D=3D "string") {=0A=
=0A=
        oItem =3D new this.ITEM_TYPE(p_oItem, { parent: this });=0A=
    =0A=
    }=0A=
    else if(typeof p_oItem =3D=3D "object") {=0A=
=0A=
        p_oItem.parent =3D this;=0A=
=0A=
        oItem =3D new this.ITEM_TYPE(p_oItem.text, p_oItem);=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(oItem) {=0A=
=0A=
        if (oItem.cfg.getProperty("selected")) {=0A=
=0A=
            this.activeItem =3D oItem;=0A=
        =0A=
        }=0A=
=0A=
=0A=
        var nGroupIndex =3D typeof p_nGroupIndex =3D=3D "number" ? =
p_nGroupIndex : 0,=0A=
            aGroup =3D this._getItemGroup(nGroupIndex),=0A=
            oGroupItem;=0A=
=0A=
=0A=
        if(!aGroup) {=0A=
=0A=
            aGroup =3D this._createItemGroup(nGroupIndex);=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(typeof p_nItemIndex =3D=3D "number") {=0A=
=0A=
            var bAppend =3D (p_nItemIndex >=3D aGroup.length);           =
 =0A=
=0A=
=0A=
            if(aGroup[p_nItemIndex]) {=0A=
    =0A=
                aGroup.splice(p_nItemIndex, 0, oItem);=0A=
    =0A=
            }=0A=
            else {=0A=
    =0A=
                aGroup[p_nItemIndex] =3D oItem;=0A=
    =0A=
            }=0A=
=0A=
=0A=
            oGroupItem =3D aGroup[p_nItemIndex];=0A=
=0A=
            if(oGroupItem) {=0A=
=0A=
                if(=0A=
                    bAppend && =0A=
                    (=0A=
                        !oGroupItem.element.parentNode || =0A=
                        oGroupItem.element.parentNode.nodeType =3D=3D 11=0A=
                    )=0A=
                ) {=0A=
        =0A=
                    this._aListElements[nGroupIndex].appendChild(=0A=
                        oGroupItem.element=0A=
                    );=0A=
    =0A=
                }=0A=
                else {=0A=
  =0A=
                    function getNextItemSibling(p_aArray, p_nStartIndex) =
{=0A=
                =0A=
                            return (=0A=
                                    p_aArray[p_nStartIndex] || =0A=
                                    getNextItemSibling(=0A=
                                        p_aArray, =0A=
                                        (p_nStartIndex+1)=0A=
                                    )=0A=
                                );=0A=
=0A=
                    }=0A=
    =0A=
    =0A=
                    var oNextItemSibling =3D =0A=
                            getNextItemSibling(aGroup, (p_nItemIndex+1));=0A=
    =0A=
                    if(=0A=
                        oNextItemSibling && =0A=
                        (=0A=
                            !oGroupItem.element.parentNode || =0A=
                            oGroupItem.element.parentNode.nodeType =
=3D=3D 11=0A=
                        )=0A=
                    ) {=0A=
            =0A=
                        this._aListElements[nGroupIndex].insertBefore(=0A=
                                oGroupItem.element, =0A=
                                oNextItemSibling.element=0A=
                            );=0A=
        =0A=
                    }=0A=
    =0A=
                }=0A=
    =0A=
=0A=
                oGroupItem.parent =3D this;=0A=
        =0A=
                this._subscribeToItemEvents(oGroupItem);=0A=
    =0A=
                this._configureSubmenu(oGroupItem);=0A=
                =0A=
                this._updateItemProperties(nGroupIndex);=0A=
        =0A=
=0A=
                this.itemAddedEvent.fire(oGroupItem);=0A=
=0A=
                return oGroupItem;=0A=
    =0A=
            }=0A=
=0A=
        }=0A=
        else {=0A=
    =0A=
            var nItemIndex =3D aGroup.length;=0A=
    =0A=
            aGroup[nItemIndex] =3D oItem;=0A=
=0A=
            oGroupItem =3D aGroup[nItemIndex];=0A=
    =0A=
=0A=
            if(oGroupItem) {=0A=
    =0A=
                if(=0A=
                    !Dom.isAncestor(=0A=
                        this._aListElements[nGroupIndex], =0A=
                        oGroupItem.element=0A=
                    )=0A=
                ) {=0A=
    =0A=
                    this._aListElements[nGroupIndex].appendChild(=0A=
                        oGroupItem.element=0A=
                    );=0A=
    =0A=
                }=0A=
    =0A=
                oGroupItem.element.setAttribute("groupindex", =
nGroupIndex);=0A=
                oGroupItem.element.setAttribute("index", nItemIndex);=0A=
        =0A=
                oGroupItem.parent =3D this;=0A=
    =0A=
                oGroupItem.index =3D nItemIndex;=0A=
                oGroupItem.groupIndex =3D nGroupIndex;=0A=
        =0A=
                this._subscribeToItemEvents(oGroupItem);=0A=
    =0A=
                this._configureSubmenu(oGroupItem);=0A=
    =0A=
                if(nItemIndex =3D=3D=3D 0) {=0A=
        =0A=
                    Dom.addClass(oGroupItem.element, "first-of-type");=0A=
        =0A=
                }=0A=
=0A=
        =0A=
=0A=
                this.itemAddedEvent.fire(oGroupItem);=0A=
=0A=
                return oGroupItem;=0A=
    =0A=
            }=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _removeItemFromGroupByIndex=0A=
* @description Removes a menu item from a group by index.  Returns the =
menu =0A=
* item that was removed.=0A=
* @private=0A=
* @param {Number} p_nGroupIndex Number indicating the group to which the =
menu =0A=
* item belongs.=0A=
* @param {Number} p_nItemIndex Number indicating the index of the menu =
item =0A=
* to be removed.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
*/=0A=
_removeItemFromGroupByIndex: function(p_nGroupIndex, p_nItemIndex) {=0A=
=0A=
    var nGroupIndex =3D typeof p_nGroupIndex =3D=3D "number" ? =
p_nGroupIndex : 0,=0A=
        aGroup =3D this._getItemGroup(nGroupIndex);=0A=
=0A=
    if(aGroup) {=0A=
=0A=
        var aArray =3D aGroup.splice(p_nItemIndex, 1),=0A=
            oItem =3D aArray[0];=0A=
    =0A=
        if(oItem) {=0A=
    =0A=
            // Update the index and className properties of each member  =
      =0A=
            =0A=
            this._updateItemProperties(nGroupIndex);=0A=
    =0A=
            if(aGroup.length =3D=3D=3D 0) {=0A=
    =0A=
                // Remove the UL=0A=
    =0A=
                var oUL =3D this._aListElements[nGroupIndex];=0A=
    =0A=
                if(this.body && oUL) {=0A=
    =0A=
                    this.body.removeChild(oUL);=0A=
    =0A=
                }=0A=
    =0A=
                // Remove the group from the array of items=0A=
    =0A=
                this._aItemGroups.splice(nGroupIndex, 1);=0A=
    =0A=
    =0A=
                // Remove the UL from the array of ULs=0A=
    =0A=
                this._aListElements.splice(nGroupIndex, 1);=0A=
    =0A=
    =0A=
                /*=0A=
                     Assign the "first-of-type" class to the new first =
UL =0A=
                     in the collection=0A=
                */=0A=
    =0A=
                oUL =3D this._aListElements[0];=0A=
    =0A=
                if(oUL) {=0A=
    =0A=
                    Dom.addClass(oUL, "first-of-type");=0A=
    =0A=
                }            =0A=
    =0A=
            }=0A=
    =0A=
=0A=
            this.itemRemovedEvent.fire(oItem);    =0A=
=0A=
=0A=
            // Return a reference to the item that was removed=0A=
        =0A=
            return oItem;=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _removeItemFromGroupByValue=0A=
* @description Removes a menu item from a group by reference.  Returns =
the =0A=
* menu item that was removed.=0A=
* @private=0A=
* @param {Number} p_nGroupIndex Number indicating the group to which the=0A=
* menu item belongs.=0A=
* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the =
MenuItem =0A=
* instance to be removed.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
*/    =0A=
_removeItemFromGroupByValue: function(p_nGroupIndex, p_oItem) {=0A=
=0A=
    var aGroup =3D this._getItemGroup(p_nGroupIndex);=0A=
=0A=
    if(aGroup) {=0A=
=0A=
        var nItems =3D aGroup.length,=0A=
            nItemIndex =3D -1;=0A=
    =0A=
        if(nItems > 0) {=0A=
    =0A=
            var i =3D nItems-1;=0A=
        =0A=
            do {=0A=
        =0A=
                if(aGroup[i] =3D=3D p_oItem) {=0A=
        =0A=
                    nItemIndex =3D i;=0A=
                    break;    =0A=
        =0A=
                }=0A=
        =0A=
            }=0A=
            while(i--);=0A=
        =0A=
            if(nItemIndex > -1) {=0A=
        =0A=
                return this._removeItemFromGroupByIndex(=0A=
                            p_nGroupIndex, =0A=
                            nItemIndex=0A=
                        );=0A=
        =0A=
            }=0A=
    =0A=
        }=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _updateItemProperties=0A=
* @description Updates the "index," "groupindex," and "className" =
properties =0A=
* of the menu items in the specified group. =0A=
* @private=0A=
* @param {Number} p_nGroupIndex Number indicating the group of items to =
update.=0A=
*/=0A=
_updateItemProperties: function(p_nGroupIndex) {=0A=
=0A=
    var aGroup =3D this._getItemGroup(p_nGroupIndex),=0A=
        nItems =3D aGroup.length;=0A=
=0A=
    if(nItems > 0) {=0A=
=0A=
        var i =3D nItems - 1,=0A=
            oItem,=0A=
            oLI;=0A=
=0A=
        // Update the index and className properties of each member=0A=
    =0A=
        do {=0A=
=0A=
            oItem =3D aGroup[i];=0A=
=0A=
            if(oItem) {=0A=
    =0A=
                oLI =3D oItem.element;=0A=
=0A=
                oItem.index =3D i;=0A=
                oItem.groupIndex =3D p_nGroupIndex;=0A=
=0A=
                oLI.setAttribute("groupindex", p_nGroupIndex);=0A=
                oLI.setAttribute("index", i);=0A=
=0A=
                Dom.removeClass(oLI, "first-of-type");=0A=
=0A=
            }=0A=
    =0A=
        }=0A=
        while(i--);=0A=
=0A=
=0A=
        if(oLI) {=0A=
=0A=
            Dom.addClass(oLI, "first-of-type");=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _createItemGroup=0A=
* @description Creates a new menu item group (array) and its associated =0A=
* <code>&#60;ul&#62;</code> element. Returns an aray of menu item groups.=0A=
* @private=0A=
* @param {Number} p_nIndex Number indicating the group to create.=0A=
* @return {Array}=0A=
*/=0A=
_createItemGroup: function(p_nIndex) {=0A=
=0A=
    if(!this._aItemGroups[p_nIndex]) {=0A=
=0A=
        this._aItemGroups[p_nIndex] =3D [];=0A=
=0A=
        var oUL =3D document.createElement("ul");=0A=
=0A=
        this._aListElements[p_nIndex] =3D oUL;=0A=
=0A=
        return this._aItemGroups[p_nIndex];=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _getItemGroup=0A=
* @description Returns the menu item group at the specified index.=0A=
* @private=0A=
* @param {Number} p_nIndex Number indicating the index of the menu item =
group =0A=
* to be retrieved.=0A=
* @return {Array}=0A=
*/=0A=
_getItemGroup: function(p_nIndex) {=0A=
=0A=
    var nIndex =3D ((typeof p_nIndex =3D=3D "number") ? p_nIndex : 0);=0A=
=0A=
    return this._aItemGroups[nIndex];=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _configureSubmenu=0A=
* @description Subscribes the menu item's submenu to its parent menu's =
events.=0A=
* @private=0A=
* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the =
MenuItem =0A=
* instance with the submenu to be configured.=0A=
*/=0A=
_configureSubmenu: function(p_oItem) {=0A=
=0A=
    var oSubmenu =3D p_oItem.cfg.getProperty("submenu");=0A=
=0A=
    if(oSubmenu) {=0A=
            =0A=
        /*=0A=
            Listen for configuration changes to the parent menu =0A=
            so they they can be applied to the submenu.=0A=
        */=0A=
=0A=
        this.cfg.configChangedEvent.subscribe(=0A=
                this._onParentMenuConfigChange, =0A=
                oSubmenu, =0A=
                true=0A=
            );=0A=
=0A=
        this.renderEvent.subscribe(=0A=
                this._onParentMenuRender,=0A=
                oSubmenu, =0A=
                true=0A=
            );=0A=
=0A=
        oSubmenu.beforeShowEvent.subscribe(=0A=
                this._onSubmenuBeforeShow, =0A=
                oSubmenu, =0A=
                true=0A=
            );=0A=
=0A=
        oSubmenu.showEvent.subscribe(this._onSubmenuShow, null, p_oItem);=0A=
        oSubmenu.hideEvent.subscribe(this._onSubmenuHide, null, p_oItem);=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _subscribeToItemEvents=0A=
* @description Subscribes a menu to a menu item's event.=0A=
* @private=0A=
* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the =
MenuItem =0A=
* instance whose events should be subscribed to.=0A=
*/=0A=
_subscribeToItemEvents: function(p_oItem) {=0A=
=0A=
    p_oItem.focusEvent.subscribe(this._onMenuItemFocus);=0A=
=0A=
    p_oItem.blurEvent.subscribe(this._onMenuItemBlur);=0A=
=0A=
    p_oItem.cfg.configChangedEvent.subscribe(=0A=
        this._onMenuItemConfigChange,=0A=
        p_oItem,=0A=
        this=0A=
    );=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _getOffsetWidth=0A=
* @description Returns the offset width of the menu's =0A=
* <code>&#60;div&#62;</code> element.=0A=
* @private=0A=
*/=0A=
_getOffsetWidth: function() {=0A=
=0A=
    var oClone =3D this.element.cloneNode(true);=0A=
=0A=
    Dom.setStyle(oClone, "width", "");=0A=
=0A=
    document.body.appendChild(oClone);=0A=
=0A=
    var sWidth =3D oClone.offsetWidth;=0A=
=0A=
    document.body.removeChild(oClone);=0A=
=0A=
    return sWidth;=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _setWidth=0A=
* @description Sets the width of the menu's root =
<code>&#60;div&#62;</code> =0A=
* element to its offsetWidth.=0A=
* @private=0A=
*/=0A=
_setWidth: function() {=0A=
=0A=
    var sWidth;=0A=
=0A=
    if (this.element.parentNode.tagName.toUpperCase() =3D=3D "BODY") {=0A=
=0A=
        if (this.browser =3D=3D "opera") {=0A=
=0A=
            sWidth =3D this._getOffsetWidth();=0A=
        =0A=
        }=0A=
        else {=0A=
=0A=
            Dom.setStyle(this.element, "width", "auto");=0A=
            =0A=
            sWidth =3D this.element.offsetWidth;=0A=
        =0A=
        }=0A=
=0A=
    }=0A=
    else {=0A=
    =0A=
        sWidth =3D this._getOffsetWidth();=0A=
    =0A=
    }=0A=
=0A=
    this.cfg.setProperty("width", (sWidth + "px"));=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onWidthChange=0A=
* @description Change event handler for the the menu's "width" =
configuration=0A=
* property.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
*/=0A=
_onWidthChange: function(p_sType, p_aArgs) {=0A=
=0A=
    var sWidth =3D p_aArgs[0];=0A=
    =0A=
    if (sWidth && !this._hasSetWidthHandlers) {=0A=
=0A=
        this.itemAddedEvent.subscribe(this._setWidth);=0A=
        this.itemRemovedEvent.subscribe(this._setWidth);=0A=
=0A=
        this._hasSetWidthHandlers =3D true;=0A=
=0A=
    }=0A=
    else if (this._hasSetWidthHandlers) {=0A=
=0A=
        this.itemAddedEvent.unsubscribe(this._setWidth);=0A=
        this.itemRemovedEvent.unsubscribe(this._setWidth);=0A=
=0A=
        this._hasSetWidthHandlers =3D false;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onVisibleChange=0A=
* @description Change event handler for the the menu's "visible" =
configuration=0A=
* property.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
*/=0A=
_onVisibleChange: function(p_sType, p_aArgs) {=0A=
=0A=
    var bVisible =3D p_aArgs[0];=0A=
    =0A=
    if (bVisible) {=0A=
=0A=
        Dom.addClass(this.element, "visible");=0A=
=0A=
    }=0A=
    else {=0A=
=0A=
        Dom.removeClass(this.element, "visible");=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _cancelHideDelay=0A=
* @description Cancels the call to "hideMenu."=0A=
* @private=0A=
*/=0A=
_cancelHideDelay: function() {=0A=
=0A=
    var oRoot =3D this.getRoot();=0A=
=0A=
    if(oRoot._nHideDelayId) {=0A=
=0A=
        window.clearTimeout(oRoot._nHideDelayId);=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _execHideDelay=0A=
* @description Hides the menu after the number of milliseconds specified =
by =0A=
* the "hidedelay" configuration property.=0A=
* @private=0A=
*/=0A=
_execHideDelay: function() {=0A=
=0A=
    this._cancelHideDelay();=0A=
=0A=
    var oRoot =3D this.getRoot(),=0A=
        me =3D this;=0A=
=0A=
    function hideMenu() {=0A=
    =0A=
        if(oRoot.activeItem) {=0A=
=0A=
            oRoot.clearActiveItem();=0A=
=0A=
        }=0A=
=0A=
        if(oRoot =3D=3D me && me.cfg.getProperty("position") =3D=3D =
"dynamic") {=0A=
=0A=
            me.hide();            =0A=
        =0A=
        }=0A=
    =0A=
    }=0A=
=0A=
=0A=
    oRoot._nHideDelayId =3D =0A=
        window.setTimeout(hideMenu, oRoot.cfg.getProperty("hidedelay"));=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _cancelShowDelay=0A=
* @description Cancels the call to the "showMenu."=0A=
* @private=0A=
*/=0A=
_cancelShowDelay: function() {=0A=
=0A=
    var oRoot =3D this.getRoot();=0A=
=0A=
    if(oRoot._nShowDelayId) {=0A=
=0A=
        window.clearTimeout(oRoot._nShowDelayId);=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _execShowDelay=0A=
* @description Shows the menu after the number of milliseconds specified =
by =0A=
* the "showdelay" configuration property have ellapsed.=0A=
* @private=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object specifying the menu that =
should =0A=
* be made visible.=0A=
*/=0A=
_execShowDelay: function(p_oMenu) {=0A=
=0A=
    var oRoot =3D this.getRoot();=0A=
=0A=
    function showMenu() {=0A=
=0A=
        if(p_oMenu.parent.cfg.getProperty("selected")) {=0A=
=0A=
            p_oMenu.show();=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    oRoot._nShowDelayId =3D =0A=
        window.setTimeout(showMenu, oRoot.cfg.getProperty("showdelay"));=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _execSubmenuHideDelay=0A=
* @description Hides a submenu after the number of milliseconds =
specified by =0A=
* the "submenuhidedelay" configuration property have ellapsed.=0A=
* @private=0A=
* @param {YAHOO.widget.Menu} p_oSubmenu Object specifying the submenu =
that  =0A=
* should be hidden.=0A=
* @param {Number} p_nMouseX The x coordinate of the mouse when it left =0A=
* the specified submenu's parent menu item.=0A=
* @param {Number} p_nHideDelay The number of milliseconds that should =
ellapse=0A=
* before the submenu is hidden.=0A=
*/=0A=
_execSubmenuHideDelay: function(p_oSubmenu, p_nMouseX, p_nHideDelay) {=0A=
=0A=
    var me =3D this;=0A=
=0A=
    p_oSubmenu._nSubmenuHideDelayId =3D window.setTimeout(function () {=0A=
=0A=
        if(me._nCurrentMouseX > (p_nMouseX + 10)) {=0A=
=0A=
            p_oSubmenu._nSubmenuHideDelayId =3D =
window.setTimeout(function () {=0A=
        =0A=
                p_oSubmenu.hide();=0A=
=0A=
            }, p_nHideDelay);=0A=
=0A=
        }=0A=
        else {=0A=
=0A=
            p_oSubmenu.hide();=0A=
        =0A=
        }=0A=
=0A=
    }, 50);=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Protected methods=0A=
=0A=
=0A=
/**=0A=
* @method _disableScrollHeader=0A=
* @description Disables the header used for scrolling the body of the =
menu.=0A=
* @protected=0A=
*/=0A=
_disableScrollHeader: function() {=0A=
=0A=
    if(!this._bHeaderDisabled) {=0A=
=0A=
        Dom.addClass(this.header, "topscrollbar_disabled");=0A=
        this._bHeaderDisabled =3D true;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _disableScrollFooter=0A=
* @description Disables the footer used for scrolling the body of the =
menu.=0A=
* @protected=0A=
*/=0A=
_disableScrollFooter: function() {=0A=
=0A=
    if(!this._bFooterDisabled) {=0A=
=0A=
        Dom.addClass(this.footer, "bottomscrollbar_disabled");=0A=
        this._bFooterDisabled =3D true;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _enableScrollHeader=0A=
* @description Enables the header used for scrolling the body of the =
menu.=0A=
* @protected=0A=
*/=0A=
_enableScrollHeader: function() {=0A=
=0A=
    if(this._bHeaderDisabled) {=0A=
=0A=
        Dom.removeClass(this.header, "topscrollbar_disabled");=0A=
        this._bHeaderDisabled =3D false;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _enableScrollFooter=0A=
* @description Enables the footer used for scrolling the body of the =
menu.=0A=
* @protected=0A=
*/=0A=
_enableScrollFooter: function() {=0A=
=0A=
    if(this._bFooterDisabled) {=0A=
=0A=
        Dom.removeClass(this.footer, "bottomscrollbar_disabled");=0A=
        this._bFooterDisabled =3D false;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onMouseOver=0A=
* @description "mouseover" event handler for the menu.=0A=
* @protected=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onMouseOver: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    if(this._bStopMouseEventHandlers) {=0A=
    =0A=
        return false;=0A=
    =0A=
    }=0A=
=0A=
=0A=
    var oEvent =3D p_aArgs[0],=0A=
        oItem =3D p_aArgs[1],=0A=
        oTarget =3D Event.getTarget(oEvent);=0A=
=0A=
=0A=
    if(=0A=
        !this._bHandledMouseOverEvent && =0A=
        (oTarget =3D=3D this.element || Dom.isAncestor(this.element, =
oTarget))=0A=
    ) {=0A=
=0A=
        // Menu mouseover logic=0A=
=0A=
        this._nCurrentMouseX =3D 0;=0A=
=0A=
        Event.on(=0A=
                this.element, =0A=
                "mousemove", =0A=
                this._onMouseMove, =0A=
                this, =0A=
                true=0A=
            );=0A=
=0A=
=0A=
        this.clearActiveItem();=0A=
=0A=
=0A=
        if(this.parent && this._nSubmenuHideDelayId) {=0A=
=0A=
            window.clearTimeout(this._nSubmenuHideDelayId);=0A=
=0A=
            this.parent.cfg.setProperty("selected", true);=0A=
=0A=
            var oParentMenu =3D this.parent.parent;=0A=
=0A=
            oParentMenu._bHandledMouseOutEvent =3D true;=0A=
            oParentMenu._bHandledMouseOverEvent =3D false;=0A=
=0A=
        }=0A=
=0A=
=0A=
        this._bHandledMouseOverEvent =3D true;=0A=
        this._bHandledMouseOutEvent =3D false;=0A=
    =0A=
    }=0A=
=0A=
=0A=
    if(=0A=
        oItem && !oItem.handledMouseOverEvent && =0A=
        !oItem.cfg.getProperty("disabled") && =0A=
        (oTarget =3D=3D oItem.element || Dom.isAncestor(oItem.element, =
oTarget))=0A=
    ) {=0A=
=0A=
        // Menu Item mouseover logic=0A=
=0A=
        var nShowDelay =3D this.cfg.getProperty("showdelay"),=0A=
            bShowDelay =3D (nShowDelay > 0);=0A=
=0A=
=0A=
        if(bShowDelay) {=0A=
        =0A=
            this._cancelShowDelay();=0A=
        =0A=
        }=0A=
=0A=
=0A=
        var oActiveItem =3D this.activeItem;=0A=
    =0A=
        if(oActiveItem) {=0A=
    =0A=
            oActiveItem.cfg.setProperty("selected", false);=0A=
    =0A=
        }=0A=
=0A=
=0A=
        var oItemCfg =3D oItem.cfg;=0A=
    =0A=
        // Select and focus the current menu item=0A=
    =0A=
        oItemCfg.setProperty("selected", true);=0A=
=0A=
=0A=
        if (this.hasFocus()) {=0A=
        =0A=
            oItem.focus();=0A=
        =0A=
        }=0A=
=0A=
=0A=
        if(this.cfg.getProperty("autosubmenudisplay")) {=0A=
=0A=
            // Show the submenu this menu item=0A=
=0A=
            var oSubmenu =3D oItemCfg.getProperty("submenu");=0A=
        =0A=
            if(oSubmenu) {=0A=
        =0A=
                if(bShowDelay) {=0A=
=0A=
                    this._execShowDelay(oSubmenu);=0A=
        =0A=
                }=0A=
                else {=0A=
=0A=
                    oSubmenu.show();=0A=
=0A=
                }=0A=
=0A=
            }=0A=
=0A=
        }                        =0A=
=0A=
        oItem.handledMouseOverEvent =3D true;=0A=
        oItem.handledMouseOutEvent =3D false;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onMouseOut=0A=
* @description "mouseout" event handler for the menu.=0A=
* @protected=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onMouseOut: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    if(this._bStopMouseEventHandlers) {=0A=
    =0A=
        return false;=0A=
    =0A=
    }=0A=
=0A=
=0A=
    var oEvent =3D p_aArgs[0],=0A=
        oItem =3D p_aArgs[1],=0A=
        oRelatedTarget =3D Event.getRelatedTarget(oEvent),=0A=
        bMovingToSubmenu =3D false;=0A=
=0A=
=0A=
    if(oItem && !oItem.cfg.getProperty("disabled")) {=0A=
=0A=
        var oItemCfg =3D oItem.cfg,=0A=
            oSubmenu =3D oItemCfg.getProperty("submenu");=0A=
=0A=
=0A=
        if(=0A=
            oSubmenu && =0A=
            (=0A=
                oRelatedTarget =3D=3D oSubmenu.element ||=0A=
                Dom.isAncestor(oSubmenu.element, oRelatedTarget)=0A=
            )=0A=
        ) {=0A=
=0A=
            bMovingToSubmenu =3D true;=0A=
=0A=
        }=0A=
=0A=
=0A=
        if( =0A=
            !oItem.handledMouseOutEvent && =0A=
            (=0A=
                (=0A=
                    oRelatedTarget !=3D oItem.element &&  =0A=
                    !Dom.isAncestor(oItem.element, oRelatedTarget)=0A=
                ) || bMovingToSubmenu=0A=
            )=0A=
        ) {=0A=
=0A=
            // Menu Item mouseout logic=0A=
=0A=
            if(!bMovingToSubmenu) {=0A=
=0A=
                oItem.cfg.setProperty("selected", false);=0A=
=0A=
=0A=
                if(oSubmenu) {=0A=
=0A=
                    var nSubmenuHideDelay =3D =0A=
                            this.cfg.getProperty("submenuhidedelay"),=0A=
=0A=
                        nShowDelay =3D this.cfg.getProperty("showdelay");=0A=
=0A=
                    if(=0A=
                        !(this instanceof YAHOO.widget.MenuBar) && =0A=
                        nSubmenuHideDelay > 0 && =0A=
                        nShowDelay >=3D nSubmenuHideDelay=0A=
                    ) {=0A=
=0A=
                        this._execSubmenuHideDelay(=0A=
                                oSubmenu, =0A=
                                Event.getPageX(oEvent),=0A=
                                nSubmenuHideDelay=0A=
                            );=0A=
=0A=
                    }=0A=
                    else {=0A=
=0A=
                        oSubmenu.hide();=0A=
=0A=
                    }=0A=
=0A=
                }=0A=
=0A=
            }=0A=
=0A=
=0A=
            oItem.handledMouseOutEvent =3D true;=0A=
            oItem.handledMouseOverEvent =3D false;=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(=0A=
        !this._bHandledMouseOutEvent && =0A=
        (=0A=
            (=0A=
                oRelatedTarget !=3D this.element &&  =0A=
                !Dom.isAncestor(this.element, oRelatedTarget)=0A=
            ) =0A=
            || bMovingToSubmenu=0A=
        )=0A=
    ) {=0A=
=0A=
        // Menu mouseout logic=0A=
=0A=
        Event.removeListener(this.element, "mousemove", =
this._onMouseMove);=0A=
=0A=
        this._nCurrentMouseX =3D Event.getPageX(oEvent);=0A=
=0A=
        this._bHandledMouseOutEvent =3D true;=0A=
        this._bHandledMouseOverEvent =3D false;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onMouseMove=0A=
* @description "click" event handler for the menu.=0A=
* @protected=0A=
* @param {Event} p_oEvent Object representing the DOM event object =
passed =0A=
* back by the event utility (YAHOO.util.Event).=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onMouseMove: function(p_oEvent, p_oMenu) {=0A=
=0A=
    if(this._bStopMouseEventHandlers) {=0A=
    =0A=
        return false;=0A=
    =0A=
    }=0A=
=0A=
    this._nCurrentMouseX =3D Event.getPageX(p_oEvent);=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onClick=0A=
* @description "click" event handler for the menu.=0A=
* @protected=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onClick: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var oEvent =3D p_aArgs[0],=0A=
        oItem =3D p_aArgs[1],=0A=
        oTarget =3D Event.getTarget(oEvent);=0A=
=0A=
    if(oItem && !oItem.cfg.getProperty("disabled")) {=0A=
=0A=
        var oItemCfg =3D oItem.cfg,=0A=
            oSubmenu =3D oItemCfg.getProperty("submenu");=0A=
=0A=
=0A=
        /*=0A=
            ACCESSIBILITY FEATURE FOR SCREEN READERS: =0A=
            Expand/collapse the submenu when the user clicks =0A=
            on the submenu indicator image.=0A=
        */        =0A=
=0A=
        if(oTarget =3D=3D oItem.submenuIndicator && oSubmenu) {=0A=
=0A=
            if(oSubmenu.cfg.getProperty("visible")) {=0A=
=0A=
                oSubmenu.hide();=0A=
                =0A=
                oSubmenu.parent.focus();=0A=
    =0A=
            }=0A=
            else {=0A=
=0A=
                this.clearActiveItem();=0A=
=0A=
                oItem.cfg.setProperty("selected", true);=0A=
=0A=
                oSubmenu.show();=0A=
                =0A=
                oSubmenu.setInitialFocus();=0A=
    =0A=
            }=0A=
    =0A=
        }=0A=
        else {=0A=
=0A=
            var sURL =3D oItemCfg.getProperty("url"),=0A=
                bCurrentPageURL =3D (sURL.substr((sURL.length-1),1) =
=3D=3D "#"),=0A=
                sTarget =3D oItemCfg.getProperty("target"),=0A=
                bHasTarget =3D (sTarget && sTarget.length > 0);=0A=
=0A=
            /*=0A=
                Prevent the browser from following links =0A=
                equal to "#"=0A=
            */=0A=
            =0A=
            if(=0A=
                oTarget.tagName.toUpperCase() =3D=3D "A" && =0A=
                bCurrentPageURL && !bHasTarget=0A=
            ) {=0A=
=0A=
                Event.preventDefault(oEvent);=0A=
=0A=
                oItem.focus();=0A=
            =0A=
            }=0A=
=0A=
            if(=0A=
                oTarget.tagName.toUpperCase() !=3D "A" && =0A=
                !bCurrentPageURL && !bHasTarget=0A=
            ) {=0A=
                =0A=
                /*=0A=
                    Follow the URL of the item regardless of =0A=
                    whether or not the user clicked specifically=0A=
                    on the anchor element.=0A=
                */=0A=
    =0A=
                document.location =3D sURL;=0A=
        =0A=
            }=0A=
=0A=
=0A=
            /*=0A=
                If the item doesn't navigate to a URL and it doesn't have=0A=
                a submenu, then collapse the menu tree.=0A=
            */=0A=
=0A=
            if(bCurrentPageURL && !oSubmenu) {=0A=
    =0A=
                var oRoot =3D this.getRoot();=0A=
                =0A=
                if(oRoot.cfg.getProperty("position") =3D=3D "static") {=0A=
    =0A=
                    oRoot.clearActiveItem();=0A=
    =0A=
                }=0A=
                else if(oRoot.cfg.getProperty("clicktohide")) {=0A=
=0A=
                    oRoot.hide();=0A=
                =0A=
                }=0A=
    =0A=
            }=0A=
=0A=
        }                    =0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onKeyDown=0A=
* @description "keydown" event handler for the menu.=0A=
* @protected=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onKeyDown: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var oEvent =3D p_aArgs[0],=0A=
        oItem =3D p_aArgs[1],=0A=
        me =3D this,=0A=
        oSubmenu;=0A=
=0A=
=0A=
    /*=0A=
        This function is called to prevent a bug in Firefox.  In Firefox,=0A=
        moving a DOM element into a stationary mouse pointer will cause =
the =0A=
        browser to fire mouse events.  This can result in the menu mouse=0A=
        event handlers being called uncessarily, especially when menus =
are =0A=
        moved into a stationary mouse pointer as a result of a =0A=
        key event handler.=0A=
    */=0A=
    function stopMouseEventHandlers() {=0A=
=0A=
        me._bStopMouseEventHandlers =3D true;=0A=
        =0A=
        window.setTimeout(function() {=0A=
        =0A=
            me._bStopMouseEventHandlers =3D false;=0A=
        =0A=
        }, 10);=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(oItem && !oItem.cfg.getProperty("disabled")) {=0A=
=0A=
        var oItemCfg =3D oItem.cfg,=0A=
            oParentItem =3D this.parent,=0A=
            oRoot,=0A=
            oNextItem;=0A=
=0A=
=0A=
        switch(oEvent.keyCode) {=0A=
    =0A=
            case 38:    // Up arrow=0A=
            case 40:    // Down arrow=0A=
    =0A=
                oNextItem =3D (oEvent.keyCode =3D=3D 38) ? =0A=
                    oItem.getPreviousEnabledSibling() : =0A=
                    oItem.getNextEnabledSibling();=0A=
        =0A=
                if(oNextItem) {=0A=
=0A=
                    this.clearActiveItem();=0A=
=0A=
                    oNextItem.cfg.setProperty("selected", true);=0A=
                    oNextItem.focus();=0A=
=0A=
=0A=
                    if(this.cfg.getProperty("maxheight") > 0) {=0A=
=0A=
                        var oBody =3D this.body;=0A=
=0A=
                        oBody.scrollTop =3D =0A=
=0A=
                            (=0A=
                                oNextItem.element.offsetTop + =0A=
                                oNextItem.element.offsetHeight=0A=
                            ) - oBody.offsetHeight;=0A=
=0A=
=0A=
                        var nScrollTop =3D oBody.scrollTop,=0A=
                            nScrollTarget =3D =0A=
                                oBody.scrollHeight - oBody.offsetHeight;=0A=
=0A=
                        if(nScrollTop =3D=3D=3D 0) {=0A=
=0A=
                            this._disableScrollHeader();=0A=
                            this._enableScrollFooter();=0A=
=0A=
                        }=0A=
                        else if(nScrollTop =3D=3D nScrollTarget) {=0A=
=0A=
                             this._enableScrollHeader();=0A=
                             this._disableScrollFooter();=0A=
=0A=
                        }=0A=
                        else {=0A=
=0A=
                            this._enableScrollHeader();=0A=
                            this._enableScrollFooter();=0A=
=0A=
                        }=0A=
=0A=
                    }=0A=
=0A=
                }=0A=
=0A=
    =0A=
                Event.preventDefault(oEvent);=0A=
=0A=
                stopMouseEventHandlers();=0A=
    =0A=
            break;=0A=
            =0A=
    =0A=
            case 39:    // Right arrow=0A=
    =0A=
                oSubmenu =3D oItemCfg.getProperty("submenu");=0A=
    =0A=
                if(oSubmenu) {=0A=
    =0A=
                    if(!oItemCfg.getProperty("selected")) {=0A=
        =0A=
                        oItemCfg.setProperty("selected", true);=0A=
        =0A=
                    }=0A=
    =0A=
                    oSubmenu.show();=0A=
                    oSubmenu.setInitialFocus();=0A=
                    oSubmenu.setInitialSelection();=0A=
    =0A=
                }=0A=
                else {=0A=
    =0A=
                    oRoot =3D this.getRoot();=0A=
                    =0A=
                    if(oRoot instanceof YAHOO.widget.MenuBar) {=0A=
    =0A=
                        oNextItem =3D =
oRoot.activeItem.getNextEnabledSibling();=0A=
    =0A=
                        if(oNextItem) {=0A=
                        =0A=
                            oRoot.clearActiveItem();=0A=
    =0A=
                            oNextItem.cfg.setProperty("selected", true);=0A=
    =0A=
                            oSubmenu =3D =
oNextItem.cfg.getProperty("submenu");=0A=
    =0A=
                            if(oSubmenu) {=0A=
    =0A=
                                oSubmenu.show();=0A=
                            =0A=
                            }=0A=
    =0A=
                            oNextItem.focus();=0A=
                        =0A=
                        }=0A=
                    =0A=
                    }=0A=
                =0A=
                }=0A=
    =0A=
    =0A=
                Event.preventDefault(oEvent);=0A=
=0A=
                stopMouseEventHandlers();=0A=
=0A=
            break;=0A=
    =0A=
    =0A=
            case 37:    // Left arrow=0A=
    =0A=
                if(oParentItem) {=0A=
    =0A=
                    var oParentMenu =3D oParentItem.parent;=0A=
    =0A=
                    if(oParentMenu instanceof YAHOO.widget.MenuBar) {=0A=
    =0A=
                        oNextItem =3D =0A=
                            =
oParentMenu.activeItem.getPreviousEnabledSibling();=0A=
    =0A=
                        if(oNextItem) {=0A=
                        =0A=
                            oParentMenu.clearActiveItem();=0A=
    =0A=
                            oNextItem.cfg.setProperty("selected", true);=0A=
    =0A=
                            oSubmenu =3D =
oNextItem.cfg.getProperty("submenu");=0A=
    =0A=
                            if(oSubmenu) {=0A=
                            =0A=
                                oSubmenu.show();=0A=
                            =0A=
                            }=0A=
    =0A=
                            oNextItem.focus();=0A=
                        =0A=
                        } =0A=
                    =0A=
                    }=0A=
                    else {=0A=
    =0A=
                        this.hide();=0A=
    =0A=
                        oParentItem.focus();=0A=
                    =0A=
                    }=0A=
    =0A=
                }=0A=
    =0A=
                Event.preventDefault(oEvent);=0A=
=0A=
                stopMouseEventHandlers();=0A=
=0A=
            break;        =0A=
    =0A=
        }=0A=
=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(oEvent.keyCode =3D=3D 27) { // Esc key=0A=
=0A=
        if(this.cfg.getProperty("position") =3D=3D "dynamic") {=0A=
        =0A=
            this.hide();=0A=
=0A=
            if(this.parent) {=0A=
=0A=
                this.parent.focus();=0A=
            =0A=
            }=0A=
=0A=
        }=0A=
        else if(this.activeItem) {=0A=
=0A=
            oSubmenu =3D this.activeItem.cfg.getProperty("submenu");=0A=
=0A=
            if(oSubmenu && oSubmenu.cfg.getProperty("visible")) {=0A=
            =0A=
                oSubmenu.hide();=0A=
                this.activeItem.focus();=0A=
            =0A=
            }=0A=
            else {=0A=
=0A=
                this.activeItem.blur();=0A=
                this.activeItem.cfg.setProperty("selected", false);=0A=
        =0A=
            }=0A=
        =0A=
        }=0A=
=0A=
=0A=
        Event.preventDefault(oEvent);=0A=
    =0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onKeyPress=0A=
* @description "keypress" event handler for a Menu instance.=0A=
* @protected=0A=
* @param {String} p_sType The name of the event that was fired.=0A=
* @param {Array} p_aArgs Collection of arguments sent when the event =0A=
* was fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu The Menu instance that fired the =
event.=0A=
*/=0A=
_onKeyPress: function(p_sType, p_aArgs, p_oMenu) {=0A=
    =0A=
    var oEvent =3D p_aArgs[0];=0A=
=0A=
=0A=
    if(oEvent.keyCode =3D=3D 40 || oEvent.keyCode =3D=3D 38) {=0A=
=0A=
        YAHOO.util.Event.preventDefault(oEvent);=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onTextResize=0A=
* @description "textresize" event handler for the menu.=0A=
* @protected=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onTextResize: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    if(this.browser =3D=3D "gecko" && !this._handleResize) {=0A=
=0A=
        this._handleResize =3D true;=0A=
        return;=0A=
    =0A=
    }=0A=
=0A=
=0A=
    var oConfig =3D this.cfg;=0A=
=0A=
    if(oConfig.getProperty("position") =3D=3D "dynamic") {=0A=
=0A=
        oConfig.setProperty("width", (this._getOffsetWidth() + "px"));=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onScrollTargetMouseOver=0A=
* @description "mouseover" event handler for the menu's "header" and =
"footer" =0A=
* elements.  Used to scroll the body of the menu up and down when the =0A=
* menu's "maxheight" configuration property is set to a value greater =
than 0.=0A=
* @protected=0A=
* @param {Event} p_oEvent Object representing the DOM event object =
passed =0A=
* back by the event utility (YAHOO.util.Event).=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onScrollTargetMouseOver: function(p_oEvent, p_oMenu) {=0A=
=0A=
    this._cancelHideDelay();=0A=
=0A=
    var oTarget =3D Event.getTarget(p_oEvent),=0A=
        oBody =3D this.body,=0A=
        me =3D this,=0A=
        nScrollTarget,=0A=
        fnScrollFunction;=0A=
=0A=
=0A=
    function scrollBodyDown() {=0A=
=0A=
        var nScrollTop =3D oBody.scrollTop;=0A=
=0A=
=0A=
        if(nScrollTop < nScrollTarget) {=0A=
=0A=
            oBody.scrollTop =3D (nScrollTop + 1);=0A=
=0A=
            me._enableScrollHeader();=0A=
=0A=
        }=0A=
        else {=0A=
=0A=
            oBody.scrollTop =3D nScrollTarget;=0A=
            =0A=
            window.clearInterval(me._nBodyScrollId);=0A=
=0A=
            me._disableScrollFooter();=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    function scrollBodyUp() {=0A=
=0A=
        var nScrollTop =3D oBody.scrollTop;=0A=
=0A=
=0A=
        if(nScrollTop > 0) {=0A=
=0A=
            oBody.scrollTop =3D (nScrollTop - 1);=0A=
=0A=
            me._enableScrollFooter();=0A=
=0A=
        }=0A=
        else {=0A=
=0A=
            oBody.scrollTop =3D 0;=0A=
            =0A=
            window.clearInterval(me._nBodyScrollId);=0A=
=0A=
            me._disableScrollHeader();=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
    =0A=
    if(Dom.hasClass(oTarget, "hd")) {=0A=
=0A=
        fnScrollFunction =3D scrollBodyUp;=0A=
    =0A=
    }=0A=
    else {=0A=
=0A=
        nScrollTarget =3D oBody.scrollHeight - oBody.offsetHeight;=0A=
=0A=
        fnScrollFunction =3D scrollBodyDown;=0A=
    =0A=
    }=0A=
=0A=
=0A=
    this._nBodyScrollId =3D window.setInterval(fnScrollFunction, 10);=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onScrollTargetMouseOut=0A=
* @description "mouseout" event handler for the menu's "header" and =
"footer" =0A=
* elements.  Used to stop scrolling the body of the menu up and down =
when the =0A=
* menu's "maxheight" configuration property is set to a value greater =
than 0.=0A=
* @protected=0A=
* @param {Event} p_oEvent Object representing the DOM event object =
passed =0A=
* back by the event utility (YAHOO.util.Event).=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onScrollTargetMouseOut: function(p_oEvent, p_oMenu) {=0A=
=0A=
    window.clearInterval(this._nBodyScrollId);=0A=
=0A=
    this._cancelHideDelay();=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Private methods=0A=
=0A=
=0A=
/**=0A=
* @method _onInit=0A=
* @description "init" event handler for the menu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onInit: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    this.cfg.subscribeToConfigEvent("width", this._onWidthChange);=0A=
    this.cfg.subscribeToConfigEvent("visible", this._onVisibleChange);=0A=
=0A=
    if(=0A=
        (=0A=
            (this.parent && !this.lazyLoad) || =0A=
            (!this.parent && this.cfg.getProperty("position") =3D=3D =
"static") ||=0A=
            (=0A=
                !this.parent && =0A=
                !this.lazyLoad && =0A=
                this.cfg.getProperty("position") =3D=3D "dynamic"=0A=
            ) =0A=
        ) && =0A=
        this.getItemGroups().length =3D=3D=3D 0=0A=
    ) {=0A=
 =0A=
        if(this.srcElement) {=0A=
=0A=
            this._initSubTree();=0A=
        =0A=
        }=0A=
=0A=
=0A=
        if(this.itemData) {=0A=
=0A=
            this.addItems(this.itemData);=0A=
=0A=
        }=0A=
    =0A=
    }=0A=
    else if(this.lazyLoad) {=0A=
=0A=
        this.cfg.fireQueue();=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onBeforeRender=0A=
* @description "beforerender" event handler for the menu.  Appends all =
of the =0A=
* <code>&#60;ul&#62;</code>, <code>&#60;li&#62;</code> and their =
accompanying =0A=
* title elements to the body element of the menu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onBeforeRender: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var oConfig =3D this.cfg,=0A=
        oEl =3D this.element,=0A=
        nListElements =3D this._aListElements.length;=0A=
=0A=
=0A=
    if(nListElements > 0) {=0A=
=0A=
        var i =3D 0,=0A=
            bFirstList =3D true,=0A=
            oUL,=0A=
            oGroupTitle;=0A=
=0A=
=0A=
        do {=0A=
=0A=
            oUL =3D this._aListElements[i];=0A=
=0A=
            if(oUL) {=0A=
=0A=
                if(bFirstList) {=0A=
        =0A=
                    Dom.addClass(oUL, "first-of-type");=0A=
                    bFirstList =3D false;=0A=
        =0A=
                }=0A=
=0A=
=0A=
                if(!Dom.isAncestor(oEl, oUL)) {=0A=
=0A=
                    this.appendToBody(oUL);=0A=
=0A=
                }=0A=
=0A=
=0A=
                oGroupTitle =3D this._aGroupTitleElements[i];=0A=
=0A=
                if(oGroupTitle) {=0A=
=0A=
                    if(!Dom.isAncestor(oEl, oGroupTitle)) {=0A=
=0A=
                        oUL.parentNode.insertBefore(oGroupTitle, oUL);=0A=
=0A=
                    }=0A=
=0A=
=0A=
                    Dom.addClass(oUL, "hastitle");=0A=
=0A=
                }=0A=
=0A=
            }=0A=
=0A=
            i++;=0A=
=0A=
        }=0A=
        while(i < nListElements);=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onRender=0A=
* @description "render" event handler for the menu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
*/=0A=
_onRender: function(p_sType, p_aArgs) {=0A=
=0A=
    if (=0A=
        this.cfg.getProperty("position") =3D=3D "dynamic" && =0A=
        !this.cfg.getProperty("width")=0A=
    ) {=0A=
=0A=
        this._setWidth();=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onBeforeShow=0A=
* @description "beforeshow" event handler for the menu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
_onBeforeShow: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    if(this.lazyLoad && this.getItemGroups().length =3D=3D=3D 0) {=0A=
=0A=
        if(this.srcElement) {=0A=
        =0A=
            this._initSubTree();=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(this.itemData) {=0A=
=0A=
            if(=0A=
                this.parent && this.parent.parent && =0A=
                this.parent.parent.srcElement && =0A=
                this.parent.parent.srcElement.tagName.toUpperCase() =
=3D=3D "SELECT"=0A=
            ) {=0A=
=0A=
                var nOptions =3D this.itemData.length;=0A=
    =0A=
                for(var n=3D0; n<nOptions; n++) {=0A=
=0A=
                    if(this.itemData[n].tagName) {=0A=
=0A=
                        this.addItem((new =
this.ITEM_TYPE(this.itemData[n])));=0A=
    =0A=
                    }=0A=
    =0A=
                }=0A=
            =0A=
            }=0A=
            else {=0A=
=0A=
                this.addItems(this.itemData);=0A=
            =0A=
            }=0A=
        =0A=
        }=0A=
=0A=
=0A=
        var oSrcElement =3D this.srcElement;=0A=
=0A=
        if(oSrcElement) {=0A=
=0A=
            if(oSrcElement.tagName.toUpperCase() =3D=3D "SELECT") {=0A=
=0A=
                if(Dom.inDocument(oSrcElement)) {=0A=
=0A=
                    this.render(oSrcElement.parentNode);=0A=
                =0A=
                }=0A=
                else {=0A=
                =0A=
                    this.render(this.cfg.getProperty("container"));=0A=
                =0A=
                }=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                this.render();=0A=
=0A=
            }=0A=
=0A=
        }=0A=
        else {=0A=
=0A=
            if(this.parent) {=0A=
=0A=
                this.render(this.parent.element);            =0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                this.render(this.cfg.getProperty("container"));=0A=
                this.cfg.refireEvent("xy");=0A=
=0A=
            }                =0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(this.cfg.getProperty("position") =3D=3D "dynamic") {=0A=
=0A=
        var nViewportHeight =3D Dom.getViewportHeight();=0A=
=0A=
=0A=
        if(this.parent && this.parent.parent instanceof =
YAHOO.widget.MenuBar) {=0A=
           =0A=
            var oRegion =3D =
YAHOO.util.Region.getRegion(this.parent.element);=0A=
            =0A=
            nViewportHeight =3D (nViewportHeight - oRegion.bottom);=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(this.element.offsetHeight >=3D nViewportHeight) {=0A=
    =0A=
            var nMaxHeight =3D this.cfg.getProperty("maxheight");=0A=
=0A=
            /*=0A=
                Cache the original value for the "maxheight" =
configuration  =0A=
                property so that we can set it back when the menu is =
hidden.=0A=
            */=0A=
    =0A=
            this._nMaxHeight =3D nMaxHeight;=0A=
=0A=
            this.cfg.setProperty("maxheight", (nViewportHeight - 20));=0A=
        =0A=
        }=0A=
    =0A=
    =0A=
        if(this.cfg.getProperty("maxheight") > 0) {=0A=
    =0A=
            var oBody =3D this.body;=0A=
    =0A=
            if(oBody.scrollTop > 0) {=0A=
    =0A=
                oBody.scrollTop =3D 0;=0A=
    =0A=
            }=0A=
=0A=
            this._disableScrollHeader();=0A=
            this._enableScrollFooter();=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onShow=0A=
* @description "show" event handler for the menu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =
fired =0A=
* the event.=0A=
*/=0A=
_onShow: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var oParent =3D this.parent;=0A=
    =0A=
    if(oParent) {=0A=
=0A=
        var oParentMenu =3D oParent.parent,=0A=
            aParentAlignment =3D =
oParentMenu.cfg.getProperty("submenualignment"),=0A=
            aAlignment =3D this.cfg.getProperty("submenualignment");=0A=
=0A=
=0A=
        if(=0A=
            (aParentAlignment[0] !=3D aAlignment[0]) &&=0A=
            (aParentAlignment[1] !=3D aAlignment[1])=0A=
        ) {=0A=
=0A=
            this.cfg.setProperty(=0A=
                "submenualignment", =0A=
                [ aParentAlignment[0], aParentAlignment[1] ]=0A=
            );=0A=
        =0A=
        }=0A=
=0A=
=0A=
        if(=0A=
            !oParentMenu.cfg.getProperty("autosubmenudisplay") && =0A=
            oParentMenu.cfg.getProperty("position") =3D=3D "static"=0A=
        ) {=0A=
=0A=
            oParentMenu.cfg.setProperty("autosubmenudisplay", true);=0A=
=0A=
=0A=
            function disableAutoSubmenuDisplay(p_oEvent) {=0A=
=0A=
                if(=0A=
                    p_oEvent.type =3D=3D "mousedown" || =0A=
                    (p_oEvent.type =3D=3D "keydown" && p_oEvent.keyCode =
=3D=3D 27)=0A=
                ) {=0A=
=0A=
                    /*  =0A=
                        Set the "autosubmenudisplay" to "false" if the =
user=0A=
                        clicks outside the menu bar.=0A=
                    */=0A=
=0A=
                    var oTarget =3D Event.getTarget(p_oEvent);=0A=
=0A=
                    if(=0A=
                        oTarget !=3D oParentMenu.element || =0A=
                        !YAHOO.util.Dom.isAncestor(oParentMenu.element, =
oTarget)=0A=
                    ) {=0A=
=0A=
                        oParentMenu.cfg.setProperty(=0A=
                            "autosubmenudisplay", =0A=
                            false=0A=
                        );=0A=
=0A=
                        Event.removeListener(=0A=
                                document, =0A=
                                "mousedown", =0A=
                                disableAutoSubmenuDisplay=0A=
                            );=0A=
=0A=
                        Event.removeListener(=0A=
                                document, =0A=
                                "keydown", =0A=
                                disableAutoSubmenuDisplay=0A=
                            );=0A=
=0A=
                    }=0A=
                =0A=
                }=0A=
=0A=
            }=0A=
=0A=
            Event.on(document, "mousedown", disableAutoSubmenuDisplay);  =
                           =0A=
            Event.on(document, "keydown", disableAutoSubmenuDisplay);=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onBeforeHide=0A=
* @description "beforehide" event handler for the menu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =
fired =0A=
* the event.=0A=
*/=0A=
_onBeforeHide: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var oActiveItem =3D this.activeItem;=0A=
=0A=
    if(oActiveItem) {=0A=
=0A=
        var oConfig =3D oActiveItem.cfg;=0A=
=0A=
        oConfig.setProperty("selected", false);=0A=
=0A=
        var oSubmenu =3D oConfig.getProperty("submenu");=0A=
=0A=
        if(oSubmenu) {=0A=
=0A=
            oSubmenu.hide();=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
    if (this =3D=3D this.getRoot()) {=0A=
=0A=
        this.blur();=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onHide=0A=
* @description "hide" event handler for the menu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =
fired =0A=
* the event.=0A=
*/=0A=
_onHide: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    if(this._nMaxHeight !=3D -1) {=0A=
=0A=
        this.cfg.setProperty("maxheight", this._nMaxHeight);=0A=
=0A=
        this._nMaxHeight =3D -1;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onParentMenuConfigChange=0A=
* @description "configchange" event handler for a submenu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oSubmenu Object representing the submenu =
that =0A=
* subscribed to the event.=0A=
*/=0A=
_onParentMenuConfigChange: function(p_sType, p_aArgs, p_oSubmenu) {=0A=
    =0A=
    var sPropertyName =3D p_aArgs[0][0],=0A=
        oPropertyValue =3D p_aArgs[0][1];=0A=
=0A=
    switch(sPropertyName) {=0A=
=0A=
        case "iframe":=0A=
        case "constraintoviewport":=0A=
        case "hidedelay":=0A=
        case "showdelay":=0A=
        case "submenuhidedelay":=0A=
        case "clicktohide":=0A=
        case "effect":=0A=
        case "classname":=0A=
=0A=
            p_oSubmenu.cfg.setProperty(sPropertyName, oPropertyValue);=0A=
                =0A=
        break;        =0A=
        =0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onParentMenuRender=0A=
* @description "render" event handler for a submenu.  Renders a  =0A=
* submenu in response to the firing of its parent's "render" event.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oSubmenu Object representing the submenu =
that =0A=
* subscribed to the event.=0A=
*/=0A=
_onParentMenuRender: function(p_sType, p_aArgs, p_oSubmenu) {=0A=
=0A=
    var oParentMenu =3D p_oSubmenu.parent.parent,=0A=
=0A=
        oConfig =3D {=0A=
=0A=
            constraintoviewport: =0A=
                oParentMenu.cfg.getProperty("constraintoviewport"),=0A=
=0A=
            xy: [0,0],=0A=
                =0A=
            clicktohide: oParentMenu.cfg.getProperty("clicktohide"),=0A=
                =0A=
            effect: oParentMenu.cfg.getProperty("effect"),=0A=
=0A=
            showdelay: oParentMenu.cfg.getProperty("showdelay"),=0A=
            =0A=
            hidedelay: oParentMenu.cfg.getProperty("hidedelay"),=0A=
=0A=
            submenuhidedelay: =
oParentMenu.cfg.getProperty("submenuhidedelay"),=0A=
=0A=
            classname: oParentMenu.cfg.getProperty("classname")=0A=
=0A=
        };=0A=
=0A=
=0A=
    /*=0A=
        Only sync the "iframe" configuration property if the parent=0A=
        menu's "position" configuration is the same.=0A=
    */=0A=
=0A=
    if(=0A=
        this.cfg.getProperty("position") =3D=3D =0A=
        oParentMenu.cfg.getProperty("position")=0A=
    ) {=0A=
=0A=
        oConfig.iframe =3D oParentMenu.cfg.getProperty("iframe");=0A=
    =0A=
    }=0A=
               =0A=
=0A=
    p_oSubmenu.cfg.applyConfig(oConfig);=0A=
=0A=
=0A=
    if(!this.lazyLoad) {=0A=
=0A=
        var oLI =3D this.parent.element;=0A=
=0A=
        if(this.element.parentNode =3D=3D oLI) {=0A=
    =0A=
            this.render();=0A=
    =0A=
        }=0A=
        else {=0A=
=0A=
            this.render(oLI);=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onSubmenuBeforeShow=0A=
* @description "beforeshow" event handler for a submenu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oSubmenu Object representing the submenu =
that =0A=
* subscribed to the event.=0A=
*/=0A=
_onSubmenuBeforeShow: function(p_sType, p_aArgs, p_oSubmenu) {=0A=
    =0A=
    var oParent =3D this.parent,=0A=
        aAlignment =3D =
oParent.parent.cfg.getProperty("submenualignment");=0A=
=0A=
    this.cfg.setProperty(=0A=
        "context", =0A=
        [oParent.element, aAlignment[0], aAlignment[1]]=0A=
    );=0A=
=0A=
=0A=
    var nScrollTop =3D oParent.parent.body.scrollTop;=0A=
=0A=
    if(=0A=
        (this.browser =3D=3D "gecko" || this.browser =3D=3D "safari") =0A=
        && nScrollTop > 0=0A=
    ) {=0A=
=0A=
         this.cfg.setProperty("y", (this.cfg.getProperty("y") - =
nScrollTop));=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onSubmenuShow=0A=
* @description "show" event handler for a submenu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
*/=0A=
_onSubmenuShow: function(p_sType, p_aArgs) {=0A=
    =0A=
    this.submenuIndicator.firstChild.nodeValue =3D =0A=
        this.EXPANDED_SUBMENU_INDICATOR_TEXT;=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onSubmenuHide=0A=
* @description "hide" Custom Event handler for a submenu.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
*/=0A=
_onSubmenuHide: function(p_sType, p_aArgs) {=0A=
    =0A=
    this.submenuIndicator.firstChild.nodeValue =3D=0A=
        this.COLLAPSED_SUBMENU_INDICATOR_TEXT;=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onMenuItemFocus=0A=
* @description "focus" event handler for the menu's items.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
*/=0A=
_onMenuItemFocus: function(p_sType, p_aArgs) {=0A=
=0A=
    this.parent.focusEvent.fire(this);=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onMenuItemBlur=0A=
* @description "blur" event handler for the menu's items.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event =0A=
* that was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
*/=0A=
_onMenuItemBlur: function(p_sType, p_aArgs) {=0A=
=0A=
    this.parent.blurEvent.fire(this);=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onMenuItemConfigChange=0A=
* @description "configchange" event handler for the menu's items.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu =
item =0A=
* that fired the event.=0A=
*/=0A=
_onMenuItemConfigChange: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
    var sPropertyName =3D p_aArgs[0][0],=0A=
        oPropertyValue =3D p_aArgs[0][1];=0A=
=0A=
    switch(sPropertyName) {=0A=
=0A=
        case "selected":=0A=
=0A=
            if (oPropertyValue =3D=3D=3D true) {=0A=
=0A=
                this.activeItem =3D p_oItem;=0A=
            =0A=
            }=0A=
=0A=
        break;=0A=
=0A=
        case "submenu":=0A=
=0A=
            var oSubmenu =3D p_aArgs[0][1];=0A=
=0A=
            if(oSubmenu) {=0A=
=0A=
                this._configureSubmenu(p_oItem);=0A=
=0A=
            }=0A=
=0A=
        break;=0A=
=0A=
        case "text":=0A=
        case "helptext":=0A=
=0A=
            /*=0A=
                A change to an item's "text" or "helptext"=0A=
                configuration properties requires the width of the parent=0A=
                menu to be recalculated.=0A=
            */=0A=
=0A=
            if(this.element.style.width) {=0A=
    =0A=
                var sWidth =3D this._getOffsetWidth() + "px";=0A=
=0A=
                Dom.setStyle(this.element, "width", sWidth);=0A=
=0A=
            }=0A=
=0A=
        break;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Public event handlers for configuration properties=0A=
=0A=
=0A=
/**=0A=
* @method enforceConstraints=0A=
* @description The default event handler executed when the moveEvent is =
fired,  =0A=
* if the "constraintoviewport" configuration property is set to true.=0A=
* @param {String} type The name of the event that was fired.=0A=
* @param {Array} args Collection of arguments sent when the =0A=
* event was fired.=0A=
* @param {Array} obj Array containing the current Menu instance =0A=
* and the item that fired the event.=0A=
*/=0A=
enforceConstraints: function(type, args, obj) {=0A=
=0A=
    if(this.parent && !(this.parent.parent instanceof =
YAHOO.widget.MenuBar)) {=0A=
    =0A=
        var oConfig =3D this.cfg,=0A=
            pos =3D args[0],=0A=
            =0A=
            x =3D pos[0],=0A=
            y =3D pos[1],=0A=
            =0A=
            offsetHeight =3D this.element.offsetHeight,=0A=
            offsetWidth =3D this.element.offsetWidth,=0A=
            =0A=
            viewPortWidth =3D YAHOO.util.Dom.getViewportWidth(),=0A=
            viewPortHeight =3D YAHOO.util.Dom.getViewportHeight(),=0A=
            =0A=
            scrollX =3D Math.max(=0A=
                    document.documentElement.scrollLeft, =0A=
                    document.body.scrollLeft=0A=
                ),=0A=
            =0A=
            scrollY =3D Math.max(=0A=
                    document.documentElement.scrollTop, =0A=
                    document.body.scrollTop=0A=
                ),=0A=
            =0A=
            nPadding =3D (=0A=
                            this.parent && =0A=
                            this.parent.parent instanceof =
YAHOO.widget.MenuBar=0A=
                        ) ? 0 : 10,=0A=
            =0A=
            topConstraint =3D scrollY + nPadding,=0A=
            leftConstraint =3D scrollX + nPadding,=0A=
            bottomConstraint =3D =0A=
                scrollY + viewPortHeight - offsetHeight - nPadding,=0A=
            rightConstraint =3D scrollX + viewPortWidth - offsetWidth - =
nPadding,=0A=
            =0A=
            aContext =3D oConfig.getProperty("context"),=0A=
            oContextElement =3D aContext ? aContext[0] : null;=0A=
    =0A=
    =0A=
        if (x < 10) {=0A=
    =0A=
            x =3D leftConstraint;=0A=
    =0A=
        } else if ((x + offsetWidth) > viewPortWidth) {=0A=
    =0A=
            if(=0A=
                oContextElement &&=0A=
                ((x - oContextElement.offsetWidth) > offsetWidth)=0A=
            ) {=0A=
    =0A=
                x =3D (x - (oContextElement.offsetWidth + offsetWidth));=0A=
    =0A=
            }=0A=
            else {=0A=
    =0A=
                x =3D rightConstraint;=0A=
    =0A=
            }=0A=
    =0A=
        }=0A=
    =0A=
        if (y < 10) {=0A=
    =0A=
            y =3D topConstraint;=0A=
    =0A=
        } else if (y > bottomConstraint) {=0A=
    =0A=
            if(oContextElement && (y > offsetHeight)) {=0A=
    =0A=
                y =3D ((y + oContextElement.offsetHeight) - =
offsetHeight);=0A=
    =0A=
            }=0A=
            else {=0A=
    =0A=
                y =3D bottomConstraint;=0A=
    =0A=
            }=0A=
    =0A=
        }=0A=
    =0A=
        oConfig.setProperty("x", x, true);=0A=
        oConfig.setProperty("y", y, true);=0A=
        oConfig.setProperty("xy", [x,y], true);=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method configVisible=0A=
* @description Event handler for when the "visible" configuration =
property =0A=
* the menu changes.=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
configVisible: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    if(this.cfg.getProperty("position") =3D=3D "dynamic") {=0A=
=0A=
        YAHOO.widget.Menu.superclass.configVisible.call(=0A=
            this, =0A=
            p_sType, =0A=
            p_aArgs, =0A=
            p_oMenu=0A=
        );=0A=
=0A=
    }=0A=
    else {=0A=
=0A=
        var bVisible =3D p_aArgs[0],=0A=
    	    sDisplay =3D Dom.getStyle(this.element, "display");=0A=
=0A=
        if(bVisible) {=0A=
=0A=
            if(sDisplay !=3D "block") {=0A=
                this.beforeShowEvent.fire();=0A=
                Dom.setStyle(this.element, "display", "block");=0A=
                this.showEvent.fire();=0A=
            }=0A=
        =0A=
        }=0A=
        else {=0A=
=0A=
			if(sDisplay =3D=3D "block") {=0A=
				this.beforeHideEvent.fire();=0A=
				Dom.setStyle(this.element, "display", "none");=0A=
				this.hideEvent.fire();=0A=
			}=0A=
        =0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method configPosition=0A=
* @description Event handler for when the "position" configuration =
property =0A=
* of the menu changes.=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
configPosition: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var sCSSPosition =3D p_aArgs[0] =3D=3D "static" ? "static" : =
"absolute",=0A=
        oCfg =3D this.cfg;=0A=
=0A=
    Dom.setStyle(this.element, "position", sCSSPosition);=0A=
=0A=
=0A=
    if(sCSSPosition =3D=3D "static") {=0A=
=0A=
        /*=0A=
            Remove the iframe for statically positioned menus since it =
will =0A=
            intercept mouse events.=0A=
        */=0A=
=0A=
        oCfg.setProperty("iframe", false);=0A=
=0A=
=0A=
        // Statically positioned menus are visible by default=0A=
        =0A=
        Dom.setStyle(this.element, "display", "block");=0A=
=0A=
        oCfg.setProperty("visible", true);=0A=
=0A=
    }=0A=
    else {=0A=
=0A=
        /*=0A=
            Even though the "visible" property is queued to =0A=
            "false" by default, we need to set the "visibility" property =
to =0A=
            "hidden" since Overlay's "configVisible" implementation =
checks the =0A=
            element's "visibility" style property before deciding =
whether =0A=
            or not to show an Overlay instance.=0A=
        */=0A=
=0A=
        Dom.setStyle(this.element, "visibility", "hidden");=0A=
    =0A=
    }=0A=
=0A=
=0A=
    if(sCSSPosition =3D=3D "absolute") {=0A=
=0A=
        var nZIndex =3D oCfg.getProperty("zindex");=0A=
=0A=
        if(!nZIndex || nZIndex =3D=3D=3D 0) {=0A=
=0A=
            nZIndex =3D this.parent ? =0A=
                (this.parent.parent.cfg.getProperty("zindex") + 1) : 1;=0A=
=0A=
            oCfg.setProperty("zindex", nZIndex);=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method configIframe=0A=
* @description Event handler for when the "iframe" configuration =
property of =0A=
* the menu changes.=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
configIframe: function(p_sType, p_aArgs, p_oMenu) {    =0A=
=0A=
    if(this.cfg.getProperty("position") =3D=3D "dynamic") {=0A=
=0A=
        YAHOO.widget.Menu.superclass.configIframe.call(=0A=
            this, =0A=
            p_sType, =0A=
            p_aArgs, =0A=
            p_oMenu=0A=
        );=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method configHideDelay=0A=
* @description Event handler for when the "hidedelay" configuration =
property =0A=
* of the menu changes.=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
configHideDelay: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var nHideDelay =3D p_aArgs[0],=0A=
        oMouseOutEvent =3D this.mouseOutEvent,=0A=
        oMouseOverEvent =3D this.mouseOverEvent,=0A=
        oKeyDownEvent =3D this.keyDownEvent;=0A=
=0A=
    if(nHideDelay > 0) {=0A=
=0A=
        /*=0A=
            Only assign event handlers once. This way the user change =0A=
            the value for the hidedelay as many times as they want.=0A=
        */=0A=
=0A=
        if(!this._bHideDelayEventHandlersAssigned) {=0A=
=0A=
            oMouseOutEvent.subscribe(this._execHideDelay, this);=0A=
            oMouseOverEvent.subscribe(this._cancelHideDelay, this, true);=0A=
            oKeyDownEvent.subscribe(this._cancelHideDelay, this, true);=0A=
=0A=
            this._bHideDelayEventHandlersAssigned =3D true;=0A=
        =0A=
        }=0A=
=0A=
    }=0A=
    else {=0A=
=0A=
        oMouseOutEvent.unsubscribe(this._execHideDelay, this);=0A=
        oMouseOverEvent.unsubscribe(this._cancelHideDelay, this);=0A=
        oKeyDownEvent.unsubscribe(this._cancelHideDelay, this);=0A=
=0A=
        this._bHideDelayEventHandlersAssigned =3D false;=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method configContainer=0A=
* @description Event handler for when the "container" configuration =
property =0A=
of the menu changes.=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that =0A=
* fired the event.=0A=
*/=0A=
configContainer: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
	var oElement =3D p_aArgs[0];=0A=
=0A=
	if(typeof oElement =3D=3D 'string') {=0A=
=0A=
        this.cfg.setProperty(=0A=
                "container", =0A=
                document.getElementById(oElement), =0A=
                true=0A=
            );=0A=
=0A=
	}=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _setMaxHeight=0A=
* @description "renderEvent" handler used to defer the setting of the =0A=
* "maxheight" configuration property until the menu is rendered in lazy =0A=
* load scenarios.=0A=
* @param {String} p_sType The name of the event that was fired.=0A=
* @param {Array} p_aArgs Collection of arguments sent when the event =0A=
* was fired.=0A=
* @param {Number} p_nMaxHeight Number representing the value to set for =
the =0A=
* "maxheight" configuration property.=0A=
* @private=0A=
*/=0A=
_setMaxHeight: function(p_sType, p_aArgs, p_nMaxHeight) {=0A=
=0A=
    this.cfg.setProperty("maxheight", p_nMaxHeight);=0A=
    this.renderEvent.unsubscribe(this._setMaxHeight);=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method configMaxHeight=0A=
* @description Event handler for when the "maxheight" configuration =
property of =0A=
* a Menu changes.=0A=
* @param {String} p_sType The name of the event that was fired.=0A=
* @param {Array} p_aArgs Collection of arguments sent when the event =0A=
* was fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu The Menu instance fired=0A=
* the event.=0A=
*/=0A=
configMaxHeight: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var nMaxHeight =3D p_aArgs[0],=0A=
        oBody =3D this.body;=0A=
=0A=
=0A=
    if(this.lazyLoad && !oBody) {=0A=
=0A=
        this.renderEvent.unsubscribe(this._setMaxHeight);=0A=
    =0A=
        if(nMaxHeight > 0) {=0A=
=0A=
            this.renderEvent.subscribe(this._setMaxHeight, nMaxHeight, =
this);=0A=
=0A=
        }=0A=
=0A=
        return;=0A=
    =0A=
    }=0A=
=0A=
    Dom.setStyle(oBody, "height", "auto");=0A=
    Dom.setStyle(oBody, "overflow", "visible");    =0A=
=0A=
    var oHeader =3D this.header,=0A=
        oFooter =3D this.footer,=0A=
        fnMouseOver =3D this._onScrollTargetMouseOver,=0A=
        fnMouseOut =3D this._onScrollTargetMouseOut;=0A=
=0A=
=0A=
    if((nMaxHeight > 0) && (oBody.offsetHeight > nMaxHeight)) {=0A=
=0A=
        if(!this.cfg.getProperty("width")) {=0A=
=0A=
            this._setWidth();=0A=
=0A=
        }=0A=
=0A=
        if(!oHeader && !oFooter) {=0A=
=0A=
            this.setHeader("&#32;");=0A=
            this.setFooter("&#32;");=0A=
=0A=
            oHeader =3D this.header;=0A=
            oFooter =3D this.footer;=0A=
=0A=
            Dom.addClass(oHeader, "topscrollbar");=0A=
            Dom.addClass(oFooter, "bottomscrollbar");=0A=
            =0A=
            this.element.insertBefore(oHeader, oBody);=0A=
            this.element.appendChild(oFooter);=0A=
=0A=
            Event.on(oHeader, "mouseover", fnMouseOver, this, true);=0A=
            Event.on(oHeader, "mouseout", fnMouseOut, this, true);=0A=
            Event.on(oFooter, "mouseover", fnMouseOver, this, true);=0A=
            Event.on(oFooter, "mouseout", fnMouseOut, this, true);=0A=
        =0A=
        }=0A=
=0A=
        var nHeight =3D =0A=
=0A=
                (=0A=
                    nMaxHeight - =0A=
                    (this.footer.offsetHeight + this.header.offsetHeight)=0A=
                );=0A=
=0A=
        Dom.setStyle(oBody, "height", (nHeight + "px"));=0A=
        Dom.setStyle(oBody, "overflow", "hidden");=0A=
=0A=
    }=0A=
    else if(oHeader && oFooter) {=0A=
=0A=
        Dom.setStyle(oBody, "height", "auto");=0A=
        Dom.setStyle(oBody, "overflow", "visible");=0A=
=0A=
        Event.removeListener(oHeader, "mouseover", fnMouseOver);=0A=
        Event.removeListener(oHeader, "mouseout", fnMouseOut);=0A=
        Event.removeListener(oFooter, "mouseover", fnMouseOver);=0A=
        Event.removeListener(oFooter, "mouseout", fnMouseOut);=0A=
=0A=
        this.element.removeChild(oHeader);=0A=
        this.element.removeChild(oFooter);=0A=
    =0A=
        this.header =3D null;=0A=
        this.footer =3D null;=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method configClassName=0A=
* @description Event handler for when the "classname" configuration =
property of =0A=
* a menu changes.=0A=
* @param {String} p_sType The name of the event that was fired.=0A=
* @param {Array} p_aArgs Collection of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.Menu} p_oMenu The Menu instance fired the event.=0A=
*/=0A=
configClassName: function(p_sType, p_aArgs, p_oMenu) {=0A=
=0A=
    var sClassName =3D p_aArgs[0];=0A=
=0A=
    if(this._sClassName) {=0A=
=0A=
        Dom.removeClass(this.element, this._sClassName);=0A=
=0A=
    }=0A=
=0A=
    Dom.addClass(this.element, sClassName);=0A=
    this._sClassName =3D sClassName;=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Public methods=0A=
=0A=
=0A=
=0A=
/**=0A=
* @method initEvents=0A=
* @description Initializes the custom events for the menu.=0A=
*/=0A=
initEvents: function() {=0A=
=0A=
	YAHOO.widget.Menu.superclass.initEvents.call(this);=0A=
=0A=
    // Create custom events=0A=
=0A=
    var EVENT_TYPES =3D YAHOO.widget.Menu._EVENT_TYPES;=0A=
=0A=
    this.mouseOverEvent =3D new CustomEvent(EVENT_TYPES.MOUSE_OVER, =
this);=0A=
    this.mouseOutEvent =3D new CustomEvent(EVENT_TYPES.MOUSE_OUT, this);=0A=
    this.mouseDownEvent =3D new CustomEvent(EVENT_TYPES.MOUSE_DOWN, =
this);=0A=
    this.mouseUpEvent =3D new CustomEvent(EVENT_TYPES.MOUSE_UP, this);=0A=
    this.clickEvent =3D new CustomEvent(EVENT_TYPES.CLICK, this);=0A=
    this.keyPressEvent =3D new CustomEvent(EVENT_TYPES.KEY_PRESS, this);=0A=
    this.keyDownEvent =3D new CustomEvent(EVENT_TYPES.KEY_DOWN, this);=0A=
    this.keyUpEvent =3D new CustomEvent(EVENT_TYPES.KEY_UP, this);=0A=
    this.focusEvent =3D new CustomEvent(EVENT_TYPES.FOCUS, this);=0A=
    this.blurEvent =3D new CustomEvent(EVENT_TYPES.BLUR, this);=0A=
    this.itemAddedEvent =3D new CustomEvent(EVENT_TYPES.ITEM_ADDED, =
this);=0A=
    this.itemRemovedEvent =3D new CustomEvent(EVENT_TYPES.ITEM_REMOVED, =
this);=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method getRoot=0A=
* @description Finds the menu's root menu.=0A=
*/=0A=
getRoot: function() {=0A=
=0A=
    var oItem =3D this.parent;=0A=
=0A=
    if(oItem) {=0A=
=0A=
        var oParentMenu =3D oItem.parent;=0A=
=0A=
        return oParentMenu ? oParentMenu.getRoot() : this;=0A=
=0A=
    }=0A=
    else {=0A=
    =0A=
        return this;=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method toString=0A=
* @description Returns a string representing the menu.=0A=
* @return {String}=0A=
*/=0A=
toString: function() {=0A=
=0A=
    var sReturnVal =3D "Menu",=0A=
        sId =3D this.id;=0A=
=0A=
    if(sId) {=0A=
=0A=
        sReturnVal +=3D (" " + sId);=0A=
    =0A=
    }=0A=
=0A=
    return sReturnVal;=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method setItemGroupTitle=0A=
* @description Sets the title of a group of menu items.=0A=
* @param {String} p_sGroupTitle String specifying the title of the group.=0A=
* @param {Number} p_nGroupIndex Optional. Number specifying the group to =
which=0A=
* the title belongs.=0A=
*/=0A=
setItemGroupTitle: function(p_sGroupTitle, p_nGroupIndex) {=0A=
        =0A=
    if(typeof p_sGroupTitle =3D=3D "string" && p_sGroupTitle.length > 0) =
{=0A=
=0A=
        var nGroupIndex =3D typeof p_nGroupIndex =3D=3D "number" ? =
p_nGroupIndex : 0,=0A=
            oTitle =3D this._aGroupTitleElements[nGroupIndex];=0A=
=0A=
=0A=
        if(oTitle) {=0A=
=0A=
            oTitle.innerHTML =3D p_sGroupTitle;=0A=
            =0A=
        }=0A=
        else {=0A=
=0A=
            oTitle =3D document.createElement(this.GROUP_TITLE_TAG_NAME);=0A=
                    =0A=
            oTitle.innerHTML =3D p_sGroupTitle;=0A=
=0A=
            this._aGroupTitleElements[nGroupIndex] =3D oTitle;=0A=
=0A=
        }=0A=
=0A=
=0A=
        var i =3D this._aGroupTitleElements.length - 1,=0A=
            nFirstIndex;=0A=
=0A=
        do {=0A=
=0A=
            if(this._aGroupTitleElements[i]) {=0A=
=0A=
                Dom.removeClass(this._aGroupTitleElements[i], =
"first-of-type");=0A=
=0A=
                nFirstIndex =3D i;=0A=
=0A=
            }=0A=
=0A=
        }=0A=
        while(i--);=0A=
=0A=
=0A=
        if(nFirstIndex !=3D=3D null) {=0A=
=0A=
            Dom.addClass(=0A=
                this._aGroupTitleElements[nFirstIndex], =0A=
                "first-of-type"=0A=
            );=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
/**=0A=
* @method addItem=0A=
* @description Appends an item to the menu.=0A=
* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the =
MenuItem =0A=
* instance to be added to the menu.=0A=
* @param {String} p_oItem String specifying the text of the item to be =
added =0A=
* to the menu.=0A=
* @param {Object} p_oItem Object literal containing a set of menu item =0A=
* configuration properties.=0A=
* @param {Number} p_nGroupIndex Optional. Number indicating the group to=0A=
* which the item belongs.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
*/=0A=
addItem: function(p_oItem, p_nGroupIndex) {=0A=
=0A=
    if(p_oItem) {=0A=
=0A=
        return this._addItemToGroup(p_nGroupIndex, p_oItem);=0A=
        =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method addItems=0A=
* @description Adds an array of items to the menu.=0A=
* @param {Array} p_aItems Array of items to be added to the menu.  The =
array =0A=
* can contain strings specifying the text for each item to be created, =
object=0A=
* literals specifying each of the menu item configuration properties, =0A=
* or MenuItem instances.=0A=
* @param {Number} p_nGroupIndex Optional. Number specifying the group to =0A=
* which the items belongs.=0A=
* @return {Array}=0A=
*/=0A=
addItems: function(p_aItems, p_nGroupIndex) {=0A=
=0A=
    if(Lang.isArray(p_aItems)) {=0A=
=0A=
        var nItems =3D p_aItems.length,=0A=
            aItems =3D [],=0A=
            oItem;=0A=
=0A=
=0A=
        for(var i=3D0; i<nItems; i++) {=0A=
=0A=
            oItem =3D p_aItems[i];=0A=
=0A=
            if(oItem) {=0A=
=0A=
                if(Lang.isArray(oItem)) {=0A=
    =0A=
                    aItems[aItems.length] =3D this.addItems(oItem, i);=0A=
    =0A=
                }=0A=
                else {=0A=
    =0A=
                    aItems[aItems.length] =3D =0A=
                        this._addItemToGroup(p_nGroupIndex, oItem);=0A=
                =0A=
                }=0A=
=0A=
            }=0A=
    =0A=
        }=0A=
=0A=
=0A=
        if(aItems.length) {=0A=
        =0A=
            return aItems;=0A=
        =0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method insertItem=0A=
* @description Inserts an item into the menu at the specified index.=0A=
* @param {YAHOO.widget.MenuItem} p_oItem Object reference for the =
MenuItem =0A=
* instance to be added to the menu.=0A=
* @param {String} p_oItem String specifying the text of the item to be =
added =0A=
* to the menu.=0A=
* @param {Object} p_oItem Object literal containing a set of menu item =0A=
* configuration properties.=0A=
* @param {Number} p_nItemIndex Number indicating the ordinal position at =
which=0A=
* the item should be added.=0A=
* @param {Number} p_nGroupIndex Optional. Number indicating the group to =
which =0A=
* the item belongs.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
*/=0A=
insertItem: function(p_oItem, p_nItemIndex, p_nGroupIndex) {=0A=
    =0A=
    if(p_oItem) {=0A=
=0A=
        return this._addItemToGroup(p_nGroupIndex, p_oItem, =
p_nItemIndex);=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method removeItem=0A=
* @description Removes the specified item from the menu.=0A=
* @param {YAHOO.widget.MenuItem} p_oObject Object reference for the =
MenuItem =0A=
* instance to be removed from the menu.=0A=
* @param {Number} p_oObject Number specifying the index of the item =0A=
* to be removed.=0A=
* @param {Number} p_nGroupIndex Optional. Number specifying the group to =0A=
* which the item belongs.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
*/=0A=
removeItem: function(p_oObject, p_nGroupIndex) {=0A=
    =0A=
    if(typeof p_oObject !=3D "undefined") {=0A=
=0A=
        var oItem;=0A=
=0A=
        if(p_oObject instanceof YAHOO.widget.MenuItem) {=0A=
=0A=
            oItem =3D this._removeItemFromGroupByValue(p_nGroupIndex, =
p_oObject);           =0A=
=0A=
        }=0A=
        else if(typeof p_oObject =3D=3D "number") {=0A=
=0A=
            oItem =3D this._removeItemFromGroupByIndex(p_nGroupIndex, =
p_oObject);=0A=
=0A=
        }=0A=
=0A=
        if(oItem) {=0A=
=0A=
            oItem.destroy();=0A=
=0A=
=0A=
            return oItem;=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method getItems=0A=
* @description Returns an array of all of the items in the menu.=0A=
* @return {Array}=0A=
*/=0A=
getItems: function() {=0A=
=0A=
    var aGroups =3D this._aItemGroups,=0A=
        nGroups =3D aGroups.length;=0A=
=0A=
    return (=0A=
                (nGroups =3D=3D 1) ? aGroups[0] : =0A=
                    (Array.prototype.concat.apply([], aGroups))=0A=
            );=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method getItemGroups=0A=
* @description Multi-dimensional Array representing the menu items as =
they =0A=
* are grouped in the menu.=0A=
* @return {Array}=0A=
*/        =0A=
getItemGroups: function() {=0A=
=0A=
    return this._aItemGroups;=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method getItem=0A=
* @description Returns the item at the specified index.=0A=
* @param {Number} p_nItemIndex Number indicating the ordinal position of =
the =0A=
* item to be retrieved.=0A=
* @param {Number} p_nGroupIndex Optional. Number indicating the group to =
which =0A=
* the item belongs.=0A=
* @return {YAHOO.widget.MenuItem}=0A=
*/=0A=
getItem: function(p_nItemIndex, p_nGroupIndex) {=0A=
    =0A=
    if(typeof p_nItemIndex =3D=3D "number") {=0A=
=0A=
        var aGroup =3D this._getItemGroup(p_nGroupIndex);=0A=
=0A=
        if(aGroup) {=0A=
=0A=
            return aGroup[p_nItemIndex];=0A=
        =0A=
        }=0A=
=0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method clearContent=0A=
* @description Removes all of the content from the menu, including the =
menu =0A=
* items, group titles, header and footer.=0A=
*/=0A=
clearContent: function() {=0A=
=0A=
    var aItems =3D this.getItems(),=0A=
        nItems =3D aItems.length,=0A=
        oElement =3D this.element,=0A=
        oBody =3D this.body,=0A=
        oHeader =3D this.header,=0A=
        oFooter =3D this.footer;=0A=
=0A=
=0A=
    if(nItems > 0) {=0A=
=0A=
        var i =3D nItems - 1,=0A=
            oItem,=0A=
            oSubmenu;=0A=
=0A=
        do {=0A=
=0A=
            oItem =3D aItems[i];=0A=
=0A=
            if(oItem) {=0A=
=0A=
                oSubmenu =3D oItem.cfg.getProperty("submenu");=0A=
=0A=
                if(oSubmenu) {=0A=
=0A=
                    this.cfg.configChangedEvent.unsubscribe(=0A=
                                this._onParentMenuConfigChange, =0A=
                                oSubmenu=0A=
                            );=0A=
=0A=
                    this.renderEvent.unsubscribe(=0A=
                                        this._onParentMenuRender, =0A=
                                        oSubmenu=0A=
                                    );=0A=
=0A=
                }=0A=
=0A=
                oItem.destroy();=0A=
=0A=
            }=0A=
        =0A=
        }=0A=
        while(i--);=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(oHeader) {=0A=
=0A=
        Event.purgeElement(oHeader);=0A=
        oElement.removeChild(oHeader);=0A=
=0A=
    }=0A=
    =0A=
=0A=
    if(oFooter) {=0A=
=0A=
        Event.purgeElement(oFooter);=0A=
        oElement.removeChild(oFooter);=0A=
    }=0A=
=0A=
=0A=
    if(oBody) {=0A=
=0A=
        Event.purgeElement(oBody);=0A=
=0A=
        oBody.innerHTML =3D "";=0A=
=0A=
    }=0A=
=0A=
=0A=
    this._aItemGroups =3D [];=0A=
    this._aListElements =3D [];=0A=
    this._aGroupTitleElements =3D [];=0A=
    =0A=
    this.cfg.setProperty("width", null);=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method destroy=0A=
* @description Removes the menu's <code>&#60;div&#62;</code> element =0A=
* (and accompanying child nodes) from the document.=0A=
*/=0A=
destroy: function() {=0A=
=0A=
    // Remove all DOM event listeners=0A=
=0A=
    Event.purgeElement(this.element);=0A=
=0A=
=0A=
    // Remove Custom Event listeners=0A=
=0A=
    this.mouseOverEvent.unsubscribeAll();=0A=
    this.mouseOutEvent.unsubscribeAll();=0A=
    this.mouseDownEvent.unsubscribeAll();=0A=
    this.mouseUpEvent.unsubscribeAll();=0A=
    this.clickEvent.unsubscribeAll();=0A=
    this.keyPressEvent.unsubscribeAll();=0A=
    this.keyDownEvent.unsubscribeAll();=0A=
    this.keyUpEvent.unsubscribeAll();=0A=
    this.focusEvent.unsubscribeAll();=0A=
    this.blurEvent.unsubscribeAll();=0A=
    this.itemAddedEvent.unsubscribeAll();=0A=
    this.itemRemovedEvent.unsubscribeAll();=0A=
    this.cfg.unsubscribeFromConfigEvent("width", this._onWidthChange);=0A=
    this.cfg.unsubscribeFromConfigEvent("visible", =
this._onVisibleChange);=0A=
=0A=
    if (this._hasSetWidthHandlers) {=0A=
=0A=
        this.itemAddedEvent.unsubscribe(this._setWidth);=0A=
        this.itemRemovedEvent.unsubscribe(this._setWidth);=0A=
=0A=
        this._hasSetWidthHandlers =3D false;=0A=
=0A=
    }=0A=
=0A=
    YAHOO.widget.Module.textResizeEvent.unsubscribe(this._onTextResize, =
this);=0A=
=0A=
=0A=
    // Remove all items=0A=
=0A=
    this.clearContent();=0A=
=0A=
=0A=
    this._aItemGroups =3D null;=0A=
    this._aListElements =3D null;=0A=
    this._aGroupTitleElements =3D null;=0A=
=0A=
=0A=
    // Continue with the superclass implementation of this method=0A=
=0A=
    YAHOO.widget.Menu.superclass.destroy.call(this);=0A=
    =0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method setInitialFocus=0A=
* @description Sets focus to the menu's first enabled item.=0A=
*/=0A=
setInitialFocus: function() {=0A=
=0A=
    var oItem =3D this._getFirstEnabledItem();=0A=
    =0A=
    if (oItem) {=0A=
=0A=
        oItem.focus();=0A=
=0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method setInitialSelection=0A=
* @description Sets the "selected" configuration property of the menu's =
first =0A=
* enabled item to "true."=0A=
*/=0A=
setInitialSelection: function() {=0A=
=0A=
    var oItem =3D this._getFirstEnabledItem();=0A=
    =0A=
    if(oItem) {=0A=
    =0A=
        oItem.cfg.setProperty("selected", true);=0A=
    }        =0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method clearActiveItem=0A=
* @description Sets the "selected" configuration property of the menu's =
active=0A=
* item to "false" and hides the item's submenu.=0A=
* @param {Boolean} p_bBlur Boolean indicating if the menu's active item =0A=
* should be blurred.  =0A=
*/=0A=
clearActiveItem: function(p_bBlur) {=0A=
=0A=
    if(this.cfg.getProperty("showdelay") > 0) {=0A=
    =0A=
        this._cancelShowDelay();=0A=
    =0A=
    }=0A=
=0A=
=0A=
    var oActiveItem =3D this.activeItem;=0A=
=0A=
    if(oActiveItem) {=0A=
=0A=
        var oConfig =3D oActiveItem.cfg;=0A=
=0A=
        if(p_bBlur) {=0A=
=0A=
            oActiveItem.blur();=0A=
        =0A=
        }=0A=
=0A=
        oConfig.setProperty("selected", false);=0A=
=0A=
        var oSubmenu =3D oConfig.getProperty("submenu");=0A=
=0A=
        if(oSubmenu) {=0A=
=0A=
            oSubmenu.hide();=0A=
=0A=
        }=0A=
=0A=
        this.activeItem =3D null;            =0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method focus=0A=
* @description Causes the menu to receive focus and fires the "focus" =
event.=0A=
*/=0A=
focus: function() {=0A=
=0A=
    if (!this.hasFocus()) {=0A=
=0A=
        this.setInitialFocus();=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method blur=0A=
* @description Causes the menu to lose focus and fires the "blur" event.=0A=
*/    =0A=
blur: function() {=0A=
=0A=
    if (this.hasFocus()) {=0A=
    =0A=
        var oItem =3D YAHOO.widget.MenuManager.getFocusedMenuItem();=0A=
        =0A=
        if (oItem) {=0A=
=0A=
            oItem.blur();=0A=
=0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method hasFocus=0A=
* @description Returns a boolean indicating whether or not the menu has =
focus.=0A=
* @return {Boolean}=0A=
*/=0A=
hasFocus: function() {=0A=
=0A=
    return (YAHOO.widget.MenuManager.getFocusedMenu() =3D=3D =
this.getRoot());=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @description Initializes the class's configurable properties which can =
be=0A=
* changed using the menu's Config object ("cfg").=0A=
* @method initDefaultConfig=0A=
*/=0A=
initDefaultConfig: function() {=0A=
=0A=
    YAHOO.widget.Menu.superclass.initDefaultConfig.call(this);=0A=
=0A=
    var oConfig =3D this.cfg,=0A=
        DEFAULT_CONFIG =3D YAHOO.widget.Menu._DEFAULT_CONFIG;=0A=
=0A=
	// Add configuration attributes=0A=
=0A=
    /*=0A=
        Change the default value for the "visible" configuration =0A=
        property to "false" by re-adding the property.=0A=
    */=0A=
=0A=
    /**=0A=
    * @config visible=0A=
    * @description Boolean indicating whether or not the menu is =
visible.  If =0A=
    * the menu's "position" configuration property is set to "dynamic" =
(the =0A=
    * default), this property toggles the menu's =
<code>&#60;div&#62;</code> =0A=
    * element's "visibility" style property between "visible" (true) or =0A=
    * "hidden" (false).  If the menu's "position" configuration property =
is =0A=
    * set to "static" this property toggles the menu's =0A=
    * <code>&#60;div&#62;</code> element's "display" style property =0A=
    * between "block" (true) or "none" (false).=0A=
    * @default false=0A=
    * @type Boolean=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.VISIBLE.key, =0A=
        {=0A=
            handler: this.configVisible, =0A=
            value: DEFAULT_CONFIG.VISIBLE.value, =0A=
            validator: DEFAULT_CONFIG.VISIBLE.validator=0A=
         }=0A=
     );=0A=
=0A=
=0A=
    /*=0A=
        Change the default value for the "constraintoviewport" =
configuration =0A=
        property to "true" by re-adding the property.=0A=
    */=0A=
=0A=
    /**=0A=
    * @config constraintoviewport=0A=
    * @description Boolean indicating if the menu will try to remain =
inside =0A=
    * the boundaries of the size of viewport.=0A=
    * @default true=0A=
    * @type Boolean=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key, =0A=
        {=0A=
            handler: this.configConstrainToViewport, =0A=
            value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value, =0A=
            validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator, =0A=
            supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes =0A=
        } =0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config position=0A=
    * @description String indicating how a menu should be positioned on =
the =0A=
    * screen.  Possible values are "static" and "dynamic."  Static menus =
are =0A=
    * visible by default and reside in the normal flow of the document =0A=
    * (CSS position: static).  Dynamic menus are hidden by default, =
reside =0A=
    * out of the normal flow of the document (CSS position: absolute), =
and =0A=
    * can overlay other elements on the screen.=0A=
    * @default dynamic=0A=
    * @type String=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.POSITION.key, =0A=
        {=0A=
            handler: this.configPosition,=0A=
            value: DEFAULT_CONFIG.POSITION.value, =0A=
            validator: DEFAULT_CONFIG.POSITION.validator,=0A=
            supercedes: DEFAULT_CONFIG.POSITION.supercedes=0A=
        }=0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config submenualignment=0A=
    * @description Array defining how submenus should be aligned to =
their =0A=
    * parent menu item. The format is: [itemCorner, submenuCorner]. By =
default=0A=
    * a submenu's top left corner is aligned to its parent menu item's =
top =0A=
    * right corner.=0A=
    * @default ["tl","tr"]=0A=
    * @type Array=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key, =0A=
        { =0A=
            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value =0A=
        }=0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config autosubmenudisplay=0A=
    * @description Boolean indicating if submenus are automatically made =0A=
    * visible when the user mouses over the menu's items.=0A=
    * @default true=0A=
    * @type Boolean=0A=
    */=0A=
	oConfig.addProperty(=0A=
	   DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key, =0A=
	   { =0A=
	       value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value, =0A=
	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator=0A=
       } =0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config showdelay=0A=
    * @description Number indicating the time (in milliseconds) that =
should =0A=
    * expire before a submenu is made visible when the user mouses over =0A=
    * the menu's items.=0A=
    * @default 250=0A=
    * @type Number=0A=
    */=0A=
	oConfig.addProperty(=0A=
	   DEFAULT_CONFIG.SHOW_DELAY.key, =0A=
	   { =0A=
	       value: DEFAULT_CONFIG.SHOW_DELAY.value, =0A=
	       validator: DEFAULT_CONFIG.SHOW_DELAY.validator=0A=
       } =0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config hidedelay=0A=
    * @description Number indicating the time (in milliseconds) that =
should =0A=
    * expire before the menu is hidden.=0A=
    * @default 0=0A=
    * @type Number=0A=
    */=0A=
	oConfig.addProperty(=0A=
	   DEFAULT_CONFIG.HIDE_DELAY.key, =0A=
	   { =0A=
	       handler: this.configHideDelay,=0A=
	       value: DEFAULT_CONFIG.HIDE_DELAY.value, =0A=
	       validator: DEFAULT_CONFIG.HIDE_DELAY.validator, =0A=
	       suppressEvent: DEFAULT_CONFIG.HIDE_DELAY.suppressEvent=0A=
       } =0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config submenuhidedelay=0A=
    * @description Number indicating the time (in milliseconds) that =
should =0A=
    * expire before a submenu is hidden when the user mouses out of a =
menu item =0A=
    * heading in the direction of a submenu.  The value must be greater =
than or =0A=
    * equal to the value specified for the "showdelay" configuration =
property.=0A=
    * @default 250=0A=
    * @type Number=0A=
    */=0A=
	oConfig.addProperty(=0A=
	   DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.key, =0A=
	   { =0A=
	       value: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.value, =0A=
	       validator: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.validator=0A=
       } =0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config clicktohide=0A=
    * @description Boolean indicating if the menu will automatically be =0A=
    * hidden if the user clicks outside of it.=0A=
    * @default true=0A=
    * @type Boolean=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.CLICK_TO_HIDE.key,=0A=
        {=0A=
            value: DEFAULT_CONFIG.CLICK_TO_HIDE.value,=0A=
            validator: DEFAULT_CONFIG.CLICK_TO_HIDE.validator=0A=
        }=0A=
    );=0A=
=0A=
=0A=
	/**=0A=
	* @config container=0A=
	* @description HTML element reference or string specifying the id =0A=
	* attribute of the HTML element that the menu's markup should be =0A=
	* rendered into.=0A=
	* @type <a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
	* level-one-html.html#ID-58190037">HTMLElement</a>|String=0A=
	* @default document.body=0A=
	*/=0A=
	oConfig.addProperty(=0A=
	   DEFAULT_CONFIG.CONTAINER.key, =0A=
	   { =0A=
	       handler: this.configContainer,=0A=
	       value: document.body=0A=
       } =0A=
   );=0A=
=0A=
=0A=
    /**=0A=
    * @config maxheight=0A=
    * @description Defines the maximum height (in pixels) for a menu =
before the=0A=
    * contents of the body are scrolled.=0A=
    * @default 0=0A=
    * @type Number=0A=
    */=0A=
    oConfig.addProperty(=0A=
       DEFAULT_CONFIG.MAX_HEIGHT.key, =0A=
       {=0A=
            handler: this.configMaxHeight,=0A=
            value: DEFAULT_CONFIG.MAX_HEIGHT.value,=0A=
            validator: DEFAULT_CONFIG.MAX_HEIGHT.validator=0A=
       } =0A=
    );=0A=
=0A=
=0A=
    /**=0A=
    * @config classname=0A=
    * @description CSS class to be applied to the menu's root =0A=
    * <code>&#60;div&#62;</code> element.  The specified class(es) are =0A=
    * appended in addition to the default class as specified by the =
menu's=0A=
    * CSS_CLASS_NAME constant.=0A=
    * @default null=0A=
    * @type String=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.CLASS_NAME.key, =0A=
        { =0A=
            handler: this.configClassName,=0A=
            value: DEFAULT_CONFIG.CLASS_NAME.value, =0A=
            validator: DEFAULT_CONFIG.CLASS_NAME.validator=0A=
        }=0A=
    );=0A=
=0A=
}=0A=
=0A=
}); // END YAHOO.lang.extend=0A=
=0A=
})();=0A=
=0A=
=0A=
=0A=
(function() {=0A=
=0A=
var Dom =3D YAHOO.util.Dom,=0A=
    Module =3D YAHOO.widget.Module,=0A=
    Menu =3D YAHOO.widget.Menu,=0A=
    CustomEvent =3D YAHOO.util.CustomEvent,=0A=
    Lang =3D YAHOO.lang;=0A=
=0A=
/**=0A=
* Creates an item for a menu.=0A=
* =0A=
* @param {String} p_oObject String specifying the text of the menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object =
specifying =0A=
* the <code>&#60;li&#62;</code> element of the menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject Object =0A=
* specifying the <code>&#60;optgroup&#62;</code> element of the menu =
item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object =0A=
* specifying the <code>&#60;option&#62;</code> element of the menu item.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the menu item. See configuration class documentation =0A=
* for more details.=0A=
* @class MenuItem=0A=
* @constructor=0A=
*/=0A=
YAHOO.widget.MenuItem =3D function(p_oObject, p_oConfig) {=0A=
=0A=
    if(p_oObject) {=0A=
=0A=
        if(p_oConfig) {=0A=
    =0A=
            this.parent =3D p_oConfig.parent;=0A=
            this.value =3D p_oConfig.value;=0A=
            this.id =3D p_oConfig.id;=0A=
=0A=
        }=0A=
=0A=
        this.init(p_oObject, p_oConfig);=0A=
=0A=
    }=0A=
=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Constant representing the name of the MenuItem's events=0A=
* @property YAHOO.widget.MenuItem._EVENT_TYPES=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.MenuItem._EVENT_TYPES =3D {=0A=
=0A=
    "MOUSE_OVER": "mouseover",=0A=
    "MOUSE_OUT": "mouseout",=0A=
    "MOUSE_DOWN": "mousedown",=0A=
    "MOUSE_UP": "mouseup",=0A=
    "CLICK": "click",=0A=
    "KEY_PRESS": "keypress",=0A=
    "KEY_DOWN": "keydown",=0A=
    "KEY_UP": "keyup",=0A=
    "ITEM_ADDED": "itemAdded",=0A=
    "ITEM_REMOVED": "itemRemoved",=0A=
    "FOCUS": "focus",=0A=
    "BLUR": "blur",=0A=
    "DESTROY": "destroy"=0A=
=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Constant representing the MenuItem's configuration properties=0A=
* @property YAHOO.widget.MenuItem._DEFAULT_CONFIG=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.MenuItem._DEFAULT_CONFIG =3D {=0A=
=0A=
    "TEXT": { =0A=
        key: "text", =0A=
        value: "", =0A=
        validator: Lang.isString, =0A=
        suppressEvent: true =0A=
    }, =0A=
=0A=
    "HELP_TEXT": { =0A=
        key: "helptext" =0A=
    },=0A=
=0A=
    "URL": { =0A=
        key: "url", =0A=
        value: "#", =0A=
        suppressEvent: true =0A=
    }, =0A=
=0A=
    "TARGET": { =0A=
        key: "target", =0A=
        suppressEvent: true =0A=
    }, =0A=
=0A=
    "EMPHASIS": { =0A=
        key: "emphasis", =0A=
        value: false, =0A=
        validator: Lang.isBoolean, =0A=
        suppressEvent: true =0A=
    }, =0A=
=0A=
    "STRONG_EMPHASIS": { =0A=
        key: "strongemphasis", =0A=
        value: false, =0A=
        validator: Lang.isBoolean, =0A=
        suppressEvent: true =0A=
    },=0A=
=0A=
    "CHECKED": { =0A=
        key: "checked", =0A=
        value: false, =0A=
        validator: Lang.isBoolean, =0A=
        suppressEvent: true, =0A=
        supercedes:["disabled"]=0A=
    }, =0A=
=0A=
    "DISABLED": { =0A=
        key: "disabled", =0A=
        value: false, =0A=
        validator: Lang.isBoolean, =0A=
        suppressEvent: true=0A=
    },=0A=
=0A=
    "SELECTED": { =0A=
        key: "selected", =0A=
        value: false, =0A=
        validator: Lang.isBoolean, =0A=
        suppressEvent: true=0A=
    },=0A=
=0A=
    "SUBMENU": { =0A=
        key: "submenu"=0A=
    },=0A=
=0A=
    "ONCLICK": { =0A=
        key: "onclick"=0A=
    },=0A=
=0A=
    "CLASS_NAME": { =0A=
        key: "classname", =0A=
        value: null, =0A=
        validator: Lang.isString=0A=
    }=0A=
=0A=
};=0A=
=0A=
=0A=
YAHOO.widget.MenuItem.prototype =3D {=0A=
=0A=
    // Constants=0A=
=0A=
=0A=
    /**=0A=
    * @property COLLAPSED_SUBMENU_INDICATOR_TEXT=0A=
    * @description String representing the text for the =
<code>&#60;em&#62;</code>=0A=
    * element used for the submenu arrow indicator.=0A=
    * @default "Submenu collapsed.  Click to expand submenu."=0A=
    * @final=0A=
    * @type String=0A=
    */=0A=
    COLLAPSED_SUBMENU_INDICATOR_TEXT: =0A=
        "Submenu collapsed.  Click to expand submenu.",=0A=
=0A=
=0A=
    /**=0A=
    * @property EXPANDED_SUBMENU_INDICATOR_TEXT=0A=
    * @description String representing the text for the submenu arrow =
indicator =0A=
    * element (<code>&#60;em&#62;</code>) when the submenu is visible.=0A=
    * @default "Submenu expanded.  Click to collapse submenu."=0A=
    * @final=0A=
    * @type String=0A=
    */=0A=
    EXPANDED_SUBMENU_INDICATOR_TEXT: =0A=
        "Submenu expanded.  Click to collapse submenu.",=0A=
=0A=
=0A=
    /**=0A=
    * @property DISABLED_SUBMENU_INDICATOR_TEXT=0A=
    * @description String representing the text for the submenu arrow =
indicator =0A=
    * element (<code>&#60;em&#62;</code>) when the menu item is disabled.=0A=
    * @default "Submenu collapsed.  (Item disabled.)."=0A=
    * @final=0A=
    * @type String=0A=
    */=0A=
    DISABLED_SUBMENU_INDICATOR_TEXT: "Submenu collapsed.  (Item =
disabled.)",=0A=
=0A=
=0A=
    /**=0A=
    * @property CHECKED_TEXT=0A=
    * @description String representing the text to be used for the =
checked =0A=
    * indicator element (<code>&#60;em&#62;</code>).=0A=
    * @default "Checked."=0A=
    * @final=0A=
    * @type String=0A=
    */=0A=
    CHECKED_TEXT: "Menu item checked.",=0A=
    =0A=
    =0A=
    /**=0A=
    * @property DISABLED_CHECKED_TEXT=0A=
    * @description String representing the text to be used for the =
checked =0A=
    * indicator element (<code>&#60;em&#62;</code>) when the menu item =0A=
    * is disabled.=0A=
    * @default "Checked. (Item disabled.)"=0A=
    * @final=0A=
    * @type String=0A=
    */=0A=
    DISABLED_CHECKED_TEXT: "Checked. (Item disabled.)",=0A=
=0A=
=0A=
    /**=0A=
    * @property CSS_CLASS_NAME=0A=
    * @description String representing the CSS class(es) to be applied =
to the =0A=
    * <code>&#60;li&#62;</code> element of the menu item.=0A=
    * @default "yuimenuitem"=0A=
    * @final=0A=
    * @type String=0A=
    */=0A=
    CSS_CLASS_NAME: "yuimenuitem",=0A=
=0A=
=0A=
    /**=0A=
    * @property SUBMENU_TYPE=0A=
    * @description Object representing the type of menu to instantiate =
and =0A=
    * add when parsing the child nodes of the menu item's source HTML =
element.=0A=
    * @final=0A=
    * @type YAHOO.widget.Menu=0A=
    */=0A=
    SUBMENU_TYPE: null,=0A=
=0A=
=0A=
=0A=
    // Private member variables=0A=
    =0A=
=0A=
    /**=0A=
    * @property _oAnchor=0A=
    * @description Object reference to the menu item's =0A=
    * <code>&#60;a&#62;</code> element.=0A=
    * @default null =0A=
    * @private=0A=
    * @type <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-48250443">HTMLAnchorElement</a>=0A=
    */=0A=
    _oAnchor: null,=0A=
    =0A=
=0A=
    /**=0A=
    * @property _oText=0A=
    * @description Object reference to the menu item's text node.=0A=
    * @default null=0A=
    * @private=0A=
    * @type TextNode=0A=
    */=0A=
    _oText: null,=0A=
    =0A=
    =0A=
    /**=0A=
    * @property _oHelpTextEM=0A=
    * @description Object reference to the menu item's help text =0A=
    * <code>&#60;em&#62;</code> element.=0A=
    * @default null=0A=
    * @private=0A=
    * @type <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-58190037">HTMLElement</a>=0A=
    */=0A=
    _oHelpTextEM: null,=0A=
    =0A=
    =0A=
    /**=0A=
    * @property _oSubmenu=0A=
    * @description Object reference to the menu item's submenu.=0A=
    * @default null=0A=
    * @private=0A=
    * @type YAHOO.widget.Menu=0A=
    */=0A=
    _oSubmenu: null,=0A=
    =0A=
=0A=
    /**=0A=
    * @property _oCheckedIndicator=0A=
    * @description Object reference to the menu item's checkmark image.=0A=
    * @default <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-58190037">HTMLElement</a>=0A=
    * @private=0A=
    * @type <a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-58190037">HTMLElement</a>=0A=
    */=0A=
    _oCheckedIndicator: null,=0A=
=0A=
=0A=
    /** =0A=
    * @property _oOnclickAttributeValue=0A=
    * @description Object reference to the menu item's current value for =
the =0A=
    * "onclick" configuration attribute.=0A=
    * @default null=0A=
    * @private=0A=
    * @type Object=0A=
    */=0A=
    _oOnclickAttributeValue: null,=0A=
=0A=
=0A=
    /**=0A=
    * @property _sClassName=0A=
    * @description The current value of the "classname" configuration =
attribute.=0A=
    * @default null=0A=
    * @private=0A=
    * @type String=0A=
    */=0A=
    _sClassName: null,=0A=
=0A=
=0A=
=0A=
    // Public properties=0A=
=0A=
=0A=
	/**=0A=
    * @property constructor=0A=
	* @description Object reference to the menu item's constructor function.=0A=
    * @default YAHOO.widget.MenuItem=0A=
	* @type YAHOO.widget.MenuItem=0A=
	*/=0A=
	constructor: YAHOO.widget.MenuItem,=0A=
=0A=
=0A=
    /**=0A=
    * @property index=0A=
    * @description Number indicating the ordinal position of the menu =
item in =0A=
    * its group.=0A=
    * @default null=0A=
    * @type Number=0A=
    */=0A=
    index: null,=0A=
=0A=
=0A=
    /**=0A=
    * @property groupIndex=0A=
    * @description Number indicating the index of the group to which the =
menu =0A=
    * item belongs.=0A=
    * @default null=0A=
    * @type Number=0A=
    */=0A=
    groupIndex: null,=0A=
=0A=
=0A=
    /**=0A=
    * @property parent=0A=
    * @description Object reference to the menu item's parent menu.=0A=
    * @default null=0A=
    * @type YAHOO.widget.Menu=0A=
    */=0A=
    parent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @property element=0A=
    * @description Object reference to the menu item's =0A=
    * <code>&#60;li&#62;</code> element.=0A=
    * @default <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level=0A=
    * -one-html.html#ID-74680021">HTMLLIElement</a>=0A=
    * @type <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-74680021">HTMLLIElement</a>=0A=
    */=0A=
    element: null,=0A=
=0A=
=0A=
    /**=0A=
    * @property srcElement=0A=
    * @description Object reference to the HTML element (either =0A=
    * <code>&#60;li&#62;</code>, <code>&#60;optgroup&#62;</code> or =0A=
    * <code>&#60;option&#62;</code>) used create the menu item.=0A=
    * @default <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-74680021">HTMLLIElement</a>|<a =
href=3D"http://www.=0A=
    * =
w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-38450247"=0A=
    * >HTMLOptGroupElement</a>|<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-=0A=
    * =
Level-1-20000929/level-one-html.html#ID-70901257">HTMLOptionElement</a>=0A=
    * @type <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-74680021">HTMLLIElement</a>|<a =
href=3D"http://www.w3.=0A=
    * =
org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-38450247">=0A=
    * HTMLOptGroupElement</a>|<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-=0A=
    * =
Level-1-20000929/level-one-html.html#ID-70901257">HTMLOptionElement</a>=0A=
    */=0A=
    srcElement: null,=0A=
=0A=
=0A=
    /**=0A=
    * @property value=0A=
    * @description Object reference to the menu item's value.=0A=
    * @default null=0A=
    * @type Object=0A=
    */=0A=
    value: null,=0A=
=0A=
=0A=
    /**=0A=
    * @property submenuIndicator=0A=
    * @description Object reference to the <code>&#60;em&#62;</code> =
element =0A=
    * used to create the submenu indicator for the menu item.=0A=
    * @default <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-58190037">HTMLElement</a>=0A=
    * @type <a href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-58190037">HTMLElement</a>=0A=
    */=0A=
    submenuIndicator: null,=0A=
=0A=
=0A=
	/**=0A=
    * @property browser=0A=
	* @description String representing the browser.=0A=
	* @type String=0A=
	*/=0A=
	browser: Module.prototype.browser,=0A=
=0A=
=0A=
    /**=0A=
    * @property id=0A=
    * @description Id of the menu item's root <code>&#60;li&#62;</code> =0A=
    * element.  This property should be set via the constructor using =
the =0A=
    * configuration object literal.  If an id is not specified, then one =
will =0A=
    * be created using the "generateId" method of the Dom utility.=0A=
    * @default null=0A=
    * @type String=0A=
    */=0A=
    id: null,=0A=
=0A=
=0A=
=0A=
    // Events=0A=
=0A=
=0A=
    /**=0A=
    * @event destroyEvent=0A=
    * @description Fires when the menu item's <code>&#60;li&#62;</code> =0A=
    * element is removed from its parent <code>&#60;ul&#62;</code> =
element.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    destroyEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event mouseOverEvent=0A=
    * @description Fires when the mouse has entered the menu item.  =
Passes =0A=
    * back the DOM Event object as an argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    mouseOverEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event mouseOutEvent=0A=
    * @description Fires when the mouse has left the menu item.  Passes =
back =0A=
    * the DOM Event object as an argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    mouseOutEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event mouseDownEvent=0A=
    * @description Fires when the user mouses down on the menu item.  =
Passes =0A=
    * back the DOM Event object as an argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    mouseDownEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event mouseUpEvent=0A=
    * @description Fires when the user releases a mouse button while the =
mouse =0A=
    * is over the menu item.  Passes back the DOM Event object as an =
argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    mouseUpEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event clickEvent=0A=
    * @description Fires when the user clicks the on the menu item.  =
Passes =0A=
    * back the DOM Event object as an argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    clickEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event keyPressEvent=0A=
    * @description Fires when the user presses an alphanumeric key when =
the =0A=
    * menu item has focus.  Passes back the DOM Event object as an =
argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    keyPressEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event keyDownEvent=0A=
    * @description Fires when the user presses a key when the menu item =
has =0A=
    * focus.  Passes back the DOM Event object as an argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    keyDownEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event keyUpEvent=0A=
    * @description Fires when the user releases a key when the menu item =
has =0A=
    * focus.  Passes back the DOM Event object as an argument.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    keyUpEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event focusEvent=0A=
    * @description Fires when the menu item receives focus.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    focusEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @event blurEvent=0A=
    * @description Fires when the menu item loses the input focus.=0A=
    * @type YAHOO.util.CustomEvent=0A=
    */=0A=
    blurEvent: null,=0A=
=0A=
=0A=
    /**=0A=
    * @method init=0A=
    * @description The MenuItem class's initialization method. This =
method is =0A=
    * automatically called by the constructor, and sets up all DOM =
references =0A=
    * for pre-existing markup, and creates required markup if it is not =0A=
    * already present.=0A=
    * @param {String} p_oObject String specifying the text of the menu =
item.=0A=
    * @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object =
specifying =0A=
    * the <code>&#60;li&#62;</code> element of the menu item.=0A=
    * @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject =
Object =0A=
    * specifying the <code>&#60;optgroup&#62;</code> element of the menu =
item.=0A=
    * @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
    * one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object =0A=
    * specifying the <code>&#60;option&#62;</code> element of the menu =
item.=0A=
    * @param {Object} p_oConfig Optional. Object literal specifying the =0A=
    * configuration for the menu item. See configuration class =
documentation =0A=
    * for more details.=0A=
    */=0A=
    init: function(p_oObject, p_oConfig) {=0A=
=0A=
=0A=
        if(!this.SUBMENU_TYPE) {=0A=
    =0A=
            this.SUBMENU_TYPE =3D Menu;=0A=
    =0A=
        }=0A=
=0A=
=0A=
        // Create the config object=0A=
=0A=
        this.cfg =3D new YAHOO.util.Config(this);=0A=
=0A=
        this.initDefaultConfig();=0A=
=0A=
        var oConfig =3D this.cfg;=0A=
=0A=
=0A=
        if(Lang.isString(p_oObject)) {=0A=
=0A=
            this._createRootNodeStructure();=0A=
=0A=
            oConfig.setProperty("text", p_oObject);=0A=
=0A=
        }=0A=
        else if(this._checkDOMNode(p_oObject)) {=0A=
=0A=
            switch(p_oObject.tagName.toUpperCase()) {=0A=
=0A=
                case "OPTION":=0A=
=0A=
                    this._createRootNodeStructure();=0A=
=0A=
                    oConfig.setProperty("text", p_oObject.text);=0A=
=0A=
                    this.srcElement =3D p_oObject;=0A=
=0A=
                break;=0A=
=0A=
                case "OPTGROUP":=0A=
=0A=
                    this._createRootNodeStructure();=0A=
=0A=
                    oConfig.setProperty("text", p_oObject.label);=0A=
=0A=
                    this.srcElement =3D p_oObject;=0A=
=0A=
                    this._initSubTree();=0A=
=0A=
                break;=0A=
=0A=
                case "LI":=0A=
=0A=
                    // Get the anchor node (if it exists)=0A=
=0A=
                    var oAnchor =3D this._getFirstElement(p_oObject, =
"A"),=0A=
                        sURL =3D "#",=0A=
                        sTarget,=0A=
                        sText;=0A=
=0A=
=0A=
                    // Capture the "text" and/or the "URL"=0A=
=0A=
                    if(oAnchor) {=0A=
=0A=
                        sURL =3D oAnchor.getAttribute("href");=0A=
                        sTarget =3D oAnchor.getAttribute("target");=0A=
=0A=
                        if(oAnchor.innerText) {=0A=
                =0A=
                            sText =3D oAnchor.innerText;=0A=
                =0A=
                        }=0A=
                        else {=0A=
                =0A=
                            var oRange =3D =
oAnchor.ownerDocument.createRange();=0A=
                =0A=
                            oRange.selectNodeContents(oAnchor);=0A=
                =0A=
                            sText =3D oRange.toString();             =0A=
                =0A=
                        }=0A=
=0A=
                    }=0A=
                    else {=0A=
=0A=
                        var oText =3D p_oObject.firstChild;=0A=
=0A=
                        sText =3D oText.nodeValue;=0A=
=0A=
                        oAnchor =3D document.createElement("a");=0A=
                        =0A=
                        oAnchor.setAttribute("href", sURL);=0A=
=0A=
                        p_oObject.replaceChild(oAnchor, oText);=0A=
                        =0A=
                        oAnchor.appendChild(oText);=0A=
=0A=
                    }=0A=
=0A=
=0A=
                    this.srcElement =3D p_oObject;=0A=
                    this.element =3D p_oObject;=0A=
                    this._oAnchor =3D oAnchor;=0A=
    =0A=
=0A=
                    // Check if emphasis has been applied to the MenuItem=0A=
=0A=
                    var oEmphasisNode =3D this._getFirstElement(oAnchor),=0A=
                        bEmphasis =3D false,=0A=
                        bStrongEmphasis =3D false;=0A=
=0A=
                    if(oEmphasisNode) {=0A=
=0A=
                        // Set a reference to the text node =0A=
=0A=
                        this._oText =3D oEmphasisNode.firstChild;=0A=
=0A=
                        switch(oEmphasisNode.tagName.toUpperCase()) {=0A=
=0A=
                            case "EM":=0A=
=0A=
                                bEmphasis =3D true;=0A=
=0A=
                            break;=0A=
=0A=
                            case "STRONG":=0A=
=0A=
                                bStrongEmphasis =3D true;=0A=
=0A=
                            break;=0A=
=0A=
                        }=0A=
=0A=
                    }=0A=
                    else {=0A=
=0A=
                        // Set a reference to the text node =0A=
=0A=
                        this._oText =3D oAnchor.firstChild;=0A=
=0A=
                    }=0A=
=0A=
=0A=
                    /*=0A=
                        Set these properties silently to sync up the =0A=
                        configuration object without making changes to =
the =0A=
                        element's DOM=0A=
                    */ =0A=
=0A=
                    oConfig.setProperty("text", sText, true);=0A=
                    oConfig.setProperty("url", sURL, true);=0A=
                    oConfig.setProperty("target", sTarget, true);=0A=
                    oConfig.setProperty("emphasis", bEmphasis, true);=0A=
                    oConfig.setProperty(=0A=
                        "strongemphasis", =0A=
                        bStrongEmphasis, =0A=
                        true=0A=
                    );=0A=
=0A=
                    this._initSubTree();=0A=
=0A=
                break;=0A=
=0A=
            }            =0A=
=0A=
        }=0A=
=0A=
=0A=
        if(this.element) {=0A=
=0A=
            var sId =3D this.element.id;=0A=
=0A=
            if(!sId) {=0A=
=0A=
                sId =3D this.id || Dom.generateId();=0A=
=0A=
                this.element.id =3D sId;=0A=
=0A=
            }=0A=
=0A=
            this.id =3D sId;=0A=
=0A=
=0A=
            Dom.addClass(this.element, this.CSS_CLASS_NAME);=0A=
=0A=
=0A=
            // Create custom events=0A=
=0A=
            var EVENT_TYPES =3D YAHOO.widget.MenuItem._EVENT_TYPES;=0A=
=0A=
            this.mouseOverEvent =3D new =
CustomEvent(EVENT_TYPES.MOUSE_OVER, this);=0A=
            this.mouseOutEvent =3D new =
CustomEvent(EVENT_TYPES.MOUSE_OUT, this);=0A=
            this.mouseDownEvent =3D new =
CustomEvent(EVENT_TYPES.MOUSE_DOWN, this);=0A=
            this.mouseUpEvent =3D new CustomEvent(EVENT_TYPES.MOUSE_UP, =
this);=0A=
            this.clickEvent =3D new CustomEvent(EVENT_TYPES.CLICK, this);=0A=
            this.keyPressEvent =3D new =
CustomEvent(EVENT_TYPES.KEY_PRESS, this);=0A=
            this.keyDownEvent =3D new CustomEvent(EVENT_TYPES.KEY_DOWN, =
this);=0A=
            this.keyUpEvent =3D new CustomEvent(EVENT_TYPES.KEY_UP, =
this);=0A=
            this.focusEvent =3D new CustomEvent(EVENT_TYPES.FOCUS, this);=0A=
            this.blurEvent =3D new CustomEvent(EVENT_TYPES.BLUR, this);=0A=
            this.destroyEvent =3D new CustomEvent(EVENT_TYPES.DESTROY, =
this);=0A=
=0A=
            if(p_oConfig) {=0A=
    =0A=
                oConfig.applyConfig(p_oConfig);=0A=
    =0A=
            }        =0A=
=0A=
            oConfig.fireQueue();=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
=0A=
    // Private methods=0A=
=0A=
=0A=
    /**=0A=
    * @method _getFirstElement=0A=
    * @description Returns an HTML element's first HTML element node.=0A=
    * @private=0A=
    * @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-58190037">HTMLElement</a>} p_oElement =
Object =0A=
    * reference specifying the element to be evaluated.=0A=
    * @param {String} p_sTagName Optional. String specifying the tagname =
of =0A=
    * the element to be retrieved.=0A=
    * @return {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-58190037">HTMLElement</a>}=0A=
    */=0A=
    _getFirstElement: function(p_oElement, p_sTagName) {=0A=
    =0A=
        var oFirstChild =3D p_oElement.firstChild,=0A=
            oElement;=0A=
    =0A=
        if(oFirstChild) {=0A=
    =0A=
            if(oFirstChild.nodeType =3D=3D 1) {=0A=
    =0A=
                oElement =3D oFirstChild;=0A=
    =0A=
            }=0A=
            else {=0A=
    =0A=
                var oNextSibling =3D oFirstChild.nextSibling;=0A=
    =0A=
                if(oNextSibling && oNextSibling.nodeType =3D=3D 1) {=0A=
                =0A=
                    oElement =3D oNextSibling;=0A=
                =0A=
                }=0A=
    =0A=
            }=0A=
    =0A=
        }=0A=
=0A=
=0A=
        if(p_sTagName) {=0A=
=0A=
            return (oElement && oElement.tagName.toUpperCase() =3D=3D =
p_sTagName) ? =0A=
                oElement : false;=0A=
=0A=
        }=0A=
        =0A=
        return oElement;=0A=
=0A=
    },    =0A=
=0A=
=0A=
    /**=0A=
    * @method _checkDOMNode=0A=
    * @description Determines if an object is an HTML element.=0A=
    * @private=0A=
    * @param {Object} p_oObject Object to be evaluated.=0A=
    * @return {Boolean}=0A=
    */=0A=
    _checkDOMNode: function(p_oObject) {=0A=
=0A=
        return (p_oObject && p_oObject.tagName);=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method _createRootNodeStructure=0A=
    * @description Creates the core DOM structure for the menu item.=0A=
    * @private=0A=
    */=0A=
    _createRootNodeStructure: function () {=0A=
=0A=
        var oTemplate =3D YAHOO.widget.MenuItem._MenuItemTemplate;=0A=
=0A=
        if(!oTemplate) {=0A=
=0A=
            oTemplate =3D document.createElement("li");=0A=
            oTemplate.innerHTML =3D "<a href=3D\"#\">s</a>";=0A=
=0A=
            YAHOO.widget.MenuItem._MenuItemTemplate =3D oTemplate;=0A=
=0A=
        }=0A=
=0A=
        this.element =3D oTemplate.cloneNode(true);=0A=
        this._oAnchor =3D this.element.firstChild;=0A=
        this._oText =3D this._oAnchor.firstChild;=0A=
=0A=
        this.element.appendChild(this._oAnchor);=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method _initSubTree=0A=
    * @description Iterates the source element's childNodes collection =
and uses =0A=
    * the child nodes to instantiate other menus.=0A=
    * @private=0A=
    */=0A=
    _initSubTree: function() {=0A=
=0A=
        var oSrcEl =3D this.srcElement,=0A=
            oConfig =3D this.cfg;=0A=
=0A=
=0A=
        if(oSrcEl.childNodes.length > 0) {=0A=
=0A=
            if(=0A=
                this.parent.lazyLoad && =0A=
                this.parent.srcElement && =0A=
                this.parent.srcElement.tagName.toUpperCase() =3D=3D =
"SELECT"=0A=
            ) {=0A=
=0A=
                oConfig.setProperty(=0A=
                        "submenu", =0A=
                        { id: Dom.generateId(), itemdata: =
oSrcEl.childNodes }=0A=
                    );=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                var oNode =3D oSrcEl.firstChild,=0A=
                    aOptions =3D [];=0A=
    =0A=
                do {=0A=
    =0A=
                    if(oNode && oNode.tagName) {=0A=
    =0A=
                        switch(oNode.tagName.toUpperCase()) {=0A=
                =0A=
                            case "DIV":=0A=
                =0A=
                                oConfig.setProperty("submenu", oNode);=0A=
                =0A=
                            break;=0A=
         =0A=
                            case "OPTION":=0A=
        =0A=
                                aOptions[aOptions.length] =3D oNode;=0A=
        =0A=
                            break;=0A=
               =0A=
                        }=0A=
                    =0A=
                    }=0A=
                =0A=
                }        =0A=
                while((oNode =3D oNode.nextSibling));=0A=
    =0A=
    =0A=
                var nOptions =3D aOptions.length;=0A=
    =0A=
                if(nOptions > 0) {=0A=
    =0A=
                    var oMenu =3D new =
this.SUBMENU_TYPE(Dom.generateId());=0A=
                    =0A=
                    oConfig.setProperty("submenu", oMenu);=0A=
    =0A=
                    for(var n=3D0; n<nOptions; n++) {=0A=
        =0A=
                        oMenu.addItem((new =
oMenu.ITEM_TYPE(aOptions[n])));=0A=
        =0A=
                    }=0A=
        =0A=
                }=0A=
            =0A=
            }=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
=0A=
    // Event handlers for configuration properties=0A=
=0A=
=0A=
    /**=0A=
    * @method configText=0A=
    * @description Event handler for when the "text" configuration =
property of =0A=
    * the menu item changes.=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */=0A=
    configText: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var sText =3D p_aArgs[0];=0A=
=0A=
=0A=
        if(this._oText) {=0A=
=0A=
            this._oText.nodeValue =3D sText;=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configHelpText=0A=
    * @description Event handler for when the "helptext" configuration =
property =0A=
    * of the menu item changes.=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configHelpText: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var me =3D this,=0A=
            oHelpText =3D p_aArgs[0],=0A=
            oEl =3D this.element,=0A=
            oConfig =3D this.cfg,=0A=
            aNodes =3D [oEl, this._oAnchor],=0A=
            oSubmenuIndicator =3D this.submenuIndicator;=0A=
=0A=
=0A=
        function initHelpText() {=0A=
=0A=
            Dom.addClass(aNodes, "hashelptext");=0A=
=0A=
            if(oConfig.getProperty("disabled")) {=0A=
=0A=
                oConfig.refireEvent("disabled");=0A=
=0A=
            }=0A=
=0A=
            if(oConfig.getProperty("selected")) {=0A=
=0A=
                oConfig.refireEvent("selected");=0A=
=0A=
            }                =0A=
=0A=
        }=0A=
=0A=
=0A=
        function removeHelpText() {=0A=
=0A=
            Dom.removeClass(aNodes, "hashelptext");=0A=
=0A=
            oEl.removeChild(me._oHelpTextEM);=0A=
            me._oHelpTextEM =3D null;=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(this._checkDOMNode(oHelpText)) {=0A=
=0A=
            oHelpText.className =3D "helptext";=0A=
=0A=
            if(this._oHelpTextEM) {=0A=
            =0A=
                this._oHelpTextEM.parentNode.replaceChild(=0A=
                    oHelpText, =0A=
                    this._oHelpTextEM=0A=
                );=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                this._oHelpTextEM =3D oHelpText;=0A=
=0A=
                oEl.insertBefore(this._oHelpTextEM, oSubmenuIndicator);=0A=
=0A=
            }=0A=
=0A=
            initHelpText();=0A=
=0A=
        }=0A=
        else if(Lang.isString(oHelpText)) {=0A=
=0A=
            if(oHelpText.length =3D=3D=3D 0) {=0A=
=0A=
                removeHelpText();=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                if(!this._oHelpTextEM) {=0A=
=0A=
                    this._oHelpTextEM =3D document.createElement("em");=0A=
                    this._oHelpTextEM.className =3D "helptext";=0A=
=0A=
                    oEl.insertBefore(this._oHelpTextEM, =
oSubmenuIndicator);=0A=
=0A=
                }=0A=
=0A=
                this._oHelpTextEM.innerHTML =3D oHelpText;=0A=
=0A=
                initHelpText();=0A=
=0A=
            }=0A=
=0A=
        }=0A=
        else if(!oHelpText && this._oHelpTextEM) {=0A=
=0A=
            removeHelpText();=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configURL=0A=
    * @description Event handler for when the "url" configuration =
property of =0A=
    * the menu item changes.=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configURL: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var sURL =3D p_aArgs[0];=0A=
=0A=
        if(!sURL) {=0A=
=0A=
            sURL =3D "#";=0A=
=0A=
        }=0A=
=0A=
        this._oAnchor.setAttribute("href", sURL);=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configTarget=0A=
    * @description Event handler for when the "target" configuration =
property =0A=
    * of the menu item changes.  =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configTarget: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var sTarget =3D p_aArgs[0],=0A=
            oAnchor =3D this._oAnchor;=0A=
=0A=
        if(sTarget && sTarget.length > 0) {=0A=
=0A=
            oAnchor.setAttribute("target", sTarget);=0A=
=0A=
        }=0A=
        else {=0A=
=0A=
            oAnchor.removeAttribute("target");=0A=
        =0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configEmphasis=0A=
    * @description Event handler for when the "emphasis" configuration =
property=0A=
    * of the menu item changes.  =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configEmphasis: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var bEmphasis =3D p_aArgs[0],=0A=
            oAnchor =3D this._oAnchor,=0A=
            oText =3D this._oText,=0A=
            oConfig =3D this.cfg,=0A=
            oEM;=0A=
=0A=
=0A=
        if(bEmphasis && oConfig.getProperty("strongemphasis")) {=0A=
=0A=
            oConfig.setProperty("strongemphasis", false);=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(oAnchor) {=0A=
=0A=
            if(bEmphasis) {=0A=
=0A=
                oEM =3D document.createElement("em");=0A=
                oEM.appendChild(oText);=0A=
=0A=
                oAnchor.appendChild(oEM);=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                oEM =3D this._getFirstElement(oAnchor, "EM");=0A=
=0A=
                if(oEM) {=0A=
=0A=
                    oAnchor.removeChild(oEM);=0A=
                    oAnchor.appendChild(oText);=0A=
=0A=
                }=0A=
=0A=
            }=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configStrongEmphasis=0A=
    * @description Event handler for when the "strongemphasis" =
configuration =0A=
    * property of the menu item changes. =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configStrongEmphasis: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var bStrongEmphasis =3D p_aArgs[0],=0A=
            oAnchor =3D this._oAnchor,=0A=
            oText =3D this._oText,=0A=
            oConfig =3D this.cfg,=0A=
            oStrong;=0A=
=0A=
        if(bStrongEmphasis && oConfig.getProperty("emphasis")) {=0A=
=0A=
            oConfig.setProperty("emphasis", false);=0A=
=0A=
        }=0A=
=0A=
        if(oAnchor) {=0A=
=0A=
            if(bStrongEmphasis) {=0A=
=0A=
                oStrong =3D document.createElement("strong");=0A=
                oStrong.appendChild(oText);=0A=
=0A=
                oAnchor.appendChild(oStrong);=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                oStrong =3D this._getFirstElement(oAnchor, "STRONG");=0A=
=0A=
                if(oStrong) {=0A=
=0A=
                    oAnchor.removeChild(oStrong);=0A=
                    oAnchor.appendChild(oText);=0A=
=0A=
                }=0A=
=0A=
            }=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configChecked=0A=
    * @description Event handler for when the "checked" configuration =
property =0A=
    * of the menu item changes. =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configChecked: function(p_sType, p_aArgs, p_oItem) {=0A=
    =0A=
        var bChecked =3D p_aArgs[0],=0A=
            oEl =3D this.element,=0A=
            oConfig =3D this.cfg,=0A=
            oEM;=0A=
=0A=
=0A=
        if(bChecked) {=0A=
=0A=
            var oTemplate =3D =
YAHOO.widget.MenuItem._CheckedIndicatorTemplate;=0A=
=0A=
            if(!oTemplate) {=0A=
=0A=
                oTemplate =3D document.createElement("em");=0A=
                oTemplate.innerHTML =3D this.CHECKED_TEXT;=0A=
                oTemplate.className =3D "checkedindicator";=0A=
=0A=
                YAHOO.widget.MenuItem._CheckedIndicatorTemplate =3D =
oTemplate;=0A=
=0A=
            }=0A=
=0A=
            oEM =3D oTemplate.cloneNode(true);=0A=
=0A=
            var oSubmenu =3D this.cfg.getProperty("submenu");=0A=
=0A=
            if(oSubmenu && oSubmenu.element) {=0A=
=0A=
                oEl.insertBefore(oEM, oSubmenu.element);=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                oEl.appendChild(oEM);=0A=
=0A=
            }=0A=
=0A=
=0A=
            Dom.addClass(oEl, "checked");=0A=
=0A=
            this._oCheckedIndicator =3D oEM;=0A=
=0A=
            if(oConfig.getProperty("disabled")) {=0A=
=0A=
                oConfig.refireEvent("disabled");=0A=
=0A=
            }=0A=
=0A=
            if(oConfig.getProperty("selected")) {=0A=
=0A=
                oConfig.refireEvent("selected");=0A=
=0A=
            }=0A=
        =0A=
        }=0A=
        else {=0A=
=0A=
            oEM =3D this._oCheckedIndicator;=0A=
=0A=
            Dom.removeClass(oEl, "checked");=0A=
=0A=
            if(oEM) {=0A=
=0A=
                oEl.removeChild(oEM);=0A=
=0A=
            }=0A=
=0A=
            this._oCheckedIndicator =3D null;=0A=
        =0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
=0A=
    /**=0A=
    * @method configDisabled=0A=
    * @description Event handler for when the "disabled" configuration =
property =0A=
    * of the menu item changes. =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configDisabled: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var bDisabled =3D p_aArgs[0],=0A=
            oConfig =3D this.cfg,=0A=
            oAnchor =3D this._oAnchor,=0A=
            aNodes =3D [this.element, oAnchor],=0A=
            oHelpText =3D this._oHelpTextEM,=0A=
            oCheckedIndicator =3D this._oCheckedIndicator,=0A=
            oSubmenuIndicator =3D this.submenuIndicator,=0A=
            i =3D 1;=0A=
=0A=
=0A=
        if(oHelpText) {=0A=
=0A=
            i++;=0A=
            aNodes[i] =3D oHelpText;=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(oCheckedIndicator) {=0A=
            =0A=
            oCheckedIndicator.firstChild.nodeValue =3D bDisabled ? =0A=
                this.DISABLED_CHECKED_TEXT : =0A=
                this.CHECKED_TEXT;=0A=
=0A=
            i++;=0A=
            aNodes[i] =3D oCheckedIndicator;=0A=
            =0A=
        }    =0A=
=0A=
=0A=
        if(oSubmenuIndicator) {=0A=
=0A=
            oSubmenuIndicator.firstChild.nodeValue =3D bDisabled ? =0A=
                this.DISABLED_SUBMENU_INDICATOR_TEXT : =0A=
                this.COLLAPSED_SUBMENU_INDICATOR_TEXT;=0A=
=0A=
            i++;=0A=
            aNodes[i] =3D oSubmenuIndicator;=0A=
        =0A=
        }=0A=
=0A=
=0A=
        if(bDisabled) {=0A=
=0A=
            if(oConfig.getProperty("selected")) {=0A=
=0A=
                oConfig.setProperty("selected", false);=0A=
=0A=
            }=0A=
=0A=
            oAnchor.removeAttribute("href");=0A=
=0A=
            Dom.addClass(aNodes, "disabled");=0A=
=0A=
        }=0A=
        else {=0A=
=0A=
            oAnchor.setAttribute("href", oConfig.getProperty("url"));=0A=
=0A=
            Dom.removeClass(aNodes, "disabled");=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configSelected=0A=
    * @description Event handler for when the "selected" configuration =
property =0A=
    * of the menu item changes. =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */    =0A=
    configSelected: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        if(!this.cfg.getProperty("disabled")) {=0A=
=0A=
            var bSelected =3D p_aArgs[0],=0A=
                oHelpText =3D this._oHelpTextEM,=0A=
                oSubmenuIndicator =3D this.submenuIndicator,=0A=
                oCheckedIndicator =3D this._oCheckedIndicator,=0A=
                aNodes =3D [this.element, this._oAnchor],=0A=
                i =3D 1;=0A=
=0A=
=0A=
            if(oHelpText) {=0A=
    =0A=
                i++;=0A=
                aNodes[i] =3D oHelpText;=0A=
    =0A=
            }=0A=
            =0A=
=0A=
            if(oSubmenuIndicator) {=0A=
=0A=
                i++;=0A=
                aNodes[i] =3D oSubmenuIndicator;=0A=
=0A=
            }=0A=
=0A=
=0A=
            if(oCheckedIndicator) {=0A=
=0A=
                i++;=0A=
                aNodes[i] =3D oCheckedIndicator;=0A=
            =0A=
            }=0A=
=0A=
=0A=
            if(bSelected) {=0A=
    =0A=
                Dom.addClass(aNodes, "selected");=0A=
    =0A=
            }=0A=
            else {=0A=
    =0A=
                Dom.removeClass(aNodes, "selected");=0A=
    =0A=
            }=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configSubmenu=0A=
    * @description Event handler for when the "submenu" configuration =
property =0A=
    * of the menu item changes. =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */=0A=
    configSubmenu: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var oEl =3D this.element,=0A=
            oSubmenu =3D p_aArgs[0],=0A=
            oSubmenuIndicator =3D this.submenuIndicator,=0A=
            oConfig =3D this.cfg,=0A=
            aNodes =3D [this.element, this._oAnchor],=0A=
            bLazyLoad =3D this.parent && this.parent.lazyLoad,=0A=
            oMenu;=0A=
=0A=
=0A=
        if(oSubmenu) {=0A=
=0A=
            if(oSubmenu instanceof Menu) {=0A=
=0A=
                oMenu =3D oSubmenu;=0A=
                oMenu.parent =3D this;=0A=
                oMenu.lazyLoad =3D bLazyLoad;=0A=
=0A=
            }=0A=
            else if(=0A=
                typeof oSubmenu =3D=3D "object" && =0A=
                oSubmenu.id && =0A=
                !oSubmenu.nodeType=0A=
            ) {=0A=
=0A=
                var sSubmenuId =3D oSubmenu.id,=0A=
                    oSubmenuConfig =3D oSubmenu;=0A=
=0A=
                oSubmenuConfig.lazyload =3D bLazyLoad;=0A=
                oSubmenuConfig.parent =3D this;=0A=
=0A=
                oMenu =3D new this.SUBMENU_TYPE(sSubmenuId, =
oSubmenuConfig);=0A=
=0A=
=0A=
                // Set the value of the property to the Menu instance=0A=
                =0A=
                this.cfg.setProperty("submenu", oMenu, true);=0A=
=0A=
            }=0A=
            else {=0A=
=0A=
                oMenu =3D new this.SUBMENU_TYPE(=0A=
                                oSubmenu,=0A=
                                { lazyload: bLazyLoad, parent: this }    =
            =0A=
                            );=0A=
=0A=
=0A=
                // Set the value of the property to the Menu instance=0A=
                =0A=
                this.cfg.setProperty("submenu", oMenu, true);=0A=
=0A=
            }=0A=
=0A=
=0A=
            if(oMenu) {=0A=
=0A=
                this._oSubmenu =3D oMenu;=0A=
=0A=
=0A=
                if(!oSubmenuIndicator) { =0A=
=0A=
                    var oTemplate =3D =0A=
                            =
YAHOO.widget.MenuItem._oSubmenuIndicatorTemplate;=0A=
=0A=
                    if(!oTemplate) {=0A=
                   =0A=
                        oTemplate =3D document.createElement("em");=0A=
                        oTemplate.innerHTML =3D  =0A=
                            this.COLLAPSED_SUBMENU_INDICATOR_TEXT;=0A=
                        oTemplate.className =3D "submenuindicator";=0A=
                        =0A=
                        YAHOO.widget.MenuItem._oSubmenuIndicatorTemplate =
=3D =0A=
                            oTemplate;=0A=
=0A=
                    }=0A=
=0A=
=0A=
                    oSubmenuIndicator =3D oTemplate.cloneNode(true);=0A=
=0A=
=0A=
                    if(oMenu.element.parentNode =3D=3D oEl) {=0A=
=0A=
                        if(this.browser =3D=3D "opera") {=0A=
=0A=
                            oEl.appendChild(oSubmenuIndicator);=0A=
                            =0A=
                            oMenu.renderEvent.subscribe(function() {=0A=
=0A=
                                =
oSubmenuIndicator.parentNode.insertBefore(=0A=
                                                            =
oSubmenuIndicator, =0A=
                                                            oMenu.element=0A=
                                                        );=0A=
                            =0A=
                            });=0A=
                =0A=
                        }=0A=
                        else {=0A=
=0A=
                            oEl.insertBefore(oSubmenuIndicator, =
oMenu.element);=0A=
                        =0A=
                        }=0A=
                =0A=
                    }=0A=
                    else {=0A=
=0A=
                        oEl.appendChild(oSubmenuIndicator);=0A=
                    =0A=
                    }=0A=
=0A=
                    this.submenuIndicator =3D oSubmenuIndicator;=0A=
=0A=
                }=0A=
=0A=
=0A=
                Dom.addClass(aNodes, "hassubmenu");=0A=
=0A=
=0A=
                if(oConfig.getProperty("disabled")) {=0A=
=0A=
                    oConfig.refireEvent("disabled");=0A=
=0A=
                }=0A=
=0A=
                if(oConfig.getProperty("selected")) {=0A=
=0A=
                    oConfig.refireEvent("selected");=0A=
=0A=
                }                =0A=
            =0A=
            }=0A=
=0A=
        }=0A=
        else {=0A=
=0A=
            Dom.removeClass(aNodes, "hassubmenu");=0A=
=0A=
            if(oSubmenuIndicator) {=0A=
=0A=
                oEl.removeChild(oSubmenuIndicator);=0A=
=0A=
            }=0A=
=0A=
            if(this._oSubmenu) {=0A=
=0A=
                this._oSubmenu.destroy();=0A=
=0A=
            }=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configOnClick=0A=
    * @description Event handler for when the "onclick" configuration =
property =0A=
    * of the menu item changes. =0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */=0A=
    configOnClick: function(p_sType, p_aArgs, p_oItem) {=0A=
=0A=
        var oObject =3D p_aArgs[0];=0A=
=0A=
        /*=0A=
            Remove any existing listeners if a "click" event handler has =0A=
            already been specified.=0A=
        */=0A=
=0A=
        if(=0A=
            this._oOnclickAttributeValue && =0A=
            (this._oOnclickAttributeValue !=3D oObject)=0A=
        ) {=0A=
=0A=
            this.clickEvent.unsubscribe(=0A=
                                this._oOnclickAttributeValue.fn, =0A=
                                this._oOnclickAttributeValue.obj=0A=
                            );=0A=
=0A=
            this._oOnclickAttributeValue =3D null;=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(=0A=
            !this._oOnclickAttributeValue && =0A=
            typeof oObject =3D=3D "object" && =0A=
            typeof oObject.fn =3D=3D "function"=0A=
        ) {=0A=
=0A=
            this.clickEvent.subscribe(=0A=
                    oObject.fn, =0A=
                    (oObject.obj || this), =0A=
                    oObject.scope=0A=
                );=0A=
=0A=
            this._oOnclickAttributeValue =3D oObject;=0A=
=0A=
        }=0A=
    =0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method configClassName=0A=
    * @description Event handler for when the "classname" configuration =0A=
    * property of a menu item changes.=0A=
    * @param {String} p_sType String representing the name of the event =
that =0A=
    * was fired.=0A=
    * @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
    * @param {YAHOO.widget.MenuItem} p_oItem Object representing the =
menu item=0A=
    * that fired the event.=0A=
    */=0A=
    configClassName: function(p_sType, p_aArgs, p_oItem) {=0A=
    =0A=
        var sClassName =3D p_aArgs[0];=0A=
    =0A=
        if(this._sClassName) {=0A=
    =0A=
            Dom.removeClass(this.element, this._sClassName);=0A=
    =0A=
        }=0A=
    =0A=
        Dom.addClass(this.element, sClassName);=0A=
        this._sClassName =3D sClassName;=0A=
    =0A=
    },=0A=
=0A=
=0A=
=0A=
    // Public methods=0A=
=0A=
=0A=
	/**=0A=
    * @method initDefaultConfig=0A=
	* @description Initializes an item's configurable properties.=0A=
	*/=0A=
	initDefaultConfig : function() {=0A=
=0A=
        var oConfig =3D this.cfg,=0A=
            DEFAULT_CONFIG =3D YAHOO.widget.MenuItem._DEFAULT_CONFIG;=0A=
=0A=
=0A=
        // Define the configuration attributes=0A=
=0A=
        /**=0A=
        * @config text=0A=
        * @description String specifying the text label for the menu =
item.  =0A=
        * When building a menu from existing HTML the value of this =
property=0A=
        * will be interpreted from the menu's markup.=0A=
        * @default ""=0A=
        * @type String=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.TEXT.key, =0A=
            { =0A=
                handler: this.configText, =0A=
                value: DEFAULT_CONFIG.TEXT.value, =0A=
                validator: DEFAULT_CONFIG.TEXT.validator, =0A=
                suppressEvent: DEFAULT_CONFIG.TEXT.suppressEvent =0A=
            }=0A=
        );=0A=
        =0A=
=0A=
        /**=0A=
        * @config helptext=0A=
        * @description String specifying additional instructional text =
to =0A=
        * accompany the text for the nenu item.=0A=
        * @default null=0A=
        * @type String|<a href=3D"http://www.w3.org/TR/=0A=
        * 2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-58190037">=0A=
        * HTMLElement</a>=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.HELP_TEXT.key,=0A=
            { handler: this.configHelpText }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config url=0A=
        * @description String specifying the URL for the menu item's =
anchor's =0A=
        * "href" attribute.  When building a menu from existing HTML the =
value =0A=
        * of this property will be interpreted from the menu's markup.=0A=
        * @default "#"=0A=
        * @type String=0A=
        */        =0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.URL.key, =0A=
            {=0A=
                handler: this.configURL, =0A=
                value: DEFAULT_CONFIG.URL.value, =0A=
                suppressEvent: DEFAULT_CONFIG.URL.suppressEvent=0A=
            }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config target=0A=
        * @description String specifying the value for the "target" =
attribute =0A=
        * of the menu item's anchor element. <strong>Specifying a target =
will =0A=
        * require the user to click directly on the menu item's anchor =
node in=0A=
        * order to cause the browser to navigate to the specified =
URL.</strong> =0A=
        * When building a menu from existing HTML the value of this =
property =0A=
        * will be interpreted from the menu's markup.=0A=
        * @default null=0A=
        * @type String=0A=
        */        =0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.TARGET.key, =0A=
            {=0A=
                handler: this.configTarget, =0A=
                suppressEvent: DEFAULT_CONFIG.TARGET.suppressEvent=0A=
            }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config emphasis=0A=
        * @description Boolean indicating if the text of the menu item =
will be =0A=
        * rendered with emphasis.  When building a menu from existing =
HTML the =0A=
        * value of this property will be interpreted from the menu's =
markup.=0A=
        * @default false=0A=
        * @type Boolean=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.EMPHASIS.key, =0A=
            { =0A=
                handler: this.configEmphasis, =0A=
                value: DEFAULT_CONFIG.EMPHASIS.value, =0A=
                validator: DEFAULT_CONFIG.EMPHASIS.validator, =0A=
                suppressEvent: DEFAULT_CONFIG.EMPHASIS.suppressEvent =0A=
            }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config strongemphasis=0A=
        * @description Boolean indicating if the text of the menu item =
will be =0A=
        * rendered with strong emphasis.  When building a menu from =
existing =0A=
        * HTML the value of this property will be interpreted from the=0A=
        * menu's markup.=0A=
        * @default false=0A=
        * @type Boolean=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.STRONG_EMPHASIS.key,=0A=
            {=0A=
                handler: this.configStrongEmphasis,=0A=
                value: DEFAULT_CONFIG.STRONG_EMPHASIS.value,=0A=
                validator: DEFAULT_CONFIG.STRONG_EMPHASIS.validator,=0A=
                suppressEvent: =
DEFAULT_CONFIG.STRONG_EMPHASIS.suppressEvent=0A=
            }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config checked=0A=
        * @description Boolean indicating if the menu item should be =
rendered =0A=
        * with a checkmark.=0A=
        * @default false=0A=
        * @type Boolean=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.CHECKED.key, =0A=
            {=0A=
                handler: this.configChecked, =0A=
                value: DEFAULT_CONFIG.CHECKED.value, =0A=
                validator: DEFAULT_CONFIG.CHECKED.validator, =0A=
                suppressEvent: DEFAULT_CONFIG.CHECKED.suppressEvent,=0A=
                supercedes: DEFAULT_CONFIG.CHECKED.supercedes=0A=
            } =0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config disabled=0A=
        * @description Boolean indicating if the menu item should be =
disabled.  =0A=
        * (Disabled menu items are  dimmed and will not respond to user =
input =0A=
        * or fire events.)=0A=
        * @default false=0A=
        * @type Boolean=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.DISABLED.key,=0A=
            {=0A=
                handler: this.configDisabled,=0A=
                value: DEFAULT_CONFIG.DISABLED.value,=0A=
                validator: DEFAULT_CONFIG.DISABLED.validator,=0A=
                suppressEvent: DEFAULT_CONFIG.DISABLED.suppressEvent=0A=
            }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config selected=0A=
        * @description Boolean indicating if the menu item should =0A=
        * be highlighted.=0A=
        * @default false=0A=
        * @type Boolean=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.SELECTED.key,=0A=
            {=0A=
                handler: this.configSelected,=0A=
                value: DEFAULT_CONFIG.SELECTED.value,=0A=
                validator: DEFAULT_CONFIG.SELECTED.validator,=0A=
                suppressEvent: DEFAULT_CONFIG.SELECTED.suppressEvent=0A=
            }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config submenu=0A=
        * @description Object specifying the submenu to be appended to =
the =0A=
        * menu item.  The value can be one of the following: =
<ul><li>Object =0A=
        * specifying a Menu instance.</li><li>Object literal specifying =
the=0A=
        * menu to be created.  Format: <code>{ id: [menu id], itemdata: =0A=
        * [<a href=3D"YAHOO.widget.Menu.html#itemData">array of values =
for =0A=
        * items</a>] }</code>.</li><li>String specifying the id =
attribute =0A=
        * of the <code>&#60;div&#62;</code> element of the menu.</li><li>=0A=
        * Object specifying the <code>&#60;div&#62;</code> element of =
the =0A=
        * menu.</li></ul>=0A=
        * @default null=0A=
        * @type Menu|String|Object|<a href=3D"http://www.w3.org/TR/2000/=0A=
        * WD-DOM-Level-1-20000929/level-one-html.html#ID-58190037">=0A=
        * HTMLElement</a>=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.SUBMENU.key, =0A=
            { handler: this.configSubmenu }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config onclick=0A=
        * @description Object literal representing the code to be =
executed when =0A=
        * the button is clicked.  Format:<br> <code> {<br> =0A=
        * <strong>fn:</strong> Function,   &#47;&#47; The handler to =
call when =0A=
        * the event fires.<br> <strong>obj:</strong> Object, &#47;&#47; =
An =0A=
        * object to  pass back to the handler.<br> =
<strong>scope:</strong> =0A=
        * Object &#47;&#47; The object to use for the scope of the =
handler.=0A=
        * <br> } </code>=0A=
        * @type Object=0A=
        * @default null=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.ONCLICK.key, =0A=
            { handler: this.configOnClick }=0A=
        );=0A=
=0A=
=0A=
        /**=0A=
        * @config classname=0A=
        * @description CSS class to be applied to the menu item's root =0A=
        * <code>&#60;li&#62;</code> element.  The specified class(es) =
are =0A=
        * appended in addition to the default class as specified by the =
menu =0A=
        * item's CSS_CLASS_NAME constant.=0A=
        * @default null=0A=
        * @type String=0A=
        */=0A=
        oConfig.addProperty(=0A=
            DEFAULT_CONFIG.CLASS_NAME.key, =0A=
            { =0A=
                handler: this.configClassName,=0A=
                value: DEFAULT_CONFIG.CLASS_NAME.value, =0A=
                validator: DEFAULT_CONFIG.CLASS_NAME.validator=0A=
            }=0A=
        );=0A=
=0A=
	},=0A=
=0A=
=0A=
    /**=0A=
    * @method getNextEnabledSibling=0A=
    * @description Finds the menu item's next enabled sibling.=0A=
    * @return YAHOO.widget.MenuItem=0A=
    */=0A=
    getNextEnabledSibling: function() {=0A=
=0A=
        if(this.parent instanceof Menu) {=0A=
=0A=
            var nGroupIndex =3D this.groupIndex;=0A=
=0A=
            function getNextArrayItem(p_aArray, p_nStartIndex) {=0A=
    =0A=
                return p_aArray[p_nStartIndex] || =0A=
                    getNextArrayItem(p_aArray, (p_nStartIndex+1));=0A=
    =0A=
            }=0A=
    =0A=
    =0A=
            var aItemGroups =3D this.parent.getItemGroups(),=0A=
                oNextItem;=0A=
    =0A=
    =0A=
            if(this.index < (aItemGroups[nGroupIndex].length - 1)) {=0A=
    =0A=
                oNextItem =3D getNextArrayItem(=0A=
                        aItemGroups[nGroupIndex], =0A=
                        (this.index+1)=0A=
                    );=0A=
    =0A=
            }=0A=
            else {=0A=
    =0A=
                var nNextGroupIndex;=0A=
    =0A=
                if(nGroupIndex < (aItemGroups.length - 1)) {=0A=
    =0A=
                    nNextGroupIndex =3D nGroupIndex + 1;=0A=
    =0A=
                }=0A=
                else {=0A=
    =0A=
                    nNextGroupIndex =3D 0;=0A=
    =0A=
                }=0A=
    =0A=
                var aNextGroup =3D getNextArrayItem(aItemGroups, =
nNextGroupIndex);=0A=
    =0A=
                // Retrieve the first menu item in the next group=0A=
    =0A=
                oNextItem =3D getNextArrayItem(aNextGroup, 0);=0A=
    =0A=
            }=0A=
    =0A=
            return (=0A=
                oNextItem.cfg.getProperty("disabled") || =0A=
                oNextItem.element.style.display =3D=3D "none"=0A=
            ) ? =0A=
            oNextItem.getNextEnabledSibling() : oNextItem;=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method getPreviousEnabledSibling=0A=
    * @description Finds the menu item's previous enabled sibling.=0A=
    * @return {YAHOO.widget.MenuItem}=0A=
    */=0A=
    getPreviousEnabledSibling: function() {=0A=
=0A=
       if(this.parent instanceof Menu) {=0A=
=0A=
            var nGroupIndex =3D this.groupIndex;=0A=
=0A=
            function getPreviousArrayItem(p_aArray, p_nStartIndex) {=0A=
    =0A=
                return p_aArray[p_nStartIndex] || =0A=
                    getPreviousArrayItem(p_aArray, (p_nStartIndex-1));=0A=
    =0A=
            }=0A=
=0A=
            function getFirstItemIndex(p_aArray, p_nStartIndex) {=0A=
    =0A=
                return p_aArray[p_nStartIndex] ? =0A=
                    p_nStartIndex : =0A=
                    getFirstItemIndex(p_aArray, (p_nStartIndex+1));=0A=
    =0A=
            }=0A=
    =0A=
            var aItemGroups =3D this.parent.getItemGroups(),=0A=
                oPreviousItem;=0A=
    =0A=
            if(=0A=
                this.index > getFirstItemIndex(aItemGroups[nGroupIndex], =
0)=0A=
            ) {=0A=
    =0A=
                oPreviousItem =3D =0A=
                    getPreviousArrayItem(=0A=
                        aItemGroups[nGroupIndex], =0A=
                        (this.index-1)=0A=
                    );=0A=
    =0A=
            }=0A=
            else {=0A=
    =0A=
                var nPreviousGroupIndex;=0A=
    =0A=
                if(nGroupIndex > getFirstItemIndex(aItemGroups, 0)) {=0A=
    =0A=
                    nPreviousGroupIndex =3D nGroupIndex - 1;=0A=
    =0A=
                }=0A=
                else {=0A=
    =0A=
                    nPreviousGroupIndex =3D aItemGroups.length - 1;=0A=
    =0A=
                }=0A=
    =0A=
                var aPreviousGroup =3D =0A=
                        getPreviousArrayItem(aItemGroups, =
nPreviousGroupIndex);=0A=
    =0A=
                oPreviousItem =3D =0A=
                    getPreviousArrayItem(=0A=
                        aPreviousGroup, =0A=
                        (aPreviousGroup.length - 1)=0A=
                    );=0A=
    =0A=
            }=0A=
=0A=
            return (=0A=
                oPreviousItem.cfg.getProperty("disabled") || =0A=
                oPreviousItem.element.style.display =3D=3D "none"=0A=
            ) ? =0A=
            oPreviousItem.getPreviousEnabledSibling() : oPreviousItem;=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method focus=0A=
    * @description Causes the menu item to receive the focus and fires =
the =0A=
    * focus event.=0A=
    */=0A=
    focus: function() {=0A=
=0A=
        var oParent =3D this.parent,=0A=
            oAnchor =3D this._oAnchor,=0A=
            oActiveItem =3D oParent.activeItem,=0A=
            me =3D this;=0A=
=0A=
=0A=
        function setFocus() {=0A=
=0A=
            try {=0A=
=0A=
                if (=0A=
                    (me.browser =3D=3D "ie" || me.browser =3D=3D "ie7") =
&& =0A=
                    !document.hasFocus()=0A=
                ) {=0A=
                =0A=
                    return;=0A=
                =0A=
                }=0A=
=0A=
                oAnchor.focus();=0A=
=0A=
            }=0A=
            catch(e) {=0A=
            =0A=
            }=0A=
=0A=
        }=0A=
=0A=
=0A=
        if(=0A=
            !this.cfg.getProperty("disabled") && =0A=
            oParent && =0A=
            oParent.cfg.getProperty("visible") && =0A=
            this.element.style.display !=3D "none"=0A=
        ) {=0A=
=0A=
            if(oActiveItem) {=0A=
=0A=
                oActiveItem.blur();=0A=
=0A=
            }=0A=
=0A=
=0A=
            /*=0A=
                Setting focus via a timer fixes a race condition in =
Firefox, IE =0A=
                and Opera where the browser viewport jumps as it trys to =0A=
                position and focus the menu.=0A=
            */=0A=
=0A=
            window.setTimeout(setFocus, 0);=0A=
            =0A=
            this.focusEvent.fire();=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method blur=0A=
    * @description Causes the menu item to lose focus and fires the =0A=
    * blur event.=0A=
    */    =0A=
    blur: function() {=0A=
=0A=
        var oParent =3D this.parent;=0A=
=0A=
        if(=0A=
            !this.cfg.getProperty("disabled") && =0A=
            oParent && =0A=
            Dom.getStyle(oParent.element, "visibility") =3D=3D "visible"=0A=
        ) {=0A=
=0A=
            this._oAnchor.blur();=0A=
=0A=
            this.blurEvent.fire();=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method hasFocus=0A=
    * @description Returns a boolean indicating whether or not the menu =
item=0A=
    * has focus.=0A=
    * @return {Boolean}=0A=
    */=0A=
    hasFocus: function() {=0A=
    =0A=
        return (YAHOO.widget.MenuManager.getFocusedMenuItem() =3D=3D =
this);=0A=
    =0A=
    },=0A=
=0A=
=0A=
	/**=0A=
    * @method destroy=0A=
	* @description Removes the menu item's <code>&#60;li&#62;</code> =
element =0A=
	* from its parent <code>&#60;ul&#62;</code> element.=0A=
	*/=0A=
    destroy: function() {=0A=
=0A=
        var oEl =3D this.element;=0A=
=0A=
        if(oEl) {=0A=
=0A=
=0A=
            // If the item has a submenu, destroy it first=0A=
=0A=
            var oSubmenu =3D this.cfg.getProperty("submenu");=0A=
=0A=
            if(oSubmenu) {=0A=
            =0A=
                oSubmenu.destroy();=0A=
            =0A=
            }=0A=
=0A=
=0A=
            // Remove CustomEvent listeners=0A=
    =0A=
            this.mouseOverEvent.unsubscribeAll();=0A=
            this.mouseOutEvent.unsubscribeAll();=0A=
            this.mouseDownEvent.unsubscribeAll();=0A=
            this.mouseUpEvent.unsubscribeAll();=0A=
            this.clickEvent.unsubscribeAll();=0A=
            this.keyPressEvent.unsubscribeAll();=0A=
            this.keyDownEvent.unsubscribeAll();=0A=
            this.keyUpEvent.unsubscribeAll();=0A=
            this.focusEvent.unsubscribeAll();=0A=
            this.blurEvent.unsubscribeAll();=0A=
            this.cfg.configChangedEvent.unsubscribeAll();=0A=
=0A=
=0A=
            // Remove the element from the parent node=0A=
=0A=
            var oParentNode =3D oEl.parentNode;=0A=
=0A=
            if(oParentNode) {=0A=
=0A=
                oParentNode.removeChild(oEl);=0A=
=0A=
                this.destroyEvent.fire();=0A=
=0A=
            }=0A=
=0A=
            this.destroyEvent.unsubscribeAll();=0A=
=0A=
        }=0A=
=0A=
    },=0A=
=0A=
=0A=
    /**=0A=
    * @method toString=0A=
    * @description Returns a string representing the menu item.=0A=
    * @return {String}=0A=
    */=0A=
    toString: function() {=0A=
=0A=
        var sReturnVal =3D "MenuItem";=0A=
=0A=
        if(this.cfg && this.cfg.getProperty("text")) {=0A=
    =0A=
            sReturnVal +=3D (": " + this.cfg.getProperty("text"));=0A=
    =0A=
        }=0A=
=0A=
        return sReturnVal;=0A=
    =0A=
    }=0A=
=0A=
};=0A=
=0A=
})();=0A=
=0A=
=0A=
=0A=
/**=0A=
* Creates a list of options or commands which are made visible in =
response to =0A=
* an HTML element's "contextmenu" event ("mousedown" for Opera).=0A=
*=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;div&#62;</code> element of the context menu.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;select&#62;</code> element to be used as the data source =
for the =0A=
* context menu.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-=0A=
* html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object =
specifying the =0A=
* <code>&#60;div&#62;</code> element of the context menu.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-=0A=
* html.html#ID-94282980">HTMLSelectElement</a>} p_oElement Object =
specifying =0A=
* the <code>&#60;select&#62;</code> element to be used as the data =
source for =0A=
* the context menu.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the context menu. See configuration class =
documentation =0A=
* for more details.=0A=
* @class ContextMenu=0A=
* @constructor=0A=
* @extends YAHOO.widget.Menu=0A=
* @namespace YAHOO.widget=0A=
*/=0A=
YAHOO.widget.ContextMenu =3D function(p_oElement, p_oConfig) {=0A=
=0A=
    YAHOO.widget.ContextMenu.superclass.constructor.call(=0A=
            this, =0A=
            p_oElement,=0A=
            p_oConfig=0A=
        );=0A=
=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Constant representing the name of the ContextMenu's events=0A=
* @property YAHOO.widget.ContextMenu._EVENT_TYPES=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.ContextMenu._EVENT_TYPES =3D {=0A=
=0A=
    "TRIGGER_CONTEXT_MENU": "triggerContextMenu",=0A=
=0A=
    "CONTEXT_MENU": (=0A=
                        (YAHOO.widget.Module.prototype.browser =3D=3D =
"opera" ? =0A=
                            "mousedown" : "contextmenu")=0A=
                    ),=0A=
    "CLICK": "click"=0A=
=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Constant representing the ContextMenu's configuration properties=0A=
* @property YAHOO.widget.ContextMenu._DEFAULT_CONFIG=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.ContextMenu._DEFAULT_CONFIG =3D {=0A=
=0A=
    "TRIGGER": { =0A=
        key: "trigger" =0A=
    }=0A=
=0A=
};=0A=
=0A=
=0A=
YAHOO.lang.extend(YAHOO.widget.ContextMenu, YAHOO.widget.Menu, {=0A=
=0A=
=0A=
=0A=
// Private properties=0A=
=0A=
=0A=
/**=0A=
* @property _oTrigger=0A=
* @description Object reference to the current value of the "trigger" =0A=
* configuration property.=0A=
* @default null=0A=
* @private=0A=
* @type String|<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/leve=0A=
* l-one-html.html#ID-58190037">HTMLElement</a>|Array=0A=
*/=0A=
_oTrigger: null,=0A=
=0A=
=0A=
/**=0A=
* @property _bCancelled=0A=
* @description Boolean indicating if the display of the context menu =
should =0A=
* be cancelled.=0A=
* @default false=0A=
* @private=0A=
* @type Boolean=0A=
*/=0A=
_bCancelled: false,=0A=
=0A=
=0A=
=0A=
// Public properties=0A=
=0A=
=0A=
/**=0A=
* @property contextEventTarget=0A=
* @description Object reference for the HTML element that was the target =
of the=0A=
* "contextmenu" DOM event ("mousedown" for Opera) that triggered the =
display of =0A=
* the context menu.=0A=
* @default null=0A=
* @type <a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-=0A=
* html.html#ID-58190037">HTMLElement</a>=0A=
*/=0A=
contextEventTarget: null,=0A=
=0A=
=0A=
=0A=
// Events=0A=
=0A=
=0A=
/**=0A=
* @event triggerContextMenuEvent=0A=
* @description Custom Event wrapper for the "contextmenu" DOM event =0A=
* ("mousedown" for Opera) fired by the element(s) that trigger the =
display of =0A=
* the context menu.=0A=
*/=0A=
triggerContextMenuEvent: null,=0A=
=0A=
=0A=
=0A=
/**=0A=
* @method init=0A=
* @description The ContextMenu class's initialization method. This =
method is =0A=
* automatically called by the constructor, and sets up all DOM =
references for =0A=
* pre-existing markup, and creates required markup if it is not already =
present.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;div&#62;</code> element of the context menu.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;select&#62;</code> element to be used as the data source =
for =0A=
* the context menu.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-=0A=
* html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object =
specifying the =0A=
* <code>&#60;div&#62;</code> element of the context menu.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-=0A=
* html.html#ID-94282980">HTMLSelectElement</a>} p_oElement Object =
specifying =0A=
* the <code>&#60;select&#62;</code> element to be used as the data =
source for =0A=
* the context menu.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the context menu. See configuration class =
documentation =0A=
* for more details.=0A=
*/=0A=
init: function(p_oElement, p_oConfig) {=0A=
=0A=
    if(!this.ITEM_TYPE) {=0A=
=0A=
        this.ITEM_TYPE =3D YAHOO.widget.ContextMenuItem;=0A=
=0A=
    }=0A=
=0A=
=0A=
    // Call the init of the superclass (YAHOO.widget.Menu)=0A=
=0A=
    YAHOO.widget.ContextMenu.superclass.init.call(this, p_oElement);=0A=
=0A=
=0A=
    this.beforeInitEvent.fire(YAHOO.widget.ContextMenu);=0A=
=0A=
=0A=
    if(p_oConfig) {=0A=
=0A=
        this.cfg.applyConfig(p_oConfig, true);=0A=
=0A=
    }=0A=
    =0A=
    =0A=
    this.initEvent.fire(YAHOO.widget.ContextMenu);=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method initEvents=0A=
* @description Initializes the custom events for the context menu.=0A=
*/=0A=
initEvents: function() {=0A=
=0A=
	YAHOO.widget.ContextMenu.superclass.initEvents.call(this);=0A=
=0A=
    // Create custom events=0A=
=0A=
    this.triggerContextMenuEvent =3D =0A=
=0A=
            new YAHOO.util.CustomEvent(=0A=
                    =
YAHOO.widget.ContextMenu._EVENT_TYPES.TRIGGER_CONTEXT_MENU, =0A=
                    this=0A=
                );=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method cancel=0A=
* @description Cancels the display of the context menu.=0A=
*/=0A=
cancel: function() {=0A=
=0A=
    this._bCancelled =3D true;=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Private methods=0A=
=0A=
=0A=
/**=0A=
* @method _removeEventHandlers=0A=
* @description Removes all of the DOM event handlers from the HTML =
element(s) =0A=
* whose "context menu" event ("click" for Opera) trigger the display of =0A=
* the context menu.=0A=
* @private=0A=
*/=0A=
_removeEventHandlers: function() {=0A=
=0A=
    var Event =3D YAHOO.util.Event,=0A=
        oTrigger =3D this._oTrigger;=0A=
=0A=
=0A=
    // Remove the event handlers from the trigger(s)=0A=
=0A=
    if (oTrigger) {=0A=
=0A=
        Event.removeListener(=0A=
            oTrigger, =0A=
            YAHOO.widget.ContextMenu._EVENT_TYPES.CONTEXT_MENU, =0A=
            this._onTriggerContextMenu=0A=
        );    =0A=
        =0A=
        if(this.browser =3D=3D "opera") {=0A=
        =0A=
            Event.removeListener(=0A=
                oTrigger, =0A=
                YAHOO.widget.ContextMenu._EVENT_TYPES.CLICK, =0A=
                this._onTriggerClick=0A=
            );=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Private event handlers=0A=
=0A=
=0A=
/**=0A=
* @method _onTriggerClick=0A=
* @description "click" event handler for the HTML element(s) identified =
as the =0A=
* "trigger" for the context menu.  Used to cancel default behaviors in =
Opera.=0A=
* @private=0A=
* @param {Event} p_oEvent Object representing the DOM event object =
passed back =0A=
* by the event utility (YAHOO.util.Event).=0A=
* @param {YAHOO.widget.ContextMenu} p_oMenu Object representing the =
context =0A=
* menu that is handling the event.=0A=
*/=0A=
_onTriggerClick: function(p_oEvent, p_oMenu) {=0A=
=0A=
    if(p_oEvent.ctrlKey) {=0A=
    =0A=
        YAHOO.util.Event.stopEvent(p_oEvent);=0A=
=0A=
    }=0A=
    =0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onTriggerContextMenu=0A=
* @description "contextmenu" event handler ("mousedown" for Opera) for =
the HTML =0A=
* element(s) that trigger the display of the context menu.=0A=
* @private=0A=
* @param {Event} p_oEvent Object representing the DOM event object =
passed back =0A=
* by the event utility (YAHOO.util.Event).=0A=
* @param {YAHOO.widget.ContextMenu} p_oMenu Object representing the =
context =0A=
* menu that is handling the event.=0A=
*/=0A=
_onTriggerContextMenu: function(p_oEvent, p_oMenu) {=0A=
=0A=
    var Event =3D YAHOO.util.Event;=0A=
=0A=
    if(p_oEvent.type =3D=3D "mousedown" && !p_oEvent.ctrlKey) {=0A=
=0A=
        return;=0A=
=0A=
    }=0A=
=0A=
=0A=
    /*=0A=
        Prevent the browser's default context menu from appearing and =0A=
        stop the propagation of the "contextmenu" event so that =0A=
        other ContextMenu instances are not displayed.=0A=
    */=0A=
=0A=
    Event.stopEvent(p_oEvent);=0A=
=0A=
=0A=
    // Hide any other ContextMenu instances that might be visible=0A=
=0A=
    YAHOO.widget.MenuManager.hideVisible();=0A=
=0A=
=0A=
    this.contextEventTarget =3D Event.getTarget(p_oEvent);=0A=
=0A=
    this.triggerContextMenuEvent.fire(p_oEvent);=0A=
=0A=
=0A=
    if(!this._bCancelled) {=0A=
=0A=
        // Position and display the context menu=0A=
    =0A=
        this.cfg.setProperty("xy", Event.getXY(p_oEvent));=0A=
=0A=
        this.show();=0A=
=0A=
    }=0A=
=0A=
    this._bCancelled =3D false;=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Public methods=0A=
=0A=
=0A=
/**=0A=
* @method toString=0A=
* @description Returns a string representing the context menu.=0A=
* @return {String}=0A=
*/=0A=
toString: function() {=0A=
=0A=
    var sReturnVal =3D "ContextMenu",=0A=
        sId =3D this.id;=0A=
=0A=
    if(sId) {=0A=
=0A=
        sReturnVal +=3D (" " + sId);=0A=
    =0A=
    }=0A=
=0A=
    return sReturnVal;=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method initDefaultConfig=0A=
* @description Initializes the class's configurable properties which can =
be =0A=
* changed using the context menu's Config object ("cfg").=0A=
*/=0A=
initDefaultConfig: function() {=0A=
=0A=
    YAHOO.widget.ContextMenu.superclass.initDefaultConfig.call(this);=0A=
=0A=
    /**=0A=
    * @config trigger=0A=
    * @description The HTML element(s) whose "contextmenu" event =
("mousedown" =0A=
    * for Opera) trigger the display of the context menu.  Can be a =
string =0A=
    * representing the id attribute of the HTML element, an object =
reference =0A=
    * for the HTML element, or an array of strings or HTML element =
references.=0A=
    * @default null=0A=
    * @type String|<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/=0A=
    * level-one-html.html#ID-58190037">HTMLElement</a>|Array=0A=
    */=0A=
    this.cfg.addProperty(=0A=
        YAHOO.widget.ContextMenu._DEFAULT_CONFIG.TRIGGER.key, =0A=
        { handler: this.configTrigger }=0A=
    );=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method destroy=0A=
* @description Removes the context menu's <code>&#60;div&#62;</code> =
element =0A=
* (and accompanying child nodes) from the document.=0A=
*/=0A=
destroy: function() {=0A=
=0A=
    // Remove the DOM event handlers from the current trigger(s)=0A=
=0A=
    this._removeEventHandlers();=0A=
    =0A=
=0A=
    // Continue with the superclass implementation of this method=0A=
=0A=
    YAHOO.widget.ContextMenu.superclass.destroy.call(this);=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Public event handlers for configuration properties=0A=
=0A=
=0A=
/**=0A=
* @method configTrigger=0A=
* @description Event handler for when the value of the "trigger" =
configuration =0A=
* property changes. =0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.ContextMenu} p_oMenu Object representing the =
context =0A=
* menu that fired the event.=0A=
*/=0A=
configTrigger: function(p_sType, p_aArgs, p_oMenu) {=0A=
    =0A=
    var Event =3D YAHOO.util.Event,=0A=
        oTrigger =3D p_aArgs[0];=0A=
=0A=
    if(oTrigger) {=0A=
=0A=
        /*=0A=
            If there is a current "trigger" - remove the event handlers =0A=
            from that element(s) before assigning new ones=0A=
        */=0A=
=0A=
        if(this._oTrigger) {=0A=
        =0A=
            this._removeEventHandlers();=0A=
=0A=
        }=0A=
=0A=
        this._oTrigger =3D oTrigger;=0A=
=0A=
=0A=
        /*=0A=
            Listen for the "mousedown" event in Opera b/c it does not =0A=
            support the "contextmenu" event=0A=
        */ =0A=
  =0A=
        Event.on(=0A=
            oTrigger, =0A=
            YAHOO.widget.ContextMenu._EVENT_TYPES.CONTEXT_MENU, =0A=
            this._onTriggerContextMenu,=0A=
            this,=0A=
            true=0A=
        );=0A=
=0A=
=0A=
        /*=0A=
            Assign a "click" event handler to the trigger element(s) for=0A=
            Opera to prevent default browser behaviors.=0A=
        */=0A=
=0A=
        if(this.browser =3D=3D "opera") {=0A=
        =0A=
            Event.on(=0A=
                oTrigger, =0A=
                YAHOO.widget.ContextMenu._EVENT_TYPES.CLICK, =0A=
                this._onTriggerClick,=0A=
                this,=0A=
                true=0A=
            );=0A=
=0A=
        }=0A=
=0A=
    }=0A=
    else {=0A=
   =0A=
        this._removeEventHandlers();=0A=
    =0A=
    }=0A=
    =0A=
}=0A=
=0A=
}); // END YAHOO.lang.extend=0A=
=0A=
=0A=
=0A=
/**=0A=
* Creates an item for a context menu.=0A=
* =0A=
* @param {String} p_oObject String specifying the text of the context =
menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object =
specifying the =0A=
* <code>&#60;li&#62;</code> element of the context menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject Object =0A=
* specifying the <code>&#60;optgroup&#62;</code> element of the context =0A=
* menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object =
specifying =0A=
* the <code>&#60;option&#62;</code> element of the context menu item.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the context menu item. See configuration class =0A=
* documentation for more details.=0A=
* @class ContextMenuItem=0A=
* @constructor=0A=
* @extends YAHOO.widget.MenuItem=0A=
*/=0A=
YAHOO.widget.ContextMenuItem =3D function(p_oObject, p_oConfig) {=0A=
=0A=
    YAHOO.widget.ContextMenuItem.superclass.constructor.call(=0A=
        this, =0A=
        p_oObject, =0A=
        p_oConfig=0A=
    );=0A=
=0A=
};=0A=
=0A=
YAHOO.lang.extend(YAHOO.widget.ContextMenuItem, YAHOO.widget.MenuItem, {=0A=
=0A=
=0A=
/**=0A=
* @method init=0A=
* @description The ContextMenuItem class's initialization method. This =
method =0A=
* is automatically called by the constructor, and sets up all DOM =
references =0A=
* for pre-existing markup, and creates required markup if it is not =0A=
* already present.=0A=
* @param {String} p_oObject String specifying the text of the context =
menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object =
specifying the =0A=
* <code>&#60;li&#62;</code> element of the context menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject Object =0A=
* specifying the <code>&#60;optgroup&#62;</code> element of the context =0A=
* menu item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object =
specifying =0A=
* the <code>&#60;option&#62;</code> element of the context menu item.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the context menu item. See configuration class =0A=
* documentation for more details.=0A=
*/=0A=
init: function(p_oObject, p_oConfig) {=0A=
    =0A=
    if(!this.SUBMENU_TYPE) {=0A=
=0A=
        this.SUBMENU_TYPE =3D YAHOO.widget.ContextMenu;=0A=
=0A=
    }=0A=
=0A=
=0A=
    /* =0A=
        Call the init of the superclass (YAHOO.widget.MenuItem)=0A=
        Note: We don't pass the user config in here yet =0A=
        because we only want it executed once, at the lowest =0A=
        subclass level.=0A=
    */ =0A=
=0A=
    YAHOO.widget.ContextMenuItem.superclass.init.call(this, p_oObject);=0A=
=0A=
    var oConfig =3D this.cfg;=0A=
=0A=
    if(p_oConfig) {=0A=
=0A=
        oConfig.applyConfig(p_oConfig, true);=0A=
=0A=
    }=0A=
=0A=
    oConfig.fireQueue();=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Public methods=0A=
=0A=
=0A=
/**=0A=
* @method toString=0A=
* @description Returns a string representing the context menu item.=0A=
* @return {String}=0A=
*/=0A=
toString: function() {=0A=
=0A=
    var sReturnVal =3D "ContextMenuItem";=0A=
=0A=
    if(this.cfg && this.cfg.getProperty("text")) {=0A=
=0A=
        sReturnVal +=3D (": " + this.cfg.getProperty("text"));=0A=
=0A=
    }=0A=
=0A=
    return sReturnVal;=0A=
=0A=
}=0A=
    =0A=
}); // END YAHOO.lang.extend=0A=
=0A=
=0A=
=0A=
/**=0A=
* Horizontal collection of items, each of which can contain a submenu.=0A=
* =0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;div&#62;</code> element of the menu bar.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;select&#62;</code> element to be used as the data source =
for the =0A=
* menu bar.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object =
specifying =0A=
* the <code>&#60;div&#62;</code> element of the menu bar.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-94282980">HTMLSelectElement</a>} p_oElement Object =0A=
* specifying the <code>&#60;select&#62;</code> element to be used as the =
data =0A=
* source for the menu bar.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the menu bar. See configuration class documentation =
for=0A=
* more details.=0A=
* @class Menubar=0A=
* @constructor=0A=
* @extends YAHOO.widget.Menu=0A=
* @namespace YAHOO.widget=0A=
*/=0A=
YAHOO.widget.MenuBar =3D function(p_oElement, p_oConfig) {=0A=
=0A=
    YAHOO.widget.MenuBar.superclass.constructor.call(=0A=
            this, =0A=
            p_oElement,=0A=
            p_oConfig=0A=
        );=0A=
=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Constant representing the MenuBar's configuration properties=0A=
* @property YAHOO.widget.MenuBar._DEFAULT_CONFIG=0A=
* @private=0A=
* @final=0A=
* @type Object=0A=
*/=0A=
YAHOO.widget.MenuBar._DEFAULT_CONFIG =3D {=0A=
=0A=
    "POSITION": { =0A=
        key: "position", =0A=
        value: "static", =0A=
        validator: YAHOO.widget.Menu._checkPosition, =0A=
        supercedes: ["visible"] =0A=
    }, =0A=
=0A=
    "SUBMENU_ALIGNMENT": { =0A=
        key: "submenualignment", =0A=
        value: ["tl","bl"] =0A=
    },=0A=
=0A=
    "AUTO_SUBMENU_DISPLAY": { =0A=
        key: "autosubmenudisplay", =0A=
        value: false, =0A=
        validator: YAHOO.lang.isBoolean =0A=
    }=0A=
=0A=
};=0A=
=0A=
=0A=
=0A=
YAHOO.lang.extend(YAHOO.widget.MenuBar, YAHOO.widget.Menu, {=0A=
=0A=
/**=0A=
* @method init=0A=
* @description The MenuBar class's initialization method. This method is =0A=
* automatically called by the constructor, and sets up all DOM =
references for =0A=
* pre-existing markup, and creates required markup if it is not already =
present.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;div&#62;</code> element of the menu bar.=0A=
* @param {String} p_oElement String specifying the id attribute of the =0A=
* <code>&#60;select&#62;</code> element to be used as the data source =
for the =0A=
* menu bar.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object =
specifying =0A=
* the <code>&#60;div&#62;</code> element of the menu bar.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-94282980">HTMLSelectElement</a>} p_oElement Object =0A=
* specifying the <code>&#60;select&#62;</code> element to be used as the =
data =0A=
* source for the menu bar.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the menu bar. See configuration class documentation =
for=0A=
* more details.=0A=
*/=0A=
init: function(p_oElement, p_oConfig) {=0A=
=0A=
    if(!this.ITEM_TYPE) {=0A=
=0A=
        this.ITEM_TYPE =3D YAHOO.widget.MenuBarItem;=0A=
=0A=
    }=0A=
=0A=
=0A=
    // Call the init of the superclass (YAHOO.widget.Menu)=0A=
=0A=
    YAHOO.widget.MenuBar.superclass.init.call(this, p_oElement);=0A=
=0A=
=0A=
    this.beforeInitEvent.fire(YAHOO.widget.MenuBar);=0A=
=0A=
=0A=
    if(p_oConfig) {=0A=
=0A=
        this.cfg.applyConfig(p_oConfig, true);=0A=
=0A=
    }=0A=
=0A=
    this.initEvent.fire(YAHOO.widget.MenuBar);=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Constants=0A=
=0A=
=0A=
/**=0A=
* @property CSS_CLASS_NAME=0A=
* @description String representing the CSS class(es) to be applied to =
the menu =0A=
* bar's <code>&#60;div&#62;</code> element.=0A=
* @default "yuimenubar"=0A=
* @final=0A=
* @type String=0A=
*/=0A=
CSS_CLASS_NAME: "yuimenubar",=0A=
=0A=
=0A=
=0A=
// Protected event handlers=0A=
=0A=
=0A=
/**=0A=
* @method _onKeyDown=0A=
* @description "keydown" Custom Event handler for the menu bar.=0A=
* @private=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.MenuBar} p_oMenuBar Object representing the menu =
bar =0A=
* that fired the event.=0A=
*/=0A=
_onKeyDown: function(p_sType, p_aArgs, p_oMenuBar) {=0A=
=0A=
    var Event =3D YAHOO.util.Event,=0A=
        oEvent =3D p_aArgs[0],=0A=
        oItem =3D p_aArgs[1],=0A=
        oSubmenu;=0A=
=0A=
=0A=
    if(oItem && !oItem.cfg.getProperty("disabled")) {=0A=
=0A=
        var oItemCfg =3D oItem.cfg;=0A=
=0A=
        switch(oEvent.keyCode) {=0A=
    =0A=
            case 37:    // Left arrow=0A=
            case 39:    // Right arrow=0A=
    =0A=
                if(=0A=
                    oItem =3D=3D this.activeItem && =0A=
                    !oItemCfg.getProperty("selected")=0A=
                ) {=0A=
    =0A=
                    oItemCfg.setProperty("selected", true);=0A=
    =0A=
                }=0A=
                else {=0A=
    =0A=
                    var oNextItem =3D (oEvent.keyCode =3D=3D 37) ? =0A=
                            oItem.getPreviousEnabledSibling() : =0A=
                            oItem.getNextEnabledSibling();=0A=
            =0A=
                    if(oNextItem) {=0A=
    =0A=
                        this.clearActiveItem();=0A=
    =0A=
                        oNextItem.cfg.setProperty("selected", true);=0A=
    =0A=
    =0A=
                        if(this.cfg.getProperty("autosubmenudisplay")) {=0A=
                        =0A=
                            oSubmenu =3D =
oNextItem.cfg.getProperty("submenu");=0A=
                            =0A=
                            if(oSubmenu) {=0A=
                        =0A=
                                oSubmenu.show();=0A=
                            =0A=
                            }=0A=
                =0A=
                        }           =0A=
    =0A=
                        oNextItem.focus();=0A=
    =0A=
                    }=0A=
    =0A=
                }=0A=
    =0A=
                Event.preventDefault(oEvent);=0A=
    =0A=
            break;=0A=
    =0A=
            case 40:    // Down arrow=0A=
    =0A=
                if(this.activeItem !=3D oItem) {=0A=
    =0A=
                    this.clearActiveItem();=0A=
    =0A=
                    oItemCfg.setProperty("selected", true);=0A=
                    oItem.focus();=0A=
                =0A=
                }=0A=
    =0A=
                oSubmenu =3D oItemCfg.getProperty("submenu");=0A=
    =0A=
                if(oSubmenu) {=0A=
    =0A=
                    if(oSubmenu.cfg.getProperty("visible")) {=0A=
    =0A=
                        oSubmenu.setInitialSelection();=0A=
                        oSubmenu.setInitialFocus();=0A=
                    =0A=
                    }=0A=
                    else {=0A=
    =0A=
                        oSubmenu.show();=0A=
                    =0A=
                    }=0A=
    =0A=
                }=0A=
    =0A=
                Event.preventDefault(oEvent);=0A=
    =0A=
            break;=0A=
    =0A=
        }=0A=
=0A=
    }=0A=
=0A=
=0A=
    if(oEvent.keyCode =3D=3D 27 && this.activeItem) { // Esc key=0A=
=0A=
        oSubmenu =3D this.activeItem.cfg.getProperty("submenu");=0A=
=0A=
        if(oSubmenu && oSubmenu.cfg.getProperty("visible")) {=0A=
        =0A=
            oSubmenu.hide();=0A=
            this.activeItem.focus();=0A=
        =0A=
        }=0A=
        else {=0A=
=0A=
            this.activeItem.cfg.setProperty("selected", false);=0A=
            this.activeItem.blur();=0A=
    =0A=
        }=0A=
=0A=
        Event.preventDefault(oEvent);=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @method _onClick=0A=
* @description "click" event handler for the menu bar.=0A=
* @protected=0A=
* @param {String} p_sType String representing the name of the event that =0A=
* was fired.=0A=
* @param {Array} p_aArgs Array of arguments sent when the event was =
fired.=0A=
* @param {YAHOO.widget.MenuBar} p_oMenuBar Object representing the menu =
bar =0A=
* that fired the event.=0A=
*/=0A=
_onClick: function(p_sType, p_aArgs, p_oMenuBar) {=0A=
=0A=
    YAHOO.widget.MenuBar.superclass._onClick.call(=0A=
        this, =0A=
        p_sType, =0A=
        p_aArgs, =0A=
        p_oMenuBar=0A=
    );=0A=
=0A=
=0A=
    var oItem =3D p_aArgs[1];=0A=
    =0A=
    if(oItem && !oItem.cfg.getProperty("disabled")) {=0A=
=0A=
         var Event =3D YAHOO.util.Event,=0A=
             Dom =3D YAHOO.util.Dom,=0A=
    =0A=
             oEvent =3D p_aArgs[0],=0A=
             oTarget =3D Event.getTarget(oEvent),=0A=
    =0A=
             oActiveItem =3D this.activeItem,=0A=
             oConfig =3D this.cfg;=0A=
=0A=
=0A=
        // Hide any other submenus that might be visible=0A=
    =0A=
        if(oActiveItem && oActiveItem !=3D oItem) {=0A=
    =0A=
            this.clearActiveItem();=0A=
    =0A=
        }=0A=
=0A=
    =0A=
        oItem.cfg.setProperty("selected", true);=0A=
    =0A=
=0A=
        // Show the submenu for the item=0A=
    =0A=
        var oSubmenu =3D oItem.cfg.getProperty("submenu");=0A=
=0A=
=0A=
        if(oSubmenu && oTarget !=3D oItem.submenuIndicator) {=0A=
        =0A=
            if(oSubmenu.cfg.getProperty("visible")) {=0A=
            =0A=
                oSubmenu.hide();=0A=
            =0A=
            }=0A=
            else {=0A=
            =0A=
                oSubmenu.show();                    =0A=
            =0A=
            }=0A=
        =0A=
        }=0A=
    =0A=
    }=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Public methods=0A=
=0A=
=0A=
/**=0A=
* @method toString=0A=
* @description Returns a string representing the menu bar.=0A=
* @return {String}=0A=
*/=0A=
toString: function() {=0A=
=0A=
    var sReturnVal =3D "MenuBar",=0A=
        sId =3D this.id;=0A=
=0A=
    if(sId) {=0A=
=0A=
        sReturnVal +=3D (" " + sId);=0A=
    =0A=
    }=0A=
=0A=
    return sReturnVal;=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* @description Initializes the class's configurable properties which can =
be=0A=
* changed using the menu bar's Config object ("cfg").=0A=
* @method initDefaultConfig=0A=
*/=0A=
initDefaultConfig: function() {=0A=
=0A=
    YAHOO.widget.MenuBar.superclass.initDefaultConfig.call(this);=0A=
=0A=
    var oConfig =3D this.cfg,=0A=
        DEFAULT_CONFIG =3D YAHOO.widget.MenuBar._DEFAULT_CONFIG;=0A=
=0A=
	// Add configuration properties=0A=
=0A=
=0A=
    /*=0A=
        Set the default value for the "position" configuration property=0A=
        to "static" by re-adding the property.=0A=
    */=0A=
=0A=
=0A=
    /**=0A=
    * @config position=0A=
    * @description String indicating how a menu bar should be positioned =
on the =0A=
    * screen.  Possible values are "static" and "dynamic."  Static menu =
bars =0A=
    * are visible by default and reside in the normal flow of the =
document =0A=
    * (CSS position: static).  Dynamic menu bars are hidden by default, =
reside=0A=
    * out of the normal flow of the document (CSS position: absolute), =
and can =0A=
    * overlay other elements on the screen.=0A=
    * @default static=0A=
    * @type String=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.POSITION.key, =0A=
        {=0A=
            handler: this.configPosition, =0A=
            value: DEFAULT_CONFIG.POSITION.value, =0A=
            validator: DEFAULT_CONFIG.POSITION.validator,=0A=
            supercedes: DEFAULT_CONFIG.POSITION.supercedes=0A=
        }=0A=
    );=0A=
=0A=
=0A=
    /*=0A=
        Set the default value for the "submenualignment" configuration =
property=0A=
        to ["tl","bl"] by re-adding the property.=0A=
    */=0A=
=0A=
    /**=0A=
    * @config submenualignment=0A=
    * @description Array defining how submenus should be aligned to =
their =0A=
    * parent menu bar item. The format is: [itemCorner, submenuCorner].=0A=
    * @default ["tl","bl"]=0A=
    * @type Array=0A=
    */=0A=
    oConfig.addProperty(=0A=
        DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key, =0A=
        {=0A=
            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value=0A=
        }=0A=
    );=0A=
=0A=
=0A=
    /*=0A=
        Change the default value for the "autosubmenudisplay" =
configuration =0A=
        property to "false" by re-adding the property.=0A=
    */=0A=
=0A=
    /**=0A=
    * @config autosubmenudisplay=0A=
    * @description Boolean indicating if submenus are automatically made =0A=
    * visible when the user mouses over the menu bar's items.=0A=
    * @default false=0A=
    * @type Boolean=0A=
    */=0A=
	oConfig.addProperty(=0A=
	   DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key, =0A=
	   {=0A=
	       value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value, =0A=
	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator=0A=
       } =0A=
    );=0A=
=0A=
}=0A=
 =0A=
}); // END YAHOO.lang.extend=0A=
=0A=
=0A=
=0A=
/**=0A=
* Creates an item for a menu bar.=0A=
* =0A=
* @param {String} p_oObject String specifying the text of the menu bar =
item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object =
specifying the =0A=
* <code>&#60;li&#62;</code> element of the menu bar item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject Object =0A=
* specifying the <code>&#60;optgroup&#62;</code> element of the menu bar =
item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object =
specifying =0A=
* the <code>&#60;option&#62;</code> element of the menu bar item.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the menu bar item. See configuration class =
documentation =0A=
* for more details.=0A=
* @class MenuBarItem=0A=
* @constructor=0A=
* @extends YAHOO.widget.MenuItem=0A=
*/=0A=
YAHOO.widget.MenuBarItem =3D function(p_oObject, p_oConfig) {=0A=
=0A=
    YAHOO.widget.MenuBarItem.superclass.constructor.call(=0A=
        this, =0A=
        p_oObject, =0A=
        p_oConfig=0A=
    );=0A=
=0A=
};=0A=
=0A=
YAHOO.lang.extend(YAHOO.widget.MenuBarItem, YAHOO.widget.MenuItem, {=0A=
=0A=
=0A=
/**=0A=
* @method init=0A=
* @description The MenuBarItem class's initialization method. This =
method is =0A=
* automatically called by the constructor, and sets up all DOM =
references for =0A=
* pre-existing markup, and creates required markup if it is not already =
present.=0A=
* @param {String} p_oObject String specifying the text of the menu bar =
item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object =
specifying the =0A=
* <code>&#60;li&#62;</code> element of the menu bar item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject Object =0A=
* specifying the <code>&#60;optgroup&#62;</code> element of the menu bar =
item.=0A=
* @param {<a =
href=3D"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-=0A=
* one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object =
specifying =0A=
* the <code>&#60;option&#62;</code> element of the menu bar item.=0A=
* @param {Object} p_oConfig Optional. Object literal specifying the =0A=
* configuration for the menu bar item. See configuration class =
documentation =0A=
* for more details.=0A=
*/=0A=
init: function(p_oObject, p_oConfig) {=0A=
=0A=
    if(!this.SUBMENU_TYPE) {=0A=
=0A=
        this.SUBMENU_TYPE =3D YAHOO.widget.Menu;=0A=
=0A=
    }=0A=
=0A=
=0A=
    /* =0A=
        Call the init of the superclass (YAHOO.widget.MenuItem)=0A=
        Note: We don't pass the user config in here yet =0A=
        because we only want it executed once, at the lowest =0A=
        subclass level.=0A=
    */ =0A=
=0A=
    YAHOO.widget.MenuBarItem.superclass.init.call(this, p_oObject);  =0A=
=0A=
=0A=
    var oConfig =3D this.cfg;=0A=
=0A=
    if(p_oConfig) {=0A=
=0A=
        oConfig.applyConfig(p_oConfig, true);=0A=
=0A=
    }=0A=
=0A=
    oConfig.fireQueue();=0A=
=0A=
},=0A=
=0A=
=0A=
=0A=
// Constants=0A=
=0A=
/**=0A=
* @property CSS_CLASS_NAME=0A=
* @description String representing the CSS class(es) to be applied to =
the =0A=
* <code>&#60;li&#62;</code> element of the menu bar item.=0A=
* @default "yuimenubaritem"=0A=
* @final=0A=
* @type String=0A=
*/=0A=
CSS_CLASS_NAME: "yuimenubaritem",=0A=
=0A=
=0A=
=0A=
// Public methods=0A=
=0A=
=0A=
/**=0A=
* @method toString=0A=
* @description Returns a string representing the menu bar item.=0A=
* @return {String}=0A=
*/=0A=
toString: function() {=0A=
=0A=
    var sReturnVal =3D "MenuBarItem";=0A=
=0A=
    if(this.cfg && this.cfg.getProperty("text")) {=0A=
=0A=
        sReturnVal +=3D (": " + this.cfg.getProperty("text"));=0A=
=0A=
    }=0A=
=0A=
    return sReturnVal;=0A=
=0A=
}=0A=
    =0A=
}); // END YAHOO.lang.extend=0A=
YAHOO.register("menu", YAHOO.widget.Menu, {version: "2.2.2", build: =
"202"});=0A=

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/menu/menuNIMH.js

YAHOO.example.onMenuBarReady =3D function() {
                // Animation object
                var oAnim;
                // Utility function used to setup animation for submenus
                function setupMenuAnimation(p_oMenu) {
                    if(!p_oMenu.animationSetup) {
                        var aItems =3D p_oMenu.getItemGroups();
                            if(aItems && aItems[0]) {
                                var i =3D aItems[0].length - 1;
                            var oSubmenu;

                            do {

                                oSubmenu =3D =
p_oMenu.getItem(i).cfg.getProperty("submenu");
       =20
                                if(oSubmenu) {
       =20
                                    =
oSubmenu.beforeShowEvent.subscribe(onMenuBeforeShow, oSubmenu, true);
                                    =
oSubmenu.showEvent.subscribe(onMenuShow, oSubmenu, true);
       =20
                                }
                           =20
                            }
                            while(i--);
                       =20
                        }

                        p_oMenu.animationSetup =3D true;

                    }

                }


                // "beforeshow" event handler for each submenu of the =
menu bar

                function onMenuBeforeShow(p_sType, p_sArgs, p_oMenu) {

                    if(oAnim && oAnim.isAnimated()) {
                   =20
                        oAnim.stop();
                        oAnim =3D null;
                   =20
                    }

                    YAHOO.util.Dom.setStyle(this.element, "overflow", =
"hidden");
                    YAHOO.util.Dom.setStyle(this.body, "marginTop", ("-" =
+ this.body.offsetHeight + "px"));

                }


                // "show" event handler for each submenu of the menu bar

                function onMenuShow(p_sType, p_sArgs, p_oMenu) {

                    oAnim =3D new YAHOO.util.Anim(
                        this.body,=20
                        { marginTop: { to: 0 } },
                        .5,=20
                        YAHOO.util.Easing.easeOut
                    );

                    oAnim.animate();

                    var me =3D this;
                       =20
                    function onTween() {

                        me.cfg.refireEvent("iframe");
                   =20
                    }

                    function onAnimationComplete() {

                        YAHOO.util.Dom.setStyle(me.body, "marginTop", =
("0px"));
                        YAHOO.util.Dom.setStyle(me.element, "overflow", =
"visible");

                        setupMenuAnimation(me);

                    }
                   =20

                    /*
                         Refire the event handler for the "iframe"=20
                         configuration property with each tween so that =
the =20
                         size and position of the iframe shim remain in =
sync=20
                         with the menu.
                    */

                    if(this.cfg.getProperty("iframe") =3D=3D true) {

                        oAnim.onTween.subscribe(onTween);

                    }

                    oAnim.onComplete.subscribe(onAnimationComplete);
               =20
                }


                // "beforerender" event handler for the menu bar

                function onMenuBeforeRender(p_sType, p_sArgs, p_oMenu) {

                    var oSubmenuData =3D {
                   =20
                        "home": [                        =20

                        ],
   =20
                        "health": [
{ url: "/health/topics/index.shtml", text: "Mental Health Topics" },
{ url: "/health/publications/index.shtml", text: "Publications" },
{ url: "/health/trials/index.shtml", text: "Clinical Trials" },
{ url: "/health/outreach/index.shtml", text: "NIMH Outreach" },
{ url: "/health/topics/statistics/index.shtml", text: "Statistics" }
                        ],
                       =20
                        "research": [
{ url: "/research-funding/index.shtml", text: "Research Funding =
Homepage" },					=09
{ url: "/research-funding/grants/index.shtml", text: "Grants" },
{ url: "/research-funding/contracts/index.shtml", text: "Contracts" },
{ url: "/research-funding/training/index.shtml", text: "Training" },
{ url: "/research-funding/small-business/index.shtml", text: "Small =
Business" },
{ url: "/research-funding/scientific-meetings/index.shtml", text: =
"Scientific Meetings" }
                        ],
                       =20
                        "news": [
{ url: "/science-news/2009/index.shtml", text: "2009" },
{ url: "/science-news/2008/index.shtml", text: "2008" },
{ url: "/science-news/2007/index.shtml", text: "2007" },
{ url: "/science-news/2006/index.shtml", text: "2006" },
{ url: "/science-news/2005/index.shtml", text: "2005" },
{ url: "/science-news/2004/index.shtml", text: "2004" },
{ url: "/science-news/2003/index.shtml", text: "2003" },
{ url: "/science-news/2002/index.shtml", text: "2002" }
                        ],
					=09
						"about": [
{ url: "/about/director/index.shtml", text: "Director's Corner" },
{ url: "/about/strategic-planning-reports/index.shtml", text: "Strategic =
Plans" },
{ url: "/about/connect-with-nimh/index.shtml", text: "Connect with NIMH" =
},
{ url: "/about/organization/index.shtml", text: "Organization" },
{ url: "/about/advisory-boards-and-groups/index.shtml", text: "Advisory =
Boards & Groups" },
{ url: "/about/budget/index.shtml", text: "Budget" }
						]
                   =20
                    };


                    //this.getItem(0).cfg.setProperty("submenu", { =
id:"homeS", itemdata: oSubmenuData["home"] });
                    this.getItem(1).cfg.setProperty("submenu", { =
id:"healthS", itemdata: oSubmenuData["health"] });
                    this.getItem(2).cfg.setProperty("submenu", { =
id:"researchS", itemdata: oSubmenuData["research"] });
                    this.getItem(3).cfg.setProperty("submenu", { =
id:"newsS", itemdata: oSubmenuData["news"] });
					this.getItem(4).cfg.setProperty("submenu", { id:"aboutS", itemdata: =
oSubmenuData["about"] });

                    setupMenuAnimation(this);

                }


                // Initialize the root menu bar

                var oMenuBar =3D new YAHOO.widget.MenuBar("navWrap", { =
autosubmenudisplay:true, hidedelay:750, lazyload:true });

			=09

                // Subscribe to the "beforerender" event

                oMenuBar.beforeRenderEvent.subscribe(onMenuBeforeRender, =
oMenuBar, true);


                // Render the menu bar

                oMenuBar.render();
               =20
            };


            // Initialize and render the menu bar when it is available =
in the DOM

            YAHOO.util.Event.onContentReady("navWrap", =
YAHOO.example.onMenuBarReady);

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/scripts/init.js

// GENERAL-PURPOSE FUNCTION TO LOAD MULTIPLE FUNCTIONS
function addLoadEvent(func) {=20
	var oldonload =3D window.onload;
	if (typeof window.onload !=3D 'function') {
		window.onload =3D func;
	} else {
		window.onload =3D function() {
			oldonload();
			func();
		}
	}
}

// CREATE TITLE TAGS ON THE FLY - WRITTEN BY RJB 8/3/06
function createTitleTags() {=20
	if (!document.getElementsByTagName) return false;
	var images =3D document.getElementsByTagName("IMG");
	for (var i=3D0; i < images.length; i++) {
		var image =3D images[i]
		if (!image.getAttribute("TITLE")) { // Check to see whether title tag =
already exists.
			if (image.getAttribute("ALT")) { // Check to see whether alt tag =
exists and it's not empty.
				var alttext =3D image.getAttribute("ALT");
				if (alttext !=3D=3D " ") image.setAttribute("title",alttext);
			}
		}
	}
}

// ZEBRA-STRIPE TABLE (Modified by RJB 8/3/06 to allow multiple zebra =
tables on a page)
function zebraStripeTable() {
	if (!document.getElementsByTagName) return false;
	if (!document.getElementsByTagName("table")) return false;
	var tables =3D document.getElementsByTagName("table");
	if (tables.length < 1) return false;
	for (var i=3D0; i < tables.length; i++) {
		if (tables[i].getAttribute("class") =3D=3D "zebra" || =
tables[i].getAttribute("className") =3D=3D "zebra") {  // Apparently =
getAttribute('class') doesn't work in IE (must use =
getAttribute('className')) because "class" is an ECMAScript reserved =
name.=20
			var rows =3D tables[i].getElementsByTagName("tr");
			for (j=3D0; j < rows.length; j++) {
				//manipulate rows
				if (j % 2 =3D=3D 0) {
					rows[j].className =3D "even";
				} else {
					rows[j].className =3D "odd";
				}
			}
		}
	}
}

// POP UP A SMALL WINDOW -- From "DOM Scripting," Pages 88-89
function preparePopUp() {
	if (!document.getElementsByTagName) return false;
	if (!document.getElementsByTagName("a")) return false;
	var lnks =3D document.getElementsByTagName("a");
	if (lnks.length < 1) return false;
	for (var i=3D0; i<lnks.length; i++) {
		if (lnks[i].getAttribute("class") =3D=3D "popup" || =
lnks[i].getAttribute("className") =3D=3D "popup") {  // Apparently =
getAttribute('class') doesn't work in IE (must use =
getAttribute('className')) because "class" is an ECMAScript reserved =
name.=20
			lnks[i].onclick =3D function() {
				popUp(this.getAttribute("href"));
				return false;
			}
		}
	}
}
function popUp(winURL) {
	=
window.open(winURL,"popup","width=3D500,height=3D300,scrollbars=3Dyes,res=
izable=3Dyes,menubar=3Dno");
}

// CREATE "CLOSE THIS WINDOW" LINK ON THE FLY TO DISPLAY AT THE BOTTOM =
OF POP-UP WINDOWS - WRITTEN BY RJB 8/3/06
function autoCloseWindowLink () {
	if (window.name !=3D=3D "popup") return false;
	if (!document.createElement) return false;
	if (!document.createTextNode) return false;
	var para =3D document.createElement("p");
	var link =3D document.createElement("a");
	var linktext =3D document.createTextNode("Close This Window");
	link.setAttribute("href","javascript:window.close();");
	link.appendChild(linktext);
	para.appendChild(link);
	document.body.appendChild(para);
}

// ONLY PROVIDE THE PRINT FUNCTION FOR JAVASCRIPT ENABLED BROWSERS. - JN =
09/14/2007
function ptpEnable(){
	ptp =3D document.getElementById('printpage');
	ptp.innerHTML =3D '<a href=3D"javascript:void(printSpecial());">Print =
this page</a>';
}

//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
// provide WebTrend DCS tagging for popup links
function WebTrendDCS(theURL){
	if(theURL.indexOf("http://") >=3D 0){
		a =3D theURL.replace("http://", "");
		i =3D a.indexOf("/");
		if(i >=3D 0){
			domain =3D a.slice(0,i);
			page =3D a.slice(i, a.length);
		}
		else{
			domain =3D a;
			page =3D "";
		}	=09
		=
dcsMultiTrack('DCS.dcsref',window.location.href,'DCS.dcssip',domain,'DCS.=
dcsuri',page);
	}
}

// provides WebTrends DCS tagging for external links and pdf links
// for this type of link DCS take previous page as the referer
function setupWebTrendsDCS(){
	links =3D document.getElementsByTagName("a");
	hostN =3D window.location.hostname;
=09
	for(i=3D0; i < links.length; i++){
		aLink =3D links[i];	=09
		// external links
		if(aLink.href.indexOf(hostN)<0){
			if(aLink.href.indexOf('popWindow')<0 && =
aLink.href.indexOf('ETFWindow')<0 && aLink.href.indexOf('PTPWindow')<0){
				aLink.onclick=3DextLinkAct;
			}
		}
		// internal pdf links
		else{
			if(aLink.href.indexOf(".pdf")>0){
				aLink.onclick=3DpdfLinkAct;
			}
		}
	}
}

function extLinkAct(evt){
	//alert('ext: ' + ',' + this.href +', DCS.dcsref,' + window.location);
	=
dcsMultiTrack('DCS.dcsref',window.location.href,'DCS.dcsuri',this.href);
=09
	// capture the event and pass it along
	// do not deploy - wait for approval - 11/15/2006
	//evt =3D (evt) ? evt : ((window.event) ? event : null);
	//extLink(this.href, evt);
}

// provides WebTrends DCS tagging for pdf links
function pdfLinkAct(){
	//alert('DCS.dcsuri' + ', pdf=3D' + this.href);
	hostN =3D window.location.hostname;
	uri =3D this.href;
	p =3D uri.split(hostN);
	//alert(p[1]);
	dcsMultiTrack('DCS.dcsref',window.location.href,'DCS.dcsuri',p[1]);
}

function extLink(alink, evt){
	popWindow(alink);
=09
	//John fixed IE error - 11/06/2006 - testing
	if(evt.srcElement){
	// code for IE browsers
		evt.cancelBubble =3D true;
		evt.returnValue =3D false;
	}
	else{
	// code for W3C browsers
		evt.preventDefault();
		evt.stopPropagation();
	}
}
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


// LOAD THE FUNCTIONS
addLoadEvent(ptpEnable);
addLoadEvent(createTitleTags);
addLoadEvent(zebraStripeTable);
addLoadEvent(preparePopUp);
addLoadEvent(autoCloseWindowLink);
addLoadEvent(setupWebTrendsDCS);

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/scripts/print.js

var gAutoPrint =3D true; // Flag for whether or not to automatically =
call the print function
function printSpecial()
{
if (document.getElementById !=3D null)
{
var html =3D '<HTML>\n<HEAD>\n';
if (document.getElementsByTagName !=3D null)
{
//var headTags =3D document.getElementsByTagName("head");
//if (headTags.length > 0)
//html +=3D headTags[0].innerHTML;
}
html +=3D '<link rel=3D"stylesheet" type=3D"text/css" =
href=3D"/styles/print.css" />'
html +=3D '\n</HE' + 'AD>\n<BODY bgcolor=3D"#fffffff" =
style=3D"font-weight:normal;font-size:12px;text-align:left;">\n';
var printReadyElem =3D document.getElementById("primary_content");
// added by John Nguyen 07/22/2008
if(printReadyElem =3D=3D null)
	printReadyElem =3D document.getElementById("content");
// added by John Nguyen 07/22/2008
if (printReadyElem !=3D null)
{
html +=3D printReadyElem.innerHTML;
}
else
{
alert("Could not find the printReady section in the HTML");
return;
}

html +=3D '\n</BO' + 'DY>\n</HT' + 'ML>';
var printWin =3D window.open("","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();
if (gAutoPrint)
printWin.print();
}
else
{
alert("Sorry, the print ready feature is only available in modern =
browsers.");
}
}

------=_NextPart_000_0000_01CA32EB.CE8C6050
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.nimh.nih.gov/scripts/webtrends.js

// WebTrends SmartSource Data Collector Tag
// Version: 8.6.2    =20
// Tag Builder Version: 3.0
// Created: 7/6/2009 8:43:53 PM

function WebTrends(){
	var that=3Dthis;
	// begin: user modifiable
	this.dcsid=3D"dcspa4k6s00000o22m03y5l99_9l2t";
	this.domain=3D"nimhwdc2.nimh.nih.gov";
	this.timezone=3D-5;
	this.fpcdom=3D".www.nimh.nih.gov";
	this.onsitedoms=3D"mentalhealth.gov";
	this.downloadtypes=3D"xls,doc,pdf,txt,csv,zip";
	this.navigationtag=3D"div,table";
	this.trackevents=3Dtrue;
	this.trimoffsiteparams=3Dtrue;
	this.enabled=3Dtrue;
	this.i18n=3Dfalse;
	this.fpc=3D"WT_FPC";
	this.paidsearchparams=3D"gclid";
	// end: user modifiable
	this.DCS=3D{};
	this.WT=3D{};
	this.DCSext=3D{};
	this.images=3D[];
	this.index=3D0;
	this.exre=3D(function(){return(window.RegExp?new =
RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(c=
fg)|(redirect)|(cip)","i"):"");})();
	=
this.re=3D(function(){return(window.RegExp?(that.i18n?{"%25":/\%/g}:{"%09=
":/\t/g,"%20":/ =
/g,"%23":/\#/g,"%26":/\&/g,"%2B":/\+/g,"%3F":/\?/g,"%5C":/\\/g,"%22":/\"/=
g,"%7F":/\x7F/g,"%A0":/\xA0/g}):"");})();
}
WebTrends.prototype.dcsGetCookie=3Dfunction(name){
	var cookies=3Ddocument.cookie.split("; ");
	var cmatch=3D[];
	var idx=3D0;
	var i=3D0;
	var namelen=3Dname.length;
	var clen=3Dcookies.length;
	for (i=3D0;i<clen;i++){
		var c=3Dcookies[i];
		if ((c.substring(0,namelen+1))=3D=3D(name+"=3D")){
			cmatch[idx++]=3Dc;
		}
	}
	var cmatchCount=3Dcmatch.length;
	if (cmatchCount>0){
		idx=3D0;
		if ((cmatchCount>1)&&(name=3D=3Dthis.fpc)){
			var dLatest=3Dnew Date(0);
			for (i=3D0;i<cmatchCount;i++){
				var lv=3DparseInt(this.dcsGetCrumb(cmatch[i],"lv"));
				var dLst=3Dnew Date(lv);
				if (dLst>dLatest){
					dLatest.setTime(dLst.getTime());
					idx=3Di;
				}
			}
		}
		return unescape(cmatch[idx].substring(namelen+1));
	}
	else{
		return null;
	}
}
WebTrends.prototype.dcsGetCrumb=3Dfunction(cval,crumb,sep){
	var aCookie=3Dcval.split(sep||":");
	for (var i=3D0;i<aCookie.length;i++){
		var aCrumb=3DaCookie[i].split("=3D");
		if (crumb=3D=3DaCrumb[0]){
			return aCrumb[1];
		}
	}
	return null;
}
WebTrends.prototype.dcsGetIdCrumb=3Dfunction(cval,crumb){
	var id=3Dcval.substring(0,cval.indexOf(":lv=3D"));
	var aCrumb=3Did.split("=3D");
	for (var i=3D0;i<aCrumb.length;i++){
		if (crumb=3D=3DaCrumb[0]){
			return aCrumb[1];
		}
	}
	return null;
}
WebTrends.prototype.dcsIsFpcSet=3Dfunction(name,id,lv,ss){
	var c=3Dthis.dcsGetCookie(name);
	if (c){
		return =
((id=3D=3Dthis.dcsGetIdCrumb(c,"id"))&&(lv=3D=3Dthis.dcsGetCrumb(c,"lv"))=
&&(ss=3D=3Dthis.dcsGetCrumb(c,"ss")))?0:3;
	}
	return 2;
}
WebTrends.prototype.dcsFPC=3Dfunction(){
	if (document.cookie.indexOf("WTLOPTOUT=3D")!=3D-1){
		return;
	}
	var WT=3Dthis.WT;
	var name=3Dthis.fpc;
	var dCur=3Dnew Date();
	var adj=3D(dCur.getTimezoneOffset()*60000)+(this.timezone*3600000);
	dCur.setTime(dCur.getTime()+adj);
	var dExp=3Dnew Date(dCur.getTime()+315360000000);
	var dSes=3Dnew Date(dCur.getTime());
	=
WT.co_f=3DWT.vtid=3DWT.vtvs=3DWT.vt_f=3DWT.vt_f_a=3DWT.vt_f_s=3DWT.vt_f_d=
=3DWT.vt_f_tlh=3DWT.vt_f_tlv=3D"";
	if (document.cookie.indexOf(name+"=3D")=3D=3D-1){
		if ((typeof(gWtId)!=3D"undefined")&&(gWtId!=3D"")){
			WT.co_f=3DgWtId;
		}
		else if ((typeof(gTempWtId)!=3D"undefined")&&(gTempWtId!=3D"")){
			WT.co_f=3DgTempWtId;
			WT.vt_f=3D"1";
		}
		else{
			WT.co_f=3D"2";
			var curt=3DdCur.getTime().toString();
			for (var i=3D2;i<=3D(32-curt.length);i++){
				WT.co_f+=3DMath.floor(Math.random()*16.0).toString(16);
			}
			WT.co_f+=3Dcurt;
			WT.vt_f=3D"1";
		}
		if (typeof(gWtAccountRollup)=3D=3D"undefined"){
			WT.vt_f_a=3D"1";
		}
		WT.vt_f_s=3DWT.vt_f_d=3D"1";
		WT.vt_f_tlh=3DWT.vt_f_tlv=3D"0";
	}
	else{
		var c=3Dthis.dcsGetCookie(name);
		var id=3Dthis.dcsGetIdCrumb(c,"id");
		var lv=3DparseInt(this.dcsGetCrumb(c,"lv"));
		var ss=3DparseInt(this.dcsGetCrumb(c,"ss"));
		if ((id=3D=3Dnull)||(id=3D=3D"null")||isNaN(lv)||isNaN(ss)){
			return;
		}
		WT.co_f=3Did;
		var dLst=3Dnew Date(lv);
		WT.vt_f_tlh=3DMath.floor((dLst.getTime()-adj)/1000);
		dSes.setTime(ss);
		if =
((dCur.getTime()>(dLst.getTime()+1800000))||(dCur.getTime()>(dSes.getTime=
()+28800000))){
			WT.vt_f_tlv=3DMath.floor((dSes.getTime()-adj)/1000);
			dSes.setTime(dCur.getTime());
			WT.vt_f_s=3D"1";
		}
		if =
((dCur.getDay()!=3DdLst.getDay())||(dCur.getMonth()!=3DdLst.getMonth())||=
(dCur.getYear()!=3DdLst.getYear())){
			WT.vt_f_d=3D"1";
		}
	}
	WT.co_f=3Descape(WT.co_f);
	WT.vtid=3D(typeof(this.vtid)=3D=3D"undefined")?WT.co_f:(this.vtid||"");
	WT.vtvs=3D(dSes.getTime()-adj).toString();
	var expiry=3D"";
	var cur=3DdCur.getTime().toString();
	var ses=3DdSes.getTime().toString();
	=
document.cookie=3Dname+"=3D"+"id=3D"+WT.co_f+":lv=3D"+cur+":ss=3D"+ses+ex=
piry+"; path=3D/"+(((this.fpcdom!=3D""))?("; =
domain=3D"+this.fpcdom):(""));
	var rc=3Dthis.dcsIsFpcSet(name,WT.co_f,cur,ses);
	if (rc!=3D0){
		=
WT.co_f=3DWT.vtvs=3DWT.vt_f_s=3DWT.vt_f_d=3DWT.vt_f_tlh=3DWT.vt_f_tlv=3D"=
";
		if (typeof(this.vtid)=3D=3D"undefined"){
			WT.vtid=3D"";
		}
		WT.vt_f=3DWT.vt_f_a=3Drc;
    }
}
WebTrends.prototype.dcsIsOnsite=3Dfunction(host){
	if (host.length>0){
	    host=3Dhost.toLowerCase();
	    if (host=3D=3Dwindow.location.hostname.toLowerCase()){
		    return true;
	    }
	    if (typeof(this.onsitedoms.test)=3D=3D"function"){
		    return this.onsitedoms.test(host);
	    }
	    else if (this.onsitedoms.length>0){
		    var doms=3Dthis.dcsSplit(this.onsitedoms);
		    var len=3Ddoms.length;
		    for (var i=3D0;i<len;i++){
			    if (host=3D=3Ddoms[i]){
			        return true;
			    }
		    }
	    }
	}
	return false;
}
WebTrends.prototype.dcsTypeMatch=3Dfunction(pth, typelist){
	var =
type=3Dpth.toLowerCase().substring(pth.lastIndexOf(".")+1,pth.length);
	var types=3Dthis.dcsSplit(typelist);
	var tlen=3Dtypes.length;=09
	for (var i=3D0;i<tlen;i++){
		if (type=3D=3Dtypes[i]){
			return true;
		}
	}
	return false;
}
WebTrends.prototype.dcsEvt=3Dfunction(evt,tag){
	var e=3Devt.target||evt.srcElement;
	while (e.tagName&&(e.tagName.toLowerCase()!=3Dtag.toLowerCase())){
		e=3De.parentElement||e.parentNode;
	}
	return e;
}
WebTrends.prototype.dcsNavigation=3Dfunction(evt){
	var id=3D"";
	var cname=3D"";
	var elems=3Dthis.dcsSplit(this.navigationtag);
	var elen=3Delems.length;=09
	var i,e,elem;
	for (i=3D0;i<elen;i++){
		elem=3Delems[i];
		if (elem.length){
			e=3Dthis.dcsEvt(evt,elem);
			id=3D(e.getAttribute&&e.getAttribute("id"))?e.getAttribute("id"):"";
			cname=3De.className||"";
			if (id.length||cname.length){
				break;
			}
		}
	}
	return id.length?id:cname;
}
WebTrends.prototype.dcsBind=3Dfunction(event,func){
	if ((typeof(func)=3D=3D"function")&&document.body){
		if (document.body.addEventListener){
			document.body.addEventListener(event, func.wtbind(this), true);
		}
		else if(document.body.attachEvent){
			document.body.attachEvent("on"+event, func.wtbind(this));
		}
	}
}
WebTrends.prototype.dcsET=3Dfunction(){
	var =
e=3D(navigator.appVersion.indexOf("MSIE")!=3D-1)?"click":"mousedown";
	this.dcsBind(e,this.dcsDownload);
	this.dcsBind(e,this.dcsOffsite);
	this.dcsBind("contextmenu",this.dcsRightClick);
}
WebTrends.prototype.dcsMultiTrack=3Dfunction(){
	var args=3DdcsMultiTrack.arguments?dcsMultiTrack.arguments:arguments;
	if (args.length%2=3D=3D0){
		this.dcsSetProps(args);
		var dCurrent=3Dnew Date();
		this.DCS.dcsdat=3DdCurrent.getTime();
		this.dcsFPC();
		this.dcsTag();
	}
}
WebTrends.prototype.dcsCleanUp=3Dfunction(){
	this.DCS=3D{};
	this.WT=3D{};
	this.DCSext=3D{};
	if (arguments.length%2=3D=3D0){
		this.dcsSetProps(arguments);
	}
}
WebTrends.prototype.dcsSetProps=3Dfunction(args){
	for (var i=3D0;i<args.length;i+=3D2){
		if (args[i].indexOf('WT.')=3D=3D0){
			this.WT[args[i].substring(3)]=3Dargs[i+1];
		}
		else if (args[i].indexOf('DCS.')=3D=3D0){
			this.DCS[args[i].substring(4)]=3Dargs[i+1];
		}
		else if (args[i].indexOf('DCSext.')=3D=3D0){
			this.DCSext[args[i].substring(7)]=3Dargs[i+1];
		}
	}
}
WebTrends.prototype.dcsSplit=3Dfunction(list){
	var items=3Dlist.toLowerCase().split(",");
	var len=3Ditems.length;
	for (var i=3D0;i<len;i++){
		items[i]=3Ditems[i].replace(/^\s*/,"").replace(/\s*$/,"");
	}
	return items;
}
// Code section for Track clicks to download links.
WebTrends.prototype.dcsDownload=3Dfunction(evt){
	evt=3Devt||(window.event||"");
	if (evt&&((typeof(evt.which)!=3D"number")||(evt.which=3D=3D1))){
		var e=3Dthis.dcsEvt(evt,"A");
		if (e.href){
		    var hn=3De.hostname?(e.hostname.split(":")[0]):"";
		    if =
(this.dcsIsOnsite(hn)&&this.dcsTypeMatch(e.pathname,this.downloadtypes)){=

		        var =
qry=3De.search?e.search.substring(e.search.indexOf("?")+1,e.search.length=
):"";
		        var =
pth=3De.pathname?((e.pathname.indexOf("/")!=3D0)?"/"+e.pathname:e.pathnam=
e):"/";
		        var ttl=3D"";
		        var text=3Ddocument.all?e.innerText:e.text;
		        var img=3Dthis.dcsEvt(evt,"IMG");
		        if (img.alt){
			        ttl=3Dimg.alt;
		        }
		        else if (text){
			        ttl=3Dtext;
		        }
		        else if (e.innerHTML){
			        ttl=3De.innerHTML;
		        }
		        =
this.dcsMultiTrack("DCS.dcssip",hn,"DCS.dcsuri",pth,"DCS.dcsqry",e.search=
||"","WT.ti","Download:"+ttl,"WT.dl","20","WT.nv",this.dcsNavigation(evt)=
);
		        =
this.DCS.dcssip=3Dthis.DCS.dcsuri=3Dthis.DCS.dcsqry=3Dthis.WT.ti=3Dthis.W=
T.dl=3Dthis.WT.nv=3D"";
		    }
		}
	}
}
// Code section for Track right clicks to download links.
WebTrends.prototype.dcsRightClick=3Dfunction(evt){
	evt=3Devt||(window.event||"");
	if (evt){
		var btn=3Devt.which||evt.button;
		if ((btn!=3D1)||(navigator.userAgent.indexOf("Safari")!=3D-1)){
			var e=3Dthis.dcsEvt(evt,"A");
			if ((typeof(e.href)!=3D"undefined")&&e.href){
				if =
((typeof(e.protocol)!=3D"undefined")&&e.protocol&&(e.protocol.indexOf("ht=
tp")!=3D-1)){
					if =
((typeof(e.pathname)!=3D"undefined")&&this.dcsTypeMatch(e.pathname,this.d=
ownloadtypes)){
						var =
pth=3De.pathname?((e.pathname.indexOf("/")!=3D0)?"/"+e.pathname:e.pathnam=
e):"/";
						var hn=3De.hostname?(e.hostname.split(":")[0]):"";
						=
this.dcsMultiTrack("DCS.dcssip",hn,"DCS.dcsuri",pth,"DCS.dcsqry","","WT.t=
i","RightClick:"+pth,"WT.dl","25");
						=
this.DCS.dcssip=3Dthis.DCS.dcsuri=3Dthis.WT.ti=3Dthis.WT.dl=3Dthis.WT.nv=3D=
"";
					}
				}
			}
		}
	}
}
// Code section for Track clicks to links leading offsite.
WebTrends.prototype.dcsOffsite=3Dfunction(evt){
	evt=3Devt||(window.event||"");
	if (evt&&((typeof(evt.which)!=3D"number")||(evt.which=3D=3D1))){
		var e=3Dthis.dcsEvt(evt,"A");
		if (e.href){
		    var hn=3De.hostname?(e.hostname.split(":")[0]):"";
		    var pr=3De.protocol||"";
		    if =
((hn.length>0)&&(pr.indexOf("http")=3D=3D0)&&!this.dcsIsOnsite(hn)){
			    var =
qry=3De.search?e.search.substring(e.search.indexOf("?")+1,e.search.length=
):"";
			    var =
pth=3De.pathname?((e.pathname.indexOf("/")!=3D0)?"/"+e.pathname:e.pathnam=
e):"/";
			    =
this.dcsMultiTrack("DCS.dcssip",hn,"DCS.dcsuri",pth,"DCS.dcsqry",this.tri=
moffsiteparams?"":qry,"DCS.dcsref",window.location,"WT.ti","Offsite:"+hn+=
pth+"?"+qry,"WT.dl","24","WT.nv",this.dcsNavigation(evt));
			    =
this.DCS.dcssip=3Dthis.DCS.dcsuri=3Dthis.DCS.dcsqry=3Dthis.DCS.dcsref=3Dt=
his.WT.ti=3Dthis.WT.dl=3Dthis.WT.nv=3D"";
		    }
		}
	}
}

WebTrends.prototype.dcsAdv=3Dfunction(){
	if (this.trackevents&&(typeof(this.dcsET)=3D=3D"function")){
		if (window.addEventListener){
			window.addEventListener("load",this.dcsET.wtbind(this),false);
		}
		else if (window.attachEvent){
			window.attachEvent("onload",this.dcsET.wtbind(this));
		}
	}
	this.dcsFPC();
}
WebTrends.prototype.dcsVar=3Dfunction(){
	var dCurrent=3Dnew Date();
	var WT=3Dthis.WT;
	var DCS=3Dthis.DCS;
	WT.tz=3DparseInt(dCurrent.getTimezoneOffset()/60*-1)||"0";
	WT.bh=3DdCurrent.getHours()||"0";
	=
WT.ul=3Dnavigator.appName=3D=3D"Netscape"?navigator.language:navigator.us=
erLanguage;
	if (typeof(screen)=3D=3D"object"){
		=
WT.cd=3Dnavigator.appName=3D=3D"Netscape"?screen.pixelDepth:screen.colorD=
epth;
		WT.sr=3Dscreen.width+"x"+screen.height;
	}
	if (typeof(navigator.javaEnabled())=3D=3D"boolean"){
		WT.jo=3Dnavigator.javaEnabled()?"Yes":"No";
	}
	if (document.title){
		if (window.RegExp){
			var tire=3Dnew =
RegExp("^"+window.location.protocol+"//"+window.location.hostname+"\\s-\\=
s");
			WT.ti=3Ddocument.title.replace(tire,"");
		}
		else{
			WT.ti=3Ddocument.title;
		}
	}
	WT.js=3D"Yes";
	WT.jv=3D(function(){
		var agt=3Dnavigator.userAgent.toLowerCase();
		var major=3DparseInt(navigator.appVersion);
		var mac=3D(agt.indexOf("mac")!=3D-1);
		var ff=3D(agt.indexOf("firefox")!=3D-1);
		var ff0=3D(agt.indexOf("firefox/0.")!=3D-1);
		var ff10=3D(agt.indexOf("firefox/1.0")!=3D-1);
		var ff15=3D(agt.indexOf("firefox/1.5")!=3D-1);
		var ff20=3D(agt.indexOf("firefox/2.0")!=3D-1);
		var ff3up=3D(ff&&!ff0&&!ff10&!ff15&!ff20);
		var =
nn=3D(!ff&&(agt.indexOf("mozilla")!=3D-1)&&(agt.indexOf("compatible")=3D=3D=
-1));
		var nn4=3D(nn&&(major=3D=3D4));
		var nn6up=3D(nn&&(major>=3D5));
		var =
ie=3D((agt.indexOf("msie")!=3D-1)&&(agt.indexOf("opera")=3D=3D-1));
		var ie4=3D(ie&&(major=3D=3D4)&&(agt.indexOf("msie 4")!=3D-1));
		var ie5up=3D(ie&&!ie4);
		var op=3D(agt.indexOf("opera")!=3D-1);
		var op5=3D(agt.indexOf("opera =
5")!=3D-1||agt.indexOf("opera/5")!=3D-1);
		var op6=3D(agt.indexOf("opera =
6")!=3D-1||agt.indexOf("opera/6")!=3D-1);
		var op7up=3D(op&&!op5&&!op6);
		var jv=3D"1.1";
		if (ff3up){
			jv=3D"1.8";
		}
		else if (ff20){
			jv=3D"1.7";
		}
		else if (ff15){
			jv=3D"1.6";
		}
		else if (ff0||ff10||nn6up||op7up){
			jv=3D"1.5";
		}
		else if ((mac&&ie5up)||op6){
			jv=3D"1.4";
		}
		else if (ie5up||nn4||op5){
			jv=3D"1.3";
		}
		else if (ie4){
			jv=3D"1.2";
		}
		return jv;
	})();
	WT.ct=3D"unknown";
	if (document.body&&document.body.addBehavior){
		try{
			document.body.addBehavior("#default#clientCaps");
			WT.ct=3Ddocument.body.connectionType||"unknown";
			document.body.addBehavior("#default#homePage");
			WT.hp=3Ddocument.body.isHomePage(location.href)?"1":"0";
		}
		catch(e){
		}
	}
	if (document.all){
		=
WT.bs=3Ddocument.body?document.body.offsetWidth+"x"+document.body.offsetH=
eight:"unknown";
	}
	else{
		WT.bs=3Dwindow.innerWidth+"x"+window.innerHeight;
	}
	WT.fv=3D(function(){
		var i,flash;
		if (window.ActiveXObject){
			for(i=3D10;i>0;i--){
				try{
					flash=3Dnew ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
					return i+".0";
				}
				catch(e){
				}
			}
		}
		else if (navigator.plugins&&navigator.plugins.length){
			for (i=3D0;i<navigator.plugins.length;i++){
				if (navigator.plugins[i].name.indexOf('Shockwave Flash')!=3D-1){
					return navigator.plugins[i].description.split(" ")[2];
				}
			}
		}
		return "Not enabled";
	})();
	WT.slv=3D(function(){
		var slv=3D"Not enabled";
		try{    =20
			if (navigator.userAgent.indexOf('MSIE')!=3D-1){
				var sli =3D new ActiveXObject('AgControl.AgControl');
				if (sli){
					slv=3D"Unknown";
				}
			}
			else if (navigator.plugins["Silverlight Plug-In"]){
				slv=3D"Unknown";
			}
		}
		catch(e){
		}
		if (slv!=3D"Not enabled"){
			var i,j,v;
			if =
((typeof(Silverlight)=3D=3D"object")&&(typeof(Silverlight.isInstalled)=3D=
=3D"function")){
				for(i=3D3;i>0;i--){
					for (j=3D9;j>=3D0;j--){
						v=3Di+"."+j;
						if (Silverlight.isInstalled(v)){
							slv=3Dv;
							break;
						}
					}
					if (slv=3D=3Dv){
						break;
					}
				}
			}
		}
		return slv;
	})();
	if (this.i18n){
		if (typeof(document.defaultCharset)=3D=3D"string"){
			WT.le=3Ddocument.defaultCharset;
		}=20
		else if (typeof(document.characterSet)=3D=3D"string"){
			WT.le=3Ddocument.characterSet;
		}
		else{
			WT.le=3D"unknown";
		}
	}
	WT.tv=3D"8.6.2";
//	WT.sp=3D"@@SPLITVALUE@@";
	WT.dl=3D"0";
	WT.ssl=3D(window.location.protocol.indexOf('https:')=3D=3D0)?"1":"0";
	DCS.dcsdat=3DdCurrent.getTime();
	DCS.dcssip=3Dwindow.location.hostname;
	DCS.dcsuri=3Dwindow.location.pathname;
	WT.es=3DDCS.dcssip+DCS.dcsuri;
	if (window.location.search){
		DCS.dcsqry=3Dwindow.location.search;
	}
	if (DCS.dcsqry){
		var dcsqry=3DDCS.dcsqry.toLowerCase();
		var =
params=3Dthis.paidsearchparams.length?this.paidsearchparams.toLowerCase()=
.split(","):[];
		for (var i=3D0;i<params.length;i++){
			if (dcsqry.indexOf(params[i]+"=3D")!=3D-1){
				WT.srch=3D"1";
				break;
			}
		}
	}
	if =
((window.document.referrer!=3D"")&&(window.document.referrer!=3D"-")){
		if (!(navigator.appName=3D=3D"Microsoft Internet =
Explorer"&&parseInt(navigator.appVersion)<4)){
			DCS.dcsref=3Dwindow.document.referrer;
		}
	}
	DCS.dcscfg=3D1;
}
WebTrends.prototype.dcsEscape=3Dfunction(S, REL){
	if (REL!=3D""){
		S=3DS.toString();
		for (var R in REL){
 			if (REL[R] instanceof RegExp){
				S=3DS.replace(REL[R],R);
 			}
		}
		return S;
	}
	else{
		return escape(S);
	}
}
WebTrends.prototype.dcsA=3Dfunction(N,V){
	if (this.i18n&&(this.exre!=3D"")&&!this.exre.test(N)){
		if (N=3D=3D"dcsqry"){
			var newV=3D"";
			var params=3DV.substring(1).split("&");
			for (var i=3D0;i<params.length;i++){
				var pair=3Dparams[i];
				var pos=3Dpair.indexOf("=3D");
				if (pos!=3D-1){
					var key=3Dpair.substring(0,pos);
					var val=3Dpair.substring(pos+1);
					if (i!=3D0){
						newV+=3D"&";
					}
					newV+=3Dkey+"=3D"+this.dcsEncode(val);
				}
			}
			V=3DV.substring(0,1)+newV;
		}
		else{
			V=3Dthis.dcsEncode(V);
		}
	}
	return "&"+N+"=3D"+this.dcsEscape(V, this.re);
}
WebTrends.prototype.dcsEncode=3Dfunction(S){
	return =
(typeof(encodeURIComponent)=3D=3D"function")?encodeURIComponent(S):escape=
(S);
}
WebTrends.prototype.dcsCreateImage=3Dfunction(dcsSrc){
	if (document.images){
		this.images[this.index]=3Dnew Image();
		this.images[this.index].src=3DdcsSrc;
		this.index++;
	}
	else{
		document.write('<IMG ALT=3D"" BORDER=3D"0" NAME=3D"DCSIMG" WIDTH=3D"1" =
HEIGHT=3D"1" SRC=3D"'+dcsSrc+'">');
	}
}
WebTrends.prototype.dcsMeta=3Dfunction(){
	var elems;
	if (document.all){
		elems=3Ddocument.all.tags("meta");
	}
	else if (document.documentElement){
		elems=3Ddocument.getElementsByTagName("meta");
	}
	if (typeof(elems)!=3D"undefined"){
		var length=3Delems.length;
		for (var i=3D0;i<length;i++){
			var name=3Delems.item(i).name;
			var content=3Delems.item(i).content;
			var equiv=3Delems.item(i).httpEquiv;
			if (name.length>0){
				if (name.toUpperCase().indexOf("WT.")=3D=3D0){
					this.WT[name.substring(3)]=3Dcontent;
				}
				else if (name.toUpperCase().indexOf("DCSEXT.")=3D=3D0){
					this.DCSext[name.substring(7)]=3Dcontent;
				}
				else if (name.toUpperCase().indexOf("DCS.")=3D=3D0){
					this.DCS[name.substring(4)]=3Dcontent;
				}
			}
		}
	}
}
WebTrends.prototype.dcsTag=3Dfunction(){
	if (document.cookie.indexOf("WTLOPTOUT=3D")!=3D-1){
		return;
	}
	var WT=3Dthis.WT;
	var DCS=3Dthis.DCS;
	var DCSext=3Dthis.DCSext;
	var i18n=3Dthis.i18n;
	var =
P=3D"http"+(window.location.protocol.indexOf('https:')=3D=3D0?'s':'')+":/=
/"+this.domain+(this.dcsid=3D=3D""?'':'/'+this.dcsid)+"/dcs.gif?";
	if (i18n){
		WT.dep=3D"";
	}
	for (var N in DCS){
 		if (DCS[N]&&(typeof DCS[N]!=3D"function")){
			P+=3Dthis.dcsA(N,DCS[N]);
		}
	}
	var keys=3D["co_f","vtid","vtvs","vt_f_tlv"];
	for (var i=3D0;i<keys.length;i++){
		var key=3Dkeys[i];
		if (WT[key]){
			P+=3Dthis.dcsA("WT."+key,WT[key]);
			delete WT[key];
		}
	}
	for (N in WT){
		if (WT[N]&&(typeof WT[N]!=3D"function")){
			P+=3Dthis.dcsA("WT."+N,WT[N]);
		}
	}
	for (N in DCSext){
		if (DCSext[N]&&(typeof DCSext[N]!=3D"function")){
			if (i18n){
				WT.dep=3D(WT.dep.length=3D=3D0)?N:(WT.dep+";"+N);
			}
			P+=3Dthis.dcsA(N,DCSext[N]);
		}
	}
	if (i18n&&(WT.dep.length>0)){
		P+=3Dthis.dcsA("WT.dep",WT.dep);
	}
	if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=3D0){
		P=3DP.substring(0,2040)+"&WT.tu=3D1";
	}
	this.dcsCreateImage(P);
	this.WT.ad=3D"";
}
WebTrends.prototype.dcsDebug=3Dfunction(){
	var t=3Dthis;
	var i=3Dt.images[0].src;
	var q=3Di.indexOf("?");
	var r=3Di.substring(0,q).split("/");
	var m=3D"<b>Protocol</b><br><code>"+r[0]+"<br></code>";
	m+=3D"<b>Domain</b><br><code>"+r[2]+"<br></code>";
	m+=3D"<b>Path</b><br><code>/"+r[3]+"/"+r[4]+"<br></code>";
	m+=3D"<b>Query =
Params</b><code>"+i.substring(q+1).replace(/\&/g,"<br>")+"</code>";
	=
m+=3D"<br><b>Cookies</b><br><code>"+document.cookie.replace(/\;/g,"<br>")=
+"</code>";
	if (t.w&&!t.w.closed){
		t.w.close();
	}
	=
t.w=3Dwindow.open("","dcsDebug","width=3D500,height=3D650,scrollbars=3Dye=
s,resizable=3Dyes");
	t.w.document.write(m);
	t.w.focus();
}
WebTrends.prototype.dcsCollect=3Dfunction(){
    if (this.enabled){
        this.dcsVar();
        this.dcsMeta();
        this.dcsAdv();
        this.dcsTag();
    }
}

function dcsMultiTrack(){
	if (typeof(_tag)!=3D"undefined"){
		return(_tag.dcsMultiTrack());
	}
}

function dcsDebug(){
	if (typeof(_tag)!=3D"undefined"){
		return(_tag.dcsDebug());
	}
}

Function.prototype.wtbind =3D function(obj){
	var method=3Dthis;
	var temp=3Dfunction(){
		return method.apply(obj,arguments);
	};
	return temp;
}
------=_NextPart_000_0000_01CA32EB.CE8C6050--

