function showMenu(elemID,flag) {
	if (flag == "1") {
		document.getElementById(elemID).style.display = "block";
	} else {
		document.getElementById(elemID).style.display = "none";
	}
}

function getMouseCoords(e)
{
	var position = new Array(2);
	position[1] = 0;
	position[2] = 0;

	if (!e) var e = window.event;
	if (e.pageX || e.pageY) {
		position[1] = e.pageX;
		position[2] = e.pageY;
	}
	else if (e.clientX || e.clientY) {
		position[1] = e.clientX + document.body.scrollLeft;
		position[2] = e.clientY + document.body.scrollTop;
	} 
	return position;
}

function showStats(elemID,flag,e) {
	if (flag == '1') {
		var mouse = getMouseCoords(e);
		var noPx = document.childNodes ? 'px' : 0;
		document.getElementById(elemID).style.left = mouse[1] + noPx;
		document.getElementById(elemID).style.top = mouse[2] + noPx;
		document.getElementById(elemID).style.display = "inline";
	} else {
		document.getElementById(elemID).style.display = "none";
	}
}

function showCam1(){
    newWindow("http://app.mlfnow.org/tracker/view/videoScreen.jsp?show=webcam1");
}

function showCam2(){
     newWindow("http://app.mlfnow.org/tracker/view/videoScreen.jsp?show=webcam2");
}

function showVideo2(){
     newWindow("http://app.mlfnow.org/tracker/view/videoScreen.jsp?show=video2");
}

function showVideo(){
    newWindow("http://app.mlfnow.org/tracker/view/videoScreen.jsp?show=video");
}

function newWindow(newContent){
    videoWin = window.open(newContent, 'videoWin', 'right=0,top=20,width=420,height=340,toolbar=no,scrollbars=no,resizable=no');
    videoWin.focus()
}
