// Show modal dialog and return a result (if any)
//
// Parameters :
// url - url to a page to open
// height - modal window height
// width - modal window width
// resizable - yes/no or 1/0 or on/off
// scroll - yes/no or  1/0 or on/off 
//
// E.g.:
//  var diagResult = ShowModalDialog( url, "435px", "400px", "no", "yes" );
function ShowModalDialog( url, height, width, resizable, scroll )
{
    return ShowModalDialogArg( url, height, width, resizable, scroll, "");
}

// same with the argument parameter
function ShowModalDialogArg( url, height, width, resizable, scroll, argument )
{
    return window.showModalDialog( url, argument, 
	 "dialogHeight:" + height + ";dialogWidth:" + width + 
	 ";resizable:" + resizable + ";scroll:" + scroll +
	 ";edge:raised;help:no;status:no;center:yes;" );
}

function launchPopup( url ){
	var width
	var height
	var leftdist
	var topdist
	width = screen.width;
	height = screen.height;
	leftdist = Math.round((width - 750) / 2);
	topdist = Math.round((height - 550) / 2);
	window.open(url,'imageViewer','width=750,height=550,top='+topdist+',left='+leftdist+',center=YES,help=NO,resizable=NO,menubar=NO,location=NO,scrollbars=YES,toolbar=NO,status=NO')
}