// JavaScript Document

var frameOpen = false
var theWindow;
var timeOut = 0;

function showEvent (id, prefix) {
	theWindow = window.open(prefix + 'event.asp?show=' + id, 'eventWin', 'height=300, width=350, left=200, top=200');
	theWindow.focus();
	frameOpen = true;
}

function hideFrame() {
	theWindow.close();
	frameOpen = false;
}

/*
function showEvent (id) {
		eventFrame.location.href = 'event.asp?show=' + id
		if(document.getElementById) {
			document.getElementById('calEvent').style.display = 'block'
			frameOpen = true;
			tempDate = new Date;
			timeOut = tempDate.getTime()
			locX = 200
			locY = 200
			if(window.event) {
				locX = window.event.x
				locY = window.event.y
			}
			document.getElementById('calEvent').style.top = locY - 200 + "px"
			document.getElementById('calEvent').style.left = locX - 5 + "px"

			if(document.getElementById('calEvent').style.width + document.getElementById('calEvent').style.left > document.body.innerWidth) {
				document.getElementById('calEvent').style.left = document.getElementById('calEvent').style.left - document.getElementById('calEvent').style.width;
			}
		
		}
}
function hideFrame () {
	tempDate = new Date;
	if(document.getElementById && frameOpen && timeOut < (tempDate.getTime() - 50)) {
		document.getElementById('calEvent').style.display = 'none'
		frameOpen = false;
	}
} */
