function loadImages() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
}
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
      }
   }
}

function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 




x = 0;
y = 0;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}

function spaminatormod() {
	var email = "ben"
	var emailHost = "incedo.ca"
	document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+ ">")
}

function getStyleObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
		return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
		return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
		return document.layers[objectId];
    } else {
		return false;
    }
}

function changeObjectVisibility(objectId, newVisibility) {
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
		styleObject.visibility = newVisibility;
		return true;
    } else {
		return false;
    }
}
function moveObject(objectId, newXCoordinate, newYCoordinate) {
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
		styleObject.left = newXCoordinate;
		styleObject.top = newYCoordinate;
		return true;
    } else {
		return false;
    }
}

function showPopup (targetObjectId, eventObj) {
    if(eventObj) {
		hideCurrentPopup();
		eventObj.cancelBubble = true;
		if( changeObjectVisibility(targetObjectId, 'visible') ) {
		    window.currentlyVisiblePopup = targetObjectId;
		    return true;
		} else {
		    return false;
		}
    } else {
		return false;
    }
}

function hideCurrentPopup() {
    if(window.currentlyVisiblePopup) {
		changeObjectVisibility(window.currentlyVisiblePopup, 'hidden');
		window.currentlyVisiblePopup = false;
    }
}

window.onload = initializeHacks;
document.onclick = hideCurrentPopup;

function initializeHacks() {
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
		window.onresize = explorerMacResizeFix;
    }
    resizeBlankDiv();
    createFakeEventObj();
}

function createFakeEventObj() {
    if (!window.event) {
		window.event = false;
    }
}

function resizeBlankDiv() {
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
		getStyleObject('blankDiv').width = document.body.clientWidth - 20;
		getStyleObject('blankDiv').height = document.body.clientHeight - 20;
    }
}

function explorerMacResizeFix () {
    location.reload(false);
}