<div id="selEditLinks">
	<h2 class="clsAvatarHeading">{$LANG.avatar_title}</h2>
	{include file='../general/information.tpl'}
	{if $myobj->isShowPageBlock('form_add_avatar')}
		<div id="selEditLinks">
		<form name="formAddAvatar" id="formAddAvatar" enctype="multipart/form-data" method="post" action="{$myobj->getCurrentUrl()}?mode={$myobj->getFormField('mode')}" autocomplete="off">
		<table class="clsCommonTable" summary="{$LANG.avatar_add_tbl_summary}">
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('avatar')}"><label for="avatar">{$LANG.avatar_name}</label></td>
				<td class="{$myobj->getCSSFormFieldCellClass('avatar')}">
					<input type="file" name="avatar" id="avatar" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('avatar')}" />{$myobj->getFormFieldElementErrorTip('avatar')}
				     <p>{$maxsize}</p>
					<p>{$allowed_type}</p>
				</td>
		   </tr>
		   <tr>
	           	<td class="{$myobj->getCSSFormFieldCellClass('temp')}">&nbsp;</td>
				<td class="{$myobj->getCSSFormFieldCellClass('submit')}">
					<input type="submit" class="clsSubmitButton clsMediumSubmitButton" name="add_avatar" id="add_avatar" tabindex="{smartyTabIndex}" value="{$LANG.avatar_add}" />&nbsp;
				</td>
		   </tr>
		</table>
		</form>
	</div>
	{/if}
	{if  $myobj->isShowPageBlock('form_view_avatar')}
		<!-- Confirmation Div -->
	<div id="selMsgConfirm" class="selMsgConfirm" style="display:none;position:absolute;">
		<form name="formConfirm" id="formConfirm" method="post" action="{$myobj->getCurrentUrl()}" autocomplete="off">
		<p id="confirmMessage"></p>
		<table class="clsCommonTable">
			<tr>
		      	<td>
				  	<input type="submit" class="clsSubmitButton" name="confirm_action" id="confirm_action" value="{$LANG.common_confirm}" tabindex="{smartyTabIndex}" /> &nbsp;
		          	<input type="button" class="clsCancelButton" name="cancel" id="cancel" value="{$LANG.common_cancel}" tabindex="{smartyTabIndex}" onClick="return hideAllBlocks('formViewAvatar');" />
		          	<input type="hidden" name="avatar_ids" />
		          	<input type="hidden" name="action" />
				</td>
	  		</tr>
		</table>
		</form>
	</div>

	<div id="selViewLinks">
		<form name="formViewAvatar" id="formViewAvatar" method="post" action="{$myobj->getCurrentUrl()}" autocomplete="off">
			{if $myobj->form_view_avatar.displayAvatars.total_count gt 0}
               <table class="clsCommonTable" cellpadding="0" summary="{$LANG.avatar_view_tbl_summary}">
                         <tr>
						<th colspan="8"><input type="checkbox" name="checkall" id="checkall" tabindex="{smartyTabIndex}" onclick="selectAll(this.form)"/>&nbsp;{$LANG.avatar_select_all}</th>
					</tr>
					{assign var='cols' value='0'}
					{assign var='total' value='4'}
					{assign var='a' value='0'}
					{foreach key=inc item=value from=$myobj->form_view_avatar.displayAvatars.row}
						{if $cols eq 0}
							<tr>
						{/if}
							<td><input type="checkbox" name="avatar_ids[]" value="{$value.img_file}" onClick="disableHeading('formViewAvatar');" tabindex="{smartyTabIndex}" /></td>
							<td><img src="{$value.imp_url}" /></td>
						{counter  assign=cols}
						{if $cols eq 4}
							</tr>
							{counter start=0}
						{/if}
					{/foreach}
					{if $cols}
						<td colspan="{$a = 4- $cols*2}">&nbsp;</td>
					</tr>
				   {/if}
					<tr>
						<td colspan="8"  class="clsButtonAlignment {$myobj->getCSSFormFieldCellClass('action')}">
							<select name="action" id="action" tabindex="{smartyTabIndex}" >
								{foreach key=inc item=value from=$myobj->form_view_avatar.displayAvatars.populateFilterList}
									<option value="{$value.key}" {$value.selected_chk}>{$value.name}</option>
								{/foreach}
							</select>
							<a href="#" id="dAltMlti"></a>
							<input type="button" name="avatar_action" id="avatar_action" class="clsSubmitButton" onclick="getMultiCheckBoxValue('formViewAvatar', 'checkall', '{$LANG.avatar_err_tip_select_avatar}');if(multiCheckValue!='') getAction()" value="{$LANG.common_submit}" tabindex="{smartyTabIndex}" />
						</td>
					</tr>
			</table>
			{else}
                         <div id="selMsgAlert">
                                <p>{$LANG.common_no_records_found}</p>
                         </div>
			{/if}
		</form>
	</div>
	{/if}
</div>

