<div id="selListAll">
 <div class="clsCommonTopAnalystRoundedCorner">
  <!--rounded corners-->
  <h2 class="clsInboxReadHeading">{$LANG.managesettings_title}</h2><div class="">
   <div class="clsShadedBg">
  <div class="lbtopanalyst">
    <div class="rbtopanalyst">
      <div class="bbtopanalyst">
        <div class="blctopanalyst">
          <div class="brctopanalyst">
            <div class="tbtopanalyst">
              <div class="tlctopanalyst">
                <div class="trctopanalyst clsPaddingLeft5">

{include file='../general/information.tpl'}
{if  $myobj->isShowPageBlock('form_settings')}
	<form name="form_edit_settings" id="form_edit_settings" enctype="multipart/form-data" method="post" action="{$myobj->getCurrentUrl()}">
		<table summary="{$LANG.managesettings_tbl_summary}" class="clsManageSettings" id="ning">
		  {if $CFG.admin.subscribe.tags }
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('subscribe_keywords')}"><label for="subscribe_keywords">{$LANG.managesettings_subscribe_keywords}</label>
				{$myobj->ShowHelpTip('subscribe_keywords','subscribe_keywords')}
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('subscribe_keywords')}">
					<input type="text" class="clsTextBox" name="subscribe_keywords" id="subscribe_keywords" maxlength="250" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('subscribe_keywords')}" />{$myobj->getFormFieldElementErrorTip('subscribe_keywords')}
					<p>{$LANG.managesettings_subscribe_keywords_info} {$myobj->form_settings.common_tag_size} {$LANG.managesettings_subscribe_keywords_invalid}</p>
				</td>
		   </tr>
		  {/if}
          <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('bio')}"><label for="bio">{$LANG.common_bio}</label>
				{$myobj->ShowHelpTip('bio','bio')}
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('bio')}">
					<p>{$LANG.common_allowed_htmltags} {$myobj->form_settings.htmlspecial}</p>
					<textarea name="bio" id="bio" rows="5"  maxlength="{$CFG.admin.bio_count}" tabindex="{smartyTabIndex}" onFocus="updatelength(this);" onKeyUp="updatelength(this);">{$myobj->getFormField('bio')}</textarea>{$myobj->getFormFieldElementErrorTip('bio')}
					<div id="ss" class="clsZeroColour"><span> {$LANG.header_remainig} : </span> <span class="clsCharacterLimit">{literal}<script language="javascript" type="text/javascript">var c = bio_count - document.getElementById('bio').value.length;document.write(c);</script>{/literal}</span></div>
				</td>
		   </tr>
		   <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('display_name')}">
              <label for="display_name">{$LANG.managesettings_username}</label> <span class="clsMandatory">*</span>
              {$myobj->ShowHelpTip('display_name','display_name')}

            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('display_name')}">
              <input type="text" class="clsTextBox {$myobj->getCSSFormFieldElementClass('display_name')}" name="display_name" id="display_name" maxlength="{$CFG.admin.display_name_max_size}" title="{$myobj->ShowToolTip('display_name')}" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('display_name')}" />{$myobj->getFormFieldElementErrorTip('display_name')}</td>
          </tr>

          {if (!($CFG.admin.module.facebook && $myobj->isFacebookUser()) && (!$myobj->chkIsNingUser())) && (!$myobj->IsTwitterUser()) && isMember()}
          <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('new_mail')}">
              <label for="new_mail">{$LANG.managesettings_newmail}</label>
              {$myobj->ShowHelpTip('new_mail','new_mail')}
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('new_mail')}">
              <input type="text" class="clsTextBox {$myobj->getCSSFormFieldElementClass('new_mail')}" name="new_mail" id="new_mail" title="{$myobj->ShowToolTip('new_mail')}" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('new_mail')}" />{$myobj->getFormFieldElementErrorTip('new_mail')}</td>
          </tr>
		  <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('password')}">
              <label for="password">{$LANG.managesettings_password}</label>
              {$myobj->ShowHelpTip('new_password','password')}
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('password')}">
              <input type="password" class="clsTextBox {$myobj->getCSSFormFieldElementClass('password')}" name="password" id="password" title="{$myobj->ShowToolTip('password')}" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('password')}" />{$myobj->getFormFieldElementErrorTip('password')}</td>
          </tr>
          <tr>
            <td class="{$myobj->getCSSFormLabelCellClass('confirm_password')}">
              <label for="confirm_password">{$LANG.common_confirm_password}</label>
              {$myobj->ShowHelpTip('confirmpassword','confirm_password')}
            </td>
            <td class="{$myobj->getCSSFormFieldCellClass('confirm_password')}">
              <input type="password" class="clsTextBox {$myobj->getCSSFormFieldElementClass('confirmpassword')}" name="confirm_password" id="confirm_password" title="{$myobj->ShowToolTip('confirmpassword')}" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('confirm_password')}" />{$myobj->getFormFieldElementErrorTip('confirm_password')}</td>
          </tr>
		  {/if}

          <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('gender')}"><label for="gender">{$LANG.common_gender}</label>
				{$myobj->ShowHelpTip('gender', 'sex')}
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('gender')}">
					<input class="clsChechRadio" type="radio" name="gender" id="male" tabindex="{smartyTabIndex}" value="Male" {if $myobj->getFormField('gender') eq 'Male' }  checked  {/if} /><label for="male">{$LANG.common_male_option}</label>
					<input class="clsChechRadio" type="radio" name="gender" id="female" tabindex="{smartyTabIndex}" value="Female" {if $myobj->getFormField('gender') eq 'Female' }  checked  {/if} /><label for="female">{$LANG.common_female_option}</label>{$myobj->getFormFieldElementErrorTip('gender')}
				</td>
		   </tr>
		   {if $CFG.admin.module.facebook && $myobj->isFacebookUser()}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('facebook_image')}"><label for="facebook_image">{$LANG.common_facebookImage}</label>
				{$myobj->ShowHelpTip('facebook_image', 'fb_image')}
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('facebook_image')}">
					<input class="clsChechRadio" onclick="setfacebookImageStatus('{$myobj->getUrl('managesettings','','','members')}', 'fb_image_status=Yes');" type="radio" name="fb_image" id="yes" tabindex="{smartyTabIndex}" value="{$LANG.common_yes_option}" {if $myobj->getFormField('fb_image') eq 'Yes' }  checked  {/if} /><label for="yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" onclick="setfacebookImageStatus('{$myobj->getUrl('managesettings','','','members')}', 'fb_image_status=No');" name="fb_image" id="no" tabindex="{smartyTabIndex}" value="{$LANG.common_no_option}" {if $myobj->getFormField('fb_image') eq 'No' }  checked  {/if} /><label for="no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('facebook_image')}
				</td>
		   </tr>
		   {elseif $myobj->chkIsNingUser()}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('ning_image')}"><label for="ning_image">{$LANG.ning_image}</label>
				{$myobj->ShowHelpTip('ning_image', 'ng_image')}
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('ning_image')}">
					<input class="clsChechRadio" onclick="setNingImageStatus('{$myobj->getUrl('managesettings','','','members')}', 'ng_image_status=Yes');" type="radio" name="ng_image" id="yes" tabindex="{smartyTabIndex}" value="{$LANG.common_yes_option}" {if $myobj->getFormField('ng_image') eq 'Yes' }  checked  {/if} /><label for="Yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" onclick="setNingImageStatus('{$myobj->getUrl('managesettings','','','members')}', 'ng_image_status=No');" name="ng_image" id="no" tabindex="{smartyTabIndex}" value="{$LANG.common_no_option}" {if $myobj->getFormField('ng_image') eq 'No' }  checked  {/if} /><label for="female">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('ning_image')}
				<small><p>{$LANG.ning_message_for_image}</p></small>
				</td>
		   </tr>
		   {elseif $myobj->IsTwitterUser()}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('twitter_image')}"><label for="twitter_image">{$LANG.common_twitterImage}</label>
				{$myobj->ShowHelpTip('twitter_image', 'tr_image')}
				</td>
				<td class="{$myobj->getCSSFormFieldCellClass('twitter_image')}">
					<input class="clsChechRadio" onclick="setTwitterImageStatus('{$myobj->getUrl('managesettings','','','members')}', 'tr_image_status=Yes');" type="radio" name="tr_image" id="yes" tabindex="{smartyTabIndex}" value="{$LANG.common_yes_option}" {if $myobj->getFormField('tr_image') eq 'Yes' }  checked  {/if} /><label for="yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" onclick="setTwitterImageStatus('{$myobj->getUrl('managesettings','','','members')}', 'tr_image_status=No');" name="tr_image" id="no" tabindex="{smartyTabIndex}" value="{$LANG.common_no_option}" {if $myobj->getFormField('tr_image') eq 'No' }  checked  {/if} /><label for="no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('twitter_image')}<br />
					<small><b>{$LANG.note_twitter_user}</b>{$LANG.twitter_msg}</small>
				</td>
		   </tr>
		   {/if}


       {if  isUserImageAllowed()}
			<tr>
				<td class="clsFormFieldCellDefault"></td>
				<td class="clsFormFieldCellDefault">
					<div id="selUserImage">
                   {if $myobj->form_settings.user_details_arr.photo_server_url && $myobj->form_settings.user_details_arr.photo_ext  ||  $myobj->form_settings.user_details_arr.image_path}
						<p id="selImageBorder">{$myobj->displayProfileImage($myobj->form_settings.user_details_arr, 'medium', false)}</p>
					{/if}
        			</div>
				</td>
			</tr>
		   <tr>
            {if $CFG.admin.use_profile_external_image}
				<td class="{$myobj->getCSSFormLabelCellClass('image_path')}"><label for="image_path">{$LANG.managesettings_image_path}</label>{$myobj->ShowHelpTip('image_path','image_path')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('image_path')}">
					<p><input type="text" class="clsTextBox" name="image_path" id="image_path" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('image_path')}" />{$myobj->getFormFieldElementErrorTip('image_path')}</p>
					<p>{$LANG.managesettings_image_path_info}</p>
				</td>
			{else}
				<td class="{$myobj->getCSSFormLabelCellClass('photo')}"><label for="photo">{$LANG.upload_photo}</label>{$myobj->ShowHelpTip('upload_avatar_image','photo')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('photo')}">
					<input type="file" class="clsFileBox" name="photo" id="photo" tabindex="{smartyTabIndex}" />{$myobj->getFormFieldElementErrorTip('photo')}
					<p>{$myobj->form_settings.str_ireplace}</p>
					<p>{$myobj->form_settings.photo_allowed_image_type}</p>
				</td>
			{/if}
    	   </tr>
		   <tr>
				<td colspan="2" class="clsVerticalAlign {$myobj->getCSSFormLabelCellClass('avatar')}">{$LANG.select_avartar}{$myobj->ShowHelpTip('select_avatar_image')}</td>
		   </tr>
		   <tr>
				<td colspan="2" class="{$myobj->getCSSFormFieldCellClass('avatar')}"><div id="selShowAvatarImages"></div></td>
		   </tr>
	{/if}
	{if !($CFG.admin.module.facebook && $myobj->isFacebookUser()) && isMember()}
		  <tr>
		   		<td class="clsAllEmail"><div class="AskQuestionSubHead"><label for="all_email_notification">{$LANG.managesettings_all_email_notification}</label></div></td>
		   		<td class="clsAllEmail"><p class="clsBgCheckBox"><input type="checkbox" name="all_email_notification" id="all_email_notification" onClick="checkAllMail(this.form);" tabindex="{smartyTabIndex}"  /></p></td>
		   </tr>
		   {if $CFG.admin.subscribe.tags}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('keyword_mail')}"><label for="keyword_mail_yes">{$LANG.managesettings_keyword_mail}</label>{$myobj->ShowHelpTip('keyword_mail','keyword_mail')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('keyword_mail')}">
					<input class="clsChechRadio" type="radio" name="keyword_mail" id="keyword_mail_yes"  onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="Yes"{if $myobj->getFormField('keyword_mail') eq 'Yes'} checked {else} {/if} /><label for="keyword_mail_yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" name="keyword_mail" id="keyword_mail_no" onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="No"{if $myobj->getFormField('keyword_mail') eq 'No' } checked {else} {/if}  /><label for="keyword_mail_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('keyword_mail')}
				</td>
		   </tr>
		   {/if}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('reply_mail')}"><label for="reply_mail_yes">{$LANG.managesettings_reply_mail}</label>{$myobj->ShowHelpTip('reply_mail')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('reply_mail')}">
					<input class="clsChechRadio" type="radio" name="reply_mail" id="reply_mail_yes"  onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="Yes"{if $myobj->getFormField('reply_mail') eq 'Yes'}  checked {else} {/if}  /><label for="reply_mail_yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" name="reply_mail" id="reply_mail_no" onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="No"{if $myobj->getFormField('reply_mail') eq 'No' } checked {else} {/if}  /><label for="reply_mail_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('reply_mail')}
				</td>
		   </tr>
            {if $CFG.admin.favorite.allowed}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('favorite_mail')}"><label for="favorite_mail_yes">{$LANG.managesettings_favorite_mail}</label>{$myobj->ShowHelpTip('favorite_mail')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('favorite_mail')}">
					<input class="clsChechRadio" type="radio" name="favorite_mail" id="favorite_mail_yes"  onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="Yes"{if $myobj->getFormField('favorite_mail') eq 'Yes'}  checked {else} {/if}  /><label for="favorite_mail_yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" name="favorite_mail" id="favorite_mail_no" onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}"  value="No"{if $myobj->getFormField('favorite_mail') eq 'No'}  checked {else} {/if}  /><label for="favorite_mail_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('favorite_mail')}
				</td>
		   </tr>
		  {/if}
		   {if $CFG.admin.best_answers.allowed}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('best_ans_mail')}"><label for="best_ans_mail_yes">{$LANG.managesettings_best_answer_mail}</label>{$myobj->ShowHelpTip('best_ans_mail')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('best_ans_mail')}">
					<input class="clsChechRadio" type="radio" name="best_ans_mail" id="best_ans_mail_yes"  onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="Yes"{if $myobj->getFormField('best_ans_mail') eq 'Yes'} checked {else} {/if}  /><label for="best_ans_mail_yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" name="best_ans_mail" id="best_ans_mail_no" onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="No"{ if $myobj->getFormField('best_ans_mail') eq 'No'} checked {else} {/if}  /><label for="best_ans_mail_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('best_ans_mail')}
				</td>
		   </tr>
			{/if}
		   {if $CFG.admin.abuse_questions.allowed}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('abuse_mail')}"><label for="abuse_mail_yes">{$LANG.managesettings_abuse_mail}</label>{$myobj->ShowHelpTip('abuse_mail')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('abuse_mail')}">
					<input class="clsChechRadio" type="radio" name="abuse_mail" id="abuse_mail_yes"  onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="Yes"{if $myobj->getFormField('abuse_mail') eq 'Yes'} checked {else} {/if}  /><label for="abuse_mail_yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" name="abuse_mail" id="abuse_mail_no" onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="No"{if $myobj->getFormField('abuse_mail') eq 'No'} checked {else} {/if}  /><label for="abuse_mail_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('abuse_mail')}
				</td>
		   </tr>
		   {/if}
		   {if $CFG.admin.module.mail}
		   <tr>
				<td class="{$myobj->getCSSFormLabelCellClass('internal_mail')}"><label for="internal_mail_yes">{$LANG.managesettings_internal_mail}</label>{$myobj->ShowHelpTip('internal_mail')}</td>
				<td class="{$myobj->getCSSFormFieldCellClass('internal_mail')}">
					<input class="clsChechRadio" type="radio" name="internal_mail" id="internal_mail_yes"  onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="Yes"{if $myobj->getFormField('internal_mail') eq 'Yes'} checked {else} {/if}  /><label for="internal_mail_yes">{$LANG.common_yes_option}</label>
					<input class="clsChechRadio" type="radio" name="internal_mail" id="internal_mail_no" onClick="checkOnLoadMail(this.form, '_home');" tabindex="{smartyTabIndex}" value="No"{if $myobj->getFormField('internal_mail') eq 'No'} checked {else} {/if} /><label for="internal_mail_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('internal_mail')}
				</td>
		   </tr>
		   {/if}
	{else}
			<tr id="facebook">
				<td class="clsAllEmail"><label for="all_email_notification">{$LANG.managesettings_all_email_notification}</label></td>
			  	<td>
			  		{$LANG.facebook_user}<a href="JavaScript:void(0)" onclick="openFacebook();return false;"> {$LANG.facebook_click}</a> {$LANG.facebook_mails}
			 	</td>
	       	</tr>
	       	<tr>
			   <td></td>
			   <td>
	            {literal}
	                <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
	            {/literal}
	       		{if $show_publish_stream}
            		{literal}
                    	<fb:prompt-permission perms="read_stream,publish_stream">{/literal}{$LANG.facebook_publish_stream}{literal}</fb:prompt-permission>
                	{/literal}
                	 <br />
             	{/if}
                 {if $show_offline_access}
                 	{literal}
                        <fb:prompt-permission perms="offline_access">{/literal}{$LANG.facebook_offline_access}{literal}</fb:prompt-permission>
					{/literal}
				 {/if}
        	</td></tr>
             {literal}
                <script type="text/javascript">
                    FB_RequireFeatures(["XFBML"], function()
                                            {
                                              FB.Facebook.init("{/literal}{$CFG.facebook.api_key}{literal}", "{/literal}{$CFG.site.url}{literal}facebook/xd_receiver.htm");

                                            });
                    FB.Connect.showPermissionDialog('status_update', function(accepted) { window.location.reload(); } );
                </script>
            {/literal}
	{/if}


         {foreach key=inc item=value from=$myobj->form_settings.populateIndexPageFields}
        	{if $value.headings_count_cond == 1 and $value.check_index_block == 1}
            	<tr id="homepage">
                	<td class="clsAllEmail"><div class="AskQuestionSubHead"><label for="all_home_settings">{$LANG.index_block_settings}</label></div></td>
                    <td class="clsAllEmail"><p class="clsBgCheckBox"><input type="checkbox" name="all_home_settings" id="all_home_settings" onClick="checkAllSettings(this.form, '_home');" tabindex="{smartyTabIndex}"  /></p></td>
                </tr>
            {/if}
            {if $value.check_index_block == 1}
            	 <tr>
                    <td class="{$myobj->getCSSFormLabelCellClass($value.value)}"><label for="{$value.value|cat:'_yes'}">{$value.label}</label>{$myobj->ShowHelpTip($value.value)}
                    </td>
                    <td class="{$myobj->getCSSFormFieldCellClass($value.value)}">
                        <input class="clsChechRadio" type="radio" name="{$value.value}" id="{$value.value}_yes" onClick="checkOnLoadSettings(this.form, '_home');" tabindex="{smartyTabIndex}" value="yes"{ if $myobj->getFormField($value.value) eq 'yes' }  checked {else} {/if}/><label for="{$value.value}_yes">{$LANG.common_yes_option}</label>
                        <input class="clsChechRadio" type="radio" name="{$value.value}" id="{$value.value}_no" onClick="checkOnLoadSettings(this.form, '_home');" tabindex="{smartyTabIndex}"  value="no"{ if $myobj->getFormField($value.value) eq 'no' } checked {else} {/if} /><label for="{$value.value}_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip($value.value)}
                    </td>
                </tr>
			{/if}
        {/foreach}


          <tr>
		   		<td class="clsFormFieldCellDefault">&nbsp;</td>
				<td class="{$myobj->getCSSFormFieldCellClass('submit')}">
					<div class="clsSubmitLeft">
						<div class="clsSubmitRight">
							<input type="submit" class="clsSubmitButton" name="managesettings_submit" id="submit" tabindex="{smartyTabIndex}" value="{$LANG.common_update}" />
						</div>
					</div>
					<div class="clsCancelLeft">
						<div class="clsCancelRight">
							<input type="submit" class="clsCancelButton" name="managesettings_cancel" id="managesettings_cancel" tabindex="{smartyTabIndex}" value="{$LANG.common_cancel}" />
						</div>
					</div>
					{if $myobj->form_settings.trim_task neq '' }
               				<input type="hidden" name="task" id="task" value="{$myobj->getFormField('task')} "  />
					{/if}
				</td>
		   </tr>
		</table>
		<input type="hidden" name="avatar" value="{$myobj->getFormField('avatar')}" />
	</form>
{/if}
</div></div>
  </div>
              </div>
            </div>
          </div>
        </div>
      </div>
	  </div>
    </div>
  </div>
  <!--end of rounded corners-->
</div>
{if !($CFG.admin.module.facebook && $myobj->isFacebookUser()) && isMember()}
{literal}
	<script type="text/javascript" defer="defer">
		checkOnLoadMail(document.form_edit_settings);
		function checkOnLoadMail(frm)
			{
				var frmLength = frm.elements.length;
				var is_ok = true;
				for ( var i=0; i<frmLength; i++)
					{
						if ((frm.elements[i].name.indexOf('_mail')!=-1) && (frm.elements[i].type == 'radio'))
							{
								if($(frm.elements[i]).value == 'No' && $(frm.elements[i]).checked == true)
									{
										is_ok = false;
									}
							}
					}
				if(is_ok)
					$('all_email_notification').checked = true;
				else
					$('all_email_notification').checked = false;
				return true;
			}
		</script>
{/literal}
{/if}
{literal}
		<script type="text/javascript" defer="defer">
		checkOnLoadSettings(document.form_edit_settings);
		function checkOnLoadSettings(frm1)
			{
				var frmLength = frm1.elements.length;
				var is_ok = true;
				for ( var i=0; i<frmLength; i++)
					{
						if ( (frm1.elements[i].name.indexOf('_mail')==-1) && (frm1.elements[i].type == 'radio') && ($(frm1.elements[i]).name)!= 'sex' )
							{

								if($(frm1.elements[i]).value == 'no' && $(frm1.elements[i]).checked == true)
									{
										is_ok = false;
									}
							}
					}
				if(is_ok)
					$('all_home_settings').checked = true;
				else
					$('all_home_settings').checked = false;
				return true;
			}

	</script>
{/literal}