<?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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Expires" content="" />
    <meta name="inline" content="true" />
    <meta name="debugMode" content="true" />
    <meta name="apiVersion" content="1.0" />
    <link rel="stylesheet" type="text/css" href="http://www.netvibes.com/themes/uwa/style.css" />
    <title>Recommended Dietary (Caloric) Intake</title>
    <link rel="icon" type="image/png" href="http://img.clearspring.com/widgets/499d45988f79d80f/img16x16.png" />
    <meta name="author" content="medgadgets" />
	<meta name="description" content="A useful tool to determine the recommended dietary (caloric) intake, depending on your goals: muscle building, weight loss or maintenance. You have to choose the gender and daily activity level, and input, in imperial measurement units, height and weight, and finally your age. The calculator will return the necessary daily caloric intake in terms of carbs, proteins and fat, and also the total daily caloric intake." />
    

    
    <style type="text/css"></style>
    <script type="text/javascript"><![CDATA[
    
    var Clearspring_W499d45988f79d80f = {};
    var Clearspring_W499d45988f79d80f_UserConfigArgs = '';
    
    var Clearspring_W499d45988f79d80f_ConfigArray = [];

    Clearspring_W499d45988f79d80f.getUser = function() {
        if( ( document.location.toString().indexOf('preview=true') >= 0 ) || ( document.location.toString().indexOf('platform=eco') >= 0 ) ) {
            Clearspring_W499d45988f79d80f.setWidget('/o/499d45988f79d80f/9i575/-/-', '499d45988f79d80f');
        }
        else {
            var widgetURL = widget.getValue('widgetURL');
            if(widgetURL == undefined)
            {
            // OLD...
            // var request = new Ajax.Request(NV_AJAX_REQUEST_URL + '?url=' + escape('http://widgets.clearspring.com/o/499d45988f79d80f/9i575/-/-/template.js'), {method: 'get', onSuccess: updateWidget} );
            // NEW...
                UWA.Data.getText('http://widgets.clearspring.com/o/499d45988f79d80f/9i575/-/-/template.js', Clearspring_W499d45988f79d80f.updateWidget );
            }else {
                var id = widget.getValue('widID');
                Clearspring_W499d45988f79d80f.setWidget(widgetURL, id);
            }
        }
    }

    Clearspring_W499d45988f79d80f.updateWidget = function(response) {
        var urlreg = /UR0:'([^']*)'/;
        // Old...
        // var url = response.responseText.match(urlreg);
        // New
        var url = response.match(urlreg);
        widget.setValue('widgetURL', url[1]);
        var theWidgetURL = url[1];
        var brokenURL = theWidgetURL.split('/');
        var id = 'W'+brokenURL[3];
        widget.setValue('widID', id);
        Clearspring_W499d45988f79d80f.setWidget(theWidgetURL,id);
    }

    Clearspring_W499d45988f79d80f.doConfigData = function() {
        try {

        }catch(err) {
        }
    }

    Clearspring_W499d45988f79d80f.setWidget = function(widgetURL, widID) {
        widget.onResize(); // need to resize before setBody fires onUpdateBody event
        var url = 'http://widgets.clearspring.com/csproduct/web/show/flash?opt=-MAX/1/-PUR/http%253A%252F%252Fwww.netvibes.com'+escape(Clearspring_W499d45988f79d80f_UserConfigArgs)+'&url='+widgetURL;
        widget.setBody('<iframe scrolling="no" frameborder="0" style="width:100%;height:100%;border:0px" src="'+url+'"></iframe>');
    }

    widget.onLoad = function() {
        Clearspring_W499d45988f79d80f.doConfigData();
        Clearspring_W499d45988f79d80f.getUser();
    }

    Clearspring_W499d45988f79d80f.resizeToMax = function() {
        var wP = 297 + 14;
		// The Widget itself
		var container = widget.body;
		var containerParent = container.parentNode;
		// Parent
		var containerParentWidth = getDimensions( containerParent ).width;
		containerParentWidth = containerParentWidth > wP ? wP : containerParentWidth;
		var containerParentH = 1.1447811447811447 * containerParentWidth;
		containerParentH = containerParentH > 340 ? 340 : containerParentH;
		// widget
		var wwidth = containerParentWidth - 14;
		wwidth = wwidth > 297 ? 297 : wwidth;
		var newH = 1.1447811447811447 * wwidth;
		newH = newH < 340 ? 340 : newH;
		container.setStyle('height', newH + 'px');
        container.setStyle('width', wwidth + 'px');
    }

	function getDimensions(element) {
		var display = element.style.display;
		if (display != 'none' && display != null) {
			// Safari bug
			return {width: element.offsetWidth, height: element.offsetHeight};
		}
		var els = element.style;
		var originalVisibility = els.visibility;
		var originalPosition = els.position;
		var originalDisplay = els.display;
		els.visibility = 'hidden';
		//els.position = 'absolute';
		els.display = 'block';
		var originalWidth = element.clientWidth;
		var originalHeight = element.clientHeight;
		els.display = originalDisplay;
		els.position = originalPosition;
		els.visibility = originalVisibility;
		return {width: originalWidth, height: originalHeight};
	}

    widget.onResize = function() {
        Clearspring_W499d45988f79d80f.resizeToMax();
    }

	function addEvent( obj, evt, func ) {
		if( window.addEventListener ) {
			evt = evt.replace(/^on/i,"");
			obj.addEventListener( evt, func, false );
		} else {
			obj.attachEvent( evt, func );
		}
	}
	addEvent( window, 'onresize', Clearspring_W499d45988f79d80f.resizeToMax );
    ]]>
    </script>
  </head>
  <body>
    <div style="padding:0;float:center;margin:0 auto;width:100%;" >Loading...</div>
  </body>
</html>