<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />{assign var="menuItemID" value=$menuItemID|default:''}
<title>{$language.lblAdmin} : {if $menuItemID}{$language.lblEditMenuItem}{else}{$language.lblAddNewMenuItem}{/if}</title>
{include file='CommonStyles.tpl'}
{assign var="jqueryversion" value='1.9'}
{include file='CommonJavaScript.tpl'}
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/add-edit.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" media="screen" />
{include file='CommonCustomStyles.tpl'}
{literal}
<style type="text/css">
.fileuploader_edit_section {display:none !important;}
</style>
{/literal}
<script>
    $(document).ready(function () {
     $(".caturl").hide();
     });
</script>
</head><body>
<div class="outer_container">
{include file='CommonTop.tpl'} 
<!--End:Header Container--> 
<!--***********************************************************************END HEADER CONTAINER******************************************************-->
<div class="content_container">
  <div class="content_wrapper">
    {if $menuItemID}<div class="fixing_right">

				{if $resLanguageSelect}
				 <script type="text/javascript" src="{$view_javascript}/language.plugin.js"></script>
				  {if $view_common_languages|@count>1}
				 <div class="language-block-inner normal">						  
                                     {if $contentLangSelctdDet.languageID>0}
                                         {assign var="selContentLang" value=$contentLangSelctdDet.languageName}
                                         {assign var="selContentLangImage" value=$contentLangSelctdDet.languageImage}
                                         {else}
                                              {assign var="selContentLang" value=$view_content_languageName}
                                              {assign var="selContentLangImage" value=$view_common_languageImage}
                                             {/if}
						  <div class="flagbox"><img src="{$view_host}/public/uploads/languages/{$selContentLangImage|escape}" width="14" height="11" alt="{$selContentLang}" /></div>
						  <div class="languagebox_head-inner">{$selContentLang}</div><span class="arw"></span> <span class="clse">x</span>				         
						   <div class="languageList-inner" id="languageDropdown">
							<ul>
							  {foreach from=$resLanguageSelect item="resCommonLanguages" key="key"}
							  {if $selContentLang neq $resCommonLanguages.languageName}
							  <li id="content_language_{$resCommonLanguages.languageID}" class="clearfix">
								<div class="flagbox-inner"><img src="{$view_host}/public/uploads/languages/{$resCommonLanguages.languageImage|escape}" width="14" height="11" alt="{$resCommonLanguages.languageName}" /></div>
								<div class="languagebox-inner">{$resCommonLanguages.languageName}</div>
							  </li>
							  {/if}
							  {/foreach}
							</ul>
						  </div>
						</div>
				  {/if}
				  {/if}
				</div>{/if}
				<h2>{if $menuItemID}{$language.lblEditMenuItem}{else}{$language.lblAddNewMenuItem}{/if}</h2>
    <div id="common_message" ></div>
    <div class="tab-content-outer clearfix">
      <div class="left_block fixing_left">
        <div class="tab-block-01">
          <h2>{html->anchor priv_href="custommenu/listitemdetails/" href="custommenu/listitemdetails/" content=$language.lblMenuItem}</h2>
        </div>
        <ul class="left-tab">
          <li class="sub first-item"><a href="javascript:void(0);" rel="basic-info" class="left-tab-a active">{$language.lblBasicInfo}</a></li>        
		 {if $menuItemID}
			{if $bannerprivilege}
				<li class="sub" style="{if $menuResultItem.moduleKey|default:''!='singlepage'}display:none;{/if}"><a href="javascript:void(0);" rel="basic-info" class="left-tab-a">{$language.lblBanners}</a></li> 
			{/if}
			{if $blockprivilege}
				<li class="sub" style="{if $menuResultItem.moduleKey|default:''!='singlepage'}display:none;{/if}"><a href="javascript:void(0);" rel="basic-info" class="left-tab-a">{$language.lblBlocks}</a></li>
			{/if}
            <li class="sub" style="{if $menuResultItem.moduleKey|default:''!='singlepage'}display:none;{/if}"><a href="javascript:void(0);" rel="track"  class="left-tab-a">{$language.lblSalesTracking}</a></li>{/if}
        </ul>
      </div>
      <div class="right_block fixing_right">
         {form->start name="frmMenuItem"  method="post"}
        {form->hidden name=menuItemID value=$menuItemID}
        {form->hidden name=parentID value=$menuResultItem.parentID|default:''}
		{form->hidden name=itemTypeKey value=$menuResultItem.moduleKey|default:''}
        {form->hidden name=itemOrderID value=$menuResultItem.orderID|default:''}
		{form->hidden name=menuItemKeyOld value=$menuResultItem.menuItemKey|default:''}
                {form->hidden name=itemparams value=$menuResultItem.params|default:''}
         <div id="basic-info-section" class="save-floating-section">
        <div class="cm-buttons-floating" id="menuSubmit">
          <div class="submit-position"> {form->submit name="submitMenuItem" id="submit"  class="curve-3 button03" value="{$language.lblSave}" tabindex="1"} 
            {$language.lblOr}{html->anchor priv_href="custommenu/menuitems/" href="/custommenu/menuitems/" content=$language.lblCancel} </div>
        </div>
        <div class="cm-buttons"> </div>
        </div>
        <div class="tabpane" style="display:block;">
          <div class="tabpane_inner"> <span class="BreadCrump">
            <ul class="clearfix">
              <li>{html->anchor href="custommenu/listitemdetails/" rel="" content="{$language.lblMenuItems}"} &raquo; </li>
              <li><span>{$language.lblBasicInfo}</span></li>
            </ul>
            </span>
            <div class="form_listing">
              <ul class="levl-00">
                <li>
                  <h3><span>{form->errors name='frmMenuItem'}{$language.lblBasicInfo}</span></h3>
                </li>
                <li class="clearfix">
                  <div class="left_box">
                    <ul class="levl-01">
                      <li class="clearfix">
                        <div class="left01 mandatory ">{$language.lblMenuItemType}</div>
                        <div class="right01 fixing_right">{form->select tabindex="1" name="menuItemType" caption="->{$language.lblSelect}"  content=$resFrontendModules  validate="required" error=$language.errMenuItemType onChange="changeItemType();"} </div>
                      </li>
                      <li class="clearfix">
                        <div class="left01 mandatory">{$language.lblMenuItemTitle}</div>
                        <div class="right01 fixing_right">{form->textbox maxlength="100" id="menuItemTitle" name="menuItemTitle"  value=$menuResultItem.menuItemName|default:''  validate="required"  
                          error=$language.errMenuItemTitle class="textbox" tabindex="1"} </div>
                      </li>
                      <li class="clearfix">
                        <div class="left01"> {$language.lblMenuItemKey}</div>
                        <div class="right01 fixing_right top-spc"> {form->textbox id="menuItemKey"  name="menuItemKey" validate="isUrlKey~*callback_checkItemKey" class="textbox" tabindex="1"  maxlength="120" error=$language.errValidMenuItemKey|cat:"~*"|cat:$language.errKeyAlreayExits value=$menuResultItem.menuItemKey|default:''}
                            <div id="redirectDiv" style="display:none">
                            {if $menuItemID}
                            {form->checkbox name="redirectOption" value="RP" checked="{if $settingsRedirectUrl=='Yes'}True{/if}"  tabindex="1" disabled="disabled"}
                            {$language.lblPermanentRedirect}	
                            {/if}
                            </div>
                        </div>
                      </li>
					  <li class="clearfix">
                        <div class="left01 mandatory">{$language.lblMenuBrands}</div>
                        <div class="right01 fixing_right">
						  {form->select class="select" name="brandID" caption="->{$language.lblSelect}" options=$listBrand validate="required" error=$language.errFranchisee tabindex="1" value=$menuResultItem.brandID|default:0}
						  </div>
                      </li>
                             <li class="clearfix AjaxSetCMSSourceUrl" style="{if $menuResultItem.moduleKey|default:''!='singlepage' && $menuResultItem.moduleKey|default:''!='customerservice' && $menuResultItem.moduleKey|default:''!='singlecategory'}display:none;{/if}">  
                               <div class="right01 fixing_right"> 
                                {form->checkbox name="set_cms_homepage" value="1" 
                                checked="{if $menuResultItem.set_cms_homepage|default:'0'=='1'}True{/if}" tabindex="1"} 				                       
                              <label for="set_cms_homepage">{$language.lblSetCategoryURL}</label> 
				</div>
                   
                          </li>
                       <li class="clearfix">
					 <div class="left01"> {$language.lblDefaultUrl}</div>
                       <div class="right01 fixing_right">
                        {form->textbox 
                        maxlength="100" 
                        id="default_url" 
                        name="default_url"  
                        value=$menuResultItem.default_url|default:''
                        class="textbox" 
                        tabindex="1"} </div>
                   
                       </li>
                     
                       <li class=" clearfix">
                        <div class="left01"> {$language.lblDescription} </div>
                        <!--End:Left-->
                        <div class="right01">
                            {form->textarea id="description" name="description" value=$menuResultItem.menuItemDesc|default:'' maxlength="200" onkeyup="return ismaxlength(this)" onchange="return ismaxlength(this)" class="length0_50pers" rows="4" cols="4" tabindex="1"} </div>
                        <!--End:right--> 
                      </li>
                       {if $view_common_languages|@count>1}
                        <li class="clearfix">

                                <div class="left01">
                                        {$language.lblLanguages} 
                                </div>						
                                <div class="right01 ">
                                        {if $menuResultItem.availableLang|default:''==0 || $menuResultItem.availableLang|default:''==''}
                                        {assign var="languageVar" value="Yes"} 
                                        {else}
                                        {assign var="languageVar" value="No"} 
                                        {/if}
                                        {form->radio name="langSelect" class="AllLangOptions" options="Yes->{$language.lblCommonLanguage}~*No->{$language.lblSpecificLanguage}" value=$languageVar}
                                </div>
                        </li>											 

                        <li class="selection clearfix langSpecific">
                                <div class="left01">{$language.lblLanguages}</div>
                                <div class="right01">

                                    <div class="div-languageSpecific" id="specificLangDiv">
                            <ul class="levl-03 blogLanguage">{form->hidden name="currentContentLanguageID" value=$currentContentLanguageID|default:''}												
                              {foreach item="specificLanguage" from=$view_common_languages}
                              <li class="clearfix"> {form->checkbox tabindex="3"  name="selectedLang" class="cntntlanguage" options=$specificLanguage.0|cat:"->"|cat:"&nbsp;"|cat:$specificLanguage.1 value=$resLanguageSelects|default:''}</li>
                                  {/foreach}
                                 {if $menuItemID}<span class="sub-text">{$language.msgSelectContentLanguage}</span>                    
                            {form->hidden name="hiddenParentLangCheck" value="0"}                          
                            {form->validate name="checkParentLang" validate="hiddenParentLangCheck->isequal->1~*required" error=$language.errParentMenuItemLanguageChange} 
                            {form->hidden name="hiddenLangCheck" value="0"}
                            {form->validate name="checkContentLang" validate="hiddenLangCheck->isequal->1~*required" error=$language.errMenuWithLanguageNotExists}             
			{/if} 
                            {form->validate name="checkLangSelect" validate="langSelect->isequal->No~*required" error=$language.errLanguage}                                     
                            </ul>

                       </div>  													
                            </div>
                    </li>
                    {/if}
                     
                      {*<li class="clearfix">
                        <div class="left01 mandatory">{$language.lblMenu} </div>
                        <!--End:Left-->
                        <div class="right01"> {form->select tabindex="1" name="menuLoc" value=$menuResultItem.menuID|default:'' caption="->{$language.lblSelect}"  options=$listMenus validate="required" error=$language.errSelectMenu} </div>
                        <!--End:right-->
                      </li>*}
                      <li class="clearfix">
                        <div class="left01">{$language.lblParentItem} </div>
                        <!--End:Left-->
                        <div class="right01"> {form->select tabindex="1" name="parent" value=$menuResultItem.parentID|default:'' caption="->{$language.lblRootLevel}" content=$parentItems|default:''} </div>
                        <!--End:right--> 
                      </li>
                      <li class="clearfix">
                        <div class="left01">{$language.lblAccess} </div>
                        <!--End:Left-->
                        <div class="right01">
                          <select multiple="multiple" tabindex="1"  id="access" name="access[]">
                            
                              {foreach from=$resUserTypesList item="list"} 
                                      
                            <option value="{$list[0]|default:''}" {$list[3]|default:''} >{$list[1]|default:''}</option>
                            
                              {/foreach}  
                          
                          </select>
                        </div>
																		
                      </li>
                      <!--End:right-->
                      <li class="clearfix">														
                        <div class="left01">{$language.lblMenuIcon}
                          <div class="clear"></div>
						  </div>
                        <div class="right01 icon"><span tabindex="1"> 
                                 {assign var="moduleKeyVar" value=$menuResultItem.moduleKey|default:''}
                                 {assign var="imageName" value=$imageName|default:''}
                          {if ($moduleKeyVar=='singlecategory') && (isset($paramsValues['showSectionImage']) && $paramsValues['showSectionImage']=='Yes')}
                             {assign var="imagePath" value="uploads/product-category/"}
                          {else}
                              {assign var="imagePath" value="uploads/menus/menu-items/"}
                          {/if}
						{form->upload_image 
								name		   = "menuIcon" 
								width		   = 25 
								height		   = 20
								path		   = $imagePath
								file		   = $imageName|default:''									
								validate	   = "isImage"
								error		   = $language.errValidImage  
								delete_title   = "{$language.lblDelete}"
								message_delete = "{$language.msgimageDelConfirm}"  
								size_caption   = $language.lblMaximumFileSize 
								types_caption  = $language.lblFileTypes} </span> </div>
                      </li>
                      <li class="clearfix">
                        <div class="left01 mandatory"> {$language.lblStatus} </div>
                        <!--End:Left-->
                        <div class="right01">
                          <div id="perioddiv"> {form->radio name="menuItemStatus" class="customradio" options="Active->"|cat:$language.lblActive|cat:"~*Inactive->"|cat:$language.lblInactive value=$menuResultItem.status|default:'Active' tabindex="1"} </div>
                        </div>
                        <!--End:right--> 
                      </li>
                    </ul>										
                  </div>										
                  <div class="right_box">
                    <ul class="levl-01">
                        <li class="AjaxLinkDiv clearfix" style="{if $menuResultItem.moduleKey|default:''=='text'}display:none;{/if}">
                        <div class="left01"> {$language.lblLink} </div>
                        <!--End:Left-->
                        <div class="right01"> {form->textbox name="link"  value=$menuResultItem.itemLink|default:'' class="textbox" tabindex="1"}
						<span class="showGenerateCatalogLink hide">
						<br/><br/>
						{html->anchor href="ajax/generatecataloglink/?id=link&itemID={$menuItemID|default:0}" id="generateCatalogLink" caption="{$language.lblImportCatUrl}" title="{$language.lblGenerateCatalogLinks}" class="linkbtnt01"}
						</span>
						</div>
                        <!--End:right--> 
                      </li>
                     
                       <li class="clearfix" id="mainSettings" style="{if $parameters|@count|default:'' eq 0}display:none{/if}">
                 <ul class="levl-01" id="reqSettings"> {form->hidden name=itemTypeSel value=$itemTypeSel|default:''}
                    {include file='AjaxMenuItemSettings.tpl'}
                    </ul> 
                </li>
                      {assign var="publishFrom" value="{$publishFrom|default:''}"}
                      {assign var="publishTo" value="{$publishTo|default:''}"}
                      <li class="clearfix">
                        <div class="left01"> {$language.lblStartDate} </div>
                        <div class="right01"> {form->textbox name="publishFrom" tabindex="1" class="date_picker_field" validate="isDate" error=$language.errValidDate} </div>
                      </li>
                      <li class="clearfix">
                        <div class="left01"> {$language.lblEndDate} </div>
                        <div class="right01"> {form->textbox name="publishTo" tabindex="1" class="date_picker_field" validate="isDate" error=$language.errValidDate}
                          {form->hidden name="hiddenStartEndDate" value="0"}
                          {form->validate name="StartEndDatecheck" validate="hiddenStartEndDate->isequal->1~*required" error=$language.errStartEndDate} </div>
                      </li>
                      <li class="AjaxLinkDiv clearfix">
                        <div class="left01">{$language.lblTarget} </div>
                        <div class="right01"> {form->select tabindex="1" name="target" value=$menuResultItem.target|default:''  options="_blank->"|cat:$language.lblBlank|cat:"~*_self->"|cat:$language.lblSelf|cat:"~*_parent->"|cat:$language.lblParent caption="->{$language.lblSelect}"} </div>
                      </li>
                    </ul>
                  </div>
                </li>
                <li>
                  <h3><span>{$language.lblAdvancedSettings}</span></h3>
                </li>
                <li class="clearfix">
                  <div class="left_box">
                    <ul class="levl-01">
                      <li class="clearfix">
                        <div class="left01"> </div>
                        <!--End:Left-->
                        <div class="right01"> {form->checkbox name="showDesc" value="Yes" checked="{if $menuResultItem.showDesc|default:''=='Yes'}True{/if}" tabindex="1"} {$language.lblShowDescIntroText} </div>
                        <!--End:right--> 
                      </li>
                      <li class="AjaxLinkDiv selection clearfix">
                        <div class="left01"></div>
                        <!--End:Left-->
                        <div class="right01"> {form->checkbox name="descLinkable" value="Yes" checked="{if $menuResultItem.descLinkable|default:''=='Yes'}True{/if}" tabindex="1"}  {$language.lblShowDescriptionLink} </div>
                        <!--End:right--> 
                      </li>
                      <li class="selection clearfix">
                        <div class="left01"></div>
                        <!--End:Left-->
                        <div class="right01"> {form->checkbox name="showTitle" value="No" checked="{if $menuResultItem.ShowTitle|default:''=='No'}True{/if}" tabindex="1"}  {$language.lblHideTitle} </div>
                        <!--End:right--> 
                      </li>
                       <li class="AjaxLinkDiv selection clearfix">
                        <div class="left01"></div>
                        <!--End:Left-->
                        <div class="right01"> {form->checkbox name="showBreadCrumb" value="No" checked="{if $menuResultItem.showBreadCrumb|default:''=='No'}True{/if}" tabindex="1"}  {$language.lblHideBreadCrumb} </div>
                        <!--End:right--> 
                      </li>
                    </ul>
                  </div>
                </li>
                <li>
                  <h3><span>{$language.lbllinkTypeOptions}</span></h3>
                </li>
                <li class="clearfix">
                  <div class="left_box">
                    <ul class="levl-01">
                      <li class="selection clearfix">
                        <div class="left01">{$language.lblLinkCssStyle}</div>
                        <div class="right01"> {form->textbox name="cssStyle" tabindex="1" maxlength="100" class="textbox" value=$menuResultItem.cssStyle|default:''} </div>
                      </li>
                      <li class="selection clearfix">
                        <div class="left01"> {$language.lblShowIcon} </div>
                        <!--End:Left-->
                        <div class="right01"> {form->radio name="showIcon" class="customradio" options="Yes->"|cat:$language.lblAlertYes|cat:"~*No->"|cat:$language.lblAlertNo value="{if $menuResultItem.showIcon|default:''}{$menuResultItem.showIcon}{else}No{/if}" tabindex="1"} </div>
                        <!--End:right--> 
                      </li>
                      <li class="AjaxLinkDiv selection clearfix">
                        <div class="left01"> {$language.lblIconLinkable} </div>
                        <!--End:Left-->
                        <div class="right01"> {form->radio name="iconLinkable" class="customradio" options="Yes->"|cat:$language.lblAlertYes|cat:"~*No->"|cat:$language.lblAlertNo value="{if $menuResultItem.iconLinkable|default:''}{$menuResultItem.iconLinkable}{else}No{/if}" tabindex="1"} </div>
                        <!--End:right--></li>
                    </ul>
                  </div>
                </li>
                             <li>
                  <h3><span>{$language.lblMetaDetails}</span></h3>
                </li>
                <li class="clearfix">
                  <div class="left_box">
                    <ul class="levl-01">
                      <li class="selection clearfix">
                        <div class="left01">{$language.lblMetaTitle}</div>
                        <div class="right01">  {form->textbox tabindex="1" name="metaTitle" value="{$menuResultItem.metaTitle}" class="textbox"} </div>
                      </li>
                      <li class="selection clearfix">
                        <div class="left01"> {$language.lblMetaKeyword} </div>
                        <!--End:Left-->
                        <div class="right01"> {form->textarea  tabindex="1" name="metaKeywords" value="{$menuResultItem.metaKeywords}" class="text-area-01" cols="4" rows="4"} </div>
                        <!--End:right--> 
                      </li>
                      <li class=" selection clearfix">
                        <div class="left01"> {$language.lblMetaDescription} </div>
                        <!--End:Left-->
                        <div class="right01"> {form->textarea  tabindex="1" name="metaDescription" value="{$menuResultItem.metaDescription}" class="text-area-01" cols="4" rows="4"} </div>
                        <!--End:right--></li>
                    </ul>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
		{if $bannerprivilege|default:''}
        <div class="tabpane" style="display:none;">
          <div class="tabpane_inner"> <span class="BreadCrump">
            <ul class="clearfix">
              <li>{html->anchor href="custommenu/listitemdetails/" rel="" content=$language.lblMenuItems} &raquo; </li>
              <li><span>{$language.lblManageBanner}</span></li>
            </ul>
            </span>
            <div class="form_listing">
              <ul class="levl-00">
                <li>
                  <h3><span>{$language.lblSelectBanners}</span></h3>
                </li>
                <li class="selection clearfix">
                 <div class="pane01 form_listing">
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td align="left" valign="middle" class="leftpane" >
                    {$language.lblDragBannersRight}
                    </td>
                    <td rowspan="2" align="left" valign="middle" class="midpane">&nbsp;</td>
                    <td align="left" valign="middle" class="rightpane">{$language.lblSelectedBanners}</td>
                  </tr>
                  <tr>
                    <td align="left" valign="top"><div class="drop-div">
                        <ul id="draggable" class="banner_left connectedSortable">
                        {foreach from=$resBanner item="banner"}
                          <li class="clearfix" data-id="{$banner.bannerID}"> 
                              {if $banner.bannerDisplayType=='Image'}
                          	<img style="float:left;padding-right:5px;" src='{$view_public_path}/uploads/banner/thumb/{$banner.bannerImage}' width='45'	height='40'/>
                                {else}
                                    <img style="float:left;padding-right:5px;" width='45' height='40'/>
                                    {$banner.bannerSwf}
                                    {/if}
                            <span class='banner_delete remove'  style='display:none;'>x</span>
                            <div class="title">{$banner.bannerTitle}</div>
                            <div style="font-size:12px;">
                            {if $banner.bannerStartTime && $banner.bannerStartTime!='0000-00-00 00:00:00'} 
                            	{$language.lblStartDate} : {$banner.bannerStartTime|date_format:$settingsDateFormat}
                            {/if}
                            {if $banner.bannerStartTime && $banner.bannerStartTime!='0000-00-00 00:00:00' && $banner.bannerEndTime && $banner.bannerEndTime!='0000-00-00 00:00:00'} 
                            	 - 
                            {/if}
                            {if $banner.bannerEndTime && $banner.bannerEndTime!='0000-00-00 00:00:00'}
                            	{$language.lblEndDate} : {$banner.bannerEndTime|date_format:$settingsDateFormat} 
                            {/if}
                            
                            
                            </div>
                          </li>
                          {/foreach}
                          
                        </ul>
                      </div>
                   </td>
                   <td align="left" valign="top"><div class="drop-div">
                        <ul id="sortable1" class='banner_right connectedSortable'>
                        {foreach from=$listItemBanner item="itemBanner"}
                            <li class="clearfix" data-id="{$itemBanner.bannerID}" itembannerid="{$itemBanner.ItemBannerID}"> 
                                 {if $itemBanner.bannerDisplayType=='Image'}
                            	<img style="float:left;padding-right:5px;" src='{$view_public_path}/uploads/banner/thumb/{$itemBanner.bannerImage}' width='45' height='40'/>
                                {else}
                                    <img style="float:left;padding-right:5px;" width='45' height='40'/>{$itemBanner.bannerSwf}
                                    {/if}
                                <span class='banner_delete remove'  style='display:none;'>x</span>
                                <div class="title">{$itemBanner.bannerTitle}</div>
                                <div style="font-size:12px;">
                                {if $itemBanner.bannerStartTime && $itemBanner.bannerStartTime!='0000-00-00 00:00:00'} 
                               	 	{$language.lblStartDate} :  {$itemBanner.bannerStartTime|date_format:$settingsDateFormat} 
                                {/if}
                                 {if  $itemBanner.bannerStartTime && $itemBanner.bannerStartTime!='0000-00-00 00:00:00' && $itemBanner.bannerEndTime && $itemBanner.bannerEndTime!='0000-00-00 00:00:00'} 
                            	 - 
                            	{/if}
                                {if $itemBanner.bannerEndTime && $itemBanner.bannerEndTime!='0000-00-00 00:00:00'}
                                	{$language.lblEndDate} :  {$itemBanner.bannerEndTime|date_format:$settingsDateFormat}  
                                 {/if}
                                </div>
                                 
                            </li>
                           {/foreach}
                        </ul>
                      </div>
                   </td>
                  </tr>
                </table>
              </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
		{/if}
		{if $blockprivilege|default:''}
        <div class="tabpane" style="display:none;">
          <div class="tabpane_inner"> <span class="BreadCrump">
            <ul class="clearfix">
              <li>{html->anchor href="custommenu/listitemdetails/" rel="" content=$language.lblMenuItems} &raquo; </li>
              <li><span>{$language.lblManageStaticBlocks}</span></li>
            </ul>
            </span>
            <div class="form_listing">
              <ul class="levl-00">
                <li>
                  <h3><span>{$language.lblSelectBlocks}</span></h3>
                </li>
                <li class="selection clearfix">
                 <div class="pane01 form_listing">
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td align="left" valign="middle" class="leftpane">
                    {$language.lblDragBlocksRight}
                    </td>
                    <td rowspan="2" align="left" valign="middle" class="midpane">&nbsp;</td>
                    <td align="left" valign="middle" class="rightpane">{$language.lblSelectedBlocks}</td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">
                     <div class="drop-div">
                        <ul id="draggable"  class="static_block_left connectedSortable">
                            {foreach from=$resBlocks item="blocks"}
                              <li data-id="{$blocks.blockID}"> 
                                <span class='static_block_delete remove'  style='display:none;'>x</span>
                                <div class="title">{$blocks.blockTitle}</div>
                              </li>
                             {/foreach}
                        </ul>
                      </div>
                    </td>
                    <td align="left" valign="top">
                      <div class="drop-div">
                        <ul id="sortable1" class="static_block_right connectedSortable">
                          {foreach from=$resItemBlocks item="itemBlocks"}
                            <li class="clearfix" data-id="{$itemBlocks.blockID}" itemblockid="{$itemBlocks.itemBLockID}"> 
                              <!--	<a href="javascript:;" class="remove">x</a>-->
                                <span class='static_block_delete remove'  style='display:none;'>x</span>
                                <div class="title">{$itemBlocks.blockTitle}</div>
                                
                            </li>
                          {/foreach} 
                        </ul>
                     </div>
                   </td>
                  </tr>
                </table>
              </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
        {/if}
         {form->close}
<div  class="tabpane" style="display:none;">
    {form->errors form="formTracking"}
     {form->start name="formTracking" action="" method="post" enctype="multipart/form-data"}
      <div id="track-section" class="save-floating-section">
        <div class="cm-buttons-floating trackingSubmit" id="trackingSubmit"> 
                 <div class="submit-position ">
                 {form->submit  name="submitTracking" id="submitTracking" class="curve-3 button03" value="{$language.lblSaveTracking}"} 
                 {$language.lblOr}{html->anchor href="custommenu/menuitems/" content=$language.lblCancel}
              </div> 
             </div>
              <div class="cm-buttons trackingSubmit"> 
              </div>
              </div>
            <div class="tabpane_inner">
              <span class="BreadCrump">
                <ul class="clearfix">
                  <li>{html->anchor href="custommenu/listitemdetails/" rel="" content=$language.lblMenuItems} &raquo; </li>
                  <li><span>{$language.lblManageTracking}</span></li>
                </ul>
                </span>
              <div class="form_listing"> 
                <ul class="levl-00">
                  <li> <h3><span>
                  {$language.lblAddRemarketingCode} / {$language.lblConversionTracking}
                  </span></h3></li>
                  <li class="selection clearfix">
                  <div class="left1">{$language.lblRemarketingStart}
                  <span class="small-txt">{$language.lblTrackingMultipleCode}</span></div>
                  <!--End:Left-->
                  <div class="right1"> {form->textarea maxlength="200" name="remarketingCodeStart" class="width-54per" rows="4" cols="50"} </div>
                  <!--End:right-->
                  </li>
                  <li class="selection clearfix">
                  <div class="left1">{$language.lblRemarketingEnd}
                  <span class="small-txt">{$language.lblTrackingMultipleCode}</span></div>
                  <!--End:Left-->
                  <div class="right1"> {form->textarea maxlength="200" name="remarketingCodeEnd" class="width-54per" rows="4" cols="50"}</div>
                  <!--End:right-->
                  </li>
                  <li class="selection clearfix">
                  <div class="left1">{$language.lblConversionCode}
                  <span class="small-txt">{$language.lblTrackingMultipleCode}</span></div>
                  <!--End:Left-->
                  <div class="right1"> {form->textarea maxlength="200" name="conversionCode" class="width-54per" rows="4" cols="50"}</div>
                  <!--End:right-->
                  </li>
                  </ul>
                  </div>
                  </div>
                  {form->close}
                  </div>
                  </div>
      <!--End:Border 2--> 
    </div>
    <!--End: left Block-->
    <div class="clear"></div>
  </div>
  {if $menuItemID}
  {assign var="itemDefLangs" value=$itemDefLangs|default:''}
  {/if} 
  {assign var="menuItemAction" value=$menuItemAction} 
  </div>
  <!--End:Content Container--> 
  {include file='CommonBottom.tpl'} 
  {include file='CommonJavaScriptBottom.tpl'}
  </div>
<!--End:Outer Container--> 
{form->editor_script}
{form->validate_script form="frmMenuItem"}
{html->messages_script id="common_message"}
{form->rootpath_script}
{form->basepath_script} 
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
<script type="text/javascript" src="{$common_js}/uploadImage.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/custommenu.page.js"></script> 

<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script> 
<script  type="text/javascript">
var menuItemAction = '{$menuItemAction}';
var sysKeys = '{$sysKeys}';
var selmoduleID = '';
{literal}
 $(function(){
	 $("#perioddiv input").customInput('');
	});
	$( "#sortable1, #sortable2" ).sortable({
			connectWith: ".connectedSortable",
		}).disableSelection();
	
	
{/literal}
var lblSelect="{$language.lblSelect}";
var lblRootLevel="{$language.lblRootLevel}";
var languageMismatchRollback="{$language.lblLanguageMismatchSortingRollBacked}";
var languageMismatch="{$language.lblLanguageMismatch}";
var SelectMenuItemTypeDetails = "{$language.lblSelectMenuItemTypeDetails}";
var defImagePath ='{$view_images}';
 var settingsRedirectUrl = '{$settingsRedirectUrl|default:''}';
</script> 
 {if $menuItemID}
     <script  type="text/javascript">
        var paramsEncoded = '{$paramsEncoded}';
        var selmoduleID = '{$defmoduleID}';
        var itemDefLangs = '{$itemDefLangs}';
        var children = '{$menuResultItem.children}';
        var orderchilds = '{$menuResultItem.orderchilds}';
        var orderchildsLanguages = '{$menuResultItem.orderchildsLanguages}';
        var childrenLanguages = '{$menuResultItem.childrenLanguages}';
     </script> 
     {/if}
<script type="text/javascript" src="{$view_javascript}/menuItemBlocks.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/menuItemBanners.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script> 
<script type="text/javascript" src="{$view_javascript}/custommenuitem.page.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script>
<script type="text/javascript">
$(document).ready(function () {
        changeItemType();
	$(document).on("click","ul.left-tab>li>a",function () {
        $("ul.left-tab>li>a").removeClass("active");
        $(this).addClass("active");
		var thisIndex = $("ul.left-tab>li>a").index(this);
        $(".tabpane").hide();
        
        $(".tabpane:eq(" + thisIndex + ")").show();
		setActiveTabSaveButton();
		});
setActiveTabSaveButton();
});
function changeItemType() {
           if(($('select[name="menuItemType"] :selected').val() == 46 ) || ($('select[name="menuItemType"] :selected').val() == 9))
                   $('.caturl').show();
            else 
                   $('.caturl').hide();
        };
function setActiveTabSaveButton()
{
	var thisRel =   $(".left-tab li a.active").attr("rel");
	var cmButtonsFloating = $("#"+thisRel+"-section").children(".cm-buttons-floating");
	var cmButtons = $("#"+thisRel+"-section").children(".cm-buttons");
	$.scrollPane({
			floating: cmButtonsFloating,
			fixed: cmButtons,
			padding: 71
			});
	$.fn.hasScrollBar = function()
	{
		var thisRel =   $(".left-tab li a.active").attr("rel");
		toggleSaveButton(thisRel);
	}
	var thisRel =   $(".left-tab li a.active").attr("rel");
	toggleSaveButton(thisRel);
}
function toggleSaveButton(thisRel)
{
	$(".save-floating-section").hide();
	$("#"+thisRel+"-section").show();
}
{literal}
$(document).ready(function(){
	$("#generateCatalogLink").colorbox({iframe:true, width:"80%", height:"80%"});
});	
{/literal}
</script>
<script type="text/javascript">
{literal}
$(document).ready(function(){
	$("#generateCatalogLink").colorbox({iframe:true, width:"80%", height:"80%"});
});	
{/literal}
</script>
</body>
</html>
