
var ans = 0;
var s1 = 0;
var s2 = 0;
var s3 = 0;
var s4 = 0;
var s5 = 0;

function check1(select1)
{
	document.form1.o1.value = select1;
}

function check2(select2)
{
	document.form2.o2.value = select2;
}

function check3(select3)
{
	document.form3.o3.value = select3;
}

function check4(select4)
{
	document.form4.o4.value = select4;
}

function check5(select5)
{
	document.form5.o5.value = select5;
}

function calc()
{
	s1 = parseInt(document.form1.o1.value);
	s2 = parseInt(document.form2.o2.value);
	s3 = parseInt(document.form3.o3.value);
	s4 = parseInt(document.form4.o4.value);
	s5 = parseInt(document.form5.o5.value);
	ans = (s1 + s2 + s3 + s4) - s5;
	document.form5.ans.value = parseInt(ans);

	if ((document.form5.ans.value <= 6) & (document.form2.o2.value == 2))
	{
		location.href = 'securityst.php';
		
	}
	else if ((document.form5.ans.value <= 6) & (document.form2.o2.value == 3))
	{
		location.href = 'securitymt.php';
		
	}
	else if ((document.form5.ans.value <= 6) & (document.form2.o2.value == 5))
	{
		location.href = 'securitymlt.php';
		
	}
	else if ((document.form5.ans.value <= 6) & (document.form2.o2.value == 6))
	{
		location.href = 'securitylt.php';
		
	}
	else if ((document.form5.ans.value >= 7) & (document.form5.ans.value <= 10) & (document.form2.o2.value == 2))
	{
		location.href = 'balancedst.php';
		
	}
	else if ((document.form5.ans.value >= 7) & (document.form5.ans.value <= 10) & (document.form2.o2.value == 3))
	{
		location.href = 'balancedmt.php';
		
	}
	else if ((document.form5.ans.value >= 7) & (document.form5.ans.value <= 10) & (document.form2.o2.value == 5))
	{
		location.href = 'balancedmlt.php';
		
	}
	else if ((document.form5.ans.value >= 7) & (document.form5.ans.value <= 10) & (document.form2.o2.value == 6))
	{
		location.href = 'balancedlt.php';
		
	}
	else if ((document.form5.ans.value >= 11) & (document.form5.ans.value <= 15) & (document.form2.o2.value == 2))
	{
		location.href = 'moderatest.php';
		
	}
		else if ((document.form5.ans.value >= 11) & (document.form5.ans.value <= 15) & (document.form2.o2.value == 3))
	{
		location.href = 'moderatemt.php';
		
	}
		else if ((document.form5.ans.value >= 11) & (document.form5.ans.value <= 15) & (document.form2.o2.value == 5))
	{
		location.href = 'moderatemlt.php';
		
	}
		else if ((document.form5.ans.value >= 11) & (document.form5.ans.value <= 15) & (document.form2.o2.value == 6))
	{
		location.href = 'moderatelt.php';
		
	}
	else if ((document.form5.ans.value >= 16) & (document.form2.o2.value == 2))
	{
		location.href = 'growthst.php';
		
	}
	else if ((document.form5.ans.value >= 16) & (document.form2.o2.value == 3))
	{
		location.href = 'growthmt.php';
		
	}
	else if ((document.form5.ans.value >= 16) & (document.form2.o2.value == 5))
	{
		location.href = 'growthmlt.php';
		
	}
	else if ((document.form5.ans.value >= 16) & (document.form2.o2.value == 6))
	{
		location.href = 'growthlt.php';
		
	}	
}
