function chill(form1) {
form=form1;
s=eval(form.a.value);
stype=form.slist.selectedIndex;
if (stype==0) s=s*1; // m/s
else {
if (stype==1) s=s/3.6; // km/h -> m/s
};
t=eval(form.b.value);

ctype=form.clist.selectedIndex;
if (ctype==0) { //New US & CA wind chill
k=13.12+0.6215*t+0.3965*(t-28.676)*Math.pow(s*3.6,0.16);
ft=(-24.5*(0.667*s*3.6+4.8)+2111)*Math.pow((-4.8-t),-1.668) //frostbite time
		// formula valid if ft<30 min.
} else {
if (ctype==1) { //Steadman revised wind chill
k=1.41-1.162*s+0.98*t+0.0124*s*s+0.0185*s*t;
h=1.1622*(10.45+10*Math.sqrt(s)-s)*(33-t); //heat loss Steadman
} else {
if (ctype==2) { // Siple/Passel
k=33+(t-33)*(0.474+0.454*Math.sqrt(s)-0.0454*s);
h=845.1-25.608*k; // heat loss general formula
} else {
if (ctype==3) { // Court
k=33+(t-33)*(0.550+0.417*Math.sqrt(s)-0.0454*s);
} else {
if (ctype==4) { // Rees
k=2*((-32*s/25 - t)/(2 + 1.5*s/25) + t);
}}}}};

form.k.value = 0.01*Math.round(k*100);

if (form.k.value == "NaN")
form.s.value="Enter Temperature and Wind speed";
else { // risk
if (ctype==1||ctype==2) { // heat loss & risk for Steadman & Siple
	hh = 0.1*Math.round(h*10);
	if (h < 800) form.s.value="heat loss = "+hh+" W/m^2; risk very low";
	else {
	if (h < 1200) form.s.value="heat loss = "+hh+" W/m^2; risk low";
	else {
	if (h < 1600) form.s.value="heat loss = "+hh+" W/m^2; risk medium";
	else {
	if (h < 2000) form.s.value="heat loss = "+hh+" W/m^2; risk high";
	else {
	if (h < 2200) form.s.value="heat loss = "+hh+" W/m^2; risk very high";
	else {
	form.s.value="heat loss = "+hh+" W/m^2; risk extreme";
	}}}}}
	} //end ctype 1,2
else {
if (ctype==0) { //frostbite time new us & ca wind chill
	if (ft<30)
	form.s.value="frostbite probable within "+0.1*Math.round(ft*10)+" minutes";
	else {
	if (k<-4.8) // 5% of population experiences frostbite if skin temp below this
	form.s.value="some frostbite probability";
	else {
	form.s.value="frostbite unlikely";	
	}}
	} //end ctype 0
else {
form.s.value=" ";
}
} // end ctypes
}; //end put something into form.s

} // end chill
