﻿function onBtnMouseOver(obj)
{
   obj.style.color="red";
}

function onBtnMouseOut(obj)
{
   obj.style.color="#000000";
}

function onTailMouseOut(obj)
{
   obj.style.color="#333333";
}
function onTitleMouseOut(obj)
{
   obj.style.color="#FFFFFF";
}

function onClassMouseOut(obj)
{
   obj.style.color="#004f80";
}

function OpenLink(link)
{
    document.location = link;
}

function OpenHtmlFile(id)
{
    OpenLink("readfile.aspx?id="+id);
}

function OpenNew(link)
{
      var OpenWin=window.open(link,'_blank','titlebar=no,statusbar=no,toolbar=no,resize=no,scrollbars=yes');
}

function LoadFile(src)
{
    var inn="<iframe id='ifMain' src='"+src+"' scrolling=no marginwidth=0 marginheight=0 width=970 height=530 frameborder=0></iframe>";
    document.all["divMain"].innerHTML=inn; 
}

function LoadHtmlFile(id)
{
    LoadFile("readfile.aspx?id="+id);
}

function setMainFrame()
{
    setMainFrameHeight(getDocHeight());
}

function getDocHeight() 
{ 
    var D = document; 
    return Math.max( 
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), 
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), 
        Math.max(D.body.clientHeight, D.documentElement.clientHeight) 
    ); 
}

function setMainFrameHeight(ht)
{
   var obj=parent.document.getElementById("ifMain");
   if(obj!=null) obj.style.height=ht+"px";
}