<!--hide this script from non-javascript-enabled browsers

//////////////////////////////////////////////////////////
//
// Green Chemistry
//
// Produced by Presenting Science
//  www.PresentingScience.com
//
// Copyright (C) Royal Society of Chemistry
//
//////////////////////////////////////////////////////////

function doPrint() {
	parent.contentsFrame.focus();
	parent.contentsFrame.print();
}


//////////////////////////////////////////////////////////
//
// Pop-up windows for glossary, principles and structures
//
//////////////////////////////////////////////////////////

var glossaryWin = null;

function doGlossary(url) {
	if (glossaryWin && !glossaryWin.closed) {
		glossaryWin.focus();
		 glossaryWin.location = url;
	}
	else {
                var w = 640;
                var h = 330;
                var l = (screen.width - w)/2;
                var t = (screen.height - h)/2;
		glossaryWin = window.open(url,
			"glossary",
			"status=no,scrollbars=yes,resizable=yes,"+
			"width="+w+",height="+h+
			",top="+t+",left="+l+
                        ",screenY="+t+",screenX="+l);
	}
}

var structureWin = null;

function doStructure(url) {
        if (url.length==0)
            url = "structure/index.htm";
        else
            url = "../structure/index.htm?"+url;

	if (structureWin && !structureWin.closed) {
                structureWin.location = url;
		structureWin.focus();
        }
	else {
                var w = 340;
                var h = 340;
                var l = (screen.width - w)/2;
                var t = (screen.height - h)/2;
		structureWin = window.open(url,
			"structure",
			"status=no,scrollbars=yes,resizable=yes,"+
			"width="+w+",height="+h+
			",top="+t+",left="+l+
                        ",screenY="+t+",screenX="+l);

       		structureWin.focus();
	}
}

function closePopUps() {
	if (structureWin && !structureWin.closed) {
            structureWin.close();
        }
	if (glossaryWin && !glossaryWin.closed) {
           glossaryWin.close();
        }
}

// stop hiding -->
