Есть JS который считает стоимость страховки.
[SRC]function setFormEnabled(a) {
$("#calc_wrapper select").prop("disabled", !a), $("#calc_wrapper input").prop("disabled", !a), $("#calc_wrapper button").prop("disabled", !a), $("#calc_wrapper #btn-reset").prop("disabled", !1), $("#calc_wrapper #btn-buy, #btn-buy-kasko").prop("disabled", !1)
}
function setProgress(a) {
$("#progress").css("width", a + "%")
}
function updateItogRows() {
$("#pricep_row:visible").length > 0 ? $("#itog_pricep").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_pricep").addClass("closed"), $("#moshnost_row:visible").length > 0 ? $("#itog_moshnost").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_moshnost").addClass("closed"), 1 == usl_val ? ($("#itog_region").addClass("closed"), $("#itog_region_in").addClass("closed")) : 2 == usl_val ? ($("#itog_region").addClass("closed"), $("#itog_region_in").slideDown().removeClass("closed").css({
display: ''
})) : ($("#itog_region").slideDown().removeClass("closed").css({
display: ''
}), $("#itog_region_in").addClass("closed")), isJur && 0 == usl_val || $("#period_fl_row:visible").length > 0 || $("#period_ul_row:visible").length > 0 ? $("#itog_period").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_period").addClass("closed"), 2 == usl_val ? $("#itog_ogranicheniya").addClass("closed") : $("#itog_ogranicheniya").slideDown().removeClass("closed").css({
display: ''
}), isJur && 2 == usl_val ? $("#itog_ogr_in").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_ogr_in").addClass("closed"), $("#spisok_row:visible").length > 0 && 1 == $("#spisok").val() ? $("#itog_voditeli").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_voditeli").addClass("closed"), 2 != usl_val || isJur ? $("#itog_voditeli_in").addClass("closed") : $("#itog_voditeli_in").slideDown().removeClass("closed").css({
display: ''
}), $("#klass_row:visible").length > 0 ? $("#itog_kbm").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_kbm").addClass("closed"), $("#narush_row:visible").length > 0 ? $("#itog_narusheniya").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_narusheniya").addClass("closed")
}
function resetVals(a) {
for (var b = 0; b < a.length; b++) "uslovie" == a ? ($("#usloviya").val(-1), $("#usloviya_ur").val(-1)) : "tip-ts" == a ? $("#tip-ts").val(-1) : "moshnost" == a ? $("#moshnost").val(-1) : "pricep" == a ? $("#pricep").val(-1) : "region" == a ? ($("#region").val(-1), $("#city_row").addClass("closed")) : "city" == a ? $('select[name*="city-"]').val(-1) : "period" == a ? ($("#period-fl").val(-1), $("#period-ul").val(-1), $("#period-in").val(-1)) : "jur" == a ? $("#vladelec").val(-1) : "spisok" == a ? $("#spisok").val(-1) : "voditeli" == a ? $("#voditeli").val(-1) : "klass" == a ? $("#Kbm").val(-1) : "narush" == a && $("#narusheniya").val(-1)
}
function showSpecTehnika(a) {
a ? ($("#spec-tehnika").show(), $("#spec-tehnika-label").show()) : ($("#spec-tehnika").hide(), $("#spec-tehnika-label").hide())
}
function showMoshnost(a) {
a ? ($("#moshnost_row").show(), $("#itog_moshnost").show()) : ($("#moshnost_row").hide(), $("#itog_moshnost").hide())
}
function updatePricep() {
var a = $("#tip-ts").val();
isJur || "b" != a && "b-t" != a ? ($("#pricep_row").show(), $("#itog_pricep").show()) : ($("#pricep_row").hide(), $("#itog_pricep").hide())
}
function updateRegion() {
var a = $('#usl_row :input[type="radio"]:checked').val();
1 == a ? ($("#region_row").hide(), $("#city_row").hide(), $("#itog_region").hide(), $("#itog_region_in").hide()) : 2 == a ? ($("#region_row").hide(), $("#city_row").hide(), $("#itog_region").show(), $("#itog_region_in").hide()) : ($("#region_row").show(), $("#itog_region").show(), $("#itog_region_in").hide(), resetVals(["region"]))
}
function updatePeriod() {
var a = $('#usl_row :input[type="radio"]:checked').val();
2 == a ? ($("#period_in_row").show(), $("#period_ul_row").hide(), $("#period_fl_row").hide(), $("#itog_period").show(), $("#itog_srok").hide()) : 1 == a ? ($("#period_in_row").hide(), $("#period_ul_row").hide(), $("#period_fl_row").hide(), $("#itog_period").hide(), $("#itog_srok").show()) : isJur ? (3 == a ? $("#period_ul_row").show() : $("#period_ul_row").hide(), $("#period_fl_row").hide(), $("#period_in_row").hide(), $("#itog_period").show(), $("#itog_srok").hide()) : ($("#period_fl_row").show(), $("#period_ul_row").hide(), $("#period_in_row").hide(), $("#itog_period").show(), $("#itog_srok").hide())
}
function updateSpisok() {
var a = $('#usl_row :input[type="radio"]:checked').val();
2 == a ? ($("#spisok_row").hide(), $("#voditeli_row").hide(), isJur ? ($("#itog_voditeli").hide(), $("#itog_voditeli_in").hide(), $("#itog_ogranicheniya").hide(), $("#itog_ogr_in").show()) : ($("#itog_voditeli").hide(), $("#itog_voditeli_in").show(), $("#itog_ogranicheniya").hide(), $("#itog_ogr_in").hide())) : ($("#itog_voditeli_in").hide(), $("#itog_ogr_in").hide(), isJur ? ($("#spisok_row").hide(), $("#voditeli_row").hide()) : ($("#spisok_row").show(), setSpisokLimited(isSpisokLimited)))
}
function updateKlass() {
var a = $('#usl_row :input[type="radio"]:checked').val();
1 == a || 2 == a ? ($("#klass_row").hide(), $("#itog_kbm").hide()) : ($("#klass_row").show(), $("#itog_kbm").show())
}
function updateNarush() {
var a = $('#usl_row :input[type="radio"]:checked').val();
1 == a ? ($("#narush_row").hide(), $("#itog_narusheniya").hide()) : ($("#narush_row").show(), $("#itog_narusheniya").show())
}
function setJur(a) {
isJur = a, $("#vladelec").prop("disabled", !0), isJur ? ($("#usloviya").addClass("closed"), $("#usloviya_ur").slideDown().removeClass("closed").css({
display: ''
}), $("#usl_row").slideDown().removeClass("closed").css({
display: ''
})) : ($("#usloviya").slideDown().removeClass("closed").css({
display: ''
}), $("#usloviya_ur").addClass("closed"), $("#usl_row").slideDown().removeClass("closed").css({
display: ''
})), resetVals(["uslovie"])
}
function setSpisokLimited(a) {
isSpisokLimited = a, a ? ($("#spisok").hasClass("active") || $("#spisok").addClass("active"), $("#bez-ogranichenii").removeClass("active"), $("#spisok_row:visible").length > 0 && ($("#voditeli_row").show(), $("#itog_voditeli").show(), resetVals(["voditeli"]))) : ($("#bez-ogranichenii").hasClass("active") || $("#bez-ogranichenii").addClass("active"), $("#spisok").removeClass("active"), $("#voditeli_row").hide(), $("#itog_voditeli").hide())
}
function setPricep(a) {
isPricep = a, a ? ($("#pricep").hasClass("active") || $("#pricep").addClass("active"), $("#bez-pricepa").removeClass("active")) : ($("#bez-pricepa").hasClass("active") || $("#bez-pricepa").addClass("active"), $("#pricep").removeClass("active"))
}
function setHasNarush(a) {
hasNarush = a, a ? ($("#narusheniya").hasClass("active") || $("#narusheniya").addClass("active"), $("#bez-narushenii").removeClass("active")) : ($("#bez-narushenii").hasClass("active") || $("#bez-narushenii").addClass("active"), $("#narusheniya").removeClass("active"))
}
function uslovieChanged(a) {
usl_val = a, resetVals(["tip-ts"]), $("#usloviya").prop("disabled", !0), $("#usloviya_ur").prop("disabled", !0), $("#tip_ts_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(25)
}
function tipTSChanged(a) {
$("#tip-ts").prop("disabled", !0), resetVals(["moshnost", "pricep"]), "b" == a || "b-t" == a ? $("#moshnost_row").slideDown().removeClass("closed").css({
display: ''
}) : $("#pricep_row").slideDown().removeClass("closed").css({
display: ''
})
}
function moshnostChanged() {
$("#moshnost").prop("disabled", !0), resetVals(["region", "period", "spisok"]), isJur ? $("#pricep_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? ($("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : 2 == usl_val ? ($("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : $("#region_row").slideDown().removeClass("closed").css({
display: ''
})
}
function pricepChanged() {
$("#pricep").prop("disabled", !0), resetVals(["region", "spisok", "period"]), 1 == usl_val ? isJur ? (
$("#btn-calc").prop("disabled", !1), setProgress(100)) : ($("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : 2 == usl_val ? ($("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : $("#region_row").slideDown().removeClass("closed").css({
display: ''
})
}
function regionChanged(a) {
resetVals(["city", "period", "spisok", "klass"]), $("#region").prop("disabled", !0), $('select[name*="city-"]').addClass("closed");
var b = $("#city-" + a);
b.length > 0 ? (b.slideDown().removeClass("closed").css({
display: ''
}), $("#city_row").slideDown().removeClass("closed").css({
display: ''
})) : ($("#city_row").addClass("closed"), 2 == usl_val ? $("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? isJur ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : $("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}) : isJur ? (3 == usl_val ? $("#period_ul_row").slideDown().removeClass("closed").css({
display: ''
}) : ($("#period_ul_row").addClass("closed"), $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})), $("#period_fl_row").addClass("closed"), $("#period_in_row").addClass("closed")) : ($("#period_fl_row").slideDown().removeClass("closed").css({
display: ''
}), $("#period_ul_row").addClass("closed"), $("#period_in_row").addClass("closed")), setProgress(50))
}
function cityChanged() {
resetVals(["period", "spisok", "klass"]), $('select[name*="city-"]').prop("disabled", !0), 2 == usl_val ? $("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? isJur ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : $("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}) : isJur ? (3 == usl_val ? $("#period_ul_row").slideDown().removeClass("closed").css({
display: ''
}) : ($("#period_ul_row").addClass("closed"), $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})), $("#period_fl_row").addClass("closed"), $("#period_in_row").addClass("closed")) : ($("#period_fl_row").slideDown().removeClass("closed").css({
display: ''
}), $("#period_ul_row").addClass("closed"), $("#period_in_row").addClass("closed")), setProgress(50)
}
function periodChanged() {
$("#period-fl").prop("disabled", !0), $("#period-ul").prop("disabled", !0), $("#period-in").prop("disabled", !0), resetVals(["spisok", "narush"]), 2 == usl_val ? ($("#narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : isJur ? $("#klass_row").slideDown().removeClass("closed").css({
display: ''
}) : $("#spisok_row").slideDown().removeClass("closed").css({
display: ''
})
}
function spisokChanged(a) {
$("#spisok").prop("disabled", !0), resetVals(["voditeli", "klass"]), 1 == a ? $("#voditeli_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : 2 == usl_val ? ($("narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})
}
function voditeliChanged() {
$("#voditeli").prop("disabled", !0), resetVals(["klass", "narush"]), 1 == usl_val ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : 2 == usl_val ? ($("narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})
}
function klassChanged() {
$("#Kbm").prop("disabled", !0), resetVals(["narush"]), 1 != usl_val ? ($("#narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : ($("#btn-calc").prop("disabled", !1), setProgress(100))
}
function narushChanged() {
$("#narusheniya").prop("disabled", !0), $("#btn-calc").prop("disabled", !1), setProgress(100)
}
function calculate() {
var a = "Физическое лицо";
isJur && (a = "Юридическое лицо"), $("#sob_ts").html(a), $("#usl").html($("#usloviya option:selected").text()), $("#ts").html($("#tip-ts option:selected").text());
var b = 0,
c = 0;
isJur ? (b = base_arr_jur[$("#tip-ts").val()][0], c = base_arr_jur[$("#tip-ts").val()][1]) : (b = base_arr_fiz[$("#tip-ts").val()][0], c = base_arr_fiz[$("#tip-ts").val()][1]), $("#tb_1").html(b), $("#tb_2").html(c);
var d = 1,
e = 2 == $("#pricep").val();
$("#pricep_row:visible").length > 0 && (e ? ($("#pric").html("Да"), d = isJur ? coef_pricep_jur[$("#tip-ts").val()] : coef_pricep_fiz[$("#tip-ts").val()], $("#pric_kof").html(d)) : ($("#pric").html("Нет"), $("#pric_kof").html(d)));
var f = 1;
if ($("#moshnost_row:visible").length > 0) {
$("#mosh").html($("#moshnost option:selected").text());
var g = $("#moshnost").val();
f = coef_moshn[g], $("#mosh-kof").html(f)
}
var h = 1;
if ($("#region_row:visible").length > 0) {
$("#reg").html($("#region option:selected").text());
var i = $("#region").val(),
j = $("#city-" + i);
$("#reg-city").html(j.length > 0 ? ", " + j.find("option:selected").text() : ""), h = j.length > 0 ? "tr" == $("#tip-ts").val() ? coef_city[j.val()][1] : coef_city[j.val()][0] : "tr" == $("#tip-ts").val() ? coef_city.def[1] : coef_city.def[0]
} else 2 == usl_val && (h = k_city_in, $("#itog_region").hide(), $("#itog_region_in").show());
$("#reg_kof").html(h);
var k = 1;
$("#itog_period").hide(), $("#itog_srok").hide(), $("#period_fl_row:visible").length > 0 ? ($("#itog_period").show(), $("#per").html($("#period-fl option:selected").text()), k = coef_period[$("#period-fl").val()], $("#per_kof").html(k)) : $("#period_ul_row:visible").length > 0 ? ($("#itog_period").show(), $("#per").html($("#period-ul option:selected").text()), k = coef_period[$("#period-ul").val()], $("#per_kof").html(k)) : $("#period_in_row:visible").length > 0 ? ($("#itog_srok").show(), $("#sr").html($("#period-in option:selected").text()), k = coef_period[$("#period-in").val()], $("#sr_kof").html(k)) : 1 == usl_val && ($("#itog_srok").show(), $("#sr").html(k_period_transit_text), $("#sr_kof").html(k_period_transit), k = k_period_transit), isJur && 0 == usl_val && $("#itog_period").show();
var l = 1 == $("#spisok").val(),
m = 1.8;
2 == usl_val ? (m = isJur ? k_spisok_in_jur : k_spisok_in_fiz, $("#ogr_kof_in").html(m)) : isJur ? $("#ogr").html($('#spisok option[value="2"]').text()) : ($("#ogr").html($("#spisok option:selected").text()), m = l ? k_spisok_lim : k_spisok_notlim), $("#ogr_kof").html(m);
var n = 1;
2 == usl_val ? (n = isJur ? k_voditeli_in_jur : k_voditeli_in_fiz, $("#vod_kof_in").html) : $("#voditeli_row:visible").length > 0 && ($("#vod").html($("#voditeli option:selected").text()), n = coef_voditeli[$("#voditeli").val()]), $("#vod_kof").html;
var o = 1;
$("#klass").html($("#Kbm option:selected").text()), o = coef_klass[$("#Kbm").val()], $("#klass_kof").html(o);
var p = 0,
q = 0,
r = k_narush_no,
s = 2 == $("#narusheniya").val();
s ? ($("#nar").html("Да"), r = k_narush_yes, p = b * h * 5, q = c * h * 5) : ($("#nar").html("Нет"), p = b * h * 3, q = c * h * 3), $("#nar_kof").html(r);
var t = 0,
u = 0,
v = $("#tip-ts").val();
isJur ? 0 == usl_val || 3 == usl_val ? "b" == v || "b-t" == v ? (t = b * h * o * k_spisok_notlim * f * k * r * d, u = c * h * o * k_spisok_notlim * f * k * r * d) : (t = b * h * o * k_spisok_notlim * d * k * r, u = c * h * o * k_spisok_notlim * d * k * r) : 1 == usl_val ? "b" == v || "b-t" == v ? (t = b * k_spisok_notlim * f * k_period_transit * d, u = c * k_spisok_notlim * f * k_period_transit * d) : (t = b * k_spisok_notlim * k_period_transit * d, u = c * k_spisok_notlim * k_period_transit * d) : 2 == usl_val && ("b" == v || "b-t" == v ? (t = b * h * m * f * k * r * d, u = c * h * m * f * k * r * d) : (t = b * h * m * k * r * d, u = c * h * m * k * r * d)) : 0 == usl_val || 3 == usl_val ? "b" == v || "b-t" == v ? (t = b * h * o * n * m * f * k * r, u = c * h * o * n * m * f * k * r) : (t = b * h * o * n * m * d * k * r, u = c * h * o * n * m * d * k * r) : 1 == usl_val ? "b" == v || "b-t" == v ? (t = b * n * m * f * k_period_transit, u = c * n * m * f * k_period_transit) : (t = b * n * m * k_period_transit * d, u = c * n * m * k_period_transit * d) : 2 == usl_val && ("b" == v || "b-t" == v ? (t = b * h * n * m * f * k * r, u = c * h * n * m * f * k * r) : (t = b * h * n * m * k * r * d, u = c * h * n * m * k * r * d)), $("#stoim_1").html(t.toFixed(2)), $("#stoim_2").html(u.toFixed(2)), $("#max_stoim_1").html(p.toFixed(2)), $("#max_stoim_2").html(q.toFixed(2)), (t > p || u > q) && ($("#itog-stoimost-max").slideDown().removeClass("closed").css({
display: ''
}), $("#itog-stoimost").addClass("stoimost-form")), $("#itog").show()
}
var base_arr_jur = {
a: [867, 1579],
b: [2573, 3087],
"b-t": [5138, 6166],
c: [3509, 4211],
"c-m": [5284, 6341],
d: [2808, 3370],
"d-m": [3509, 4211],
"d-t": [5138, 6166],
tb: [2808, 3370],
tm: [1751, 2101],
tr: [1124, 1579]
},
base_arr_fiz = {
a: [867, 1579],
b: [3432, 4118],
"b-t": [5138, 6166],
c: [3509, 4211],
"c-m": [5284, 6341],
d: [2808, 3370],
"d-m": [3509, 4211],
"d-t": [5138, 6166],
tb: [2808, 3370],
tm: [1751, 2101],
tr: [1124, 1579]
},
coef_city = {
1: {
def: [1.3, 1]
},
2: {
"2_1": [1.3, .8],
"2_2": [.7, .5]
},
3: {
"3_1": [1.2, .8],
"3_2": [1.1, .8],
"3_3": [1.3, .8],
"3_4": [1.8, 1],
"3_5": [1, .8]
},
4: {
"4_1": [1.3, .8],
"4_2": [.6, .5]
},
5: {
"5_1": [.7, .5],
"5_2": [.6, .5]
},
6: {
"6_1": [.8, .5],
"6_2": [.6, .5],
"6_3": [.6, .5]
},
7: {
"7_1": [1, .8],
"7_2": [.7, .5]
},
8: {
"8_1": [1.3, .8],
"8_2": [.6, .5]
},
9: {
def: [1, .8]
},
10: {
"10_1": [1.3, .8],
"10_2": [.8, .5]
},
11: {
"11_1": [1.6, 1],
"11_2": [1.3, .8],
"11_3": [1, .8]
},
12: {
"12_1": [.6, .6],
"12_2": [.6, .6]
},
13: {
"13_1": [1, .8],
"13_2": [1.4, .8],
"13_3": [.7, .5]
},
14: {
"14_1": [1.2, 1],
"14_2": [1.5, 1],
"14_3": [.8, .6]
},
15: {
"15_1": [.8, .5],
"15_2": [1.2, .7],
"15_3": [.6, .5]
},
16: {
"16_1": [1, .8],
"16_2": [.8, .5]
},
17: {
"17_1": [1.3, .8],
"17_2": [1, .8],
"17_3": [1.2, .8],
"17_4": [2, 1.2],
"17_5": [1.7, 1],
"17_6": [1.1, .8]
},
18: {
"18_1": [.6, .5],
"18_2": [.6, .5]
},
19: {
"19_1": [1.1, .8],
"19_2": [1, .8],
"19_3": [1.6, 1],
"19_4": [.8, .5]
},
20: {
"20_1": [1, .8],
"20_2": [.6, .5]
},
21: {
def: [.6, .5]
},
22: {
"22_1": [1.1, .8],
"22_2": [1.2, .8],
"22_3": [1.7, 1],
"22_4": [.8, .5]
},
23: {
"23_1": [1.7, 1],
"23_2": [1.2, .8],
"23_3": [1.1, .8],
"23_4": [.7, .5]
},
24: {
"24_1": [.6, .5],
"24_2": [.7, .5],
"24_3": [.6, .5]
},
25: {
"25_1": [1.3, .1],
"25_2": [1, .6]
},
26: {
"26_1": [1.3, .8],
"26_2": [1.2, .8],
"26_3": [1.1, .8],
"26_4": [1.8, 1],
"26_5": [1, .8]
},
27: {
"27_1": [1.1, .8],
"27_2": [1.3, .8],
"27_3": [1, .8],
"27_4": [1.8, 1],
"27_5": [.9, .5]
},
28: {
"28_1": [1.3, .8],
"28_2": [1, .8],
"28_3": [2, 1.2],
"28_4": [1.2, .8],
"28_5": [1.1, .8]
},
29: {
"29_1": [1, 0.8],
"29_2": [1.4, 1],
"29_3": [.7, .5]
},
30: {
"30_1": [1, .8],
"30_2": [1.2, .8],
"30_3": [.7, .5]
},
31: {
"31_1": [1, .8],
"31_2": [1.3, .8],
"31_3": [1.7, 1],
"31_4": [.8, .5]
},
32: {
"32_1": [1.1, .9],
"32_2": [1.6, .9],
"32_3": [1, .6]
},
33: {
"33_1": [1.8, 1],
"33_2": [1.6, 1],
"33_3": [1.7, 1],
"33_4": [.85, .5]
},
34: {
"34_1": [1.4, 1],
"34_2": [.8, .5]
},
35: {
"35_1": [1.3, .8],
"35_2": [1, .8],
"35_3": [.8, .5]
},
36: {
"36_1": [1.5, 1],
"36_2": [1, .8],
"36_3": [.7, .5]
},
37: {
"37_1": [1.6, 1],
"37_2": [1.1, .8],
"37_3": [1.2, .8],
"37_4": [1, .8]
},
38: {
"38_1": [1.3, .8],
"38_2": [1.1, .8],
"38_3": [1, .8],
"38_4": [.7, .5]
},
39: {
"39_1": [1.7, 1],
"39_2": [1.8, 1],
"39_3": [.9, .5]
},
40: {
"40_1": [1.1, .9],
"40_2": [1.5, 1.1],
"40_3": [.8, .6]
},
41: {
"41_1": [1.8, 1],
"41_2": [1.1, .8],
"41_3": [1, .8],
"41_4": [.9, .5]
},
42: {
"42_1": [1.2, .8],
"42_2": [1, .8],
"42_3": [1.7, 1],
"42_4": [1.1, .8],
"42_5": [1.3, .8],
"42_6": [.8, .5]
},
43: {
"43_1": [1.1, .8],
"43_2": [.8, .5]
},
44: {
"44_1": [1.2, .8],
"44_2": [1.3, .8],
"44_3": [.9, .5]
},
45: {
"45_1": [1.2, .8],
"45_2": [1.3, .8],
"45_3": [1.9, 1],
"45_4": [1.8, 1],
"45_5": [1.1, .8]
},
46: {
"46_1": [1.4, 1],
"46_2": [1.2, .8],
"46_3": [.8, .5]
},
47: {
"47_1": [1.3, .8],
"47_2": [.7, .5]
},
48: {
"48_1": [1.4, .8],
"48_2": [1.1, .8],
"48_3": [.6, .5]
},
49: {
"49_1": [1, .8],
"49_2": [1.2, .8],
"49_3": [.7, .5]
},
50: {
def: [1.3, 0.8]
},
51: {
"51_1": [1, .8],
"51_2": [1.5, 1],
"51_3": [.8, .5]
},
52: {
"52_1": [.7, .5],
"52_2": [.6, .5]
},
53: {
def: [1.7, 1]
},
54: {
"54_1": [1.3, 1],
"54_2": [2.1, 1.2],
"54_3": [1.6, 1],
"54_4": [1.2, 1]
},
55: {
"55_1": [1.1, .8],
"55_2": [1.3, .8],
"55_3": [1.2, .8],
"55_4": [1.8, 1],
"55_5": [1, .8]
},
56: {
"56_1": [1, .8],
"56_2": [1.3, .8],
"56_3": [.9, .5]
},
57: {
"57_1": [1.3, .8],
"57_2": [1.2, .8],
"57_3": [1, .8],
"57_4": [1.7, 1],
"57_5": [.9, .5]
},
58: {
"58_1": [1.6, 1],
"58_2": [.9, .5]
},
59: {
"59_1": [1, .8],
"59_2": [1.7, 1],
"59_3": [1.1, .8],
"59_4": [.8, .5]
},
60: {
"60_1": [1, .8],
"60_2": [1.2, .8],
"60_3": [.7, .5]
},
61: {
"61_1": [1.2, .8],
"61_2": [1, .8],
"61_3": [1.4, 1],
"61_4": [.7, .5]
},
62: {
"62_1": [1, .8],
"62_2": [1.2, .8],
"62_3": [.7, .5]
},
63: {
"63_1": [1.2, .8],
"63_2": [1.3, .8],
"63_3": [1, .8],
"63_4": [1.8, 1],
"63_5": [1.1, .8],
"63_6": [.8, .5]
},
64: {
"64_1": [1.4, 1],
"64_2": [.9, .5]
},
65: {
"65_1": [1.1, .8],
"65_2": [1.6, 1],
"65_3": [1.5, 1],
"65_4": [1.2, .8],
"65_5": [.9, .5]
},
66: {
"66_1": [1, .8],
"66_2": [1.6, 1],
"66_3": [1.2, .8],
"66_4": [.7, .5]
},
67: {
"67_1": [1.5, 1],
"67_2": [.9, .5]
},
68: {
"68_1": [1.1, .8],
"68_2": [1.3, .8],
"68_3": [1.2, .8],
"68_4": [1.8, 1],
"68_5": [1, .8]
},
69: {
"69_1": [1, .8],
"69_2": [1.2, .8],
"69_3": [.7, .5]
},
70: {
"70_1": [1, .8],
"70_2": [1.2, .8],
"70_3": [.8, .5]
},
71: {
"71_1": [1, .8],
"71_2": [1.5, 1],
"71_3": [.8, .5]
},
72: {
"72_1": [1.2, .8],
"72_2": [1.6, 1],
"72_3": [.9, .5]
},
73: {
"73_1": [1, .8],
"73_2": [1.5, 1],
"73_3": [1.2, .8],
"73_4": [.9, .5]
},
74: {
"74_1": [1.3, .8],
"74_2": [2, 1.2],
"74_3": [1.1, .8]
},
75: {
"75_1": [1.2, .9],
"75_2": [1.5, 1.1],
"75_3": [.9, .6]
},
76: {
"76_1": [1.4, .8],
"76_2": [1.6, 1],
"76_3": [1.8, 1],
"76_4": [1.2, .8],
"76_5": [2.1, 1.3],
"76_6": [1, .8]
},
77: {
"77_1": [1.5, 1],
"77_2": [.9, .5]
},
78: {
def: [2, 1.2]
},
79: {
def: [1.8, 1]
},
80: {
def: [.6, .6]
},
81: {
"81_1": [.6, .5],
"81_2": [.6, .5]
},
82: {
def: [.8, .5]
},
83: {
"83_1": [1, .8],
"83_2": [1.3, .8],
"83_3": [2, 1.2],
"83_4": [1.8, 1],
"83_5": [1.5, 1],
"83_6": [1.1, .8]
},
84: {
def: [.6, .5]
},
85: {
"85_1": [1, .8],
"85_2": [1.7, 1],
"85_3": [1.1, .8]
},
86: {
def: [0.6, .5]
}
},
k_city_in = 1.7,
coef_period = {
3: .5,
4: .6,
5: .65,
6: .7,
7: .8,
8: .9,
9: .95,
10: 1,
2: .4,
1: .3,
0: .2
},
k_period_transit = .2,
k_period_transit_text = "до 20 дней",
coef_voditeli = {
0: 1,
1: 1.7,
2: 1.6,
3: 1.8
},
k_voditeli_in_jur = 1,
k_voditeli_in_fiz = 1.7,
coef_klass = {
m: 2.45,
0: 2.3,
1: 1.55,
2: 1.4,
3: 1,
4: .95,
5: .9,
6: .85,
7: .8,
8: .75,
9: .7,
10: .65,
11: .6,
12: .55,
13: .5,
def: 1
},
coef_pricep_jur = {
a: 1.16,
b: 1.16,
"b-t": 1,
c: 1.4,
"c-m": 1.25,
d: 1,
"d-m": 1,
"d-t": 1,
tb: 1,
tm: 1,
tr: 1.24
},
coef_pricep_fiz = {
a: 1.16,
b: 1.16,
"b-t": 1,
c: 1.4,
"c-m": 1.25,
d: 1,
"d-m": 1,
"d-t": 1,
tb: 1,
tm: 1,
tr: 1.24
},
coef_moshn = {
0: .6,
1: 1,
2: 1.1,
3: 1.2,
4: 1.4,
5: 1.6
},
k_spisok_in_jur = 1.8,
k_spisok_in_fiz = 1,
k_spisok_lim = 1,
k_spisok_notlim = 1.8,
k_narush_yes = 1.5,
k_narush_no = 1,
isJur = !1,
isSpisokLimited = !0,
isPricep = !1,
hasNarush = !1,
usl_val = "";
$(document).ready(function() {
$("#vladelec").change(function() {
-1 != this.value && setJur(2 == this.value)
}), $("#usloviya").change(function() {
uslovieChanged(this.value)
}), $("#usloviya_ur").change(function() {
uslovieChanged(this.value)
}), $("#tip-ts").change(function() {
tipTSChanged(this.value)
}), $("#moshnost").change(function() {
moshnostChanged(this.value)
}), $("#pricep").change(function() {
pricepChanged(this.value)
}), $("#region").change(function() {
regionChanged(this.value)
}), $('select[name*="city-"]').change(function() {
cityChanged(this.value)
}), $("#period-fl").change(function() {
periodChanged(this.value)
}), $("#period-ul").change(function() {
periodChanged(this.value)
}), $("#period-in").change(function() {
periodChanged(this.value)
}), $("#spisok").change(function() {
spisokChanged(this.value)
}), $("#voditeli").change(function() {
voditeliChanged(this.value)
}), $("#Kbm").change(function() {
klassChanged(this.value)
}), $("#narusheniya").change(function() {
narushChanged(this.value)
}), $("#btn-reset").click(function() {
$('a.ref_part').hide();
$('.tool_result_refer').hide();
$('.content_page .tool_result_wrap button[type=button]').css({
display: ''
}), $(".serv_pol_mat").hide(), $("#btn-calc").attr({
disabled: "disabled"
}), $(".tool_result_wrap").css({
border: ''
}), resetVals(["jur"]), $("#itog").hide(), setFormEnabled(!0), $("#itog-stoimost-max").addClass("closed"), $("#itog-stoimost").removeClass("stoimost-form"), $("#usl_row").addClass("closed"), $("#tip_ts_row").addClass("closed"), $("#moshnost_row").addClass("closed"), $("#pricep_row").addClass("closed"), $("#region_row").addClass("closed"), $("#city_row").addClass("closed"), $("#period_fl_row").addClass("closed"), $("#period_ul_row").addClass("closed"), $("#period_in_row").addClass("closed"), $("#spisok_row").addClass("closed"), $("#voditeli_row").addClass("closed"), $("#klass_row").addClass("closed"), $("#narush_row").addClass("closed"), $("#btn-calc").prop("disabled", !0), setProgress(0), $("#progress-bar").removeClass("end")
}),
$("#btn-calc").click(function() {
setFormEnabled(!1),
updateItogRows(),
calculate(),
$(".tool_result_wrap").css({
border: '2px solid #28ada3'
}),
$("#progress-bar").addClass("end");
if ($(window).width() > 900) {
$('html, body').animate({
scrollTop: $("#btn-calc").offset().top
}, 1000, 'swing').find(".serv_pol_mat").delay(1300).slideDown(); // анимируем скроолинг к результатам + показ пол.мат.
} else {
$('html, body').animate({
scrollTop: $(".tool_result_wrap").offset().top - 70
}, 1000, 'swing').find(".serv_pol_mat").delay(1300).slideDown(); // анимируем скроолинг к результатам + показ пол.мат.
}
if ($(window).width() > 900) {
$('.content_page .tool_result_wrap button[type=button]').css({
display: 'inline-block'
});
}
var i = false;
$('.tool_result_wrap.calc_osago table tbody tr').each(function() {
if ($(this).css("display") == "none") {} else {
if (!i) {
i = true;
} else {
$(this).css({
background: '#eee'
});
i = false;
}
}
});
var ingosstah = ['Адыгея', 'Алтай', 'Бурятия', 'Дагестан', 'Ингушетия', 'Калмыкия', 'Карачаево-Черкесия', 'Карелия', 'Коми', 'Крым', 'Марий Эл', 'Саха (Якутия)', 'Тыва', 'Удмуртия', 'Хакасия', 'Чечня', 'Чувашия', 'Алтайский край', 'Забайкальский край', 'Республика Кабардино-Балкария', 'Камчатский край', 'Красноярский край', 'Пермский край', 'Хабаровский край', 'Амурская область', 'Астраханская область', 'Белгородская область', 'Брянская область', 'Владимирская область', 'Вологодская область', 'Иркутская область', 'Калининградская область', 'Калужская область', 'Кемеровская область', 'Костромская область', 'Курганская область', 'Курская область', 'Ленинградская область', 'Магаданская область', 'Московская область', 'Новгородская область', 'Новосибирская область', 'Омская область', 'Оренбургская область', 'Орловская область', 'Пензенская область', 'Псковская область', 'Приморский край', 'Рязанская область', 'Самарская область', 'Сахалинская область', 'Свердловская область', 'Смоленская область', 'Ставропольский край', 'Тамбовская область', 'Тверская область', 'Томская область', 'Тульская область', 'Тюменская область', 'Ярославская область', 'Москва', 'Санкт-Петербург', 'Севастополь', 'Еврейская АО', 'Ненецкий АО', 'Ханты-Мансийский АО — Югра', 'Чукотский АО', 'Ямало-Ненецкий АО'];
var vlad = $("#vladelec").val();
var tipTs = $("#tip-ts").val();
console.log(ingosstah.indexOf($("#region option:selected").text()));
if (vlad == 1 && tipTs == 'b') {
$('.tool_result_refer').css({
display: 'inline-block'
});
console.log('testing1');
if (ingosstah.indexOf($("#region option:selected").text()) != -1) {
console.log('testing2');
$('.refer_button a').show();
}
}
}),
$('.tool_result_wrap.calc_osago button').on('click', function() {
var atext = $('.tool_result_wrap #itog').html(),
prwin = open('');
prwin.document.writeln('<html><script>function printPage() { var n=navigator; if( (n.appName.indexOf("Explorer")> -1) && ( parseInt(n.appVersion) ) == 4 ){ IEControl.ExecWB(6,1); } else { window.print() } }</script>');
prwin.document.writeln('<script>var i = false;$(".tool_result_wrap.calc_osago table tbody tr").each(function(){if($(this).css("display") == "none"){} else {if (!i){i = true;} else {$(this).css({background:"#eee"});i = false;}}});</script>');
prwin.document.writeln('</body></html>');
});
});[/SRC]
Что здесь надо прописать, чтоб данные расчета отправлялмь на емаил ?
[SRC]function setFormEnabled(a) {
$("#calc_wrapper select").prop("disabled", !a), $("#calc_wrapper input").prop("disabled", !a), $("#calc_wrapper button").prop("disabled", !a), $("#calc_wrapper #btn-reset").prop("disabled", !1), $("#calc_wrapper #btn-buy, #btn-buy-kasko").prop("disabled", !1)
}
function setProgress(a) {
$("#progress").css("width", a + "%")
}
function updateItogRows() {
$("#pricep_row:visible").length > 0 ? $("#itog_pricep").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_pricep").addClass("closed"), $("#moshnost_row:visible").length > 0 ? $("#itog_moshnost").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_moshnost").addClass("closed"), 1 == usl_val ? ($("#itog_region").addClass("closed"), $("#itog_region_in").addClass("closed")) : 2 == usl_val ? ($("#itog_region").addClass("closed"), $("#itog_region_in").slideDown().removeClass("closed").css({
display: ''
})) : ($("#itog_region").slideDown().removeClass("closed").css({
display: ''
}), $("#itog_region_in").addClass("closed")), isJur && 0 == usl_val || $("#period_fl_row:visible").length > 0 || $("#period_ul_row:visible").length > 0 ? $("#itog_period").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_period").addClass("closed"), 2 == usl_val ? $("#itog_ogranicheniya").addClass("closed") : $("#itog_ogranicheniya").slideDown().removeClass("closed").css({
display: ''
}), isJur && 2 == usl_val ? $("#itog_ogr_in").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_ogr_in").addClass("closed"), $("#spisok_row:visible").length > 0 && 1 == $("#spisok").val() ? $("#itog_voditeli").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_voditeli").addClass("closed"), 2 != usl_val || isJur ? $("#itog_voditeli_in").addClass("closed") : $("#itog_voditeli_in").slideDown().removeClass("closed").css({
display: ''
}), $("#klass_row:visible").length > 0 ? $("#itog_kbm").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_kbm").addClass("closed"), $("#narush_row:visible").length > 0 ? $("#itog_narusheniya").slideDown().removeClass("closed").css({
display: ''
}) : $("#itog_narusheniya").addClass("closed")
}
function resetVals(a) {
for (var b = 0; b < a.length; b++) "uslovie" == a ? ($("#usloviya").val(-1), $("#usloviya_ur").val(-1)) : "tip-ts" == a ? $("#tip-ts").val(-1) : "moshnost" == a ? $("#moshnost").val(-1) : "pricep" == a ? $("#pricep").val(-1) : "region" == a ? ($("#region").val(-1), $("#city_row").addClass("closed")) : "city" == a ? $('select[name*="city-"]').val(-1) : "period" == a ? ($("#period-fl").val(-1), $("#period-ul").val(-1), $("#period-in").val(-1)) : "jur" == a ? $("#vladelec").val(-1) : "spisok" == a ? $("#spisok").val(-1) : "voditeli" == a ? $("#voditeli").val(-1) : "klass" == a ? $("#Kbm").val(-1) : "narush" == a && $("#narusheniya").val(-1)
}
function showSpecTehnika(a) {
a ? ($("#spec-tehnika").show(), $("#spec-tehnika-label").show()) : ($("#spec-tehnika").hide(), $("#spec-tehnika-label").hide())
}
function showMoshnost(a) {
a ? ($("#moshnost_row").show(), $("#itog_moshnost").show()) : ($("#moshnost_row").hide(), $("#itog_moshnost").hide())
}
function updatePricep() {
var a = $("#tip-ts").val();
isJur || "b" != a && "b-t" != a ? ($("#pricep_row").show(), $("#itog_pricep").show()) : ($("#pricep_row").hide(), $("#itog_pricep").hide())
}
function updateRegion() {
var a = $('#usl_row :input[type="radio"]:checked').val();
1 == a ? ($("#region_row").hide(), $("#city_row").hide(), $("#itog_region").hide(), $("#itog_region_in").hide()) : 2 == a ? ($("#region_row").hide(), $("#city_row").hide(), $("#itog_region").show(), $("#itog_region_in").hide()) : ($("#region_row").show(), $("#itog_region").show(), $("#itog_region_in").hide(), resetVals(["region"]))
}
function updatePeriod() {
var a = $('#usl_row :input[type="radio"]:checked').val();
2 == a ? ($("#period_in_row").show(), $("#period_ul_row").hide(), $("#period_fl_row").hide(), $("#itog_period").show(), $("#itog_srok").hide()) : 1 == a ? ($("#period_in_row").hide(), $("#period_ul_row").hide(), $("#period_fl_row").hide(), $("#itog_period").hide(), $("#itog_srok").show()) : isJur ? (3 == a ? $("#period_ul_row").show() : $("#period_ul_row").hide(), $("#period_fl_row").hide(), $("#period_in_row").hide(), $("#itog_period").show(), $("#itog_srok").hide()) : ($("#period_fl_row").show(), $("#period_ul_row").hide(), $("#period_in_row").hide(), $("#itog_period").show(), $("#itog_srok").hide())
}
function updateSpisok() {
var a = $('#usl_row :input[type="radio"]:checked').val();
2 == a ? ($("#spisok_row").hide(), $("#voditeli_row").hide(), isJur ? ($("#itog_voditeli").hide(), $("#itog_voditeli_in").hide(), $("#itog_ogranicheniya").hide(), $("#itog_ogr_in").show()) : ($("#itog_voditeli").hide(), $("#itog_voditeli_in").show(), $("#itog_ogranicheniya").hide(), $("#itog_ogr_in").hide())) : ($("#itog_voditeli_in").hide(), $("#itog_ogr_in").hide(), isJur ? ($("#spisok_row").hide(), $("#voditeli_row").hide()) : ($("#spisok_row").show(), setSpisokLimited(isSpisokLimited)))
}
function updateKlass() {
var a = $('#usl_row :input[type="radio"]:checked').val();
1 == a || 2 == a ? ($("#klass_row").hide(), $("#itog_kbm").hide()) : ($("#klass_row").show(), $("#itog_kbm").show())
}
function updateNarush() {
var a = $('#usl_row :input[type="radio"]:checked').val();
1 == a ? ($("#narush_row").hide(), $("#itog_narusheniya").hide()) : ($("#narush_row").show(), $("#itog_narusheniya").show())
}
function setJur(a) {
isJur = a, $("#vladelec").prop("disabled", !0), isJur ? ($("#usloviya").addClass("closed"), $("#usloviya_ur").slideDown().removeClass("closed").css({
display: ''
}), $("#usl_row").slideDown().removeClass("closed").css({
display: ''
})) : ($("#usloviya").slideDown().removeClass("closed").css({
display: ''
}), $("#usloviya_ur").addClass("closed"), $("#usl_row").slideDown().removeClass("closed").css({
display: ''
})), resetVals(["uslovie"])
}
function setSpisokLimited(a) {
isSpisokLimited = a, a ? ($("#spisok").hasClass("active") || $("#spisok").addClass("active"), $("#bez-ogranichenii").removeClass("active"), $("#spisok_row:visible").length > 0 && ($("#voditeli_row").show(), $("#itog_voditeli").show(), resetVals(["voditeli"]))) : ($("#bez-ogranichenii").hasClass("active") || $("#bez-ogranichenii").addClass("active"), $("#spisok").removeClass("active"), $("#voditeli_row").hide(), $("#itog_voditeli").hide())
}
function setPricep(a) {
isPricep = a, a ? ($("#pricep").hasClass("active") || $("#pricep").addClass("active"), $("#bez-pricepa").removeClass("active")) : ($("#bez-pricepa").hasClass("active") || $("#bez-pricepa").addClass("active"), $("#pricep").removeClass("active"))
}
function setHasNarush(a) {
hasNarush = a, a ? ($("#narusheniya").hasClass("active") || $("#narusheniya").addClass("active"), $("#bez-narushenii").removeClass("active")) : ($("#bez-narushenii").hasClass("active") || $("#bez-narushenii").addClass("active"), $("#narusheniya").removeClass("active"))
}
function uslovieChanged(a) {
usl_val = a, resetVals(["tip-ts"]), $("#usloviya").prop("disabled", !0), $("#usloviya_ur").prop("disabled", !0), $("#tip_ts_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(25)
}
function tipTSChanged(a) {
$("#tip-ts").prop("disabled", !0), resetVals(["moshnost", "pricep"]), "b" == a || "b-t" == a ? $("#moshnost_row").slideDown().removeClass("closed").css({
display: ''
}) : $("#pricep_row").slideDown().removeClass("closed").css({
display: ''
})
}
function moshnostChanged() {
$("#moshnost").prop("disabled", !0), resetVals(["region", "period", "spisok"]), isJur ? $("#pricep_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? ($("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : 2 == usl_val ? ($("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : $("#region_row").slideDown().removeClass("closed").css({
display: ''
})
}
function pricepChanged() {
$("#pricep").prop("disabled", !0), resetVals(["region", "spisok", "period"]), 1 == usl_val ? isJur ? (
$("#btn-calc").prop("disabled", !1), setProgress(100)) : ($("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : 2 == usl_val ? ($("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(50)) : $("#region_row").slideDown().removeClass("closed").css({
display: ''
})
}
function regionChanged(a) {
resetVals(["city", "period", "spisok", "klass"]), $("#region").prop("disabled", !0), $('select[name*="city-"]').addClass("closed");
var b = $("#city-" + a);
b.length > 0 ? (b.slideDown().removeClass("closed").css({
display: ''
}), $("#city_row").slideDown().removeClass("closed").css({
display: ''
})) : ($("#city_row").addClass("closed"), 2 == usl_val ? $("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? isJur ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : $("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}) : isJur ? (3 == usl_val ? $("#period_ul_row").slideDown().removeClass("closed").css({
display: ''
}) : ($("#period_ul_row").addClass("closed"), $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})), $("#period_fl_row").addClass("closed"), $("#period_in_row").addClass("closed")) : ($("#period_fl_row").slideDown().removeClass("closed").css({
display: ''
}), $("#period_ul_row").addClass("closed"), $("#period_in_row").addClass("closed")), setProgress(50))
}
function cityChanged() {
resetVals(["period", "spisok", "klass"]), $('select[name*="city-"]').prop("disabled", !0), 2 == usl_val ? $("#period_in_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? isJur ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : $("#spisok_row").slideDown().removeClass("closed").css({
display: ''
}) : isJur ? (3 == usl_val ? $("#period_ul_row").slideDown().removeClass("closed").css({
display: ''
}) : ($("#period_ul_row").addClass("closed"), $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})), $("#period_fl_row").addClass("closed"), $("#period_in_row").addClass("closed")) : ($("#period_fl_row").slideDown().removeClass("closed").css({
display: ''
}), $("#period_ul_row").addClass("closed"), $("#period_in_row").addClass("closed")), setProgress(50)
}
function periodChanged() {
$("#period-fl").prop("disabled", !0), $("#period-ul").prop("disabled", !0), $("#period-in").prop("disabled", !0), resetVals(["spisok", "narush"]), 2 == usl_val ? ($("#narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : isJur ? $("#klass_row").slideDown().removeClass("closed").css({
display: ''
}) : $("#spisok_row").slideDown().removeClass("closed").css({
display: ''
})
}
function spisokChanged(a) {
$("#spisok").prop("disabled", !0), resetVals(["voditeli", "klass"]), 1 == a ? $("#voditeli_row").slideDown().removeClass("closed").css({
display: ''
}) : 1 == usl_val ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : 2 == usl_val ? ($("narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})
}
function voditeliChanged() {
$("#voditeli").prop("disabled", !0), resetVals(["klass", "narush"]), 1 == usl_val ? ($("#btn-calc").prop("disabled", !1), setProgress(100)) : 2 == usl_val ? ($("narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : $("#klass_row").slideDown().removeClass("closed").css({
display: ''
})
}
function klassChanged() {
$("#Kbm").prop("disabled", !0), resetVals(["narush"]), 1 != usl_val ? ($("#narush_row").slideDown().removeClass("closed").css({
display: ''
}), setProgress(75)) : ($("#btn-calc").prop("disabled", !1), setProgress(100))
}
function narushChanged() {
$("#narusheniya").prop("disabled", !0), $("#btn-calc").prop("disabled", !1), setProgress(100)
}
function calculate() {
var a = "Физическое лицо";
isJur && (a = "Юридическое лицо"), $("#sob_ts").html(a), $("#usl").html($("#usloviya option:selected").text()), $("#ts").html($("#tip-ts option:selected").text());
var b = 0,
c = 0;
isJur ? (b = base_arr_jur[$("#tip-ts").val()][0], c = base_arr_jur[$("#tip-ts").val()][1]) : (b = base_arr_fiz[$("#tip-ts").val()][0], c = base_arr_fiz[$("#tip-ts").val()][1]), $("#tb_1").html(b), $("#tb_2").html(c);
var d = 1,
e = 2 == $("#pricep").val();
$("#pricep_row:visible").length > 0 && (e ? ($("#pric").html("Да"), d = isJur ? coef_pricep_jur[$("#tip-ts").val()] : coef_pricep_fiz[$("#tip-ts").val()], $("#pric_kof").html(d)) : ($("#pric").html("Нет"), $("#pric_kof").html(d)));
var f = 1;
if ($("#moshnost_row:visible").length > 0) {
$("#mosh").html($("#moshnost option:selected").text());
var g = $("#moshnost").val();
f = coef_moshn[g], $("#mosh-kof").html(f)
}
var h = 1;
if ($("#region_row:visible").length > 0) {
$("#reg").html($("#region option:selected").text());
var i = $("#region").val(),
j = $("#city-" + i);
$("#reg-city").html(j.length > 0 ? ", " + j.find("option:selected").text() : ""), h = j.length > 0 ? "tr" == $("#tip-ts").val() ? coef_city[j.val()][1] : coef_city[j.val()][0] : "tr" == $("#tip-ts").val() ? coef_city.def[1] : coef_city.def[0]
} else 2 == usl_val && (h = k_city_in, $("#itog_region").hide(), $("#itog_region_in").show());
$("#reg_kof").html(h);
var k = 1;
$("#itog_period").hide(), $("#itog_srok").hide(), $("#period_fl_row:visible").length > 0 ? ($("#itog_period").show(), $("#per").html($("#period-fl option:selected").text()), k = coef_period[$("#period-fl").val()], $("#per_kof").html(k)) : $("#period_ul_row:visible").length > 0 ? ($("#itog_period").show(), $("#per").html($("#period-ul option:selected").text()), k = coef_period[$("#period-ul").val()], $("#per_kof").html(k)) : $("#period_in_row:visible").length > 0 ? ($("#itog_srok").show(), $("#sr").html($("#period-in option:selected").text()), k = coef_period[$("#period-in").val()], $("#sr_kof").html(k)) : 1 == usl_val && ($("#itog_srok").show(), $("#sr").html(k_period_transit_text), $("#sr_kof").html(k_period_transit), k = k_period_transit), isJur && 0 == usl_val && $("#itog_period").show();
var l = 1 == $("#spisok").val(),
m = 1.8;
2 == usl_val ? (m = isJur ? k_spisok_in_jur : k_spisok_in_fiz, $("#ogr_kof_in").html(m)) : isJur ? $("#ogr").html($('#spisok option[value="2"]').text()) : ($("#ogr").html($("#spisok option:selected").text()), m = l ? k_spisok_lim : k_spisok_notlim), $("#ogr_kof").html(m);
var n = 1;
2 == usl_val ? (n = isJur ? k_voditeli_in_jur : k_voditeli_in_fiz, $("#vod_kof_in").html) : $("#voditeli_row:visible").length > 0 && ($("#vod").html($("#voditeli option:selected").text()), n = coef_voditeli[$("#voditeli").val()]), $("#vod_kof").html;
var o = 1;
$("#klass").html($("#Kbm option:selected").text()), o = coef_klass[$("#Kbm").val()], $("#klass_kof").html(o);
var p = 0,
q = 0,
r = k_narush_no,
s = 2 == $("#narusheniya").val();
s ? ($("#nar").html("Да"), r = k_narush_yes, p = b * h * 5, q = c * h * 5) : ($("#nar").html("Нет"), p = b * h * 3, q = c * h * 3), $("#nar_kof").html(r);
var t = 0,
u = 0,
v = $("#tip-ts").val();
isJur ? 0 == usl_val || 3 == usl_val ? "b" == v || "b-t" == v ? (t = b * h * o * k_spisok_notlim * f * k * r * d, u = c * h * o * k_spisok_notlim * f * k * r * d) : (t = b * h * o * k_spisok_notlim * d * k * r, u = c * h * o * k_spisok_notlim * d * k * r) : 1 == usl_val ? "b" == v || "b-t" == v ? (t = b * k_spisok_notlim * f * k_period_transit * d, u = c * k_spisok_notlim * f * k_period_transit * d) : (t = b * k_spisok_notlim * k_period_transit * d, u = c * k_spisok_notlim * k_period_transit * d) : 2 == usl_val && ("b" == v || "b-t" == v ? (t = b * h * m * f * k * r * d, u = c * h * m * f * k * r * d) : (t = b * h * m * k * r * d, u = c * h * m * k * r * d)) : 0 == usl_val || 3 == usl_val ? "b" == v || "b-t" == v ? (t = b * h * o * n * m * f * k * r, u = c * h * o * n * m * f * k * r) : (t = b * h * o * n * m * d * k * r, u = c * h * o * n * m * d * k * r) : 1 == usl_val ? "b" == v || "b-t" == v ? (t = b * n * m * f * k_period_transit, u = c * n * m * f * k_period_transit) : (t = b * n * m * k_period_transit * d, u = c * n * m * k_period_transit * d) : 2 == usl_val && ("b" == v || "b-t" == v ? (t = b * h * n * m * f * k * r, u = c * h * n * m * f * k * r) : (t = b * h * n * m * k * r * d, u = c * h * n * m * k * r * d)), $("#stoim_1").html(t.toFixed(2)), $("#stoim_2").html(u.toFixed(2)), $("#max_stoim_1").html(p.toFixed(2)), $("#max_stoim_2").html(q.toFixed(2)), (t > p || u > q) && ($("#itog-stoimost-max").slideDown().removeClass("closed").css({
display: ''
}), $("#itog-stoimost").addClass("stoimost-form")), $("#itog").show()
}
var base_arr_jur = {
a: [867, 1579],
b: [2573, 3087],
"b-t": [5138, 6166],
c: [3509, 4211],
"c-m": [5284, 6341],
d: [2808, 3370],
"d-m": [3509, 4211],
"d-t": [5138, 6166],
tb: [2808, 3370],
tm: [1751, 2101],
tr: [1124, 1579]
},
base_arr_fiz = {
a: [867, 1579],
b: [3432, 4118],
"b-t": [5138, 6166],
c: [3509, 4211],
"c-m": [5284, 6341],
d: [2808, 3370],
"d-m": [3509, 4211],
"d-t": [5138, 6166],
tb: [2808, 3370],
tm: [1751, 2101],
tr: [1124, 1579]
},
coef_city = {
1: {
def: [1.3, 1]
},
2: {
"2_1": [1.3, .8],
"2_2": [.7, .5]
},
3: {
"3_1": [1.2, .8],
"3_2": [1.1, .8],
"3_3": [1.3, .8],
"3_4": [1.8, 1],
"3_5": [1, .8]
},
4: {
"4_1": [1.3, .8],
"4_2": [.6, .5]
},
5: {
"5_1": [.7, .5],
"5_2": [.6, .5]
},
6: {
"6_1": [.8, .5],
"6_2": [.6, .5],
"6_3": [.6, .5]
},
7: {
"7_1": [1, .8],
"7_2": [.7, .5]
},
8: {
"8_1": [1.3, .8],
"8_2": [.6, .5]
},
9: {
def: [1, .8]
},
10: {
"10_1": [1.3, .8],
"10_2": [.8, .5]
},
11: {
"11_1": [1.6, 1],
"11_2": [1.3, .8],
"11_3": [1, .8]
},
12: {
"12_1": [.6, .6],
"12_2": [.6, .6]
},
13: {
"13_1": [1, .8],
"13_2": [1.4, .8],
"13_3": [.7, .5]
},
14: {
"14_1": [1.2, 1],
"14_2": [1.5, 1],
"14_3": [.8, .6]
},
15: {
"15_1": [.8, .5],
"15_2": [1.2, .7],
"15_3": [.6, .5]
},
16: {
"16_1": [1, .8],
"16_2": [.8, .5]
},
17: {
"17_1": [1.3, .8],
"17_2": [1, .8],
"17_3": [1.2, .8],
"17_4": [2, 1.2],
"17_5": [1.7, 1],
"17_6": [1.1, .8]
},
18: {
"18_1": [.6, .5],
"18_2": [.6, .5]
},
19: {
"19_1": [1.1, .8],
"19_2": [1, .8],
"19_3": [1.6, 1],
"19_4": [.8, .5]
},
20: {
"20_1": [1, .8],
"20_2": [.6, .5]
},
21: {
def: [.6, .5]
},
22: {
"22_1": [1.1, .8],
"22_2": [1.2, .8],
"22_3": [1.7, 1],
"22_4": [.8, .5]
},
23: {
"23_1": [1.7, 1],
"23_2": [1.2, .8],
"23_3": [1.1, .8],
"23_4": [.7, .5]
},
24: {
"24_1": [.6, .5],
"24_2": [.7, .5],
"24_3": [.6, .5]
},
25: {
"25_1": [1.3, .1],
"25_2": [1, .6]
},
26: {
"26_1": [1.3, .8],
"26_2": [1.2, .8],
"26_3": [1.1, .8],
"26_4": [1.8, 1],
"26_5": [1, .8]
},
27: {
"27_1": [1.1, .8],
"27_2": [1.3, .8],
"27_3": [1, .8],
"27_4": [1.8, 1],
"27_5": [.9, .5]
},
28: {
"28_1": [1.3, .8],
"28_2": [1, .8],
"28_3": [2, 1.2],
"28_4": [1.2, .8],
"28_5": [1.1, .8]
},
29: {
"29_1": [1, 0.8],
"29_2": [1.4, 1],
"29_3": [.7, .5]
},
30: {
"30_1": [1, .8],
"30_2": [1.2, .8],
"30_3": [.7, .5]
},
31: {
"31_1": [1, .8],
"31_2": [1.3, .8],
"31_3": [1.7, 1],
"31_4": [.8, .5]
},
32: {
"32_1": [1.1, .9],
"32_2": [1.6, .9],
"32_3": [1, .6]
},
33: {
"33_1": [1.8, 1],
"33_2": [1.6, 1],
"33_3": [1.7, 1],
"33_4": [.85, .5]
},
34: {
"34_1": [1.4, 1],
"34_2": [.8, .5]
},
35: {
"35_1": [1.3, .8],
"35_2": [1, .8],
"35_3": [.8, .5]
},
36: {
"36_1": [1.5, 1],
"36_2": [1, .8],
"36_3": [.7, .5]
},
37: {
"37_1": [1.6, 1],
"37_2": [1.1, .8],
"37_3": [1.2, .8],
"37_4": [1, .8]
},
38: {
"38_1": [1.3, .8],
"38_2": [1.1, .8],
"38_3": [1, .8],
"38_4": [.7, .5]
},
39: {
"39_1": [1.7, 1],
"39_2": [1.8, 1],
"39_3": [.9, .5]
},
40: {
"40_1": [1.1, .9],
"40_2": [1.5, 1.1],
"40_3": [.8, .6]
},
41: {
"41_1": [1.8, 1],
"41_2": [1.1, .8],
"41_3": [1, .8],
"41_4": [.9, .5]
},
42: {
"42_1": [1.2, .8],
"42_2": [1, .8],
"42_3": [1.7, 1],
"42_4": [1.1, .8],
"42_5": [1.3, .8],
"42_6": [.8, .5]
},
43: {
"43_1": [1.1, .8],
"43_2": [.8, .5]
},
44: {
"44_1": [1.2, .8],
"44_2": [1.3, .8],
"44_3": [.9, .5]
},
45: {
"45_1": [1.2, .8],
"45_2": [1.3, .8],
"45_3": [1.9, 1],
"45_4": [1.8, 1],
"45_5": [1.1, .8]
},
46: {
"46_1": [1.4, 1],
"46_2": [1.2, .8],
"46_3": [.8, .5]
},
47: {
"47_1": [1.3, .8],
"47_2": [.7, .5]
},
48: {
"48_1": [1.4, .8],
"48_2": [1.1, .8],
"48_3": [.6, .5]
},
49: {
"49_1": [1, .8],
"49_2": [1.2, .8],
"49_3": [.7, .5]
},
50: {
def: [1.3, 0.8]
},
51: {
"51_1": [1, .8],
"51_2": [1.5, 1],
"51_3": [.8, .5]
},
52: {
"52_1": [.7, .5],
"52_2": [.6, .5]
},
53: {
def: [1.7, 1]
},
54: {
"54_1": [1.3, 1],
"54_2": [2.1, 1.2],
"54_3": [1.6, 1],
"54_4": [1.2, 1]
},
55: {
"55_1": [1.1, .8],
"55_2": [1.3, .8],
"55_3": [1.2, .8],
"55_4": [1.8, 1],
"55_5": [1, .8]
},
56: {
"56_1": [1, .8],
"56_2": [1.3, .8],
"56_3": [.9, .5]
},
57: {
"57_1": [1.3, .8],
"57_2": [1.2, .8],
"57_3": [1, .8],
"57_4": [1.7, 1],
"57_5": [.9, .5]
},
58: {
"58_1": [1.6, 1],
"58_2": [.9, .5]
},
59: {
"59_1": [1, .8],
"59_2": [1.7, 1],
"59_3": [1.1, .8],
"59_4": [.8, .5]
},
60: {
"60_1": [1, .8],
"60_2": [1.2, .8],
"60_3": [.7, .5]
},
61: {
"61_1": [1.2, .8],
"61_2": [1, .8],
"61_3": [1.4, 1],
"61_4": [.7, .5]
},
62: {
"62_1": [1, .8],
"62_2": [1.2, .8],
"62_3": [.7, .5]
},
63: {
"63_1": [1.2, .8],
"63_2": [1.3, .8],
"63_3": [1, .8],
"63_4": [1.8, 1],
"63_5": [1.1, .8],
"63_6": [.8, .5]
},
64: {
"64_1": [1.4, 1],
"64_2": [.9, .5]
},
65: {
"65_1": [1.1, .8],
"65_2": [1.6, 1],
"65_3": [1.5, 1],
"65_4": [1.2, .8],
"65_5": [.9, .5]
},
66: {
"66_1": [1, .8],
"66_2": [1.6, 1],
"66_3": [1.2, .8],
"66_4": [.7, .5]
},
67: {
"67_1": [1.5, 1],
"67_2": [.9, .5]
},
68: {
"68_1": [1.1, .8],
"68_2": [1.3, .8],
"68_3": [1.2, .8],
"68_4": [1.8, 1],
"68_5": [1, .8]
},
69: {
"69_1": [1, .8],
"69_2": [1.2, .8],
"69_3": [.7, .5]
},
70: {
"70_1": [1, .8],
"70_2": [1.2, .8],
"70_3": [.8, .5]
},
71: {
"71_1": [1, .8],
"71_2": [1.5, 1],
"71_3": [.8, .5]
},
72: {
"72_1": [1.2, .8],
"72_2": [1.6, 1],
"72_3": [.9, .5]
},
73: {
"73_1": [1, .8],
"73_2": [1.5, 1],
"73_3": [1.2, .8],
"73_4": [.9, .5]
},
74: {
"74_1": [1.3, .8],
"74_2": [2, 1.2],
"74_3": [1.1, .8]
},
75: {
"75_1": [1.2, .9],
"75_2": [1.5, 1.1],
"75_3": [.9, .6]
},
76: {
"76_1": [1.4, .8],
"76_2": [1.6, 1],
"76_3": [1.8, 1],
"76_4": [1.2, .8],
"76_5": [2.1, 1.3],
"76_6": [1, .8]
},
77: {
"77_1": [1.5, 1],
"77_2": [.9, .5]
},
78: {
def: [2, 1.2]
},
79: {
def: [1.8, 1]
},
80: {
def: [.6, .6]
},
81: {
"81_1": [.6, .5],
"81_2": [.6, .5]
},
82: {
def: [.8, .5]
},
83: {
"83_1": [1, .8],
"83_2": [1.3, .8],
"83_3": [2, 1.2],
"83_4": [1.8, 1],
"83_5": [1.5, 1],
"83_6": [1.1, .8]
},
84: {
def: [.6, .5]
},
85: {
"85_1": [1, .8],
"85_2": [1.7, 1],
"85_3": [1.1, .8]
},
86: {
def: [0.6, .5]
}
},
k_city_in = 1.7,
coef_period = {
3: .5,
4: .6,
5: .65,
6: .7,
7: .8,
8: .9,
9: .95,
10: 1,
2: .4,
1: .3,
0: .2
},
k_period_transit = .2,
k_period_transit_text = "до 20 дней",
coef_voditeli = {
0: 1,
1: 1.7,
2: 1.6,
3: 1.8
},
k_voditeli_in_jur = 1,
k_voditeli_in_fiz = 1.7,
coef_klass = {
m: 2.45,
0: 2.3,
1: 1.55,
2: 1.4,
3: 1,
4: .95,
5: .9,
6: .85,
7: .8,
8: .75,
9: .7,
10: .65,
11: .6,
12: .55,
13: .5,
def: 1
},
coef_pricep_jur = {
a: 1.16,
b: 1.16,
"b-t": 1,
c: 1.4,
"c-m": 1.25,
d: 1,
"d-m": 1,
"d-t": 1,
tb: 1,
tm: 1,
tr: 1.24
},
coef_pricep_fiz = {
a: 1.16,
b: 1.16,
"b-t": 1,
c: 1.4,
"c-m": 1.25,
d: 1,
"d-m": 1,
"d-t": 1,
tb: 1,
tm: 1,
tr: 1.24
},
coef_moshn = {
0: .6,
1: 1,
2: 1.1,
3: 1.2,
4: 1.4,
5: 1.6
},
k_spisok_in_jur = 1.8,
k_spisok_in_fiz = 1,
k_spisok_lim = 1,
k_spisok_notlim = 1.8,
k_narush_yes = 1.5,
k_narush_no = 1,
isJur = !1,
isSpisokLimited = !0,
isPricep = !1,
hasNarush = !1,
usl_val = "";
$(document).ready(function() {
$("#vladelec").change(function() {
-1 != this.value && setJur(2 == this.value)
}), $("#usloviya").change(function() {
uslovieChanged(this.value)
}), $("#usloviya_ur").change(function() {
uslovieChanged(this.value)
}), $("#tip-ts").change(function() {
tipTSChanged(this.value)
}), $("#moshnost").change(function() {
moshnostChanged(this.value)
}), $("#pricep").change(function() {
pricepChanged(this.value)
}), $("#region").change(function() {
regionChanged(this.value)
}), $('select[name*="city-"]').change(function() {
cityChanged(this.value)
}), $("#period-fl").change(function() {
periodChanged(this.value)
}), $("#period-ul").change(function() {
periodChanged(this.value)
}), $("#period-in").change(function() {
periodChanged(this.value)
}), $("#spisok").change(function() {
spisokChanged(this.value)
}), $("#voditeli").change(function() {
voditeliChanged(this.value)
}), $("#Kbm").change(function() {
klassChanged(this.value)
}), $("#narusheniya").change(function() {
narushChanged(this.value)
}), $("#btn-reset").click(function() {
$('a.ref_part').hide();
$('.tool_result_refer').hide();
$('.content_page .tool_result_wrap button[type=button]').css({
display: ''
}), $(".serv_pol_mat").hide(), $("#btn-calc").attr({
disabled: "disabled"
}), $(".tool_result_wrap").css({
border: ''
}), resetVals(["jur"]), $("#itog").hide(), setFormEnabled(!0), $("#itog-stoimost-max").addClass("closed"), $("#itog-stoimost").removeClass("stoimost-form"), $("#usl_row").addClass("closed"), $("#tip_ts_row").addClass("closed"), $("#moshnost_row").addClass("closed"), $("#pricep_row").addClass("closed"), $("#region_row").addClass("closed"), $("#city_row").addClass("closed"), $("#period_fl_row").addClass("closed"), $("#period_ul_row").addClass("closed"), $("#period_in_row").addClass("closed"), $("#spisok_row").addClass("closed"), $("#voditeli_row").addClass("closed"), $("#klass_row").addClass("closed"), $("#narush_row").addClass("closed"), $("#btn-calc").prop("disabled", !0), setProgress(0), $("#progress-bar").removeClass("end")
}),
$("#btn-calc").click(function() {
setFormEnabled(!1),
updateItogRows(),
calculate(),
$(".tool_result_wrap").css({
border: '2px solid #28ada3'
}),
$("#progress-bar").addClass("end");
if ($(window).width() > 900) {
$('html, body').animate({
scrollTop: $("#btn-calc").offset().top
}, 1000, 'swing').find(".serv_pol_mat").delay(1300).slideDown(); // анимируем скроолинг к результатам + показ пол.мат.
} else {
$('html, body').animate({
scrollTop: $(".tool_result_wrap").offset().top - 70
}, 1000, 'swing').find(".serv_pol_mat").delay(1300).slideDown(); // анимируем скроолинг к результатам + показ пол.мат.
}
if ($(window).width() > 900) {
$('.content_page .tool_result_wrap button[type=button]').css({
display: 'inline-block'
});
}
var i = false;
$('.tool_result_wrap.calc_osago table tbody tr').each(function() {
if ($(this).css("display") == "none") {} else {
if (!i) {
i = true;
} else {
$(this).css({
background: '#eee'
});
i = false;
}
}
});
var ingosstah = ['Адыгея', 'Алтай', 'Бурятия', 'Дагестан', 'Ингушетия', 'Калмыкия', 'Карачаево-Черкесия', 'Карелия', 'Коми', 'Крым', 'Марий Эл', 'Саха (Якутия)', 'Тыва', 'Удмуртия', 'Хакасия', 'Чечня', 'Чувашия', 'Алтайский край', 'Забайкальский край', 'Республика Кабардино-Балкария', 'Камчатский край', 'Красноярский край', 'Пермский край', 'Хабаровский край', 'Амурская область', 'Астраханская область', 'Белгородская область', 'Брянская область', 'Владимирская область', 'Вологодская область', 'Иркутская область', 'Калининградская область', 'Калужская область', 'Кемеровская область', 'Костромская область', 'Курганская область', 'Курская область', 'Ленинградская область', 'Магаданская область', 'Московская область', 'Новгородская область', 'Новосибирская область', 'Омская область', 'Оренбургская область', 'Орловская область', 'Пензенская область', 'Псковская область', 'Приморский край', 'Рязанская область', 'Самарская область', 'Сахалинская область', 'Свердловская область', 'Смоленская область', 'Ставропольский край', 'Тамбовская область', 'Тверская область', 'Томская область', 'Тульская область', 'Тюменская область', 'Ярославская область', 'Москва', 'Санкт-Петербург', 'Севастополь', 'Еврейская АО', 'Ненецкий АО', 'Ханты-Мансийский АО — Югра', 'Чукотский АО', 'Ямало-Ненецкий АО'];
var vlad = $("#vladelec").val();
var tipTs = $("#tip-ts").val();
console.log(ingosstah.indexOf($("#region option:selected").text()));
if (vlad == 1 && tipTs == 'b') {
$('.tool_result_refer').css({
display: 'inline-block'
});
console.log('testing1');
if (ingosstah.indexOf($("#region option:selected").text()) != -1) {
console.log('testing2');
$('.refer_button a').show();
}
}
}),
$('.tool_result_wrap.calc_osago button').on('click', function() {
var atext = $('.tool_result_wrap #itog').html(),
prwin = open('');
prwin.document.writeln('<html><script>function printPage() { var n=navigator; if( (n.appName.indexOf("Explorer")> -1) && ( parseInt(n.appVersion) ) == 4 ){ IEControl.ExecWB(6,1); } else { window.print() } }</script>');
prwin.document.writeln('<script>var i = false;$(".tool_result_wrap.calc_osago table tbody tr").each(function(){if($(this).css("display") == "none"){} else {if (!i){i = true;} else {$(this).css({background:"#eee"});i = false;}}});</script>');
prwin.document.writeln('</body></html>');
});
});[/SRC]
Что здесь надо прописать, чтоб данные расчета отправлялмь на емаил ?
Последнее редактирование модератором: