<!--

// Functions to implement the background black fade.
//==================================================
function fade_main()
{
document.getElementById('fade').style.display='none';
}
function unfade_main()
{
document.getElementById('fade').style.display='block';
}


// Function to clear form field value on focus.
//=============================================
function clearDefault(el) {
  if (el.defaultValue==el.value) {
    el.value = "";
  }
}


// Function to programmatically submit the master budget form.
// Used to automatically calculate the totals onLoad.
//==========================================================
function submit_budget_form()
{
  document.f_budget.submit();
}


// Function to popup a hint alert regarding entering annual.
// amount for the budget's first income field.
//==========================================================
function hint_Annual_Entry()
{

  // This popup window now disabled as of June, 2009.
  exit;

  //var x=document.getElementById("salary_self").value;
  alert ("R E M I N D E R  -  If you want to enter an annual figure add the letter - a - prefix like a52000, then when you save the column, the monthly figure will be automatically calculated and entered for you.  You may also do in-field math like 116+48 and when you click Save the result will be recorded.");
}


// Function to open a window in the middle of the screen.
//=======================================================
function wopen(url, name, w, h)
{
  // Fudge factors for window decoration space.
  // In my tests these work well on all platforms & browsers.
  w += 32;
  h += 96;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;
  // IE5 and other old browsers might allow a window that is
  // partially offscreen or wider than the screen. Fix that.
  // (Newer browsers fix this for us, but let's be thorough.)
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=no, resizable=no');
  // Just in case width and height are ignored
  win.resizeTo(w, h);
  // Just in case left and top are ignored
  win.moveTo(wleft, wtop);
  win.focus();
}

-->