<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
  xmlns:widget="http://www.netvibes.com/ns/">
  <head>
 
    <meta name="author" content="Patrick Schibli" />
    <meta name="description" content="Mit diesem Rechner wird der Body Mass Index (BMI) errechnet" />
 	<meta name="website" content="http://www.muskel-tipps.de" />
 	<meta name="keywords" content="BMI, Body Mass Index, Fitness, Health, Gesundheit" />
    <meta name="apiVersion" content="1.0" />
    <meta name="autoRefresh" content="20" />
    <meta name="debugMode" content="true" />
    <meta name="screenshot" content="http://www.muskel-tipps.de/gadgets/netvibes/bodymassindex.png" />
    <meta name="thumbnail" content="http://www.muskel-tipps.de/gadgets/netvibes/muskel-tipps-small.png" />
 
    <link rel="stylesheet" type="text/css" 
      href="http://www.netvibes.com/themes/uwa/style.css" />
    <script type="text/javascript" 
      src="http://www.netvibes.com/js/UWA/load.js.php?env=Standalone"></script>
 
    <title>Body Mass Index - Rechner</title>
    <link rel="icon" type="image/png" 
      href="http://www.muskel-tipps.de/favicon.ico" />
    <link rel="rich-icon" type="image/png"
  	  href="http://www.muskel-tipps.de/gadgets/netvibes/muskel-tipps.png"/>

 
<!-- Add your UWA preferences as needed -->
    <widget:preferences>
    </widget:preferences>
 
    <style type="text/css">
     /* Add your CSS rules */
    </style>
 
    <script type="text/javascript">
// this is just some sample code
// you can/should delete it all to place your own code instead
 
// this is how you would declare a global JS object
      var YourWidgetName = {};
 
      // this is how you would declare a global JS variable
      YourWidgetName.yourVariable = "My value";
 
      // this is how you would declare a global 'display()' function
      YourWidgetName.display = function(argument) {
        // display code
      }
 
      // widget.onLoad is the first method called,
      // nothing can be done without it,
      // the rest of the code must be triggered from here.
      widget.onLoad = function() {
        UWA.Data.getFeed(widget.getValue('url'), YourWidgetName.display); 
        var knopf = widget.body.getElementsByClassName("Berechne")[0];
 		knopf.onclick = rechne;
        }
      // you can move your start up code to your own method:
      // simply use widget.onLoad = myObject.myStartupMethod;
      function rechne()
  		{
  		gewicht = document.Rechner.Gewicht.value;
  		groesse = document.Rechner.Groesse.value;
  		bmi = gewicht / ((groesse / 100) * (groesse / 100))
  		bmi = Math.round(bmi)
  		document.Rechner.BMI.value = bmi;
  		return false; // wichtig, damit das Ergebnis stehen bleibt!
  		}
    </script>
  </head>
  <body>
  <p><img src="http://www.muskel-tipps.de/gadgets/netvibes/banner.jpg" alt="Fitness" /></p>
    <form name="Rechner">
<table width="280" border="0">
  <tr>
    <td>Gewicht (Kg):</td>
    <td><input type="text" size="10" name="Gewicht"/></td>
  </tr>
  <tr>
    <td>Gr&ouml;sse (cm):</td>
    <td><input type="text" size="10" name="Groesse"/></td>
    <td><input type="RESET" value="Zur&#x00FC;cksetzen"/></td>
  </tr>
  <tr>
    <td>BMI:</td>
    <td><input name="BMI" type="text"  size="10" disabled="disabled"/></td>
    <td><input type='button' class='Berechne' value="Berechnen" /></td>
  </tr>
  <tr>
            <td><br /></td>
            </tr>
            <tr>
            <th colspan="2">Was bedeutet das Resultat des BMI-Rechners: </th>
            <td><input type='button' onclick="widget.openURL('http://www.muskel-tipps.de/index.php/Tools/BMI-Rechner.html');" value="Info..." /></td>
            </tr>

</table>
</form>
</body>
</html>