function cal()
{
	var sum= 0;
	var ans=0;
    var cnt=0;
	for (i=0;i<document.test.Q2.length;i++)
		{
			if (document.test.Q1[i].checked && document.test.Q1[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q2[i].checked && document.test.Q2[i].value=="a")
                {sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q3[i].checked && document.test.Q2[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q4[i].checked && document.test.Q4[i].value=="a")
                  {sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q5[i].checked && document.test.Q5[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q6[i].checked && document.test.Q6[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q7[i].checked && document.test.Q7[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q8[i].checked && document.test.Q8[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q9[i].checked && document.test.Q9[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
			if (document.test.Q10[i].checked && document.test.Q10[i].value=="a")
				{sum=sum + 10; cnt=cnt+1;} 
		}

//var tscore= (sum/5)*100;
var ms = "You have given "+ cnt + " correct answers. \nYour Score is : " + sum;
if(sum<50)
{ms=ms + "\nYou scored below 50...\n"
         ms=ms + "\n The score reflects that you have a risky love life.\n\n"
		 ms=ms + "\nTake it seriously. You and your partner are always in stress, not helping each other."
		 ms=ms + "\nThis score reflect your mind but it's likely that you are having a kind of love relationship"
		 ms=ms + "\nwhich can be improved."
         ms=ms + "\nFor that  you and your partner will have to accept different attitudes and have to support" 
         ms=ms + "\neach other whenever there is a problem."



}
if(sum>=50 && sum<=75)
{ms=ms + "\nYou scored between 50 and 75...\n"
        ms=ms + "\nThis is ok but not too good.\n\n"
		ms=ms + "\nPeople with this score are those who have grown up to appreciate the differences between each others." 
		ms=ms + "\nThis score is positive sign and indicates a good love relation."
        ms=ms + "\nSo enjoy, but remember always to be cautious and never take each other for granted."




}
if(sum>75)
{
	ms=ms + "\nYou scored above 75...\n"
	ms=ms + "\nThis indicates very good love relationship.\n\n" 
			ms=ms + "\nBased on this it looks like both of you have challenges, understanding your different needs when you are in Problem." 
			ms=ms + "\nGenerally people have different habit, may be a man or woman, but we have to adjust to eachother." 
			ms=ms + "\nThe only solution is that you have to learn more about the differences and handle the situations very carefully."
}
document.test.textarea1.value = ""
 document.test.textarea1.value =ms
}


