/* JavaScript Document - used by all pages except printform.htm
   IE F  N
   3  1  2   document.write, location.href, substring, lastIndexOf
*/
  var activeMenu = '';
/*
headerpic = 'file:///D:/heta/tadsa/website/images/v1_600x120.jpg';
blankpic  = 'file:///D:/heta/tadsa/website/images/blank.gif';
*/
headerpic = 'http://www.technicalaidsa.org.au/images/v2_600x120.jpg';
blankpic  = 'http://www.technicalaidsa.org.au/images/blank.gif';
logopic1  = 'http://www.technicalaidsa.org.au/images/logo1_155x25.gif';
logopic2  = 'http://www.technicalaidsa.org.au/images/logo2_65x25.gif';
logopic3  = 'http://www.technicalaidsa.org.au/images/logo3_210x25.gif';

// function to manage the header and footer html content,
// and when the content will be displayed within the body.
function Manager() {
  this.html = "";
  this.add  = function(h) {  this.html += h;  }
  this.show = function()  {  document.write( this.html );

  document.getElementById('menu'+activeMenu).className='menubig';
  document.getElementById('menu'+activeMenu).innerHTML='<a class="menubig" href="'+menu[activeMenu].url+'" title="'+menu[activeMenu].title+'">'+menu[activeMenu].name+'</a>';
  document.getElementById('submenu'+activeMenu).style.display='block';

  }
}

// create a manager for the header and footer.
header = new Manager();
footer = new Manager();

// add html content for the header and footer.
header.add( '<table class="body" border="0" cellspacing="0" cellpadding="0"> ');

/* ------------------------- HEADER ------------------------- */
header.add( '  <tr> ');
header.add( '    <td class="header" align="left" colspan="2"> ');

header.add( '      <div class="hdr_pic"><a name="top"></a> ');
header.add( '        <img src="'+ headerpic +'" class="hdr_pic" align="left" ');
header.add( '             alt="TADSA" title="Technical Aid to the Disabled (SA) Inc (TADSA)" /> ');
header.add( '      </div> ');

header.add( '      <table class="hdr_logo" border="0" cellspacing="0" cellpadding="0"> ');
header.add( '      <tr><td align="right"> ');
header.add( '        <img src="'+ logopic1 +'" width="155" height="25" border="0" alt="TADSA" title="TADSA"> ');
header.add( '        <img src="'+ logopic2 +'" width="65"  height="25" border="0" alt="TADSA" title="TADSA"> ');
header.add( '        <img src="'+ logopic3 +'" width="210" height="25" border="0" alt="TADSA" title="TADSA"> ');
header.add( '      </td></tr> ');
header.add( '      </table> ');

header.add( '    </td> ');
header.add( '  </tr> ');

/* -------------------------- MENU --------------------------width="1%" */
header.add( '  <tr> ');
header.add( '    <td class="menu" align="left" valign="top"> ');
header.add(        showHeaderMenu() );
header.add( '      <br><img src="'+ blankpic +'" width="128" height="1"> ');
header.add( '    </td> ');

/* -------------------------- BODY -------------------------- */
header.add( '    <td class="content" align="left" valign="top"> ');
                   /* content */
footer.add( '    </td>' );
footer.add( '  </tr> ');

/* ------------------------- FOOTER ------------------------- */
footer.add( '  <tr> ');
footer.add( '    <td class="footer" align="center" valign="top"> ');
footer.add( '      <a class="top" href="#top">top of page</a> ');
footer.add( '    </td> ');
footer.add( '    <td class="footer" align="center" valign="top"> ');
footer.add( '      <strong>TADSA</strong> - Phone: (08) 8261 2922 - Fax: (08) 8369 1051<br> ');
footer.add( '      <strong>TAD Australia</strong> - National No: 1300 663 243 ');
footer.add( '    </td> ');
footer.add( '  </tr> ');
footer.add( '</table> '); // end body