﻿popMenus = new Array('about','chapter','membership','services','news');

function popShow(menu) {
  rollOver(menu); 
  if (document.all) {
    document.all[menu+'Pop'].style.visibility = 'visible';
  } else if (document.getElementById) {
    document.getElementById(menu+'Pop').style.visibility = 'visible';
  }
  popHide(menu);
}

function popHide(openMenu) {
  for (n=0; n<popMenus.length; n++) {
    if (popMenus[n] != openMenu) {
      if (document.all) {
        document.all[popMenus[n]+'Pop'].style.visibility = 'hidden';
      } else if (document.getElementById) {
        document.getElementById(popMenus[n]+'Pop').style.visibility = 'hidden';
      }
      rollOut(popMenus[n]); 
    }
  }
}

function rollOver(button) {
  if (document.all) {
    document.all[button+'Btn'].className = 'navOver';
  } else if (document.getElementById) {
    document.getElementById(button+'Btn').className = 'navOver';
  }
}

function rollOut(button) {
  if (document.all) {
    document.all[button+'Btn'].className = 'navOut';
  } else if (document.getElementById) {
    document.getElementById(button+'Btn').className = 'navOut';
  }
}

function presentFlash(flashSource, bgColor, width, height, wmode, flashVars) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ width +'" height="'+ height +'" id="'+ flashSource +'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain">');
	document.write('<param name="movie" value="/images/'+ flashSource +'.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="bgcolor" value="'+ bgColor +'">');
	document.write('<param name="menu" value="false">');
	document.write('<param name="wmode" value="'+ wmode +'">');
	document.write('<param name="flashvars" value="'+ flashVars +'">');
	document.write('<embed src="/images/'+ flashSource +'.swf" flashvars="'+ flashVars +'" menu="false" wmode="'+ wmode +'" quality="high" bgcolor="'+ bgColor +'" width="'+ width +'" height="'+ height +'" name="'+ flashSource +'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer">');
	document.write('</object>');
}

var OpenedOnce = false

function OpenWindow(page_url, lgImgW, lgImgH) {

	if (OpenedOnce) {
		window1.close()
	}

	window1 = window.open(page_url,"window1","scrollbars=yes,resizable=yes,width="+lgImgW+",height="+lgImgH)
	OpenedOnce = true
}

