var win = null;

function NewWindow(mypage,myname,w,h,scroll) {
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'; 
	win = window.open(mypage,myname,settings);
}

function checkoff(name,total) {
	for(i = 1; i <= total; i++) {
		if(document.mainform.name.checked = true) {
			eval("document.mainform." + name + i + ".disabled=false;");
		}
		else {
			eval("document.mainform." + name + i + ".disabled=true;");
		}
	}
}

function openapp() {
	window.open('http://online.natconline.com/');
}

function checkwindow(application) {
	if(!(newwindow)) {
		alert("The "+application+" page has been blocked!"+"\n\n"+"This is usually a result of a popup blocker program installed on your computer.  With most programs, you can hold down the \"CTRL\" key while clicking the \"Connect\" button in the Customer Access menu again to allow only this pop-up page to open. "+"\n\n"+" Alternatively, you can add this site to the trusted list on your pop-up blocker software.");
	}
}
