function closewindframe()
{
	$('#windframe').animate({top: -800},'slow');
}

function openwindframe(url,y,title)
{
    if (!document.getElementById('bwindframe')) 
    {
        $('<table border="0" id="windframe" cellpadding="0" cellspacing="0" style="cursor: pointer;position: absolute; top: -600px; left: 40px; background-color: white;"><tr><td align="left" valign="top"><div class="xw-tl"><div class="xw-tr"><div class="xw-tcc" style="height: 25px;" ><table border="0" width="100%" height="100%"><tr><td width="60%"><strong style="color: #15428B" id="windframetitle"></strong></td><td><div class="xt xt-close" id="windframeclose" onclick="closewindframe();" onmouseover="this.className=\'xt xt-close xt-close-over\'" onmouseout="this.className=\'xt xt-close\'"></div></td></tr></table></div></div></div><div class="xw-ml"><div class="xw-mr"><div class="xw-mc topBlock"><iframe name="windframeframe" frameborder="0" scrolling="auto" width="400" height="350"></iframe></div></div></div><div class="xw-bl"><div class="xw-br"><div class="xw-bc"><div class="xw-footer"></div></div></div></div></td></tr></table>').appendTo($(document.body));
        $("#windframe").draggable();
    }
	window.frames['windframeframe'].location.href=url;
	$("#windframetitle").text(title);
	$('#windframe').animate({top: y},'slow');
}

function closebwindframe() 
{
    $('#bwindframe').animate({top: -800},'slow');
}

function openbwindframe(url,y,title,w,h,x)
{
    if (!w) w=700;
    if (!h) h=400;
    if (!x) x=40;
    if (!document.getElementById('bwindframe')) 
    {
        $('<table id="bwindframe" cellpadding="0" cellspacing="0" style="cursor: pointer;position: fixed; top: -600px; left: '+x+'px; background-color: white; z-index: 999;"><tr><td align="left" valign="top"><div class="xw-tl"><div class="xw-tr"><div class="xw-tcc" style="height: 25px;" ><table border="0" width="100%" height="100%"><tr><td width="60%"><strong id="bwindframetitle"></strong></td><td><div class="xt xt-close" id="windframeclose" onclick="closebwindframe();" onmouseover="this.className=\'xt xt-close xt-close-over\'" onmouseout="this.className=\'xt xt-close\'"></div></td></tr></table></div></div></div><div class="xw-ml"><div class="xw-mr"><div class="xw-mc topBlock"><iframe id="bwindframeframe" name="bwindframeframe" frameborder="0" scrolling="auto" width="'+w+'" height="'+h+'"></iframe></div></div></div><div class="xw-bl"><div class="xw-br"><div class="xw-bc"><div class="xw-footer"></div></div></div></div></td></tr></table>').appendTo($(document.body));
        $("#bwindframe").draggable();
        window.frames['bwindframeframe'].location.href=url;
        $("#bwindframetitle").text(title);
        $('#bwindframe').animate({top: y},'slow');
    }
    else
    {
        window.frames['bwindframeframe'].location.href=url;
        $("#bwindframetitle").text(title);
        $('#bwindframe').animate({top: y},'slow');
        $('#bwindframe').animate({left: x}, 'slow');
        $('#bwindframeframe').animate({width: w, height: h}, 'slow');
    }
}