var debugmode = 0;
var isPeopleSoft = true;

// variable Declarations
var platform = navigator.platform.substr(0,3);
var over = 'no';
var browser = navigator.appName;
var version = navigator.appVersion;
var whichOne = ' ';
var whichNews = '1';

// turns previous layer off if any and then turns current layer on (visible)
function on(pic)
{
        var div;

        if (document.images) {
                over = 'yes';
                if (browser == 'Netscape')  {
                        if( parseInt(version) != 5 ) {
                                if (whichOne != ' ') {
                                        eval('document.' + whichOne + 'Menu.visibility = "hidden"');
									
                                }
                                eval('document.' + pic + 'Menu.visibility = "visible"');
                                whichOne = pic;
                        } else {
                                if (whichOne != ' ')  {
                                        div = document.getElementById(whichOne + 'Menu');
                                        div.style.visibility = "hidden";
                                }
                                div = document.getElementById(pic + 'Menu');
                                div.style.visibility = "visible";
                                whichOne = pic;
                        }
                } else {
                        if (whichOne != ' ') {
                                eval(whichOne + 'Menu.style.visibility = "hidden"');
                        }
                        eval(pic + 'Menu.style.visibility = "visible"');
                        whichOne = pic;
                }
        }
}

// called by onmouseout event handle on images that popup rollovers
// sets over to no and begins the timeout. whichOne is used by on
// so the next div/layer knows which previous div/layer to turn off (hide)
function overChecker(pic) {
        whichOne = pic;
        over = 'no';
        setTimeout("off()", 700);
}

// the reverse of on(). Turns the div called 'whichOne' to hidden (off)
function off()
{
        var div;

        if (document.images) {
                if (over == 'no')  {
                        if (browser == 'Netscape')  {
                                if( parseInt(version) != 5 ) {
                                        eval('document.' + whichOne + 'Menu.visibility = "hidden"');
                                } else {
                                        div = document.getElementById(whichOne + 'Menu');
                                        div.style.visibility = "hidden";
                                }
                        } else {
                                eval(whichOne + 'Menu.style.visibility = "hidden"');
                        }
                }
        }
}

// used on homepage to swap the whats new section
function newsChanger(num) {
        if (browser == 'Netscape')  {
                eval('document.whatsNew' + whichNews + '.visibility = "hidden"');
                eval('document.whatsNew' + num + '.visibility = "visible"');
        }
        else {
                eval('whatsNew' + whichNews + '.style.visibility = "hidden"');
                eval('whatsNew' + num + '.style.visibility = "visible"');
        }
        whichNews = num;
}




// In netscape we have to reload the whole page on resize so netscape doesnt screw up
// the hidden divs (layers) and munge up various layouts. 
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function submitProductReg(action) {
  document.product_reg.purchase_buy.value=action;
  document.product_reg.submit()
}
