var bootstrapButton = $.fn.button.noConflict()
	$.fn.bootstrapBtn = bootstrapButton;
	$("#circuitTypeSpan").hide();
	$("#mediaTypeSpan").hide();
	$("#interfaceSpan").hide();
	$("#ipAddressSpan").hide();
	$("#portNameSpan").hide();
	$("#createTicketButton").hide();
	$("#testModalPopup").dialog({
		position: 'absolute' ,
		width: '82%',
		height: 250,
		autoOpen: false,
		bgiframe: true,
		modal: true,
		resizable: false,
		draggable: true,
		buttons: [
			{
				text: 'Copy All To Clipboard',
				click: function () {
					CopyToClipboard('testModalPopup');
					//$("#testModalPopup").focus();
				}
			}
		]
	});
	//alert('test');

	var popupData = "";

	function CopyToClipboard(containerid) {
		if (document.selection) {
			//$("#testModalPopup").focus();
			$(".ui-dialog-content ui-widget-content").focus();
			var range = document.body.createTextRange();
			range.moveToElementText(document.getElementById(containerid));
			range.select().createTextRange();
			document.execCommand("copy");

		} else if (window.getSelection) {
			$(".ui-dialog-content ui-widget-content").focus();
			var range = document.createRange();
			range.selectNode(document.getElementById(containerid));
			window.getSelection().removeAllRanges();
			window.getSelection().addRange(range);
			document.execCommand("copy");
		}
	}

	$(window).on("resize", function () {
		$("#testModalPopup").dialog("option", "style=background-color:#88ACE0", "position", {
			my: "center",
			at: "center",
			of: window
		});
	});

	$("#commandDtlsButton").bind("click", function () {
		$("#testModalPopup").css("display", "block");
		$("#testModalPopup").dialog('open');
		$('#testModalPopup').dialog('option', 'title', "Command Execution Details");

		$("#testModalPopup").html("<table style=\"vertical-align: middle; width: 100%; height: 100%;\">" +
			"<tr>" +
			"<td align=\"center\">" +
			"<img " +
			"src=\"" + 'I' + "\"" +
			"border=\"0px;\"" +
			"align=\"absmiddle\"" +
			"style=\"padding-top: 0px;\" />" +
			"&nbsp;" + "<a style=\"color: #888888; font-family: Verdana; font-size: 11px;\">Fetching Command Details. Please wait a moment...</a>" +
			"</td>" +
			"</tr>" +
			"</table>");
		$("#testModalPopup").html(decodeURIComponent(popupData));
	}); 
by