﻿function init()
{
    var fheiht=document.body.scrollHeight+45;
    if (fheiht<600)
    {
        fheiht =600;
    }
    var a =parent.document.getElementById("mainFrame")
    if ( a!=null)
    {
        parent.document.getElementById("mainFrame").style.height=fheiht;
        parent .document .getElementById ("navFrame").style.height=fheiht+20;
        parent.document.getElementById("divbar").style.height=fheiht +20;
    }
  /*
   if(document .getElementById ("mainFrame")==null& document .getElementById ("navFrame")==null)
   {
        return ;
   }
   var mainFrameHeight=mainFrame.document.body.scrollHeight+40;
   var navFrameHeight=navFrame.document.body.scrollHeight+40;
   if(mainFrameHeight >navFrameHeight )
   {
        mainFrame.height=mainFrameHeight ;
        navFrame.height=mainFrameHeight ;
   }
   else 
   {
        mainFrame.height=navFrameHeight  ;
        navFrame.height=navFrameHeight  ;
   } */
}
function setheight(sourceHeight)
{
   if(sourceHeight <700)
   {
        sourceHeight =700;
   }
   
    document.getElementById("mainFrame").style.height=sourceHeight;
    document .getElementById ("navFrame").style.height=sourceHeight;
    document.getElementById("divbar").style.height=sourceHeight;
    
}
function setParentHeight(sourceHeight)
{
        
        if (sourceHeight <parent.navFrame.document.body.scrollHeight)
        {
            setParentHeight(parent.navFrame.document.body.scrollHeight+40)
        }
        else
        {
            parent.document.getElementById("mainFrame").style.height=sourceHeight;
            parent.document .getElementById ("navFrame").style.height=sourceHeight;
            parent.document.getElementById("divbar").style.height=sourceHeight;
        }
}
