Element.implement({
    getJSONData : function(fromAttr) {
        //the regex to get the json string
        var re = /({.*})/;
        //read in the element's attribute, class is default
        var data = re.exec( this.getProperty(fromAttr || 'class') );
        var JSONData = {};
        if( data[1] )
        {
            JSONData = JSON.decode(data[1]);
        }
        return JSONData;
    }
});



function verifyFlashVersion(needed) {

    var pv = Browser.Plugins.Flash.version.toString().split('.');
    pv[0] = parseInt(pv[0], 10);
    pv[1] = parseInt(pv[1], 10) || 0;
    pv[2] = Browser.Plugins.Flash.build;

    var v = needed.split(".");
    v[0] = parseInt(v[0], 10);
    v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
    v[2] = parseInt(v[2], 10) || 0;

    return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;

}