function SetFrameHeight(frameId)
{
	if (self == parent)
		return false
	var h = parent.document.getElementById(frameId).contentWindow.document.body.scrollHeight + 12;
	parent.document.getElementById(frameId).style.height = h;
}

function SetFrameHeight2()
{
	if (self == parent)
		return false
	var h = this.document.body.scrollHeight + 12;
	this.document.body.style.height = h;
}

function popup(mylink, windowname)
{
    if (!window.focus)
        return true;
    var href;
    if (typeof(mylink) == 'string')
       href=mylink;
    else
       href=mylink.href;
    var popuw = window.open(href, windowname, 'width=640,height=640,scrollbars=yes,resizable=yes');
    popuw.focus()
    return false;
}

function closepoup(mylink)
{
    if (!(window.focus && window.opener))
        return true;
    window.opener.focus();
    window.close();
    return false;
}
