/*---------------------------------------------------------------
 (c) 2008 Divine Savior United Methodist Church
     5702 South Hill Drive, Madison, WI  53705
     (608) 238-7753, dsumc@wisconsinumc.org

 TITLE: Divine Savior United Methodist Church (ds.js)
 URL..: www.divinesaviorumc.org
 DATA.: This file uses J-script
 Notes: This file only for the menus and other things needed on every page
---------------------------------------------------------------*/

function postPop()
{
  if (safeToPop == 1) {
    if (oPopupUp == 1){
      oPopup.hide();
      window.status = " ";
      oPopupUp = 0;
    }
  } /* end if safeToPop */
 }


function initializePop() {
  /* Check for the browswer. Anything associated with the Popup object can only be run if it's IE, ie safeToPop=1 */
  safeToPop = 0;
  if (navigator.appName == 'Microsoft Internet Explorer') {
    safeToPop = 1;
    oPopupUp = 0;
    oPopup = window.createPopup();
    oPopBody = oPopup.document.body;
    oPopBody.style.backgroundColor = "#D5E7F8";
    oPopBody.style.fontFamily = "Arial";
  }
}


function popAbout()
{
if (safeToPop == 1) {
  var aboutHTM = "<table width=\"150px\" class=\"menuData\" style=\"font-size:10pt;\" onmouseout=\"parent.window.status = \' \';\"><tr><td align=\"center\" valign=\"middle\" style=\"font-size:12pt; font-family:Franklin Gothic Medium; color:#6990B5\"><span onmouseover=\"parent.window.status = \'about.htm\';\" onclick=\"parent.location.href=\'about.htm\';\" style=\"cursor:hand\"><em>&nbsp&nbsp&nbspAbout</em></span></td></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'welcome.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'welcome.htm\'\">Welcome Message</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'staff.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'staff.htm\'\">Meet the Staff</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'worship.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'worship.htm\'\">Worship</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'directions.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'directions.htm\'\">Directions</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'history.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'history.htm\'\">Our History</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'links.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'links.htm\'\">External Links</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'contact.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'contact.htm\'\">Contact Us</td></span></tr></table>";
  oPopupUp = 1; /* flag that menu is displayed; checked later so we don't 'undisplay' it when we don't need to */
  oPopBody.innerHTML = aboutHTM;
  oPopup.show(0, 0, 300, 0); /* display it hiddden to measure the right height */
  var realHeight = oPopBody.scrollHeight;
  var realWidth = oPopBody.scrollWidth;
  oPopup.hide();
  oPopup.show(-10, -3, realWidth/2, realHeight, event.srcElement.parentElement);  /* -10 is because this is on the far left and so must cover white-space of border jpg */
  } /* end if safeToPop */
}

function popMin()
{
if (safeToPop == 1) {
  var minHTM = "<table width=\"150px\" class=\"menuData\" style=\"font-size:10pt;\" onmouseout=\"parent.window.status = \' \';\"><tr><td align=\"center\" valign=\"middle\" style=\"font-size:12pt; font-family:Franklin Gothic Medium; color:#6990B5\"><span onmouseover=\"parent.window.status = \'ministries.htm\';\" onclick=\"parent.location.href=\'ministries.htm\';\" style=\"cursor:hand\"><em>&nbspMinistries</em></span></td></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'music.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'music.htm\'\">Music</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'youngadult.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'youngadult.htm\'\">Young Adult Group</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'umw.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'umw.htm\'\">UMW</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'mensgroup.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'mensgroup.htm\'\">Men\'s Group</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'fsj.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'fsj.htm\'\">Faith & Social Justice</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'stewardship.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'stewardship.htm\'\">Stewardship</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'community.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'community.htm\'\">Community Outreach</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'mission.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'mission.htm\'\">Mission Partnership</td></span></tr></table>";
  oPopupUp = 1; /* flag that menu is displayed; checked later so we don't 'undisplay' it when we don't need to */
  oPopBody.innerHTML = minHTM;
  oPopup.show(0, 0, 300, 0); /* display it hiddden to measure the right height */
  var realHeight = oPopBody.scrollHeight;
  var realWidth = oPopBody.scrollWidth;
  oPopup.hide();
  oPopup.show(0, -3, realWidth/2, realHeight, event.srcElement.parentElement);
  } /* end if safeToPop */
}

function popEdu()
{
if (safeToPop == 1) {
  var eduHTM = "<table width=\"150px\" class=\"menuData\" style=\"font-size:10pt;\" onmouseout=\"parent.window.status = \' \';\"><tr><td align=\"center\" valign=\"middle\" style=\"font-size:12pt; font-family:Franklin Gothic Medium; color:#6990B5\"><span onmouseover=\"parent.window.status = \'education.htm\';\" onclick=\"parent.location.href=\'education.htm\';\" style=\"cursor:hand\"><em>&nbspEducation</em></span></td></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'prekto5edu.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'prekto5edu.htm\'\">Preschool to 5th Grade</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'middleschooledu.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'middleschooledu.htm\'\">Middle School</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'seniorhighedu.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'seniorhighedu.htm\'\">Senior High</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'adultsundayedu.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'adultsundayedu.htm\'\">Adult Sunday School</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'studies.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'studies.htm\'\">Seasonal Studies</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'library.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'library.htm\'\">The Library</td></span></tr></table>";
  oPopupUp = 1; /* flag that menu is displayed; checked later so we don't 'undisplay' it when we don't need to */
  oPopBody.innerHTML = eduHTM;
  oPopup.show(0, 0, 300, 0); /* display it hiddden to measure the right height */
  var realHeight = oPopBody.scrollHeight;
  var realWidth = oPopBody.scrollWidth;
  oPopup.hide();
  oPopup.show(0, -3, realWidth/2, realHeight, event.srcElement.parentElement);
  } /* end if safeToPop */
}

function popKid()
{
if (safeToPop == 1) {
  var kidHTM = "<table width=\"150px\" class=\"menuData\" style=\"font-size:10pt;\" onmouseout=\"parent.window.status = \' \';\"><tr><td align=\"center\" valign=\"middle\" style=\"font-size:12pt; font-family:Franklin Gothic Medium; color:#6990B5\"><span onmouseover=\"parent.window.status = \'youth.htm\';\" onclick=\"parent.location.href=\'youth.htm\';\" style=\"cursor:hand\"><em>&nbspKids & Youth</em></span></td></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'aplacetogrow.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'aplacetogrow.htm\'\">Preschool & Child Care</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'youthactivities.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'youthactivities.htm\'\">Youth Activities</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'vbs.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'vbs.htm\'\">Vacation Bible School</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'mastershands.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'mastershands.htm\'\">The Master\'s Hands</td></span></tr></table>";
  oPopupUp = 1; /* flag that menu is displayed; checked later so we don't 'undisplay' it when we don't need to */
  oPopBody.innerHTML = kidHTM;
  oPopup.show(0, 0, 300, 0); /* display it hiddden to measure the right height */
  var realHeight = oPopBody.scrollHeight;
  var realWidth = oPopBody.scrollWidth;
  oPopup.hide();
  oPopup.show(0, -3, realWidth/2, realHeight, event.srcElement.parentElement);
  } /* end if safeToPop */
}

function popNews()
{
if (safeToPop == 1) {
  var newsHTM = "<table width=\"150px\" class=\"menuData\" style=\"font-size:10pt;\" onmouseout=\"parent.window.status = \' \';\"><tr><td align=\"center\" valign=\"middle\" style=\"font-size:12pt; font-family:Franklin Gothic Medium; color:#6990B5\"><span onmouseover=\"parent.window.status = \'news.htm\';\" onclick=\"parent.location.href=\'news.htm\';\" style=\"cursor:hand\"><em>News</em></span></td></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'newsletter.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'newsletter.htm\'\">Newsletter</td></span></tr><tr onmouseover=\"this.style.backgroundColor=\'6990B5\';\" onmouseout=\"this.style.backgroundColor=\'#D5E7F8\'\"><span onmouseout=\"parent.window.status = \' \';\" onclick=\"parent.location.href=\'listserv.htm\'\"><td style=\"cursor:hand\" onmouseout=\"this.style.color = \'black\'\" onmouseover=\"this.style.color = \'white\'; parent.window.status = \'listserv.htm\'\">Join the Listserv</td></span></tr></table>";
  oPopupUp = 1; /* flag that menu is displayed; checked later so we don't 'undisplay' it when we don't need to */
  oPopBody.innerHTML = newsHTM;
  oPopup.show(0, 0, 300, 0); /* display it hiddden to measure the right height */
  var realHeight = oPopBody.scrollHeight;
  var realWidth = oPopBody.scrollWidth;
  oPopup.hide();
  oPopup.show(0, -3, realWidth/2, realHeight, event.srcElement.parentElement);
  } /* end if safeToPop */
}


function postPopFrame()
{
  if (safeToPop == 1) {
    parent.oPopup.hide();
  } /* end if safeToPop */
}