function globalOnLoad() {
    // Assign link events
    for (var i = 0; i < document.links.length; i++) {
        if (document.links[i].className.match('popUp')) {
            document.links[i].onclick = function() { infoPopup(this.href); return false; }
        }
        if (document.links[i].className.match('External')) {
            document.links[i].onclick = function() { offsitePopup(this.href); return false; }
        }
        if (document.links[i].className.match('Enlargement')) {
            document.links[i].onclick = function() { enlargementPopup(this.href, this.title); return false; }
        }
    }

    // Run page onLoad function, if it exists
    if (typeof onLoad != 'undefined') {
        onLoad();
    }

}
function infoPopup(url) {
    var popUp = window.open(url, 'infoWindow', 'width=525,height=550,scrollbars=no,resizable=yes,menubar=no,toolbar=no,location=no');
    if (typeof popUp == 'object') {
        popUp.focus();
    }
}
function offsitePopup(url) {
    var popUp = window.open(url, 'offsiteWindow', 'width=750,height=500,scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,location=yes');
    if (typeof popUp == 'object') {
        popUp.focus();
    }
}

// Make sure the "FM" namespace object exists
if (typeof FM != 'object') {
    FM = new Object();
}

/**
 * Displays the specified URL in a new window with all menus, tools, and scrollbars
 *
 * @author  Dan Delaney     http://fluidmind.org/
 * @param   url             URL to display in the popup window
 * @param   width           (Optional) The width of the new popup window
 * @param   height          (Optional) The height of the new popup window
 * @param   windowName      (Optional) The name of the window
 */
FM.popup = function(url, width, height, windowName) {
    // Default to a 700 x 500 window
    width = (!isNaN(width) ? width + '' : '700');
    height = (!isNaN(height) ? height + '' : '500');
    windowName = (windowName == undefined || windowName == '' ? 'popup' : windowName);

    // Create it
    var popUp = window.open(url, windowName, 'width=' + width + ',height=' + height + ',scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,location=yes');

    // Bring it to the front
    if (typeof popUp == 'object') { popUp.focus(); }

}  // popup()

/**
 * Displays the specified URL in a new window with NO menus or tools, but with scrollbars
 *
 * @author  Dan Delaney     http://fluidmind.org/
 * @param   url             URL to display in the popup window
 * @param   width           (Optional) The width of the new popup window
 * @param   height          (Optional) The height of the new popup window
 * @param   windowName      (Optional) The name of the window
 */
FM.popupNoTools = function(url, width, height, windowName) {
    // Default to a 700 x 500 window
    width = (!isNaN(width) ? width + '' : '700');
    height = (!isNaN(height) ? height + '' : '500');
    windowName = (windowName == undefined || windowName == '' ? 'popup' : windowName);

    // Create it
    var popUp = window.open(url, windowName, 'width=' + width + ',height=' + height + ',scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no');

    // Bring it to the front
    if (typeof popUp == 'object') { popUp.focus(); }

}  // popupNoTools()

/**
 * Displays the specified URL in a new window with NO menus, tools OR scrollbars
 *
 * @author  Dan Delaney     http://fluidmind.org/
 * @param   url             URL to display in the popup window
 * @param   width           (Optional) The width of the new popup window
 * @param   height          (Optional) The height of the new popup window
 * @param   windowName      (Optional) The name of the window
 */
FM.popupNoScroll = function(url, width, height, windowName) {
    // Default to a 700 x 500 window
    width = (!isNaN(width) ? width + '' : '700');
    height = (!isNaN(height) ? height + '' : '500');
    windowName = (windowName == undefined || windowName == '' ? 'popup' : windowName);

    // Create it
    var popUp = window.open(url, windowName, 'width=' + width + ',height=' + height + ',scrollbars=no,resizable=no,menubar=no,toolbar=no,location=no');

    // Bring it to the front
    if (typeof popUp == 'object') { popUp.focus(); }

}  // popupNoScroll()

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function showNav() {
	if ($('activeCat')) {
		$('activeLink').style.visibility = 'hidden';
		Effect.PhaseIn('activeCat', { transition: Effect.Transitions.linear, duration: 1, fps: 100});
		//window.setTimeout("Effect.Appear('activeCat', { transition: Effect.Transitions.linear, duration: .5, fps: 100})",1500)
	}
}


function showEmailClick()
{
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
/* SAYS "click here" */
var aqbOtGPuSZeBjKK=["x69","110","x66","x6f","x74","x65","103","x40","103","109","97","x69","x6c","x2e","x63","111","x6d"];
var zzkLJxjPBQSoDCR=[" "];
var xYMzvaoxdHicKRW=["x63","x6c","x69","x63","x6b","x20","x68","101","x72","101"];
document.write("<a href=\"&#x6d;&#00097;&#x69;&#000108;&#x74;&#111;&#58;");
for (i=0; i<aqbOtGPuSZeBjKK.length; i++) document.write("&#"+aqbOtGPuSZeBjKK[i]+";");
for (i=0; i<zzkLJxjPBQSoDCR.length; i++) document.write(zzkLJxjPBQSoDCR[i]);
document.write("\">");
for (i=0; i<xYMzvaoxdHicKRW.length; i++) document.write("&#"+xYMzvaoxdHicKRW[i]+";");
document.write('</a>');
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
}


function showEmail()
{
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
var BWtJeUhgbJVATXa=["105","x6e","x66","111","x74","x65","x67","64","103","x6d","x61","105","x6c","x2e","x63","x6f","x6d"];
var HAHWbnhkrBbXAHu=[" "];
var WXuiIkoAoheZsIS=["105","x6e","102","x6f","x74","x65","x67","x40","x67","109","x61","105","108","x2e","x63","111","x6d"];
document.write("<a href=\"&#x6d;&#x61;&#000105;&#108;&#x74;&#000111;&#x3a;");
for (i=0; i<BWtJeUhgbJVATXa.length; i++) document.write("&#"+BWtJeUhgbJVATXa[i]+";");
for (i=0; i<HAHWbnhkrBbXAHu.length; i++) document.write(HAHWbnhkrBbXAHu[i]);
document.write("\">");
for (i=0; i<WXuiIkoAoheZsIS.length; i++) document.write("&#"+WXuiIkoAoheZsIS[i]+";");
document.write('</a>');
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
}





addLoadEvent(showNav);
addLoadEvent(globalOnLoad);

