<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
?>
<?if ($arResult["isFormErrors"] == "Y"):?><?=$arResult["FORM_ERRORS_TEXT"];?><?endif;?>

<?if (substr($arResult["FORM_NOTE"],0,8)==substr(GetMessage("FORM_NOTE_ADDOK"),0,8)) $arResult["FORM_NOTE"]=GetMessage("FORM_NOTE_ADDOK_TRUE")?>

<font color="green"><?=$arResult["FORM_NOTE"]?></font>

<?if ($arResult["isFormNote"] != "Y") 
{
?>
<?=$arResult["FORM_HEADER"]?>

<?
if ($arResult["isFormDescription"] == "Y" || $arResult["isFormTitle"] == "Y" || $arResult["isFormImage"] == "Y") 
{ 
/***********************************************************************************
                                        form header
***********************************************************************************/

        if ($arResult["isFormImage"] == "Y")
        {
        ?>
        <a href="<?=$arResult["FORM_IMAGE"]["URL"]?>" target="_blank" alt="<?=GetMessage("FORM_ENLARGE")?>"><img src="<?=$arResult["FORM_IMAGE"]["URL"]?>" <?if($arResult["FORM_IMAGE"]["WIDTH"] > 300):?>width="300"<?elseif($arResult["FORM_IMAGE"]["HEIGHT"] > 200):?>height="200"<?else:?><?=$arResult["FORM_IMAGE"]["ATTR"]?><?endif;?> hspace="3" vscape="3" border="0" /></a>
        <?//=$arResult["FORM_IMAGE"]["HTML_CODE"]?>
        <?
        } //endif
        ?>
        <? 
} // endif 
        ?>
<?
/***********************************************************************************
                                                form questions
***********************************************************************************/
?>
        <?
        foreach ($arResult["QUESTIONS"] as $FIELD_SID => $arQuestion)
        {
        ?>
                                <?if (is_array($arResult["FORM_ERRORS"]) && array_key_exists($FIELD_SID, $arResult['FORM_ERRORS'])):?>
                                <span class="error-fld" title="<?=$arResult["FORM_ERRORS"][$FIELD_SID]?>"></span>
                                <?endif;?>
                                <?if ($FIELD_SID=="resume_file") echo "<b>".GetMessage("FORM_ADAITIONAL_MATERIALS")."</b>"; else echo "<b>".$arQuestion["CAPTION"]."</b>"?><?if ($arQuestion["REQUIRED"] == "Y"):?><?=$arResult["REQUIRED_SIGN"];?><?endif;?>
                                <?=$arQuestion["IS_INPUT_CAPTION_IMAGE"] == "Y" ? "<br />".$arQuestion["IMAGE"]["HTML_CODE"] : ""?><br/>
                        <span class="grey"><?=$arQuestion["HTML_CODE"]?></span><br/><br/>
        <? 
        } //endwhile 
        ?>
<?
if($arResult["isUseCaptcha"] == "Y")
{
?>

                <b><?=GetMessage("FORM_CAPTCHA_TABLE_TITLE")?></b><br/>
                <input type="hidden" name="captcha_sid" value="<?=htmlspecialchars($arResult["CAPTCHACode"]);?>" />
                <img  class="captcha_enter" align="left" src="/bitrix/tools/captcha.php?captcha_sid=<?=htmlspecialchars($arResult["CAPTCHACode"]);?>" width="180" height="40" />
                <div>
                <?=GetMessage("FORM_CAPTCHA_FIELD_TITLE")?><?=$arResult["REQUIRED_SIGN"];?><br/>
                <input type="text" name="captcha_word" size="30" maxlength="50" value="" class="inputtext" /><br/>
                </div>
                <br clear="all">
<?
} // isUseCaptcha
?>
                <div class="buttons">
                	<input <?=(intval($arResult["F_RIGHT"]) < 10 ? "disabled=\"disabled\"" : "");?> type="submit" name="web_form_submit" value="<?=strlen(trim($arResult["arForm"]["BUTTON"])) <= 0 ? GetMessage("FORM_ADD") : $arResult["arForm"]["BUTTON"];?>" />
                </div>
<?/*
<p>
<?=$arResult["REQUIRED_SIGN"];?> - <?=GetMessage("FORM_REQUIRED_FIELDS")?>
</p>
*/?>
<?=$arResult["FORM_FOOTER"]?>
<?
} //endif (isFormNote)
?>