var childWindow;
function openChildWindow(url, winName, winAttribs) {
    if (!childWindow||childWindow) {
		// if a windows isn't already open
		if (winAttribs=="") {        
			// default attributes
	        var winTop=screen.height/8;
	        var winLeft=screen.width/8;
	        var winHeight="600";
	        var winWidth="750";
	        
	        winAttribs="dependent,toolbar=no,scrollbars=yes,resizable=yes,status=yes,top="+winTop+
	        				",left="+winLeft+",height="+winHeight+",width="+winWidth;
		}
		if (winName=="") {
			// default window name
			winName="childWindow";
		}  
        childWindow = window.open(url, winName, winAttribs);
  
        if (!childWindow.opener) {
        	// if this window isn't recognized as the opener, set it
        	childWindow.opener=window;
        }
    } else {
    	// use the child window that exists
        childWindow.href=url;
        childWindow.focus();
    }
}
