﻿function showDialog(placeHolderClientID, dialogTitle, url, w, h) {
  var cmb=j1_3_2("<div id='dialog' title='" + dialogTitle + "'><iframe width='100%' height='100%' src ='" + url + "'><p>Your browser does not support iframes.</p></iframe></div>")
  j1_3_2('#' + placeHolderClientID).append(cmb)
  var blockWidth = w
  var blockHeight = h
  //alert(j1_3_2(window).height() + " x " + j1_3_2(window).width());
  if (w > j1_3_2(window).width()) {
    blockWidth = j1_3_2(window).width() - 50
  }
  else {
    blockWidth = w
  }

  if (h > j1_3_2(window).height()) {
   blockHeight = j1_3_2(window).height() - 100
  }
  else {
    blockHeight = h
   }

   //alert(j1_3_2(window).height() + " x " + j1_3_2(window).width() + "\n" + blockHeight + " x " + blockWidth);
  j1_3_2(function() {
   j1_3_2('#dialog').dialog({
    bgiframe: true,
    modal: true,
    width: blockWidth,
    height: blockHeight,
    buttons: {
     Close: function() {
      j1_3_2(this).dialog('close');
     }
    }
   });
  });
}
            