Simplemodal is blank!

Simplemodal is blank!

I have started getting intermittent issues where simplemodal dialog contents are blank

this tends an issue only in production.  I have proved that the RegisterStartupScript call is passing the parameters correctly when the problem occurs.
 
When the problem occurs the modal spans the entire width of the page and hides the close button - the users are stuck until they move off the page. 
 
thinking it might be a timing issue I tried putting in a delay before displaying the modal with window.setTimeout.  Initially I thought this solved the problem but it later reared its ugly head!
 

invoked from code behind

ScriptManager.RegisterStartupScript(this.Page, typeof(UpdatePanel), "modalpopupMsg", "DisplayConfirmation('Payment','You are about to transferred to PayPal....');", true);

this is the js...

   
function DisplayConfirmation(title, message) {
 $.unblockUI();
 $('#modal-title').text(title);
 $('#modal-message').html(message);
 $('#basic-modal-content').modal({
 minHeight:200,
 // modal onclose event
 onClose: function () {
  // close modal
  $.modal.close();
 }












 

}});}
 
The codebehind is in an ascx control which is embedded within an updatepanel
 
The simplemodal html is unremarkable

<!-- modal content -->

<div id="basic-modal-content">

<h3>

<div id="modal-title">

</div>

</h3>

<div id="modal-message">

</div>

<div style="position:relative;top:10px;width:100%;">

<input type="button" value="OK" style="width:35px;height:25px;" onclick="$.modal.close();" />

</div>

</div>