// ***** other functions ******

function GetPrintContents(fromTextboxOnly)
{
  return(fromTextboxOnly ? "" : idc["dPgBody"].innerHTML);
}

function GetFont()
{
  //alert(idc["p"]);
  return(GetStyleProperty("p","font-family"));
}

function GetFontSize()
{
  //return(GetStyleProperty("p","font-size"));
  // you do not want to use the same font and size for both screen and print
  return 0; 
}

// Is it Hebrew document that we are printing
function IsRtl()
{
  return 0;
}

// resize to fit the window
function PgResize()
{
  /*
  PgFit(1.5, 250, 330, 250, 900, 320, 50);

  idc["tExpandHeight"].style.height = pgHeight;
  idc["fTextarea"].style.height = pgHeight - 10;
  idc["tExpandWidth"].style.width = pgWidth;
  idc["tPgBottom"].style.width = pgWidth - 40;
  idc["iFiller"].style.width = pgWidth + 23;
  //idc["fTextarea"].style.width = pgWidth - 10;

  //alert(idc["tExpandHeight"].style.height);
  */
}

function Print()
{
  SetFocus();

  //alert(55);
  hWndPrint = OpenWindow(hWndPrint,"../shared/print.htm");
}

function Mail(contact)
{
  SetFocus();

  //alert(55);
  hWndMail = OpenWindow(hWndMail,contact?"../shared/contact.htm":"../shared/email.htm",450,540);
}


// check if part of frame page or not
function chkfrm()
{
  // pgname is global from shared.js

  if(self==parent) 
  {
    szParam = "?" + pgname;
    document.location.replace("../hebrew-calendar.htm" + szParam);
  }
  return(1);
}

function Prepare()
{
  var id;

  //alert(111);

//alert(11);
  PrepareIdCollection(); // define global var idc

  PgResize();

  SetHandlers(0,1,1,0);

  idFocus = 0;
  
  // unhide main right away, toolbars are not crucial here
  SetFocus();

  //alert("main quirks = " + document.compatMode);
  
  PrepareToolbar();
}

function PrepareToolbar()
{
  //alert("Preparing");
  if(!parent.frameReceive || !parent.frameTop.PrepareTools) // because this frame loaded first
  {
    //alert("Delay");
    /*window.*/setTimeout("PrepareToolbar()",delayPreparing);
    delayPreparing += 100;
    return;
  }

  //alert("PreparingTools");
  //alert(parent.frameTop.PrepareTools);
  parent.frameTop.PrepareTools(); 

  //af@06oct @temp
  //SetFinePrint();
}

chkfrm();
