<script>
function createFrame(url) {
var s = '<iframe name="mainFrame" scrolling="auto" frameborder="0" src="' + url + '" style="100%;height:100%;"></iframe>';
return s;
}
function addTab(subtitle, url) {
var jq = top.jQuery;
if (!jq('#tabs', top.document).tabs('exists', subtitle)) {
jq('#tabs', top.document).tabs('add', {
title: subtitle,
content: createFrame(url),
closable: true,
$('#mainPanle').width() - 10,
height: $('#mainPanle').height() - 26
});
} else {
jq('#tabs', top.document).tabs('select', subtitle);
}
}
</script>