/*
|| ------------------------------------------------------------------
||  Program name:     layoutLibrary.js
||  Created by:       Michael McLaughlin, Copyright 2004
||  Creation date:    08/31/2004
||  History:
|| ------------------------------------------------------------------
||  Date       Author                   Purpose
|| --------   ----------------------   -----------------------------
|| dd/mm/yy   {Name}                   {Brief statement of change.}
|| ------------------------------------------------------------------
||  Execution method: Stand alone JavaScript library.
||  Program purpose:  Designed as a JavaScript library.
|| ------------------------------------------------------------------
*/
  
// ------------------------------------------------------------------
 
/*
|| The list of implemented functions:
|| ==================================================================
||  Name         Structure     Description
||  -----------  ------------  -------------------------------------
||  text         Object        An associative array of named values.
||  widgets      Array         An array of objects that are defined
||                             as associative arrays used to map
||                             attributes and relationships within
||                             a context.
||
||  Return Type  Prototype Constructor     Access     Parameter List
||  -----------  ------------------------  ---------  --------------
||
||
||  Return Type  Method Name               Access     Parameter List
||  -----------  ------------------------  ---------  --------------
||  string       getClassName()            local      Object objIn
||  string       getMethod()               local      Object objIn
||  boolean      getState()                local      Object objIn
||  Array        getTarget()               local      Object objIn
||  string       getText()                 local      Object objIn
||  boolean      setClassName()            local      Object objIn
||  boolean      setState()                local      Object objIn
||  boolean      setStates()               local      Object objIn
||  boolean      setObject()               local      Object objIn
||  boolean      switchState()             local      Object objIn
||  boolean      updateObject()            local      string objName
||                                                    string newObject
||  boolean      updateObjects()           local      Object objIn
*/

var footer ="";
var header = "";
var menu = "";
var text = "";


// ------------------------------------------------------------------

function openWindow (location,windowName,width,height)
{
  var location = window.open(location,windName,"toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+"");
}

// ------------------------------------------------------------------


function drawHeader()
{
  // Build top-most header.
  // -------------------------------
  header += '<table width="100%" border=0 cellspacing="0" cellpadding="0" summary="">';
  header += '  <tr>';
  header += '    <td></td>';
  header += '    <td>';
  header += '      <table border=0 cellpadding=0 cellspacing=3>';
  header += '        <tr>';
  header += '          <td valign=bottom bgcolor="#FFFFFF"><img src="http://www.techtinker.com/images/TechTinker.jpg"></td>';
  header += '        </tr>';
  header += '      </table>';
  header += '    </td>';
  header += '  </tr>';
  header += '</table>';
  header += '<table width="100%" border=0 cellspacing="0" cellpadding="0" bgcolor="#316592" summary="">';
  header += '  <tr>';
  header += '    <td><img src="http://www.techtinker.com/widgets/stretch.gif" border=0 alt="" width=1 height=9></td>';
  header += '  </tr>';
  header += '</table>';

  // Build menu container.
  // -------------------------------
  header += '<table width="100%" border=0 cellspacing="0" cellpadding="0" summary="">';
  header += '<tr>';
  header += '  <td valign="bottom" width=12 bgcolor="#316592"><img src="http://www.techtinker.com/widgets/lineShadow.gif" border=0 alt="" width=12 height=10></td>';
  header += '  <td valign="bottom" align="left" width=182 bgcolor="#316592"><img src="http://www.techtinker.com/widgets/lineBoxShadow.gif" border=0 alt="" width=182 height=10></td>';
  header += '  <td valign="bottom" width=32 bgcolor="#316592"><img src="http://www.techtinker.com/widgets/lineTopCurl.gif" border=0 alt="" width=32 height=25></td>';
  header += '  <td valign="top" width="100%">';
  header += '    <table width="100%" border="0" cellspacing="0" cellpadding="0" background="http://emp.byui.edu/mclaughlinm/linux/images/lineShadow.gif" summary="">';
  header += '    <tr>';
  header += '      <td><img src="http://www.techtinker.com/widgets/stretch.gif" border=0 alt="" width=1 height=10></td>';
  header += '    </tr>';
  header += '    </table>';
  header += '  </td>';
  header += '</tr>';
  header += '</table>';

  // Write page header.
  // -------------------------------
  document.write(header);

}

function drawMenu()
{
  // Build page menu.
  // -------------------------------
  menu += '<table border=0 cellspacing=0 cellpadding=0>';
  menu += '  <tr>';
  menu += '    <td width=12 bgcolor="#ffffff" valign=top>';
  menu += '      <img src="http://www.techtinker.com/widgets/whiteSpacer.gif" width=12 height=6>';
  menu += '    </td>';
  menu += '    <td valign=top width=185 height=90 background="http://www.techtinker.com/widgets/boxLeft.gif">';
  menu +='       <font face=Arial size=1>';
  menu +='         <img src="http://www.techtinker.com/widgets/boxLeft.gif" width=185 height=6><br>';
  menu +=            text;
  menu += '      </font>';
  menu += '    </td>';

  // Write page header.
  // -------------------------------
  document.write(menu);

}

function drawFooter()
{
  // Build footer header.
  // -------------------------------
  footer =  '  </td>';
  footer += '    </tr>';
  footer += '    <tr>';
  footer += '      <td width=12 bgcolor="#ffffff">&nbsp;</td>';
  footer += '      <td valign=top width=185 height=500>';
  footer += '        <img src="http://www.techtinker.com/widgets/boxLeftBase.gif">';
  footer += '      </td>';
  footer += '    </tr>';
  footer += '    <tr>';
  footer += '      <td colspan=2>&nbsp;</td>';
  footer += '  </tr>';
  footer += '</table>';

  // Write page footer.
  // -------------------------------
  document.write(footer);

}


