// Copyright © 1998, 2012, Oracle and/or its affiliates.  All rights reserved.
function keyPressHandler(e) {
	//alert("press1");
	var kC = (window.event) ?    // MSIE or Firefox?
                 event.keyCode : e.keyCode;
	var Esc = (window.event) ?
                27 : e.DOM_VK_ESCAPE // MSIE : Firefox
	if (kC == Esc) {
	if(parent.parent.isOpenDialog)
		if (parent.parent.isOpenDialog()) {
			parent.parent.closeDialog();
			return
			}
			if (parent.parent.parent.parent.isOpenDialog) {
				if (parent.parent.parent.parent.isOpenDialog())
					parent.parent.parent.parent.closeDialog();
		return;
			}
	
			
	}
}