window.onerror = null
//var nom=4 //number of menus
var isOpen; //flag to determine whether we need to hide the rest of the menus when one is activated.
function streeTools(n, display, NumberOfMenus)
{
	/*
	if (document.getElementById)
	{ 
		if (document.getElementById('streeToolsMenu' + n).style.visibility=="hidden" || document.getElementById('streeToolsMenu' + n).style.visibility=="")
		{
			document.getElementById('streeToolsMenu' + n).style.visibility="visible";
			for (i=1; i < nom+1; i++)
			{
				if (i != n)
					document.getElementById('streeToolsMenu' + i).style.visibility="hidden";
			}
		}
		
		else
		{
			document.getElementById('streeToolsMenu' + n).style.visibility="hidden";
		}
	}
	*/
	
	if (document.getElementById)
		{ 
			if (document.getElementById('streeToolsMenu' + n).style.visibility=="hidden" || document.getElementById('streeToolsMenu' + n).style.visibility=="")
			{
				if (display ==1)
				{
					document.getElementById('streeToolsMenu' + n).style.display="block";
				}
				document.getElementById('streeToolsMenu' + n).style.visibility="visible";
				//Hide JumpTo menu
				document.getElementById("jumpToMenu").style.visibility = "hidden";
				for (i=1; i < NumberOfMenus+1; i++)
				{
					if (i != n)
						document.getElementById('streeToolsMenu' + i).style.visibility="hidden";
				}
			}
			
			else
			{
				if (display ==1)
				{
					document.getElementById('streeToolsMenu' + n).style.display="none";
				}
				document.getElementById('streeToolsMenu' + n).style.visibility="hidden";
				//Show JumpTo menu
				document.getElementById("jumpToMenu").style.visibility = "visible";
			}
		}
			
}	

//The following is strictly for the personal finance calculators section -MCT
function showbuttons() {   

    var agt       = navigator.userAgent.toLowerCase();
    var IEMAC     = ((agt.indexOf("msie") != -1) && agt.indexOf("mac")!=-1);
    var N6        = (agt.indexOf("netscape6") != -1 || (agt.indexOf("netscape/6") !=-1 ));

    if ( N6 ) {
      return "Netscape 6 is unable to support our detailed reports.  Please upgrade to Nescape 7.<P>";
    }
    if ( IEMAC ) {
      return "<P>";
    }

    return "<P><FORM><INPUT TYPE='button' value='Calculate' Name='btnCallCalc' onClick='document.calculator.calculate()'><INPUT TYPE='button' value='View Report' Name='btnOpenNote' onClick='openNote()'></FORM>";
}

function openNote()
 { 
 
 var agt=navigator.userAgent.toLowerCase(); 
 var is_aol   = (agt.indexOf("aol") != -1);

 leftpos=0;
 if (screen) {
   leftpos=screen.width/2 - 300;
 } 

 if (is_aol) {
   var s = " ";
   s=document.calculator.sJavaScriptReport('HTML');
    document.write(s);
 }
 else {
   var OpenWindow=window.open("","newwin","toolbar=yes,menubar=yes,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=380,left="+leftpos+",top=20");
   var s = " ";
   s=document.calculator.sJavaScriptReport('HTML');
   OpenWindow.document.write(s);
   OpenWindow.document.close(); 
   OpenWindow.focus();
 }
 }

