// JavaScript Document
function dosearch() {
var sf=document.searchform;
var submitto = sf.sengine.value + escape(sf.searchterms.value);
window.location.href = submitto;
return false;
}
function mmLoadMenus() {
  if (window.mm_menu_0911120551_0) return;
  window.mm_menu_0911120551_0 = new Menu("root",142,18,"Verdana, Arial, Helvetica, sans-serif",12,"#cc9966","#ffcc00","#000000","#666666","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0911120551_0.addMenuItem("Contact&nbsp;Information","location='http://www.hongwanjimissionschool.org/contact/contact.html'");
  mm_menu_0911120551_0.addMenuItem("Links","location='http://www.hongwanjimissionschool.org/contact/links.html'");
   mm_menu_0911120551_0.fontWeight="bold";
   mm_menu_0911120551_0.hideOnMouseOut=true;
   mm_menu_0911120551_0.menuBorder=1;
   mm_menu_0911120551_0.menuLiteBgColor='#ffffff';
   mm_menu_0911120551_0.menuBorderBgColor='#555555';
   mm_menu_0911120551_0.bgColor='#555555';
  window.mm_menu_0911115042_1 = new Menu("root",138,18,"Verdana, Arial, Helvetica, sans-serif",12,"#cc9966","#ffcc00","#000000","#666666","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);    mm_menu_0911115042_1.addMenuItem("HMS&nbsp;Videos","location='http://www.hongwanjimissionschool.org/media/video.html'");
  mm_menu_0911115042_1.addMenuItem("Downloads","location='http://www.hongwanjimissionschool.org/media/downloads.html'");
   mm_menu_0911115042_1.fontWeight="bold";
   mm_menu_0911115042_1.hideOnMouseOut=true;
   mm_menu_0911115042_1.menuBorder=1;
   mm_menu_0911115042_1.menuLiteBgColor='#ffffff';
   mm_menu_0911115042_1.menuBorderBgColor='#555555';
   mm_menu_0911115042_1.bgColor='#555555';
    window.mm_menu_0911115428_2 = new Menu("root",196,18,"Verdana, Arial, Helvetica, sans-serif",12,"#cc9966","#ffcc00","#000000","#666666","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0911115428_2.addMenuItem("Online&nbsp;Parent&nbsp;Guide","location='http://www.hongwanjimissionschool.org/parents/parent.html'");
  mm_menu_0911115428_2.addMenuItem("Dharma&nbsp;Corner","location='http://www.hongwanjimissionschool.org/parents/dharma.html'");
  mm_menu_0911115428_2.addMenuItem("HMS&nbsp;Edline","location='http://www.edline.net'");
  mm_menu_0911115428_2.addMenuItem("HMS&nbsp;PTO","location='http://www.hongwanjimissionschool.org/parents/pto.html'");
  mm_menu_0911115428_2.addMenuItem("School&nbsp;Board","location='http://www.hongwanjimissionschool.org/parents/board.html'");
  mm_menu_0911115428_2.addMenuItem("HMS&nbsp;Calendar","location='http://www.hongwanjimissionschool.org/downloads/calendar.pdf'");
   mm_menu_0911115428_2.fontWeight="bold";
   mm_menu_0911115428_2.hideOnMouseOut=true;
   mm_menu_0911115428_2.menuBorder=1;
   mm_menu_0911115428_2.menuLiteBgColor='#ffffff';
   mm_menu_0911115428_2.menuBorderBgColor='#555555';
   mm_menu_0911115428_2.bgColor='#555555';
     window.mm_menu_0911115228_3 = new Menu("root",145,18,"Verdana, Arial, Helvetica, sans-serif",12,"#cc9966","#ffcc00","#000000","#666666","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0911115228_3.addMenuItem("Head&nbsp;of&nbsp;School","location='http://www.hongwanjimissionschool.org/school/hos.html'");
  mm_menu_0911115228_3.addMenuItem("Curriculum","location='http://www.hongwanjimissionschool.org/school/curriculum.html'");
    mm_menu_0911115228_3.addMenuItem("21st&nbsp;Century&nbsp;School","location='http://www.hongwanjimissionschool.org/school/21stcentury.html'");
  mm_menu_0911115228_3.addMenuItem("Preschool","location='http://www.hongwanjimissionschool.org/teachers/preschool.html'");
  mm_menu_0911115228_3.addMenuItem("Grade&nbsp;School","location='http://www.hongwanjimissionschool.org/teachers/grades.html'");
  mm_menu_0911115228_3.addMenuItem("Middle&nbsp;School","location='http://www.hongwanjimissionschool.org/teachers/middle.html'");
  mm_menu_0911115228_3.addMenuItem("Resource&nbsp;Classes","location='http://www.hongwanjimissionschool.org/teachers/resource.html'");
  mm_menu_0911115228_3.addMenuItem("After&nbsp;School&nbsp;Classes","location='http://www.hongwanjimissionschool.org/school/after.html'");
  mm_menu_0911115228_3.addMenuItem("Sports","location='http://www.hongwanjimissionschool.org/school/sports.html'");
  mm_menu_0911115228_3.addMenuItem("Summer&nbsp;School","location='http://www.hongwanjimissionschool.org/school/summer.html'");
  mm_menu_0911115228_3.addMenuItem("Student&nbsp;Council","location='http://www.hongwanjimissionschool.org/school/studentcouncil.html'");
   mm_menu_0911115228_3.fontWeight="bold";
   mm_menu_0911115228_3.hideOnMouseOut=true;
   mm_menu_0911115228_3.menuBorder=1;
   mm_menu_0911115228_3.menuLiteBgColor='#ffffff';
   mm_menu_0911115228_3.menuBorderBgColor='#555555';
   mm_menu_0911115228_3.bgColor='#555555';
  window.mm_menu_0911120018_4 = new Menu("root",144,18,"Verdana, Arial, Helvetica, sans-serif",12,"#cc9966","#ffcc00","#000000","#666666","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0911120018_4.addMenuItem("HMS&nbsp;Breaking&nbsp;News","location='http://www.hongwanjimissionschool.org/news/news.html'");
  mm_menu_0911120018_4.addMenuItem("HMS&nbsp;Events","location='http://www.hongwanjimissionschool.org/news/events.html'");
  mm_menu_0911120018_4.addMenuItem("HMS&nbsp;Events&nbsp;Gallery","location='http://www.hongwanjimissionschool.org/gallery'");
  mm_menu_0911120018_4.addMenuItem("HMS&nbsp;Fundraisers","location='http://www.hongwanjimissionschool.org/news/fundraisers.html'");
   mm_menu_0911120018_4.fontWeight="bold";
   mm_menu_0911120018_4.hideOnMouseOut=true;
   mm_menu_0911120018_4.menuBorder=1;
   mm_menu_0911120018_4.menuLiteBgColor='#ffffff';
   mm_menu_0911120018_4.menuBorderBgColor='#555555';
   mm_menu_0911120018_4.bgColor='#555555';
  window.mm_menu_0911120308_5 = new Menu("root",179,18,"Verdana, Arial, Helvetica, sans-serif",12,"#cc9966","#ffcc00","#000000","#666666","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0911120308_5.addMenuItem("Admissions&nbsp;Info","location='http://www.hongwanjimissionschool.org/admiss/admissions.html'");
  mm_menu_0911120308_5.addMenuItem("Pre&nbsp;&amp;&nbsp;K&nbsp;Admissions","location='http://www.hongwanjimissionschool.org/admiss/preadmin.html'");
  mm_menu_0911120308_5.addMenuItem("Grade&nbsp;School&nbsp;Admissions","location='http://www.hongwanjimissionschool.org/admiss/gradeadmin.html'");
  mm_menu_0911120308_5.addMenuItem("Middle&nbsp;School&nbsp;Admissions","location='http://www.hongwanjimissionschool.org/admiss/Midadmin.html'");
   mm_menu_0911120308_5.fontWeight="bold";
   mm_menu_0911120308_5.hideOnMouseOut=true;
   mm_menu_0911120308_5.menuBorder=1;
   mm_menu_0911120308_5.menuLiteBgColor='#ffffff';
   mm_menu_0911120308_5.menuBorderBgColor='#555555';
   mm_menu_0911120308_5.bgColor='#555555';
  window.mm_menu_0911113911_7 = new Menu("root",163,18,"Verdana, Arial, Helvetica, sans-serif",12,"#cc9966","#ffcc00","#000000","#666666","left","middle",3,0,1000,-5,7,true,true,true,0,false,true);
  mm_menu_0911113911_7.addMenuItem("History","location='http://www.hongwanjimissionschool.org/abouthms/history.html'");
  mm_menu_0911113911_7.addMenuItem("About&nbsp;HMS","location='http://www.hongwanjimissionschool.org/abouthms/about.html'");
  mm_menu_0911113911_7.addMenuItem("Vision&nbsp;&amp;&nbsp;Mission","location='http://www.hongwanjimissionschool.org/abouthms/vismis.html'");
  mm_menu_0911113911_7.addMenuItem("Buddhist&nbsp;Philosophy","location='http://www.hongwanjimissionschool.org/abouthms/buddhist.html'");
   mm_menu_0911113911_7.fontWeight="bold";
   mm_menu_0911113911_7.hideOnMouseOut=true;
   mm_menu_0911113911_7.menuBorder=1;
   mm_menu_0911113911_7.menuLiteBgColor='#ffffff';
   mm_menu_0911113911_7.menuBorderBgColor='#555555';
   mm_menu_0911113911_7.bgColor='#555555';
 
  mm_menu_0911113911_7.writeMenus();

} // mmLoadMenus()

/***********************************************
* Contractible Headers script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}

function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
}

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("switchcontent")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
}


if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate
