masterPop = null;
function masterpop(URL,pwidth,pheight) {
	if (masterPop) {
		masterPop.close();
	}
	var features = 'width=' + pwidth + ',height=' + pheight + ',toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,top=20,left=20';
	masterPop = window.open(URL,"masterpop",features);
	masterPop.focus();
}

function masterpop_noscroll(URL,pwidth,pheight) {
	if (masterPop) {
		masterPop.close();
	}
	var features = 'width=' + pwidth + ',height=' + pheight + ',toolbar=no,directories=no,status=no,scrollbars=no,resize=no,menubar=no,top=20,left=20';
	masterPop = window.open(URL,"masterpop",features);
	masterPop.focus();
}

function masterpopprint(URL,pwidth,pheight) {
	if (masterPop) {
		masterPop.close();
	}
	var features = 'width=' + pwidth + ',height=' + pheight + ',toolbar=yes,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,top=20,left=20';
	masterPop = window.open(URL,"masterpop",features);
	masterPop.focus();
}

// ************* ADD TO NOTEBOOK FUNCTION ************************* //
function addtonotebook(URL,pwidth,pheight) {
	 //alert('[inactive]');
	 masterpop(URL,pwidth,pheight);
}
