var arrEventDate = new Array()
var arrEvent     = new Array()

function ShowAnyNewsEvents() { 
  var strNewsHeader = "<DIV CLASS='NewsHeader'>News &amp; Announcements:</DIV>"
  var strNewsEndTag = "</div>"
  var strNewsEvents = "<div class='NewsBoxSection'>"
  var blHasEvents   = new Boolean(false)
  var TodayDate     = new Date()

  for(i=0;i<=arrEventDate.length;i++) {
     if (arrEventDate[i] > TodayDate) {
        strNewsEvents = strNewsEvents + arrEvent[i]
        blHasEvents = true
     }
  }
  if (blHasEvents == true) {
     document.getElementById("News").innerHTML = strNewsHeader + strNewsEvents + strNewsEndTag
  }
}

function popImage(imageName){
// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth  = 430;
defaultHeight = 327;

// Set the horizontal and vertical position for the popup
var scrn;
if (navigator.appName == "Netscape")
   scrn = screen;
else
   scrn = window.screen;
var winleft = (scrn.width - defaultWidth) / 2;
var winUp = (scrn.height - defaultHeight) / 2;


// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = true;

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+winleft+',top='+winUp;
var optIE='scrollbars=no,width=150,height=100,left='+winleft+',top='+winUp;


 if (isNN){
    imgWin=window.open('about:blank','',optNN);}
 if (isIE){
    imgWin=window.open('about:blank','',optIE);}

 with (imgWin.document){
    writeln('<html><head><title>Loading....</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
    writeln('var isNN,isIE;');
    writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
    writeln('isNN=(navigator.appName=="Netscape")?1:0;');
    writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
    writeln('function reSizeToImage(){');
    writeln('if (isIE){');writeln('window.resizeTo(220,100);');
      writeln('width=220-(document.body.clientWidth-document.images[0].width);');
      writeln('height=100-(document.body.clientHeight-document.images[0].height)+20;');
      writeln('window.resizeTo(width,height);}');
    writeln('if (isNN){');       
      writeln('window.innerWidth=document.images["eSet"].width;');
      writeln('window.innerHeight=document.images["eSet"].height+20;}}');
    writeln('function doTitle(){document.title="ZoomIn Window";}');writeln('</sc'+'ript>');
    writeln('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
    if (!AutoClose) writeln('</head><body bgcolor="#B6B6CC" scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
    else writeln('</head><body bgcolor="#B6B6CC" scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
    writeln('<img name="eSet" src=gallery/'+imageName+'.jpg style="display:block"><DIV CLASS="smallbrown" ALIGN="RIGHT" VALIGN="CENTER"><A HREF="javascript:window.close();" CLASS="zoominlink">[x] close window</A>&nbsp;&nbsp;</DIV></body></html>');
    close();            
  }
}

function GenerateMailToLink(name, domain, suffix, linkText) {
   var emailAddress = name + "\u0040" + domain + "." + suffix;
   var url = "mailto:" + emailAddress;

   if(! linkText){
      linkText = emailAddress;
   }
   document.write("<a href=\"" + url + "\">" + linkText + "</a>");
}
