var lovechild="";

function openWindow( picNum, groupNum ) {

//alert( "opening window: " + picNum + ", " + groupNum );

var myHref = "popup.html?pic=" + picNum + "&group=" + groupNum + "";
//alert( "link: " + myHref );

	if ( !lovechild.closed ) {
		lovechild = window.open( myHref, "pocket", "width=740, height=630" );
		lovechild.focus();
		// this will happen if the window has been closed...
	} else if ( lovechild.closed ) { 
		lovechild = window.open( myHref, "pocket", "width=740, height=630" );
		lovechild.focus();
	}

}
 


