<?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="author" content="Beemway" />
    <meta name="website" content="http://www.beemway.com" /> 
    <meta name="description" content="Get the most up-to-date traffic information available for your route" />
    <meta name="screenshot" content="http://media.beemway.com/d48b50c6-8a9a-4be4-928e-1ece36bd56e1/280x280.jpg" />
    <meta name="thumbnail" content="http://media.beemway.com/d48b50c6-8a9a-4be4-928e-1ece36bd56e1/120x60.png" />
    <meta name="version" content="1.0" />
    <meta name="apiVersion" content="1.0" />
    <meta name="inline" content="true" />
    <meta name="debugMode" content="false" />
                    
    <title>TomTom HD Traffic</title>
    <link rel="icon" type="image/png" href="http://www.beemway.com/favicon.ico" />
     
    <style type="text/css">			
			.bmw-widget-1d32e3d4-a7f8-4037-8413-3165042e2bd8 {height:100%;width:100%}
		</style> 
 
 		<script type="text/javascript">           
			var _bmwWL,_bmwWiGuid="1d32e3d4-a7f8-4037-8413-3165042e2bd8";
			BeemwayWidgetLoader=function(wiGuid,el,widgetType,width,height) {
				this._wiGuid=wiGuid;
				this._el=el;
				this._widgetType=widgetType;
				this._width=width;
				this._height=height;
			};
			BeemwayWidgetLoader.prototype = {
				initialize: function() {
					var url = "http://beem.beemway.com/c/f.aspx?wi="+this._wiGuid;
					var iframeHtml = "<iframe id='bmw-frame' name='bmw-frame' frameborder='0' scrolling='no' src='"+url+"' allowtransparency='true' style='height:100%;width:100%;border-width:0px'></iframe>";				
					Util.$(this._el).innerHTML = iframeHtml;
					this.initSize();
				},
				initSize: function() {
					var conEl = Util.$(this._el);
					var currentWidth = widget.body.getDimensions().width-10;
					var height = Math.round((this._height/this._width) * currentWidth);
					height = (height > this._height) ? this._height : height;					
					if (this._widgetType!="FLASH") {
					  height+=30;
					}
					conEl.setStyle("height", height + "px");
					conEl.setStyle("width", currentWidth + "px");
				}
			};			
			Util={};
			Util.$=function(c){return widget.body.getElementsByClassName(c)[0];}
			      
      widget.onRefresh = function() {
				if (_bmwWL) {
					_bmwWL.initialize();
				}
			}			
			widget.onResize = function() {
				_bmwWL.initSize();
			}       
      widget.onLoad = function() {				
				_bmwWL = new BeemwayWidgetLoader(_bmwWiGuid, "bmw-widget-1d32e3d4-a7f8-4037-8413-3165042e2bd8", 'HTML', 380, 371);
				_bmwWL.initialize();
			}
    </script>    
  </head>
  <body>  
		<div class="bmw-widget-1d32e3d4-a7f8-4037-8413-3165042e2bd8"></div>  
  </body>
</html>
