function Contact(pIndex) {

  document.write('<a href="Contact.aspx" onmouseover="this.href=ContactLink(' + pIndex + ')">');

  var x = '';
       if (pIndex ==  1) {x = 'subscribe'}
  else if (pIndex ==  2) {x = 'unsubscribe'}
  else if (pIndex ==  3) {x = 'info'}
  else if (pIndex ==  4) {x = 'unsubscribe'}
  else if (pIndex ==  5) {x = 'stephen2'}
  else if (pIndex ==  6) {x = 'judith2'};
  document.write('<img border=0 align="top" src="images/EM/' + x + '.gif" align="top" ');
	document.write('onMouseOver="this.src=\'images/EM/' + x + 'H.gif\'" ');
	document.write('onmouseout="this.src=\'images/EM/' + x + '.gif\'">');

  document.write('</a>');

};

function ContactLink(pIndex) {

  var x = '';
       if (pIndex ==  1) {x = 'mai#csubscribe#algbtran#dorg?subject=SUBSCRIBE'}
  else if (pIndex ==  2) {x = 'mai#csubscribe#algbtran#dorg?subject=UNSUBSCRIBE'}
  else if (pIndex ==  3) {x = 'mai#cinfo#algbtran#dorg'}
  else if (pIndex ==  4) {x = 'mai#csubscribe#adepaulcommunitychorus#dorg?subject=UNSUBSCRIBE'}
  else if (pIndex ==  5) {x = 'mai#cdirector#adepaulcommunitychorus#dorg'}
  else if (pIndex ==  6) {x = 'mai#cjkarzen#adepaul#dedu'};

  x = x.replace('#c', 'lto:');
  x = x.replace('#a', '@');
  x = x.replace('#d', '.');

  return(x);

}

// Video Player //

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}

function ShowVideo() {

    // Set up the blue background
    var xVideoBlue = document.getElementById('VideoBlue');
	xVideoBlue.style.height = getDocHeight().toString() + 'px';
    xVideoBlue.style.visibility = 'visible';


    // Center the video player window
    var xVideoWindow = document.getElementById('VideoWindow');
    xVideoWindow.style.left = ((document.documentElement.clientWidth - 620) / 2).toString() + 'px';
    xVideoWindow.style.top = (document.documentElement.scrollTop + 20).toString() + 'px';

    // Show the video player window
    xVideoWindow.style.visibility = 'visible';
}

function CloseVideo() {
    document.getElementById('VideoWindow').style.visibility = 'hidden';
    document.getElementById('VideoBlue').style.visibility = 'hidden';
}
