// JavaScript Document
// Copies passed text to the clipboard
function copyToClipboard(text) {
	var range = document.body.createTextRange();
	range.findText(text);
	range.select();
	document.execCommand("Copy");
	document.execCommand("Unselect");
}

//clicks for the nav table cells.
function navigate (url, target) {
	if (target == "" || target == "_self")
		document.location.href= url;
	else 
		window.open(url, target);
}


popUpWin = "nowin";
function popWin(file, name, width, height, status, resizable, scrollable) {
	var h=height;
	var w=width;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status='+status+',resizable='+resizable+',scrollbars='+scrollable;
	popUpWin = window.open( file , name, winprops );
	popUpWin.focus();
}


function closePopUp() {
	if( popUpWin != "nowin" ) {
		if( !popUpWin.closed ) {
			popUpWin.close();
		}
	}
}
