//Javascript Document
var my_pg_Menu_currentPage = ''; //TRACK URL LOADED IN CONTENT WINDOW TO AVOID RELOAD ON SAME SELECTION
var my_pg_Menu =
[
  [null, 'About Us', 'javascript:pgMenu_delayFrameSet("plugins/index.html#p5", "pgMainContent", 0)', null, null],
  [null, 'eLearning Samples', null, null, null,
    [null, 'Airline Industry', 'javascript:pgMenu_delayFrameSet("plugins/index.html#p6", "pgMainContent", 800)', null, 'View Airline eLearning Sample'],
    [null, 'Paper Industry', 'javascript:pgMenu_delayFrameSet("plugins/index.html#p7", "pgMainContent", 800)', null, 'View Paper Industry eLearning Sample'],
    [null, 'The Almena Method&trade;', 'javascript:pgMenu_delayFrameSet("almenaPlugin/index.html#p9", "pgMainContent", 800, true)', null, 'Check out the Almena Typing Method']
    ],
  [null, 'ToolBook Plugins', null, null, null,
    [null, 'About JavaScript PowerPac', 'javascript:pgMenu_delayFrameSet("http://www.pgsoftwaretools.com/tutorials/index.html?nav=features", "top", 800);', null, ''],
    [null, '<b>BUY</b> JavaScript PowerPac', 'javascript:pgMenu_delayFrameSet("buyPowerPac/index.html", "pgMainContent", 800);', null, ''],
    _cmSplit,
    [null, 'Align & Distribute Objects', 'javascript:pgMenu_delayFrameSet("plugins/index.html#p1", "pgMainContent", 800)', null, ''],
    [null, 'Align & Distribute Tutorials', 'javascript:pgMenu_delayFrameSet("plugins/index.html#p0", "pgMainContent", 800)', null, '']
    ],
  [null, 'PowerPac for ToolBook', null, null, null,
    [null, 'About JavaScript PowerPac', 'javascript:pgMenu_delayFrameSet("http://www.pgsoftwaretools.com/tutorials/index.html?nav=features", "top", 800);', null, ''],
    [null, '<b>BUY</b> JavaScript PowerPac', 'javascript:pgMenu_delayFrameSet("buyPowerPac/index.html", "pgMainContent", 800);', null, '']
  ],
  [null, 'The Almena Method&trade;', null, null, null,
    [null, 'About The Almena Method&trade;', 'javascript:pgMenu_delayFrameSet("almenaPlugin/index.html#p9", "pgMainContent", 800, true)', null, ''],
    [null, 'ONLINE Product List', 'javascript:pgMenu_delayFrameSet("almenaPlugin/index.html#p11", "pgMainContent", 800, true)', null, ''],
    _cmSplit,
    [null, '<b>BUY</b> Single User License', 'javascript:pgMenu_delayFrameSet("almenaPlugin/index.html#p15", "pgMainContent", 800, true)', null, ''],
    [null, '<b>BUY</b> Institutional License', 'javascript:pgMenu_delayFrameSet("almenaPlugin/index.html#p16", "pgMainContent", 800, true)', null, ''],
    _cmSplit,
    [null, 'The Almena King Story', 'javascript:pgMenu_delayFrameSet("almenaPlugin/index.html#p12", "pgMainContent", 800, true)', null, ''],
    [null, 'Letters & Testimonials', 'javascript:pgMenu_delayFrameSet("almenaPlugin/index.html#p13", "pgMainContent", 800, true)', null, '']
  ]
];

/* FUNCTION ASSOCIATED WITH MENU ITEMS ABOVE */
function pgMenu_delayAlert(txt, delay) {
  // PURPOSE IS TO ALLOW MENU FADE TO OCCUR BEFORE ATTEMPTING TO SHOW ALERT
  if (typeof delay != 'number') {
    delay = 500;
  }
  myAlert = 'alert("' + txt + '")';
  setTimeout(myAlert, delay);
} //End pgMenu_delayAlert

function pgMenu_delayFrameSet(url, fName, delay, refresh) {
  /* PURPOSE IS TO ALLOW MENU FADE TO OCCUR BEFORE ATTEMPTING TO LOAD FRAME SOURCE HTML
     SET DELAY TO 0 FOR IMMEDIATE NAVIGATION */
  if (url == my_pg_Menu_currentPage && refresh != true) return; //SAME SELECTION SO DO NOTHING
  if (typeof delay != 'number') {
    delay = 500;
  }
  my_pg_Menu_currentPage = url;
  if (fName == 'top') {
    myFrameSet = "top.location.href = '" + url + "'";
  } else {
    myFrameSet = "frames['" + fName + "'].location.href = '" + url + "'";
  }
  if (delay > 0)
    setTimeout(myFrameSet, delay);
  else
    frames[fName].location.href = url;
} //End pgMenu_delayFrameSet

