SPICEWORKS.plugin.add(     { name:"IP Subnet Calculator", version:"0.2", description:"IP Subnet Calculator using Google Mini Apps.", guid:"p-0b763830-cacd-012b-420f-0016353cc494-1232834958", settings:null, initialize:function(plugin){ // ==SPICEWORKS-PLUGIN==
// @name          IP Subnet Calculator
// @description   IP Subnet Calculator using Google Mini Apps.
// @version       0.2
// ==/SPICEWORKS-PLUGIN==  

// Name, description and version should be modified in the section above.
// Add your code here.  
SPICEWORKS.app.dashboard.addWidgetType({
  'name': 'google_subnet_calculator',
  'label': 'IP Subnet Calculator',
  'icon': 'http://www.google.com/favicon.ico',
  'prefs': [],

  'update': function (element, options) {

    // The embed code from Google Gadgets
    // You can find more codes like this at http://www.google.com/webmasters/gadgets/foryourpage/
    // or
    // http://www.googleminiapps.com/

    var googleEmbedCode = '<script src="http://www.gmodules.com/ig/ifr?url=http://moggert.net/subnetcalc.xml&synd=open&w=320&h=200&title=Subnet+Calculator&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>';

    // Remove the padding so that the iframe goes to the very edge. IE needs a width attribute.
    element.setStyle({'padding': '0', 'width': '338px'});

    // Pull out the google URL and convert it to output=html
    var embedURL = googleEmbedCode.match(/http:[^"]+/).first();
    embedURL = embedURL.gsub('output=js', 'output=html');

    // Build an <iframe>
    var iframe = new Element('iframe', {
      'src': embedURL,
      'frameborder': 0,
      'scrolling': 'no',
      'style': 'border:none; margin:0; padding:0; height:200px; width:338px'
    });

    // Insert the <iframe> into the Spiceworks dashboard widget
    element.insert(iframe);

  }
});
      }
    }
 );
