// JavaScript Document




/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&                                                                                  &&
  &&                                                                                  &&
  &&                               basic trig stuff                                   &&
  &&                                                                                  &&
  &&                                                                                  &&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  

//function converts numberArray[0].decimalValue from degrees to radians
//called from main.html with deg-->rad button
function deg_TO_rad()
{
	numberArray[0].decimalValue = numberArray[0].decimalValue * Math.PI / 180;

	operations_2nd_level();
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function converts numberArray[0].decimalValue from radians to degrees
//called from main.html with rad-->deg button
function rad_TO_deg()
{
	numberArray[0].decimalValue = numberArray[0].decimalValue * 180 / Math.PI;

	operations_2nd_level();
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function returns angle measure in either degress or radians
//function is used for inverse trig functions
//and is called from all inverse trig functions
function convertAngleForm(a)
{
	var angleType = returnAngleForm();
	
	if(angleType == 'rad')
	{
		return a;
	}//end if
	else
	{
		if(angleType == 'deg')
		{
			return 180 * a/Math.PI;
		}//end if
	}//end else	
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/

  
//function checks to see if deg or rad is checked on main.html
//returns 'deg' or 'rad'
//function is called from convertAngleForm(a) (above)
function returnAngleForm()
{
	if(document.faceForm.angle[0].checked == true)
	{
		return 'rad';
	}//end if
	else
	{
		if(document.faceForm.angle[1].checked == true)
		{
			return 'deg';
		}//end if
	}//end else	
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/

  
//function checks to see if deg or rad is checked
//rad is the default
//if rad is checked returns same value as in x register else converts from deg to rad
//function is called from non inverse trig functions
function checkAngleForm()
{
	var angleMeasure = numberArray[0].decimalValue;
	
	if(document.faceForm.angle[0].checked == true)
	{
		return angleMeasure;
	}//end if
	else
	{
		if(document.faceForm.angle[1].checked == true)
		{
			angleMeasure = Math.PI * angleMeasure / 180;
			return angleMeasure;
		}//end if
		else
		{
			alert('syntax error');
			return 0;
		}//end else
	}//end else	
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&                                                                                  &&
  &&                                                                                  &&
  &&                            basic trig functions                                  &&
  &&                                                                                  &&
  &&                                                                                  &&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates sine of angle in the  X register
function sinFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to degrees
	numberArray[0].decimalValue = Math.sin(angle);	//decimal value is assigned the value of the Sine
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates cosine of angle in the  X register
function cosFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to degrees
	numberArray[0].decimalValue = Math.cos(angle);	//X register is assigned the value of the Cosine
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates tangent of angle in the  X register
function tanFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to degrees
	numberArray[0].decimalValue = Math.tan(angle);	//X register is assigned the value of the Tangent
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates cotangent of angle in the  X register
function cotFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = 1 / Math.tan(angle);	//X register is assigned the value of the Cotangent
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates secant of angle in the  X register
function secFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = 1/ Math.cos(angle);	//X register is assigned the value of the Secant
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates cosecant of angle in the  X register
function cscFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = 1 / Math.sin(angle);	//X register is assigned the value of the Cosecant
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&                                                                                  &&
  &&                                                                                  &&
  &&                        basic inverse trig functions                              &&
  &&                                                                                  &&
  &&                                                                                  &&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates arcsine of a number
function asinFunc()
{
	var trigFunctionValue = numberArray[0].decimalValue;
	
	numberArray[0].decimalValue = Math.asin(trigFunctionValue);	//X register is assigned the value of the arcsine - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates arcosine of a number
function acosFunc()
{
	var trigFunctionValue = numberArray[0].decimalValue;
	
	numberArray[0].decimalValue = Math.acos(trigFunctionValue);	//X register is assigned the value of the arcosine - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}



/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates arctangent of a number
function atanFunc()
{
	var trigFunctionValue = numberArray[0].decimalValue;
	
	numberArray[0].decimalValue = Math.atan(trigFunctionValue);	//X register is assigned the value of the arctangent - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}



/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates arccotangent of a number
function acotFunc()
{
	var trigFunctionValue = 1 / numberArray[0].decimalValue;
	
	numberArray[0].decimalValue = Math.atan(trigFunctionValue);	//X register is assigned the value of the arctangent - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates arcsecant of a number
function asecFunc()
{
	var trigFunctionValue = 1 / numberArray[0].decimalValue;
	
	numberArray[0].decimalValue = Math.acos(trigFunctionValue);	//X register is assigned the value of the arcosine - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function calculates arccosecant of a number
function acscFunc()
{
	var trigFunctionValue = 1 / numberArray[0].decimalValue;
	
	numberArray[0].decimalValue = Math.asin(trigFunctionValue);	//X register is assigned the value of the arcsine - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&                                                                                  &&
  &&                                                                                  &&
  &&                          hyperbolic trig functions                               &&
  &&                                                                                  &&
  &&                                                                                  &&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function checks angle value and displays the value of the hyperbolic sine
function sinhFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = calc_sinh(angle);	//X register is assigned the value of the hyperbolic sine
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function calculates the value of the hyperbolic sine
function calc_sinh(ang)
{
	var hy_sin = (((Math.pow(Math.E,ang))-(Math.pow(Math.E,(-1 * ang))))/2);
	
	return hy_sin;
}
 

/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function checks angle value and displays the value of the hyperbolic cosine
function coshFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = calc_cosh(angle);	//X register is assigned the value of the hyperbolic cosine
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function calculates the value of the hyperbolic cosine
function calc_cosh(ang)
{
	var calc_cosh = (((Math.pow(Math.E,ang))+(Math.pow(Math.E,(-1 * ang))))/2);
	
	return calc_cosh;
}
 

/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
 
 //function checks angle value and displays the value of the hyperbolic tangent
function tanhFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = calc_tanh(angle);	//X register is assigned the value of the hyperbolic tangent
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function calculates the value of the hyperbolic tangent
function calc_tanh(ang)
{
	var calc_tanh = calc_sinh(ang) / calc_cosh(ang);
	
	return calc_tanh;
}
 

/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  

//function checks angle value and displays the value of the hyperbolic cotangent
function cothFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = 1 / calc_tanh(angle);	//X register is assigned the value of the hyperbolic cotangent
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  

 //function checks angle value and displays the value of the hyperbolic secant
function sechFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = 1 / calc_cosh(angle);	//X register is assigned the value of the hyperbolic secant
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  

 //function checks angle value and displays the value of the hyperbolic cosecant
function cschFunc()
{
	var angle;
	angle = checkAngleForm();	//function returns the angle and if form is degrees
								//converts it to radians
	numberArray[0].decimalValue = 1 / calc_sinh(angle);	//X register is assigned the value of the hyperbolic cosecant
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&                                                                                  &&
  &&                                                                                  &&
  &&                      inverse hyperbolic trig functions                           &&
  &&                                                                                  &&
  &&                                                                                  &&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  

  
//function checks angle value and displays the value of the inverse hyperbolic sine
function asinhFunc()
{
	var trigFunctionValue = numberArray[0].decimalValue;	//number in the X register is used for the calculation

	numberArray[0].decimalValue = calc_asinh(trigFunctionValue);	//X register is assigned the value of the inverse hyperbolic sine
	
	numberArray[0].decimalValue = checkAngleForm();	//function returns the angle and if form is degrees
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function calculates the value of the inverse hyperbolic sine
function calc_asinh(numb)
{
	var radicand = numb * numb + 1;
	var radical = Math.sqrt(radicand);
	var expression = numb + radical;
	var asinh = Math.log(expression);
	
	return asinh;
}
 

/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
//function checks angle value and displays the value of the inverse hyperbolic cosine
function acoshFunc()
{
	var trigFunctionValue = numberArray[0].decimalValue;	//number in the X register is used for the calculation

	numberArray[0].decimalValue = calc_acosh(trigFunctionValue);	//X register is assigned the value of the inverse hyperbolic cosine
	
	numberArray[0].decimalValue = checkAngleForm();	//function returns the angle and if form is degrees
													//converts it to degrees
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function calculates the value of the inverse hyperbolic sine
function calc_acosh(numb)
{
	var radicand = numb * numb - 1;
	var radical = Math.sqrt(radicand);
	var expression = numb + radical;
	var acosh = Math.log(expression);
	
	return acosh;
}
 

/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
 
 //function checks angle value and displays the value of the inverse hyperbolic tangent
function atanhFunc()
{
	var trigFunctionValue = numberArray[0].decimalValue;	//number in the X register is used for the calculation

	numberArray[0].decimalValue = calc_atanh(trigFunctionValue);	//X register is assigned the value of the inverse hyperbolic tangent
	
	numberArray[0].decimalValue = checkAngleForm();	//function returns the angle and if form is degrees
													//converts it to degrees
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset	
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/


//function calculates the value of the inverse hyperbolic tangent
function calc_atanh(numb)
{
	var numerator_ = 1 + numb;
	var denominator_ = 1 - numb;
	var fraction_ = numerator_ / denominator_;
	var atanh = .5 * Math.log(fraction_);
	
	return atanh;
}
 

/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
function acothFunc()
{
	var trigFunctionValue = 1 / numberArray[0].decimalValue;

	numberArray[0].decimalValue = calc_atanh(trigFunctionValue);	//X register is assigned the value of the inverse hyperbolic cotangent - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
function asechFunc()
{
	var trigFunctionValue = 1 / numberArray[0].decimalValue;

	numberArray[0].decimalValue = calc_acosh(trigFunctionValue);	//X register is assigned the value of the inverse hyperbolic secant - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
  
function acschFunc()
{
	var trigFunctionValue = 1 / numberArray[0].decimalValue;

	numberArray[0].decimalValue = calc_asinh(trigFunctionValue);	//X register is assigned the value of the inverse hyperbolic cosecant - in rad
	
	//below
	//convertAngleForm(a) will convert from radians to degrees if required otherwise returns the same value
	//as was there before
	numberArray[0].decimalValue = convertAngleForm(numberArray[0].decimalValue);
	
	operations_2nd_level();	//displays result, assigns value to string value and resets what needs to be reset
}


/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
  
