<!--<script language="javascript" type="text/javascript" src="{$urlStatic}/script/lightbox.js"></script>
<script language="javascript" type="text/javascript" src="{$urlStatic}/script/cropper.js"></script>
<script language="javascript" type="text/javascript" src="{$urlStatic}/script/uploader.js"></script>-->

<script language="javascript" type="text/javascript">
	urlStatic = '{$urlStatic}';
</script>

<script type="text/javascript">
    var LinkUrl = '{url SimpleArticle=link}';
    var ReloadListUrl = '{url SimpleArticle=AjaxReloadList}';
</script>
<form method="post" action="{url _value='mainSite,validateform'}" class="avfo" >
	{if isset($objArticle)}
		<input type="hidden" name="idArticle" value="{$objArticle->GetId()}" />
		<input type="hidden" name="idMainSite" value="{$objMainSite->GetId()}" />
		{assign var=idArticle value=$objArticle->GetId()}
		{assign var=author value='makl'}
		{assign var=desc value=$objArticle->GetDescriptionObj()}
		{assign var=zajawka value=$desc->GetShortNote()}
		{assign var=idMainSite value=$objMainSite->GetId()}
	{else}
		{assign var=idArticle value='-1'}
		{assign var=author value=''}
		{assign var=zajawka value=''}
		{assign var=idMainSite value=-1}
	{/if}
	<input type="hidden" name="mainType" value="{$mainType}" />
	<div class="panelRightTop"></div>
	<div class="panelRightBody">
		<div class="paddedContent">
			{assign var="additionalTitle" value=""}

			{dropDownContainer title="Ogólne" additionalTitle=$additionalTitle}
				<table width="100%" cellspacing="0" cellpadding="5" border="0" class="tableContentData2">
					<tbody>
						<tr>
							<td><b>Tytuł:</b></td>
							<td>{formField name='tytul' class='avf inputWidth141' type='text' obj='objArticle' func='GetTitle'}</td>
						</tr>
						{*<tr>
							<td><b>Publikuj:</b></td>
							<td>{formField type='checkbox' name='publication' obj='objArticle' func='GetPublication'}</td>
						</tr>
						<tr>
							<td><b>Ocenianie:</b></td>
							<td>{formField type='checkbox' name='allowrating' obj='objArticle' func='GetAllowRating'}</td>
						</tr>
						<tr>
							<td><b>Komentowanie:</b></td>
							<td>{formField type='checkbox' name='allowcomment' obj='objArticle' func='GetAllowComment'}</td>
						</tr>
						<tr>
							<td><b>Profil autora:</b></td>
							<td>
							   
							    <input type="text" size="60" name="author_profile" value="{$author}" class="input autocompleter avf" id="inputProfile" autocomplete="on" />
							    <div id="autocomplete_inputProfile" class="autocomplete"></div>
							</td>
						</tr>
						<tr>
							<td><b>Autor:</b></td>
							<td>{formField type='input' class='inputWidth141' name='author' obj='objArticle' func='GetAuthor'}</td>
						</tr>
						<tr>
							<td><b>Źródło:</b></td>
							<td>{formField type='input' class='inputWidth141' name='source' obj='objArticle' func='GetSource'}</td>
						</tr>
						<tr>
							<td class="verticalAlignTop"><b>Data wyświetlana:</b></td>
							<td><img src='{$urlStatic}/image/iconKalendarz.gif' alt='kalendarz' onclick="showKal(document.getElementById('dateshown'));" />&nbsp;{formField type='input' name='dateshown' obj='objMainSite' func='GetDateShown' id='dateshown'}</td>
						</tr>*}
						<tr>
							<td class="noborder"><b>Data publikacji:</b></td>
							<td class="noborder">
							    <img src='{$urlStatic}/image/iconKalendarz.gif' alt='kalendarz' onclick="showKal(document.getElementById('datepublication'));" />&nbsp;{formField type='input' name='datepublication' obj='objMainSite' func='GetDatePublicationWithoutTime' id='datepublication'}
							</td>
						</tr>
						<tr>
							<td><b>Godzina:</b></td>
							<td>
								{formField type='input' maxlength='2' class='inputWidth141' name='timepublication' obj='objMainSite' func='GetDatePublicationTime'}
								<span class="grayText smallText">format (HH):</span>
							</td>
						</tr>
						<tr>
							<td class="verticalAlignTop noborder">
								<b>Data zakonczenia publikcji:</b>
							</td>
							<td class="noborder">
							    <img src='{$urlStatic}/image/iconKalendarz.gif' alt='kalendarz' onclick="showKal(document.getElementById('date_stop_publication'));" />&nbsp;{formField type='input' name='date_stop_publication' obj='objMainSite' func='GetDateStopPublicationWithoutTime' id='date_stop_publication'}
							</td>
						</tr>
						<tr>
							<td><b>Godzina:</b></td>
							<td>
							    {formField type='input' class='inputWidth141' maxlength='5' name='time_stop_publication' obj='objMainSite' func='GetDateStopPublicationTime'} 
							     <span class="grayText smallText">format (HH:mm):</span>
							</td>
						</tr>
						{if $mainType != 1}
						<tr>
							<td><b>Pozycja:</b></td>
							<td>
								<select name="weight" >
							    {foreach from=$arrayWeight item=weight name=waight}
										<option {if $weight == $objMainSite->GetWeight()}  selected {/if}>{if $smarty.foreach.waight.first}{else}{$weight}{/if}</option>
									{/foreach}
								</select>
							</td>
						</tr>
						{/if}
						{if $mainType != 3 AND isset($objArticle) AND $objArticle->GetIdPicture() != 0}
						<tr>
							<td><b>Usuń zdjęcie</b></td>
							<td><input type="checkbox" name="deleteOldPhoto" value="1" onclick="return confirm('Czy jesteś pewien, że chcesz usunąć zdjęcie?');"/></td>
						</tr>
						{/if}
					</tbody>
				</table>
			{/dropDownContainer}

			{*dropDownContainer title="Właściwości (SEO)"}
				<table width="100%" cellspacing="0" cellpadding="5" border="0" class="frameTableForm tableContetntWhite">
					<tbody>
						<tr>
							<td>META Description:</td>
							<td>{formField type='text' name='metaDescription' obj='objArticle' func='GetMetaDescription'}</td>
						</tr>
						<tr>
							<td>META Keywords:</td>
							<td>{formField type='text' name='metaKeywords' obj='objArticle' func='GetMetaKeywords'}</td>
						</tr>
						<tr>
							<td>Skrypt statystyk:</td>
							<td>{formField type='text' name='statScript' obj='objArticle' func='GetStatScript'}</td>
						</tr>
					</tbody>
				</table>
			{/dropDownContainer*}
			{if $mainType != 3}
			{dropDownContainer title="Zajawka"}
				<div class="articlePreviewLeftMainSite">
					<div class="articlePreviewLeftContentMainSite">
						<div class="_zajawkaPhoto articlePreviewPhotoViewMainSite">
							{if isset($objArticle) && $objArticle->GetPicture()}
								<div class="articlePreviewPhotoMainSite">
									<img id="ArticleAvatar" class="ArticleAvatar" src="{$objArticle->GetPictureUrl()}" alt="" />
								</div>
							{else}
								podczas dodawania będziesz mógł przyciąć swoje zdjęcie do rozmiarów 120x70.
							{/if}
						</div>
						<input type="hidden" value="" id="photoadded" name="photoadded" class="avf" />
						<div class="articlePreviewLeftContentBottom">
							<a class="_lbOn ustawZdjecie" rel="globCropLBox" onclick="{literal}try{ createUploadLightbox(this);} catch(err){ alert(err.message);}{/literal} return false;" href="{if isset($objArticle)}{url MainSite='AjaxPhotoCropper' id=$objArticle->GetId()}{else}{url MainSite='AjaxPhotoCropper'}{/if}" name="ustawZdjecie">&nbsp;</a>
						</div>
					</div>
				</div>
				<div class="clearBoth"></div>
				<div class="articlePreviewRight">
				<fieldset id="zajawkafck2" name="zajawkafck2" style="border: 0px;">
					{if isset($objArticle)}
						{assign var='zajawka' value=$objArticle->GetShortnote()}
					{else}
						{assign var='zajawka' value=''}
					{/if}
					{if $mainType != 3}
					{assign var=widthFCK value=399}
					{else}
					{assign var=widthFCK value=620}
					{/if}
					{insertFckEditor width=$widthFCK height='159' name='zajawka' toolbar='Basic' value=$zajawka}
					<input type="hidden" value="" name="zajawkafck" id="zajawkafck" class="avf" />
				</fieldset> 
				</div>
				<div class="clearBoth"></div>
				
			{/dropDownContainer}
			{/if}
			{*dropDownContainer title="Obiekty powiązane"}
			<div id="articleLinkList">
			{$articleLinkList}
			</div>
			{/dropDownContainer*}
			{dropDownContainer title="Powiąż"}
			
			<script language="javascript" type="text/javascript">
				var fields1 = new Array(2);
				fields1[0] = 'ms_id';
				fields1[1] = 'ms_name';
			</script>
			
			<form action="{url MainSite='AjaxList'}" method="post" onsubmit="Dosia.Form(this);return false;">
			    <table class="tableContentData2" cellpadding="10" cellspacing="1" border="0" width="100%">
				<tr>
				    <td>
					<b>Tytuł:</b>
				    </td>
				    <td>
					<input id="ms_name" type="text" name="ms_name" value="{$ms_name}"  onkeyup="Dosia.RequestArray('{url MainSite='AjaxList' id=$idMainSite}', fields1);"/>
				    </td>
				    <td>
					<b>ID:</b>
				    </td>
				    <td>
					<input id="ms_id" type="text" name="ms_id" value="{$ms_id}" onkeyup="Dosia.RequestArray('{url MainSite='AjaxList' id=$idMainSite}', fields1);"/>
				    </td>
				</tr>
			    </table>
			</form>
			<div id="articleListToLink">
			{$articleListToLink}
			</div>							

							
							<div class="panelPowiazaniaContentBottom"></div>
							
			{/dropDownContainer}
			
		</div>
	</div>
	<br />
		<div class="floatLeft">
			<input type="button" class="button buttonAnuluj" value="" name="" onclick="document.location.href='{url _value=$controller,index}'"/>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</div>
		<div class="floatRight">
			
			<input type="submit" class="button buttonZapisz" value="" name="save" onmouseover="var oEditor = FCKeditorAPI.GetInstance('zajawka'); var zajawkafck = document.getElementById('zajawkafck'); zajawkafck.value = oEditor.GetXHTML(false);  var photosrc = document.getElementById('ArticleAvatar'); var photoflag = document.getElementById('photoadded'); photoflag.value = photosrc.src;" />
			
		</div>
</form>
<div class="clearBoth"></div>