/* =============================================================================
 copyright © 2006 Ivo Truxa, truXoft.com, all right reserved
 
 NO PARTS MAY BE REUSED WITHOUT PRIOR WRITTEN PERMISSION FROM THE AUTHOR
 
============================================================================= */ 

/* -------- fmSwitchTab --------------------------------------------------------
  fmSwitchTab
------------------------------------------------------------------------------*/
function fmSwitchTab(tab,tabNm){
  if (tab != lastTab) {
    if (lastTab) {
      document.getElementById("fmTab"+lastTab).className = "fmTab0";
      document.getElementById("fmPane"+lastTab).style.display = "none";
    }
    document.mainForm.fmTab.value = tabNm;
    document.getElementById("fmTab"+tab).className = "fmTab1";
    document.getElementById("fmPane"+tab).style.display = "block";
    lastTab = tab;
  }
}

function topTab(tab) {
 document.mainForm.action = "/forum.html";
 document.mainForm.forum.value = "";
 document.mainForm.fmTab.value = tab;
 document.mainForm.submit();
 return false;
}




/* ieSpell API JavaScript
 * Copyright (C) 2002-2004 Red Egg Software. * All rights reserved. 
 * @author Sidney Chong
 * @version $Revision: 1.1 $ $Date: 2004/11/19 16:06:03 $
 **/

var myAgent = navigator.userAgent.toLowerCase();
var myVersion = parseInt(navigator.appVersion);
var is_ie =  ((myAgent.indexOf("msie") != -1) 
           && (myAgent.indexOf("opera") == -1));
var is_nav = ((myAgent.indexOf('mozilla')!=-1) 
           && (myAgent.indexOf('spoofer')==-1) 
           && (myAgent.indexOf('compatible') == -1) 
           && (myAgent.indexOf('opera')==-1)
           && (myAgent.indexOf('webtv') ==-1) 
           && (myAgent.indexOf('hotjava')==-1));
var is_win = ((myAgent.indexOf("win")!=-1) 
           || (myAgent.indexOf("16bit")!=-1));
var is_mac = (myAgent.indexOf("mac")!=-1);

//this function uses the more advanced node spell check method that does not
//prompts the user with the "Spell Check Completed" message as well as returning a
//FALSE if the user cancels the spell check.
function checknodespelling2(node) {
  try {
    var tmpis = new ActiveXObject("ieSpell.ieSpellExtension");
    return tmpis.CheckDocumentNode2(node, true);
  } catch(exception) {
    if (is_ie&&is_win) {
      window.open("http://www.iespell.com/download.php","Download");
    }
  }
}
