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()
}


function makeWindow(URL) {
	newWindow = window.open(URL,'myWindow','scrollbars=no,status=no,width=450,height=350,screenX=400,screenY=50,top=50,left=400')
	
if (newWindow.opener == null) newWindow.opener = self;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function VisitValue2(){
	var i = document.TheForm2.TopLoc2.selectedIndex
	
	if(i!=0){
		parent.location.href = document.TheForm2.TopLoc2.options[i].value
	}
	
}	

function VisitValue(){
	var i = document.TheForm.TopLoc.selectedIndex
	
	if(i!=0){
		parent.location.href = document.TheForm.TopLoc.options[i].value
	}
	
}	
