<!-- hide from old browsers
var win = null;
function openWindow(url, name, h, w) {
	// set the window coordinates for the popup
	if (window.screen) { 
		var xcoor = 60;
		var ycoor = 60;
		coordinates = ",left=" + xcoor + ",screenX=" + xcoor;
    	coordinates += ",top=" + ycoor + ",screenY=" + ycoor;
	}

	//if the parent window is closed, close the popup window
	closeDependantWindows();
	
	settings = 'height='+h+',innerHeight='+h+',width='+w+',innerWidth='+w+coordinates+',resizable=1,scrollbars=1,toolbar=1';

	win = window.open(url, name, settings);
	if(win.window.focus){
		win.window.focus();
	}
}

function closeWindow() {
  window.close();
}

function closeDependantWindows() {
  if (win && win.open && !win.closed) {
  	win.close();
  }
}
// end hiding from old browsers -->