// util.js
//  useful javascript functions

// include one html page inside another
function doInclude(id, url) {
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id + "passed to clientSideInclude. You need a div or span element with this id in your page.");
  return;
 }
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Sorry, your browser does not support " +
      "XMLHTTPRequest objects. This page requires " +
      "Internet Explorer 5 or better for Windows, " +
      "or Firefox for any system, or Safari. Other " +
      "compatible browsers may also exist.";
  }
}

//Popup notice
//<tr>
//									<td align="right" valign="top">January 23</td>
//									<td><b>Annual Awards Banquet</b><br>
//											&nbsp;&nbsp;Saanich Fairgrounds Hall<br>
//                      &nbsp;&nbsp;<a href="javascript:showInfo('banquet.html')"> Click here</a> for more information
//                  </td>
//								</tr>

function showInfo(fileName) {
	infoWindow = window.open(fileName,'win2','width=450, height=300, titlebar=0, toolbar=0, menubar=0, location=0, status=0, scrollbars=1, resizable=0, left=40, top=40'); 	
}
