function showLayer(id) { document.getElementById(id).style.display = "block"; }

function addPhoto() {
        n = parseInt($("#images").val()) +1;
        $("<input name='image" + n + "' type='file' class='files' value='' /><br />").appendTo("#imgupload");
        $("#images").val(n);
}

function load_service(value) {
	$("#company-list").html("<br /><br />").css("background", "url(/js/loadingAnimation.gif) center top no-repeat");
	$("#company-list").load("/ajax-service.php?service=" + value, {}, function(){ $(this).css("background", ""); });
}

function load_parts(value) {
	$("#company-list").html("<br /><br />").css("background", "url(/js/loadingAnimation.gif) center top no-repeat");
	$("#company-list").load("/ajax-parts.php?zavod=" + value, {}, function(){ $(this).css("background", ""); });
}


function mainsearch_loadModel() {
	var z = $("#srch_zavod_id").val();
	$('#model-list select').removeOption(/./).ajaxAddOption('/ajax.php', {module: 'SelectCar', zavod: z}, false, function() {
		var tmp = document.getElementById("srch_car_id");
		option = tmp.getElementsByTagName("option");
		option[0].selected = true;
		document.getElementById("select" + tmp.name).childNodes[0].nodeValue = option[0].childNodes[0].nodeValue;
	});
}