{*<!--

+---------------------------------------------------------------------------+
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
  
-->*}
{if !$bannerId}
<form action='banner-edit.php' method='POST'>
    <input type='hidden' name='clientid' value='{$clientId}'>
    <input type='hidden' name='campaignid' value='{$campaignId}'>
    <input type='hidden' name='bannerid' value='{$bannerId}'>

    <table border='0' width='100%' cellpadding='0' cellspacing='0'>
        <tr><td height='25' colspan='3'><b>{t str=ChooseBanner}</b></td></tr>
        <tr><td height='25'>
        <select name='type' onChange='this.form.action=this.form.action+"?clientid={$clientId}&campaignid={$campaignId}";this.form.submit();' {tabindex} >
            {html_options options=$bannerTypes selected=$bannerType}
        </select>
        </td></tr>
    </table>
</form>
{phpAds_ShowBreak}

{else}
    {* Only display the notices when *changing* a banner size, not for new banners *}
<div class='errormessage' id='warning_change_zone_type' style='display:none'> <img class='errormessage' src='{$assetPath}/images/errormessage.gif' align='absmiddle' />
<span class='tab-r'>{t str=Warning}:</span><br />
{t str=WarnChangeZoneType}
</div>

<div class='errormessage' id='warning_change_banner_size' style='display:none'> <img class='errormessage' src='{$assetPath}/images/warning.gif' align='absmiddle' />
<span class='tab-s'> {t str=Notice}</span><br />
{t str=WarnChangeBannerSize}
</div>
{/if}

{if $disabled}
<div class='errormessage' id='warning_banner_readonly'> <img class='errormessage' src='{$assetPath}/images/warning.gif' align='absmiddle' />
<span class='tab-s'> {t str=Notice}</span><br />
{t str=WarnBannerReadonly}
</div>
{/if}

{*banner form*}
{*YZZZ*}
{include file=form/form.html form=$form}
{*YYZZZ*}
{*/banner form*}


<script language='JavaScript'>
<!--

{if $bannerId}
    document.bannerHeight ={$bannerHeight};
    document.bannerWidth ={$bannerWidth};
{/if}

{literal}
    function selectFile(o, handleSWF)
    {
        var filename = o.value.toLowerCase();
        var bannerForm = findObj ('bannerForm');
        $(o).siblings('input[value=t]').attr('checked', true);

        if (handleSWF) {
            // Show SWF Layer
            var swflayer = findObj ('swflayer');
            var swfAlternate1 = findObj ('swfAlternative1');
            var swfAlternate2 = findObj ('swfAlternative2');
            var iab_rmedia_note = findObj ('iab_rmedia_note');

            if (swflayer) {
                if (filename.indexOf('swf') + 3 == filename.length) {
                    swflayer.style.display = '';
                    swfAlternate1.style.display = '';
                    swfAlternate2.style.display = '';
                    iab_rmedia_note.style.display = ''; 
                } else {
                    swflayer.style.display = 'none';
                    swfAlternate1.style.display = 'none';
                    swfAlternate2.style.display = 'none';
                    iab_rmedia_note.style.display = 'none';
                }
            }
        }

    }

    function oa_sizeChangeUpdateMessage(id)
    {
        if (document.bannerWidth != document.bannerForm.width.value ||
            document.bannerHeight !=  document.bannerForm.height.value) {
                oa_show(id);

        } else if (document.bannerWidth == document.bannerForm.width.value &&
                   document.bannerHeight ==  document.bannerForm.height.value) {
            oa_hide(id);
        }
    }

    function oa_show(id)
    {
        var obj = findObj(id);
        if (obj) { obj.style.display = 'block'; }
    }

    function oa_hide(id)
    {
        var obj = findObj(id);
        if (obj) { obj.style.display = 'none'; }
    }
{/literal}
//-->
</script>



