var ajax_url = 'ajax2.php?';
/******************** pdf change city ***********************/
function change_model()
{	
	this.element = $('marka_left_id');
           		        	
			$('model_left_id').innerHTML = '<option value="0">Загрузка ...</option>';
        	new Ajax(ajax_url+'target=auto&event=load_model&marka_id=' + this.element.value, {
				method: 'get',
				onComplete: update_target.bind(this)
			}).request();
        
      
}



function update_target(response)
{
	resp=Json.evaluate(response);
	
	if ($defined(resp.model_list))
	{
		var select = $('model_left_id');
		select.style.disabled = true;
		select.empty();
		
		new Element('option',{value: 0}).inject(select).setText('- Все -');
		$each(resp.model_list,
		function(item,index)
			{
				//alert(index + ':' + item.name + ' : '+ item.model_id);
					var element = new Element('option', { value: item.model_id});
					element.inject(select).setText(item.name);
			});
	select.style.disabled = false;
	}	
}	

function checkRabotaSearch(){
	if ($('vacance_search').checked){
		$('rabota_with_photo').style.display = 'none';
	} else if ($('resume_search').checked)  {
		$('rabota_with_photo').style.display = 'block';
	}
}
	
	