﻿function ShowErrMsgRows(){
  ShowItem('ErrMsgRow1');
  ShowItem('ErrMsgRow2');
  ShowItem('ErrMsgRow3');
  ShowItem('ErrMsgRow4');
  ShowItem('ErrMsgRow5');
  ShowItem('ErrMsgRow6');
  ShowItem('ErrMsgRow7');
}
function HideErrMsgRows(){
  HideItem('ErrMsgRow1');
  HideItem('ErrMsgRow2');
  HideItem('ErrMsgRow3');
  HideItem('ErrMsgRow4');
  HideItem('ErrMsgRow5');
  HideItem('ErrMsgRow6');
  HideItem('ErrMsgRow7');
}
function HideOptions() {
  HideItem('OptionRow1');
  HideItem('OptionRow2');
  HideItem('OptionRow3');
  HideItem('OptionRow4');
}
function ShowOptions() {
  DisplayExtraQuestionA();
  DisplayExtraQuestionB();
}
function HideItem(Id) {
  if(document.getElementById(Id)){ document.getElementById(Id).style.display = 'none'; }
}
function ShowItem(Id){
  if(document.getElementById(Id)){ document.getElementById(Id).style.display = ''; }
}
function GrabScreenDimensions(){
  document.getElementById('ScreenWidth').value = screen.width;
  document.getElementById('ScreenHeight').value = screen.height;
}
function DisplayExtraQuestionA() {
    var f = document.forms[0];
    if (f.IsPersonalPension[1].checked) {
        ShowItem('OptionRow1');
        ShowItem('OptionRow2');
    } else {
        HideItem('OptionRow1');
        HideItem('OptionRow2');
    }
}
function DisplayExtraQuestionB() {
    var f = document.forms[0];
    if (f.TotalCompanyPensions[0].checked) {
        ShowItem('OptionRow3');
        ShowItem('OptionRow4');
    } else {
        HideItem('OptionRow3');
        HideItem('OptionRow4');
    }
}
