function kinetic(m, munit, v, vunit) {
  e= m*munit * v*vunit * v*vunit / 2;
  return e;
}
function mega(x,u) {
  if (u=="kWh") {
      x = x * 1000; u = "Wh";
  }
  if (x>1000000000000000) {
      // alert("Giga");
	  return  Math.round(x/1000000000000000) + " Peta" + u;
  } else if (x>1000000000000) {
      // alert("Giga");
	  return  Math.round(x/1000000000000) + " Tera" + u;
   } else if (x>1000000000) {
      // alert("Giga");
	  return  Math.round(x/1000000000) + " Giga" + u;
  } else if (x>1000000) {
      // alert("Mega");
	  return Math.round(x/1000000) + " Mega" + u;
  } else if (x>1000) {
      // alert("kilo");
	  return Math.round(x/1000) + " Kilo" + u;
  } else {
      // alert("zu wenig");
	  return x;
  }
}
