Call CRM 2013 Modal window for webresources

we had requirement to implement CRM 2013 look alike modal window for some webresources. Following code can do the needful:

var DialogOption = new Xrm.DialogOptions;
DialogOption.width = 500; DialogOption.height = 420;
Xrm.Internal.openDialog(“Web Resource path”,
DialogOption,
null, null,
CallbackFunction);
function CallbackFunction(returnValue){ }

In our case, we needed custom UI like below:

image

Hope it helps!