$(function(){
$(".fade").load(function(){
	$(this).fadeTo(100, 1.0);
});
$(".fade").hover(
function(){
	$(this).fadeTo(100, 0.5);
},
function(){
	$(this).fadeTo(100, 1.0);
}
);
});


$(function(){
$("body").css("font-size",$.cookie('fsize'));
});
function font(size){
$("body").css("font-size",size);
$.cookie("fsize",size,{expires:30,path:'/'});
}

function m1(){
	with(document.f1){
		weight=((h1.value/100)*(h2.value/100)*n1.value)+" ";
		weight=((h1.value/100)*(h1.value/100)*22)+" ";
		total.value=weight.substr(0,2)+"."+weight.substr(3,1)+"";
	}
}

function m2(){
	with(document.f2){
		total.value=w1.value*c1.value;
	}
	
}

function m5(){
	with(document.f5){
		bmi=(w1.value/(h1.value/100)/(h2.value/100))+" ";
		total.value=bmi.substr(0,2)+"";

	}
	
}

check=new Array();
	check[0]=1;check[1]=1;check[2]=1;check[3]=1;check[4]=1;check[5]=1;check[6]=1;check[7]=1;check[8]=1;check[9]=1;check[10]=1;

function m3(){
	all=0;
	for(i=0;i<=9;i++){
		if(document.f3.elements[i].checked==true){
		all=all+check[i];
	}
}

document.f3.total.value=all;
}

function m4(){
	all=0;
	for(i=0;i<=8;i++){
		if(document.f4.elements[i].checked==true){
		all=all+check[i];
	}
}

document.f4.total.value=all;
}
