/****************************

 * this file just contains the functions to create the indexmedia buttons

 *

 * Do like this to create a button:

 * <script type="text/javascript" charset="utf-8">

 * show_indexmedia_button("url","button_type","title","summary");

 * </script>

 * replace the url with the url of the content to submit to WC

 * replace the button_type with one of these: 'default' 'text' 'wide' 'tall'

 * title and summary allow you to send WC a headline and summary

 * button_type, title and summary are optional

 ****************************/

base_url = "http://www.indexmedia.ro"

styles = {

  'text':{

    'width':'200px',

    'height':'18px',

    'border':'0px'

  },

  'tall':{

    'width':'50px',

    'height':'68px'

  },

  'wide':{

    'width':'119px',

    'height':'33px'

  },

  'default':{

    'width':'75px',

    'height':'40px'

  }

}



// dont change this stuff

counter = 0;



function show_indexmedia_button() {

  var div_id = "wc-button-"+counter;

  counter += 1;

  var url = arguments[0];

  if ( arguments.length > 1 )

    var type = arguments[1];

  else var type = 'default';

  if ( arguments.length > 2 )

    var title = arguments[2];

  else var title = '';

  if ( arguments.length > 3 )

    var summary = arguments[3];

  else var summary ='';

  

  

  

  document.write('<iframe scrolling="no" allowTransparency="true" name="'+div_id+'" id="'+div_id+'" src="'+base_url+'/drigg_external/display_button?url='+escape(url)+'&title='+escape(title)+'&summary='+escape(summary)+'&style='+type+'" frameborder="0" scrolling="0" width="'+styles[type]['width']+'" height="'+styles[type]['height']+'"></iframe>');

}

