﻿//Opens new window that is centered on the screen with the appropriate URL
//Parameters:  'mypage' is the name of the new window
//             'w' and 'h' are the width and height of the window
function NewWindow(mypage, w, h)
{
	var scroll = 'yes';
	myname = 'enc_NewWin';
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;	
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',location=yes,directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes';
	win = window.open(mypage, myname, winprops)
}

function toggleDisplay(elementObj)
{
	var parentNodeObj = elementObj.parentNode;

	for (i=0; i < parentNodeObj.childNodes.length; i++){
		if(parentNodeObj.childNodes[i].nodeType == 1){
			if(parentNodeObj.childNodes[i].style.display=="none"){
				parentNodeObj.childNodes[i].style.display = "";
			}else{
				parentNodeObj.childNodes[i].style.display = "none";
			}
		}
	}
	return false;
}
