If your aim is to center the dialog for both maximized and restored-down states I would use StartPosition="CenterPage"
I haven't found a good use yet for "CenterParent" for C1WebDialog. Centerparent centers the dialog in relation to the content on the page it seems. So if the content of the parent is small in vertical display height, the dialog could get cut off if it's too big.
But with CenterPage if the window is smaller than the dialog, then it gets centered off screen and becomes unusable. here is code that checks if the dialog is too small it uses the default positioning, otherwise it will center the dialog.
dialog = $get(
"C1WebDialog1").control;
var width = document.getElementById("C1WebDialog1").style.width
width = width.substring(0, width.length - 2) //remove 'px'
if(width > document.body.offsetWidth)
{
dialog.set_startPosition(0); //default
}
else
{
dialog.set_startPosition(1); //centerpage
}
dialog.show();
Regards,
Greg L