/* put all dynamic variables in a single structure used by following static scripts */ var pmi_glob = { "link": { "css": "font-family: Tahoma; font-size: 11px; color: #B7B7B7; background-color: #inherit; width: auto; text-decoration: underline;", "label": "Share", "index": 0 }, "button": { "css": "font-family: Tahoma; font-size: 11px; color: #B7B7B7; background-color: #676767; width: auto; text-decoration: inherit;", "label": "Share", "index": 0 }, "feed": { "css": "font-family: Tahoma; font-size: 11px; color: #B7B7B7; background-color: #EFEFEF; width: 100; text-decoration: inherit;", "label": "Share", "index": 0 }, "program" : { "id": "173", "name": "PopularMeida", "active" : "true", "callback" : "http://share.studio.strongmail.com/panel/index/669?u=", "statCallback" : "http://share.studio.strongmail.com/share/stat/669", "type" : "button_plus_feed", "show_mlink" : "", "mlink_type" : "", "sharing_services" : "" }, "state" : { "isOpen" : false, "wasOpen" : false, "loaded" : false }, "data" : { "feed_content" : null, "panel_data" : null, "panel_url" : null }, "config" : { "serverPath" : "http://share.studio.strongmail.com", "overlay_image_path" : "http://share.studio.strongmail.com/images/trans.png" } }; // avoid multiple loads of feedback functionality var pmi_is_loaded = (typeof(pmi_cond_glob) == 'undefined') ? false : true; var pmi_cond_glob = pmi_cond_glob || null; if (!pmi_is_loaded) { // alert('not loaded!'); pmi_cond_glob = { 'state' : { 'loaded' : false } }; } /* */ var pmi_program_code = null; var pmi_params = null; var pmi_action = null; var pmi_protocol = 'http' // Find the script on the page var pmi_scripts = document.getElementsByTagName('script'); for (i=0; i < pmi_scripts.length; i++) { if (match = pmi_scripts[i].src.split('?')[0].match(/\/share\/(header|widget|button|link|feed)\/(\d+)$/)) { pmi_action = match[1]; pmi_program_code = match[2]; if (pmi_scripts[i].src.split('?')[1]) { pmi_params = pmi_scripts[i].src.split('?')[1]; } if (pmi_scripts[i].src[4]=='s') { // https pmi_protocol = 'https'; } } } function getQueryVariable(qs, variable) { if(qs) { var query = qs.split('#')[0]; // Don't care about the anchor var vars = query.split("&"); for (var i=0;i