<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
if($arParams['~VACANCY_IBLOCK_ID'] && CModule::IncludeModule("iblock"))
{
	$arFilter=array("IBLOCK_ID"=>$arParams['~VACANCY_IBLOCK_ID'], "ACTIVE"=>"Y");
	$resElem=CIBlockElement::GetList(Array("NAME"=>"asc"), $arFilter,false,false,array("ID","NAME","IBLOCK_SECTION_ID","CODE"));
	$resArrElem=array();
	while($arrElem=$resElem->GetNext())
	{
		$resArrElem[$arrElem['ID']]=$arrElem;
	}

	$arResult["QUESTIONS"]['resume_vac_name']['HTML_CODE']='<select name="form_text_'.$arResult["QUESTIONS"]['resume_vac_name']['STRUCTURE'][0]['QUESTION_ID'].'" class="resume_text">';
	$j=0;
	foreach($resArrElem as $elId => $el)
	{		
		if(($j==0 && !$_REQUEST['ELEMENT_CODE']) || $_REQUEST['ELEMENT_CODE']==$el['CODE'])
				$selected='selected="selected"';
		else
				$selected='';
		$arResult["QUESTIONS"]['resume_vac_name']['HTML_CODE'].='<option '.$selected.' value="'.$sectArr['NAME'].': ['.$elId.'] '.$el['NAME'].'">'.$el['NAME'].'</option>';
		$j++;					
	}
	$arResult["QUESTIONS"]['resume_vac_name']['HTML_CODE'].='</select>';
}

?>