"""
    MoinMoin - Advertisement Macro (link to Amazon, B&N, etc)

    Usage: [[Ad(type)]]

    @copyright: 2006 by Osvaldo Santana Neto <osantana@gmail.com>
    @license:   GNU GPL, see COPYING for details
"""

import random

ads = {
	'250x250': [
		u"""__put your 250x250 advertisement html here__""",
	],
	'468x60': [
		u"""__put your 468x60 advertisement html here__""",
		u"""__put other 468x60 advertisement html here__""",
	],
}

def execute(macro, arg):
    f = macro.formatter
    result = ''
    if arg:
        arg = arg.strip()

    if arg in ads:
        return random.choice(ads[arg])

    return f.strong(1) + f.text('Example: [[Ad(type)]]') + f.strong(0) + f.text(' - banner type.')


