var firsttime;
var RENEWALCOMMISSION,SALECOMMISSION,Converter;
var A1,A2,A3,B1,B2,B3,B4,B5,B6,B7,B8,C1,C2,C3,C4,C5,C6,C7,C8,D1,D2,D3,D4,D5,D6,D7,D8,E1,E2,E3,E4,E5,E6,E7,E8,F1,F2,F3,F4,F5,F6,F7,F8,G1,G2,G3,G4,G5,G6,G7,G8; // input values
var A1result,A2result,B1result,B2result,C1result,C2result,D1result,D2result,E1result,E2result,F1result,F2result,G1result,G2result;					// calcluated values
var tempD1,tempD2,tempD3;

function Startup()
{
	A1=A2=A3=B1=B2=B3=B4=B5=B6=B7=B8=C1=C2=C3=C4=C5=C6=C7=C8=D1=D2=D3=D4=D5=D6=D7=D8=E1=E2=E3=E4=E5=E6=E7=E8=F1=F2=F3=F4=F5=F6=F7=F8=G1=G2=G3=G4=G5=G6=G7=G8=0;
	//initialsie to 0 unless there is a different values below
	A1result=A2result=B1result=B2result=C1result=C2result=D1result=D2result=E1result=E2result=F1result=F2result=G1result=G2result=0;					// calcluated values
	RENEWALCOMMISSION=SALECOMMISSION=Converter= 0;

	tempD1=tempD2=tempD3 = 0;

	// different values alaway stays the same unless users changes
	RENEWALCOMMISSION=50;
	SALECOMMISSION=200;
	Converter= 9.7;

	A1=50;
	//A2 = A1*SALECOMMISSION;
	B1=75;
	B2=50;
	B7=100;

	C1=100;
	D1=100;
	E1=90;
	F1=120;
	G1=10;

	//C1="1,000,000";
	Calculate();
	Update(); //format results fields on the FORM sheet according to the values above
	document.sheet.Converter.value = Converter;

	
} /* Startup */


function Calculate()
{	
	//RENEWALCOMMISSION=50;
	//SALECOMMISSION=200;

	A2 = A1*SALECOMMISSION;
	A1result = A2;
	A2result = A1result*Converter;
	
	B3 = Math.round(A1*0.95);
	B5 = B1*SALECOMMISSION;
	B6 = B3*RENEWALCOMMISSION;
	B1result = parseFloat(B5)+parseFloat(B6);
	B2result = B1result*Converter;

	C2 = parseFloat(B1)+parseFloat(B3);
	C3 = Math.round(B1*0.95);
	C4 = Math.round(C2*0.95);
	C5 = C1*SALECOMMISSION;
	C6 = C3*RENEWALCOMMISSION;
	C7 = getC1(C1, B1);
	C8 = ((C4*RENEWALCOMMISSION)*C7)/100;
	C1result = parseFloat(C8)+parseFloat(C6)+parseFloat(C5);
	C2result = C1result*Converter;


	D2 = parseFloat(C1)+parseFloat(C3)+parseFloat(C4);
	D3 = Math.round(C1*0.95);
	D4 = Math.round(D2*0.9);
	D5 = D1*SALECOMMISSION;
	D6 = D3*RENEWALCOMMISSION;
	D7 = getC1(D1, C1);
	D8 = ((D4*RENEWALCOMMISSION)*D7)/100;
	D1result = parseFloat(D5)+parseFloat(D6);
	D2result = D1result*Converter;


	E2 = parseFloat(D1)+parseFloat(D3)+parseFloat(D4);
	E3 = Math.round(C1*0.95);
	E4 = Math.round(E2*0.9);
	E5 = E1*SALECOMMISSION;
	E6 = E3*RENEWALCOMMISSION;
	E7 = getC1(E1, D1);
	E8 = ((E4*RENEWALCOMMISSION)*E7)/100;
	E1result = parseFloat(E5)+parseFloat(E6);
	E2result = E1result*Converter;

	F2 = parseFloat(E1)+parseFloat(E3)+parseFloat(E4);
	F3 = Math.round(E1*0.95);
	F4 = Math.round(F2*0.9);
	F5 = F1*SALECOMMISSION;
	F6 = F3*RENEWALCOMMISSION;
	F7 = getC1(F1, E1);
	F8 = ((F4*RENEWALCOMMISSION)*F7)/100;
	F1result = parseFloat(F5)+parseFloat(F6);
	F2result = F1result*Converter;

	G2 = parseFloat(F1)+parseFloat(F3)+parseFloat(F4);
	G3 = Math.round(F1*0.95);
	G4 = Math.round(G2*0.9);
	G5 = G1*SALECOMMISSION;
	G6 = G3*RENEWALCOMMISSION;
	G7 = getC1(G1, F1);
	G8 = ((G4*RENEWALCOMMISSION)*G7)/100;
	G1result = parseFloat(G5)+parseFloat(G6);
	G2result = G1result*Converter;







	//tempD1 = D1*(100-D3)/100;
	//tempD2 = D2*(100-D4)/100;
	//tempD3 = tempD1*(100-D5)/100;	
	//D1result = parseFloat(D1)+parseFloat(D2)-(parseFloat(tempD3)+parseFloat(tempD2));		
	//D2result = D1result*D6;

	//E1result = (+E1*(100-C2)/100)*0.1;
	//E2result = (C1result*E2)/100;
	//E3result = (C2result+D2result+E1result+E4result+E5result);
	//E4result = (E1*(100-C2)/100)*(C5/2)/100;
	//E5result = E1-E1*(100-E4)/100;

	return(true);
} /* Calculate */


function getC1(c1, b1)
{
//	c1=C1;
//	b1=B1;

	if (c1>(b1*0.90))
	{
		 c7=100;
		 return c7;
	}
	if ((c1>(b1*0.80)) && (c1<=(b1*0.90)))
	{
		 c7=90;
		 return c7;
	}		
	if ((c1>(b1*0.70)) && (c1 <=(b1*0.80)))
	{
		 c7=90;
		 return c7;
	}
		
	if ((c1>(b1*0.60)) && (c1 <=(b1*0.70)))
	{
		 c7=70;
		 return c7;
	}
		
	if ((c1>(b1*0.50)) && (c1 <=(b1*0.60)))
	{
		 c7=60;
		 return c7;
	}
		
	if ((c1>(b1*0.40)) && (c1 <=(b1*0.50)))
	{
		 c7=50;
		 return c7;
	}
		
	if ((c1>(b1*0.30)) && (c1 <=(b1*0.40)))
	{
		 c7=40;
		 return c7;
	}
		
	if ((c1>(b1*0.20)) && (c1 <=(b1*0.30)))
	{
		 c7=30;
		 return c7;
	}
		
	if ((c1>(b1*0.10)) && (c1 <=(b1*0.20)))
	{
		 c7=20;
		 return c7;
	}

	if (c1<=(b1*0.10))
	{
		 c7=10;
		 return c7;
	}
}



function Update()
{
	
	
	document.sheet.Converter.value = Converter;

	document.sheet.A1.value = formatoutput( A1 ) ;
	document.sheet.A2.value = formatoutput( A2 ) ;
	document.sheet.A3.value = formatoutput( A3 ) ;

	document.sheet.B1.value = formatoutput( B1 ) ;
	document.sheet.B2.value = formatoutput( B2 ) ;
	document.sheet.B3.value = formatoutput( B3 ) ;
	document.sheet.B4.value = formatoutput( B4 ) ;
	document.sheet.B5.value = formatoutput( B5 ) ;
	document.sheet.B6.value = formatoutput( B6 ) ;
	document.sheet.B7.value = formatoutput( B7 ) ;
	document.sheet.B8.value = formatoutput( B8 ) ;

	document.sheet.C1.value = formatoutput( C1 ) ;
	document.sheet.C2.value = formatoutput( C2 ) ;
	document.sheet.C3.value = formatoutput( C3 ) ;
	document.sheet.C4.value = formatoutput( C4 ) ;
	document.sheet.C5.value = formatoutput( C5 ) ;
	document.sheet.C6.value = formatoutput( C6 ) ;
	document.sheet.C7.value = formatoutput( C7 ) ;
	document.sheet.C8.value = formatoutput( C8 ) ;

	document.sheet.D1.value = formatoutput( D1 ) ;
	document.sheet.D2.value = formatoutput( D2 ) ;
	document.sheet.D3.value = formatoutput( D3 ) ;
	document.sheet.D4.value = formatoutput( D4 ) ;
	document.sheet.D5.value = formatoutput( D5 ) ;
	document.sheet.D6.value = formatoutput( D6 ) ;
	document.sheet.D7.value = formatoutput( D7 ) ;
	document.sheet.D8.value = formatoutput( D8 ) ;

	document.sheet.E1.value = formatoutput( E1 ) ;
	document.sheet.E2.value = formatoutput( E2 ) ;
	document.sheet.E3.value = formatoutput( E3 ) ;
	document.sheet.E4.value = formatoutput( E4 ) ;
	document.sheet.E5.value = formatoutput( E5 ) ;
	document.sheet.E6.value = formatoutput( E6 ) ;
	document.sheet.E7.value = formatoutput( E7 ) ;
	document.sheet.E8.value = formatoutput( E8 ) ;

	document.sheet.F1.value = formatoutput( F1 ) ;
	document.sheet.F2.value = formatoutput( F2 ) ;
	document.sheet.F3.value = formatoutput( F3 ) ;
	document.sheet.F4.value = formatoutput( F4 ) ;
	document.sheet.F5.value = formatoutput( F5 ) ;
	document.sheet.F6.value = formatoutput( F6 ) ;
	document.sheet.F7.value = formatoutput( F7 ) ;
	document.sheet.F8.value = formatoutput( F8 ) ;

	document.sheet.G1.value = formatoutput( G1 ) ;
	document.sheet.G2.value = formatoutput( G2 ) ;
	document.sheet.G3.value = formatoutput( G3 ) ;
	document.sheet.G4.value = formatoutput( G4 ) ;
	document.sheet.G5.value = formatoutput( G5 ) ;
	document.sheet.G6.value = formatoutput( G6 ) ;
	document.sheet.G7.value = formatoutput( G7 ) ;
	document.sheet.G8.value = formatoutput( G8 ) ;



	
	document.sheet.A1result.value = formatoutput( A1result ) ;
	document.sheet.A2result.value = formatoutput( A2result ) ;
	document.sheet.B1result.value = formatoutput( B1result ) ;
	document.sheet.B2result.value = formatoutput( B2result ) ;
	document.sheet.C1result.value = formatoutput( C1result ) ;
	document.sheet.C2result.value = formatoutput( C2result ) ;
	document.sheet.D1result.value = formatoutput( D1result ) ;
	document.sheet.D2result.value = formatoutput( D2result ) ;
	document.sheet.E1result.value = formatoutput( E1result ) ;
	document.sheet.E2result.value = formatoutput( E2result ) ;
	document.sheet.F1result.value = formatoutput( F1result ) ;
	document.sheet.F2result.value = formatoutput( F2result ) ;
	document.sheet.G1result.value = formatoutput( G1result ) ;
	document.sheet.G2result.value = formatoutput( G2result ) ;


} /* Update */


function Validate()
{
	if( isnumeric( document.sheet.Converter.value ) )
		Converter = formatinput( document.sheet.Converter.value ) ;
	else
		document.sheet.Converter.value = formatoutput( Converter ) ;

	
	if( isnumeric( document.sheet.A1.value ) )
		A1 = formatinput( document.sheet.A1.value ) ;
	else
		document.sheet.A1.value = formatoutput( A1 ) ;

	if( isnumeric( document.sheet.A2.value ) )
		A2 = formatinput( document.sheet.A2.value ) ;
	else
		document.sheet.A2.value = formatoutput( A2 ) ;

	if( isnumeric( document.sheet.A3.value ) )
		A3 = formatinput( document.sheet.A3.value ) ;
	else
		document.sheet.A3.value = formatoutput( A3 ) ;



	if( isnumeric( document.sheet.B1.value ) )
		B1 = formatinput( document.sheet.B1.value ) ;
	else
		document.sheet.B1.value = formatoutput( B1 ) ;

	if( isnumeric( document.sheet.B2.value ) )
		B2 = formatinput( document.sheet.B2.value ) ;
	else
		document.sheet.B2.value = formatoutput( B2 ) ;

	if( isnumeric( document.sheet.B3.value ) )
		B3 = formatinput( document.sheet.B3.value ) ;
	else
		document.sheet.B3.value = formatoutput( B3 ) ;

	if( isnumeric( document.sheet.B4.value ) )
		B4 = formatinput( document.sheet.B4.value ) ;
	else
		document.sheet.B4.value = formatoutput( B4 ) ;

	if( isnumeric( document.sheet.B5.value ) )
		B5 = formatinput( document.sheet.B5.value ) ;
	else
		document.sheet.B5.value = formatoutput( B5 ) ;

	if( isnumeric( document.sheet.B6.value ) )
		B6 = formatinput( document.sheet.B6.value ) ;
	else
		document.sheet.B6.value = formatoutput( B6 ) ;

	if( isnumeric( document.sheet.B7.value ) )
		B7 = formatinput( document.sheet.B7.value ) ;
	else
		document.sheet.B7.value = formatoutput( B7 ) ;

	if( isnumeric( document.sheet.B8.value ) )
		B8 = formatinput( document.sheet.B8.value ) ;
	else
		document.sheet.B8.value = formatoutput( B8 ) ;

	
	
	if( isnumeric( document.sheet.C1.value ) )
		C1 = formatinput( document.sheet.C1.value ) ;
	else
		document.sheet.C1.value = formatoutput( C1 ) ;

	if( isnumeric( document.sheet.C2.value ) )
		C2 = formatinput( document.sheet.C2.value ) ;
	else
		document.sheet.C2.value = formatoutput( C2 ) ;

	if( isnumeric( document.sheet.C3.value ) )
		C3 = formatinput( document.sheet.C3.value ) ;
	else
		document.sheet.C3.value = formatoutput( C3 ) ;

	if( isnumeric( document.sheet.C4.value ) )
		C4 = formatinput( document.sheet.C4.value ) ;
	else
		document.sheet.C4.value = formatoutput( C4 ) ;

	if( isnumeric( document.sheet.C5.value ) )
		C5 = formatinput( document.sheet.C5.value ) ;
	else
		document.sheet.C5.value = formatoutput( C5 ) ;

	if( isnumeric( document.sheet.C6.value ) )
		C6 = formatinput( document.sheet.C6.value ) ;
	else
		document.sheet.C6.value = formatoutput( C6 ) ;

	if( isnumeric( document.sheet.C7.value ) )
		C7 = formatinput( document.sheet.C7.value ) ;
	else
		document.sheet.C7.value = formatoutput( C7 ) ;

	if( isnumeric( document.sheet.C8.value ) )
		C8 = formatinput( document.sheet.C8.value ) ;
	else
		document.sheet.C8.value = formatoutput( C8 ) ;

	
	if( isnumeric( document.sheet.D1.value ) )
		D1 = formatinput( document.sheet.D1.value ) ;
	else
		document.sheet.D1.value = formatoutput( D1 ) ;

	if( isnumeric( document.sheet.D2.value ) )
		D2 = formatinput( document.sheet.D2.value ) ;
	else
		document.sheet.D2.value = formatoutput( D2 ) ;

	if( isnumeric( document.sheet.D3.value ) )
		D3 = formatinput( document.sheet.D3.value ) ;
	else
		document.sheet.D3.value = formatoutput( D3 ) ;

	if( isnumeric( document.sheet.D4.value ) )
		D4 = formatinput( document.sheet.D4.value ) ;
	else
		document.sheet.D4.value = formatoutput( D4 ) ;

	if( isnumeric( document.sheet.D5.value ) )
		D5 = formatinput( document.sheet.D5.value ) ;
	else
		document.sheet.D5.value = formatoutput( D5 ) ;

	if( isnumeric( document.sheet.D6.value ) )
		D6 = formatinput( document.sheet.D6.value ) ;
	else
		document.sheet.D6.value = formatoutput( D6 ) ;

	if( isnumeric( document.sheet.D7.value ) )
		D7 = formatinput( document.sheet.D7.value ) ;
	else
		document.sheet.D7.value = formatoutput( D7 ) ;

	if( isnumeric( document.sheet.D8.value ) )
		D8 = formatinput( document.sheet.D8.value ) ;
	else
		document.sheet.D8.value = formatoutput( D8 ) ;

	
	if( isnumeric( document.sheet.E1.value ) )
		E1 = formatinput( document.sheet.E1.value ) ;
	else
		document.sheet.E1.value = formatoutput( E1 ) ;

	if( isnumeric( document.sheet.E2.value ) )
		E2 = formatinput( document.sheet.E2.value ) ;
	else
		document.sheet.E2.value = formatoutput( E2 ) ;

	if( isnumeric( document.sheet.E3.value ) )
		E3 = formatinput( document.sheet.E3.value ) ;
	else
		document.sheet.E3.value = formatoutput( E3 ) ;

	if( isnumeric( document.sheet.E4.value ) )
		E4 = formatinput( document.sheet.E4.value ) ;
	else
		document.sheet.E4.value = formatoutput( E4 ) ;

	if( isnumeric( document.sheet.E5.value ) )
		E5 = formatinput( document.sheet.E5.value ) ;
	else
		document.sheet.E5.value = formatoutput( E5 ) ;

	if( isnumeric( document.sheet.E6.value ) )
		E6 = formatinput( document.sheet.E6.value ) ;
	else
		document.sheet.E6.value = formatoutput( E6 ) ;

	if( isnumeric( document.sheet.E7.value ) )
		E7 = formatinput( document.sheet.E7.value ) ;
	else
		document.sheet.E7.value = formatoutput( E7 ) ;

	if( isnumeric( document.sheet.E8.value ) )
		E8 = formatinput( document.sheet.E8.value ) ;
	else
		document.sheet.E8.value = formatoutput( E8 ) ;


	if( isnumeric( document.sheet.F1.value ) )
		F1 = formatinput( document.sheet.F1.value ) ;
	else
		document.sheet.F1.value = formatoutput( F1 ) ;

	if( isnumeric( document.sheet.F2.value ) )
		F2 = formatinput( document.sheet.F2.value ) ;
	else
		document.sheet.F2.value = formatoutput( F2 ) ;

	if( isnumeric( document.sheet.F3.value ) )
		F3 = formatinput( document.sheet.F3.value ) ;
	else
		document.sheet.F3.value = formatoutput( F3 ) ;

	if( isnumeric( document.sheet.F4.value ) )
		F4 = formatinput( document.sheet.F4.value ) ;
	else
		document.sheet.F4.value = formatoutput( F4 ) ;

	if( isnumeric( document.sheet.F5.value ) )
		F5 = formatinput( document.sheet.F5.value ) ;
	else
		document.sheet.F5.value = formatoutput( F5 ) ;

	if( isnumeric( document.sheet.F6.value ) )
		F6 = formatinput( document.sheet.F6.value ) ;
	else
		document.sheet.F6.value = formatoutput( F6 ) ;

	if( isnumeric( document.sheet.F7.value ) )
		F7 = formatinput( document.sheet.F7.value ) ;
	else
		document.sheet.F7.value = formatoutput( F7 ) ;

	if( isnumeric( document.sheet.F8.value ) )
		F8 = formatinput( document.sheet.F8.value ) ;
	else
		document.sheet.F8.value = formatoutput( F8 ) ;


	if( isnumeric( document.sheet.G1.value ) )
		G1 = formatinput( document.sheet.G1.value ) ;
	else
		document.sheet.G1.value = formatoutput( G1 ) ;

	if( isnumeric( document.sheet.G2.value ) )
		G2 = formatinput( document.sheet.G2.value ) ;
	else
		document.sheet.G2.value = formatoutput( G2 ) ;

	if( isnumeric( document.sheet.G3.value ) )
		G3 = formatinput( document.sheet.G3.value ) ;
	else
		document.sheet.G3.value = formatoutput( G3 ) ;

	if( isnumeric( document.sheet.G4.value ) )
		G4 = formatinput( document.sheet.G4.value ) ;
	else
		document.sheet.G4.value = formatoutput( G4 ) ;

	if( isnumeric( document.sheet.G5.value ) )
		G5 = formatinput( document.sheet.G5.value ) ;
	else
		document.sheet.G5.value = formatoutput( G5 ) ;

	if( isnumeric( document.sheet.G6.value ) )
		G6 = formatinput( document.sheet.G6.value ) ;
	else
		document.sheet.G6.value = formatoutput( G6 ) ;

	if( isnumeric( document.sheet.G7.value ) )
		G7 = formatinput( document.sheet.G7.value ) ;
	else
		document.sheet.G7.value = formatoutput( G7 ) ;

	if( isnumeric( document.sheet.G8.value ) )
		G8 = formatinput( document.sheet.G8.value ) ;
	else
		document.sheet.G8.value = formatoutput( G8 ) ;


	Calculate();
	Update();

	return true;
} /* Validate */


function isnumeric( num )
{
	var result=true;
	var start=0;

	while ((start < num.length) && result )
	{
		if( ( (num.charAt(start)<'0') || (num.charAt(start)>'9') ) && (num.charAt(start)!=',') && (num.charAt(start)!='.') )
			result=false;

		++start;
	}
	return( result );
} /* isnumeric */

function formatinput( num )
{
	var result="";
	var start=0;

	while (start < num.length)
	{
		if( ( (num.charAt(start)>='0') && (num.charAt(start)<='9') ) || (num.charAt(start)=='.') )
		{
			result = result + num.charAt(start);
		}

		++start;
	}
	return( result );
} /* formatinput */


function formatoutput( num )
{
	var result="";
	var work="";
	var i=0;

	work = ' ' + Math.round( num ) + '.00';	// con the bit afterwards into treating this as a string!

		// break up every 3 characters (charat 0 is always ' ')...
	for( i=1 ; i<work.length && work.charAt(i)!='.'; ++i )
	{
		if( work.length - i > 5 && i > 1 )
		{
			if( (work.length - i) % 3== 0 )
			{
				result = result + ',';
			}
		}

		result = result + work.charAt(i);
	}

	return( result );
} /* formatoutput */


function formatoutput2dp( num )
{
	var result="";
	var work="";
	var i=0;

	if( parseInt( num ) == num )	// no fraction
	{
		work = ' ' + num + '.00';
	}
	else if( parseInt( num * 10 ) == num * 10 )
	{
		work = ' ' + num + '0';
	}
	else
	{
		work = ' ' + Math.round( num * 100 ) / 100;	// con the bit afterwards into treating this as a string!
	}

		// break up every 3 characters...
	for( i=1 ; i<work.length; ++i )
	{
		if( work.length - i > 5 && i > 1 )
		{
			if( (work.length - i) % 3 == 0 )
			{
				result = result + ',';
			}
		}

		result = result + work.charAt(i);
	}

	return( result );
} /* formatoutput2dp */
// update values on the form if users changes
	/*
	document.sheet.Converter.value = Converter;

	document.sheet.A1.value = A1;
	document.sheet.A2.value = A2;
	document.sheet.A3.value = A3;
	document.sheet.A1result.value = A1result;
	document.sheet.A2result.value = A2result;

	document.sheet.B1.value = B1;
	document.sheet.B2.value = B2;
	document.sheet.B3.value = B3;
	document.sheet.B4.value = B4;
	document.sheet.B5.value = B5;
	document.sheet.B6.value = B6;
	document.sheet.B7.value = B7;
	document.sheet.B8.value = B8;
	document.sheet.B1result.value = B1result;
	document.sheet.B2result.value = B2result;
	

	document.sheet.C1.value = C1;
	document.sheet.C2.value = C2;
	document.sheet.C3.value = C3;
	document.sheet.C4.value = C4;
	document.sheet.C5.value = C5;
	document.sheet.C6.value = C6;
	document.sheet.C7.value = C7;
	document.sheet.C8.value = C8;
	document.sheet.C1result.value = C1result;
	document.sheet.C2result.value = C2result;
	
	document.sheet.D1.value = D1;
	document.sheet.D2.value = D2;
	document.sheet.D3.value = D3;
	document.sheet.D4.value = D4;
	document.sheet.D5.value = D5;
	document.sheet.D6.value = D6;
	document.sheet.D7.value = D7;
	document.sheet.D8.value = D8;
	document.sheet.D1result.value = D1result;
	document.sheet.D2result.value = D2result;

	document.sheet.E1.value = E1;
	document.sheet.E2.value = E2;
	document.sheet.E3.value = E3;
	document.sheet.E4.value = E4;
	document.sheet.E5.value = E5;
	document.sheet.E6.value = E6;
	document.sheet.E7.value = E7;
	document.sheet.E8.value = E8;
	document.sheet.E1result.value = E1result;
	document.sheet.E2result.value = E2result;

	document.sheet.F1.value = F1;
	document.sheet.F2.value = F2;
	document.sheet.F3.value = F3;
	document.sheet.F4.value = F4;
	document.sheet.F5.value = F5;
	document.sheet.F6.value = F6;
	document.sheet.F7.value = F7;
	document.sheet.F8.value = F8;
	document.sheet.F1result.value = F1result;
	document.sheet.F2result.value = F2result;

	document.sheet.G1.value = G1;
	document.sheet.G2.value = G2;
	document.sheet.G3.value = G3;
	document.sheet.G4.value = G4;
	document.sheet.G5.value = G5;
	document.sheet.G6.value = G6;
	document.sheet.G7.value = G7;
	document.sheet.G8.value = G8;
	document.sheet.G1result.value = G1result;
	document.sheet.G2result.value = G2result;
	
	
	
	Validate();//format values fields on the FORM sheet

	return( true ); */
// -->
