﻿function calc1()
{
 	var w = document.getElementById('weight').value;

 	var cost="";

 	if(w=="")
 	{
 		cost=0;
 		alert("Введите вес");
 	}
 var cost1="";
 var cost2="";
 var cost3="";
 var cost6="";
 var cost7="";
 var ss1="6-9 дней";
 var ss2="10-15 дней";
 var s6="";
var tp = document.getElementById('tp').value;
if(1==1)
{
 	switch (w)
 	{
 	
 case       "1":cost=30.00;break;
 case       "2":cost=33.75;break;
 case       "3":cost=37.50;break;
 case       "4":cost=39.25;break;
 case       "5":cost=43.00;break;
 case       "6":cost=47.00;break;
 case       "7":cost=51.00;break;
 case       "8":cost=55.00;break;
 case       "9":cost=59.00;break;
 case       "10":cost=63.00;break;
 case       "11":cost=67.25;break;
 case       "12":cost=         71.50      ;break;
 case       "13":cost=         75.75      ;break;
 case       "14":cost=         80.00      ;break;
 case       "15":cost=         84.25      ;break;
 case       "16":cost=         88.50     ;break;
 case       "17":cost=         92.75     ;break;
 case       "18":cost=         97.00      ;break;
 case       "19":cost=         101.25     ;break;
 case       "20":cost=         105.50   ;break;
 case       "21":cost=         109.75      ;break;
 case       "22":cost=         114.00      ;break;
 case       "23":cost=         118.25     ;break;
 case       "24":cost=         122.50     ;break;
 case       "25":cost=         126.75      ;break;
 case       "26":cost=         131.00     ;break;
 case       "27":cost=         135.25     ;break;
 case       "28":cost=         139.50     ;break;
 case       "29":cost=         143.75     ;break;
 case       "30":cost=         148.00     ;break;
 case       "31":cost=         152.25     ;break;
 case       "32":cost=         156.50    ;break;
 case       "33":cost=         160.75     ;break;
 case       "34":cost=         165.00     ;break;
 case       "35":cost=         169.25     ;break;
 case       "36":cost=         173.50    ;break;
 case       "37":cost=         177.75     ;break;
 case       "38":cost=         182.00     ;break;
 case       "39":cost=         186.25     ;break;
 case       "40":cost=         190.50    ;break;
 case       "41":cost=         194.75     ;break;
 case       "42":cost=         199.00     ;break;
 case       "43":cost=         203.25     ;break;
 case       "44":cost=         207.50     ;break;
 	}
	cost1=cost*1.08;
	cost="";
	
switch (w)
{
case "1":
cost = 21.50 ;
break;
case "2":cost=24.75;break;
case "3":cost=28.00;break;
case "4":cost=31.25;break;
case "5":cost=34.50;break;
case "6":cost=37.75;break;
case "7":cost=41.00;break;
case "8":cost=44.25 ;break;
case "9" :cost=47.50 ;break;
case "10":cost=50.75;break;
case "11":cost=54.50;break;
case "12":cost=58.25;break;
case "13":cost=62.00;break;
case "14":cost=65.75;break;
case "15":cost=69.50;break;
case "16":cost=73.25;break;
case "17":cost=77.00;break;
case "18":cost=80.75;break;
case "19":cost=84.50;break;
case "20":cost=88.25;break;
case "21":cost=92.00;break;
case "22":cost=95.75;break;
case "23":cost=99.50;break;
case "24":cost=103.25;break;
case "25":cost=107.00;break;
case "26":cost=110.75;break;
case "27":cost=114.50;break;
case "28":cost=118.25;break;
case "29":cost=122.00;break;
case "30":cost=125.75;break;
case "31":cost=129.50;break;
case "32":cost=133.25;break;
case "33":cost=137.00;break;
case "34":cost=140.75;break;
case "35":cost=144.50;break;
case "36":cost=148.25;break;
case "37":cost=152.00;break;
case "38":cost=155.75;break;
case "39":cost=159.50;break;
case "40":cost=163.25;break;
case "41":cost=167.00;break;
case "42":cost=170.75;break;
case "43":cost=174.50;break;
case "44":cost=178.25;break;
case "45":cost=182.00;break;
case "46":cost=185.75;break;
case "47":cost=189.50;break;
case "48":cost=193.25;break;
case "49":cost=197.00;break;
case "50":cost=200.75;break;
case "51":cost=204.50;break;
case "52":cost=208.25;break;
case "53":cost=212.00;break;
case "54":cost=215.75;break;
case "55":cost=219.50;break;
case "56":cost=223.25;break;
case "57":cost=227.00;break;
case "58":cost=230.75;break;
case "59":cost=234.50;break;
case "60":cost=238.25;break;
case "61":cost=242.00;break;
case "62":cost=245.75;break;
case "63":cost=249.50;break;
case "64":cost=253.25;break;
case "65":cost=257.00;break;
case "66":cost=260.75;break;
 	}
 	
 	cost2=cost*1.15;
 	cost="";
}

if(1==2)
{
 	switch (w)
 	{
 case       "1":cost=28.00;break;
 case       "2":cost=31.75;break;
 case       "3":cost=35.50;break;
 case       "4":cost=39.25;break;
 case       "5":cost=43.00;break;
 case       "6":cost=47.00;break;
 case       "7":cost=51.00;break;
 case       "8":cost=55.00;break;
 case       "9":cost=59.00;break;
 case       "10":cost=63.00;break;
 case       "11":cost=67.25;break;
 case       "12":cost=        71.50      ;break;
 case       "13":cost=        75.75      ;break;
 case       "14":cost=        80.00      ;break;
 case       "15":cost=        84.25      ;break;
 case       "16":cost=        88.50     ;break;
 case       "17":cost=        92.75     ;break;
 case       "18":cost=        97.00      ;break;
 case       "19":cost=        101.25     ;break;
 case       "20":cost=        105.50   ;break;
 case       "21":cost=        109.75      ;break;
 case       "22":cost=        114.00      ;break;
 case       "23":cost=        118.25     ;break;
 case       "24":cost=        122.50     ;break;
 case       "25":cost=        126.75      ;break;
 case       "26":cost=        131.00     ;break;
 case       "27":cost=        135.25     ;break;
 case       "28":cost=        139.50     ;break;
 case       "29":cost=        143.75     ;break;
 case       "30":cost=        148.00     ;break;
 case       "31":cost=        152.25     ;break;
 case       "32":cost=        156.50    ;break;
 case       "33":cost=        160.75     ;break;
 case       "34":cost=        165.00     ;break;
 case       "35":cost=        169.25     ;break;
 case       "36":cost=        173.50    ;break;
 case       "37":cost=        177.75     ;break;
 case       "38":cost=        182.00     ;break;
 case       "39":cost=        186.25     ;break;
 case       "40":cost=        190.50    ;break;
 case       "41":cost=        194.75     ;break;
 case       "42":cost=        199.00     ;break;
 case       "43":cost=        203.25     ;break;
 case       "44":cost=        207.50     ;break;
 case       "45":cost=        111.75     ;break;
 case       "46":cost=        216.00     ;break;
 case       "47":cost=        220.25     ;break;
 case       "48":cost=        224.50     ;break;
 case       "49":cost=        228.75     ;break;
 case       "50":cost=        233.00     ;break;
 case       "51":cost=        237.25     ;break;
 case       "52":cost=        241.50     ;break;
 case       "53":cost=        245.75     ;break;
 case       "54":cost=        250.00     ;break;
 case       "55":cost=        254.25     ;break;
 case       "56":cost=        258.50     ;break;
 case       "57":cost=        262.75     ;break;
 case       "58":cost=        267.00     ;break;
 case       "59":cost=        271.25     ;break;
 case       "60":cost=        275.50     ;break;
 case       "61":cost=        279.75     ;break;
 case       "62":cost=        284.00     ;break;
 case       "63":cost=        288.25     ;break;
 case       "64":cost=        292.50     ;break;
 
 
 	}
	
	cost1=cost*1.08;
	cost="";


switch (w)
{
case "1":cost=21.50;break;
case "2":cost=24.75;break;
case "3":cost=28.00;break;
case "4":cost=31.25;break;
case "5":cost=34.50;break;
case "6":cost=37.75;break;
case "7":cost=41.00;break;
case "8":cost=44.25;break;
case "9":cost=47.50;break;
case "10":cost=50.75;break;
case "11":cost=54.50;break;
case "12":cost=58.25;break;
case "13":cost=62.00;break;
case "14":cost=65.75;break;
case "15":cost=69.50;break;
case "16":cost=73.25;break;
case "17":cost=77.00;break;
case "18":cost=80.75;break;
case "19":cost=84.50;break;
case "20":cost=88.25;break;
case "21":cost=92.00;break;
case "22":cost=95.75;break;
case "23":cost=99.50;break;
case "24":cost=103.25;break;
case "25":cost=107.00;break;
case "26":cost=110.75;break;
case "27":cost=114.50;break;
case "28":cost=118.25;break;
case "29":cost=122.00;break;
case "30":cost=125.75;break;
case "31":cost=129.50;break;
case "32":cost=133.25;break;
case "33":cost=137.00;break;
case "34":cost=140.75;break;
case "35":cost=144.50;break;
case "36":cost=148.25;break;
case "37":cost=152.00;break;
case "38":cost=155.75;break;
case "39":cost=159.50;break;
case "40":cost=163.25;break;
case "41":cost=167.00;break;
case "42":cost=170.75;break;
case "43":cost=174.50;break;
case "44":cost=178.25;break;

 	}
 
 	cost2=cost*1.15;
 	cost="";
}









if(1==3)
{
 	switch (w)
 	{
case "1" :cost=28.50 ;break;
case "2" :cost=32.25 ;break;
case "3" :cost=36.00 ;break;
case "4" :cost=39.75 ;break;
case "5" :cost=43.50 ;break;
case "6" :cost=48.25 ;break;
case "7" :cost=53.00 ;break;
case "8" :cost=57.75 ;break;
case "9" :cost=62.50 ;break;
case "10" :cost=67.25 ;break;
case "11" :cost=72.50 ;break;
case "12" :cost=77.75 ;break;
case "13" :cost=83.00 ;break;
case "14" :cost=88.25 ;break;
case "15" :cost=93.50 ;break;
case "16" :cost=98.75 ;break;
case "17" :cost=104.00 ;break;
case "18" :cost=109.25 ;break;
case "19" :cost=114.50 ;break;
case "20" :cost=119.75 ;break;
case "21" :cost=125.00 ;break;
case "22" :cost=130.25 ;break;
case "23" :cost=135.50 ;break;
case "24" :cost=140.75 ;break;
case "25" :cost=146.00 ;break;
case "26" :cost=151.25 ;break;
case "27" :cost=156.50 ;break;
case "28" :cost=161.75 ;break;
case "29" :cost=167.00 ;break;
case "30" :cost=172.25 ;break;
case "31" :cost=177.50 ;break;
case "32" :cost=182.75 ;break;
case "33" :cost=188.00 ;break;
case "34" :cost=193.25 ;break;
case "35" :cost=198.50 ;break;
case "36" :cost=203.75 ;break;
case "37" :cost=209.00 ;break;
case "38" :cost=214.25 ;break;
case "39" :cost=219.50 ;break;
case "40" :cost=224.75 ;break;
case "41" :cost=230.00 ;break;
case "42" :cost=235.25 ;break;
case "43" :cost=240.50 ;break;
case "44" :cost=245.75 ;break;
case "45" :cost=251.00 ;break;
case "46" :cost=256.25 ;break;
case "47" :cost=261.50 ;break;
case "48" :cost=266.75 ;break;
case "49" :cost=272.00 ;break;
case "50" :cost=277.25 ;break;
case "51" :cost=282.50 ;break;
case "52" :cost=287.75 ;break;
case "53" :cost=293.00 ;break;
case "54" :cost=298.25 ;break;
case "55" :cost=303.50 ;break;
case "56" :cost=308.75 ;break;
case "57" :cost=314.00 ;break;
case "58" :cost=319.25 ;break;
case "59" :cost=324.50 ;break;
case "60" :cost=329.75 ;break;
case "61" :cost=335.00 ;break;
case "62" :cost=340.25 ;break;
case "63" :cost=345.50 ;break;
case "64" :cost=350.75 ;break;
case "65" :cost=356.00 ;break;
case "66" :cost=361.25 ;break;
 	}

	cost1=cost;
	cost="";


 	switch (w)
 	{
case "1" :cost=23.00 ;break;
case "2" :cost=27.25 ;break;
case "3" :cost=31.50 ;break;
case "4" :cost=35.75 ;break;
case "5" :cost=40.00 ;break;
case "6" :cost=44.75 ;break;
case "7" :cost=49.50 ;break;
case "8" :cost=54.25 ;break;
case "9" :cost=59.00 ;break;
case "10" :cost=63.75 ;break;
case "11" :cost=68.75 ;break;
case "12" :cost=73.75 ;break;
case "13" :cost=78.75 ;break;
case "14" :cost=83.75 ;break;
case "15" :cost=88.75 ;break;
case "16" :cost=93.75 ;break;
case "17" :cost=98.75 ;break;
case "18" :cost=103.75 ;break;
case "19" :cost=108.75 ;break;
case "20" :cost=113.75 ;break;
case "21" :cost=118.75 ;break;
case "22" :cost=123.75 ;break;
case "23" :cost=128.75 ;break;
case "24" :cost=133.75 ;break;
case "25" :cost=138.75 ;break;
case "26" :cost=143.75 ;break;
case "27" :cost=148.75 ;break;
case "28" :cost=153.75 ;break;
case "29" :cost=158.75 ;break;
case "30" :cost=163.75 ;break;
case "31" :cost=168.75 ;break;
case "32" :cost=173.75 ;break;
case "33" :cost=178.75 ;break;
case "34" :cost=183.75 ;break;
case "35" :cost=188.75 ;break;
case "36" :cost=193.75 ;break;
case "37" :cost=198.75 ;break;
case "38" :cost=203.75 ;break;
case "39" :cost=208.75 ;break;
case "40" :cost=213.75 ;break;
case "41" :cost=218.75 ;break;
case "42" :cost=223.75 ;break;
case "43" :cost=228.75 ;break;
case "44" :cost=233.75 ;break;
 	}

 	cost2=cost;
 	cost="";
}

 	switch(w)
 	{
case       "1":
 case       "2":
 case       "3":
 case       "4":
 case       "5":cost=24.25;break;
 case       "6":cost=26.35;break;
 case       "7":cost=28.45;break;
 case       "8":cost=30.55;break;
 case       "9":cost=32.65;break;
 case    "10":cost=41.70   ;break;
 case    "11":cost=43.50   ;break;
 case    "12":cost=45.25   ;break;
 case    "13":cost=47.05   ;break;
 case    "14":cost=48.85   ;break;
 case    "15":cost=50.65   ;break;
 case    "16":cost=52.45   ;break;
 case    "17":cost=54.10   ;break;
 case    "18":cost=55.80   ;break;
 case    "19":cost=57.50   ;break;
 case    "20":cost=59.20   ;break;
 case    "21":cost=60.85   ;break;
 case    "22":cost=62.55   ;break;
 case    "23":cost=64.25   ;break;
 case    "24":cost=65.95   ;break;
 case    "25":cost=67.60  ;break;
 case    "26":cost=69.30   ;break;
 case    "27":cost=70.90   ;break;
 case    "28":cost=72.45   ;break;
 case    "29":cost=74.05   ;break;
 case    "30":cost=75.60   ;break;
 case    "31":cost=77.20   ;break;
 case    "32":cost=78.80   ;break;
 case    "33":cost=80.35   ;break;
 case    "34":cost=81.95   ;break;
 case    "35":cost=83.55   ;break;
 case    "36":cost=85.10   ;break;
 case    "37":cost=86.70   ;break;
 case    "38":cost=88.25   ;break;
 case    "39":cost=89.85   ;break;
 case    "40":cost=91.45   ;break;
 case    "41":cost=93.00   ;break;
 case    "42":cost=94.60   ;break;
 case    "43":cost=96.20   ;break;
 case    "44":cost=97.75   ;break;

 }
var cost3="";

var cost4="";
var cost5="";
var cost6="";
var cost7="";
var s3="";
//MeesAvia

switch(tp)
{
	case "1"://Ukraine
		switch(w)
		{
			case "1":
				cost3=25;
				break;
			case "2":
				cost3=30;
				break;
			case "3":
				cost3=35;
				break;
			case "4":
				cost3=40;
				break;
			case "5":
			case "6":
			case "7":
			case "8":
			case "9":
			case "10":
				cost3 = 2.89*10+20;
				break;
			default:
				cost3 = 2.89*w+20;
		}
		
		s3 = "1 - 2 недели";
		break;
	case "2"://Belarus, Moldova
		
		switch(w)
		{
			case "1":
				cost3=30;
				break;
			case "2":
				cost3=35;
				break;
			case "3":
 				cost3=40;
				break;
			case "4":
 				cost3=45;
				break;
			case "5":
			case "6":
			case "7":
			case "8":
			case "9":
			case "10":
				cost3=2.89*10+25;
				break;
			default:
				cost3=2.89*w+25;
		}
		s3 = "2-3 недели";
		break;
	case "3":
		var ww=w;
		if(w<10)ww=10;
		cost3=4.19*ww+25;
		s3="3 недели";
		break;
	case "4":
		var ww=w;
		if(w<10)ww=10;
		cost3=4.49*ww+25;
		s3="3-4 недели";
		break;
	case "5":
		var ww=w;
		if(w<10)ww=10;
		cost3=5.39*ww+25;
		s3="4-5 недель";
		break;
	case "6":
		var ww=w;
		if(w<10 && w>5)ww=10;
		cost3=5.69*ww+25;
		s3="2-3 недели";
		switch(w)
		{
			case "1":cost3=30;break;
			case "2":cost3=35;break;
			case "3":cost3=40;break;
			case "4":cost3=45;break;
			case "5":cost3=50;break;
		}
		break;
}
var s5="";
//Mest Sea
var s4="";

	s4="4-6 недель";
switch(tp)
{

	case "1":
		if(w<10)w=10;
		cost4=1.29*w+20;
		s4="4-6 недель";
		break;
	case "2":
		if(w<10)w=10;
		var w4=w;
		if(w<10)w4=10;
		cost4=1.49*w4+25;
		s4="5-7 недель";
		break;
	case "3":
		var w4=w;
		if(w<10)w4=10;
		cost4=2.79*w4+25;
		s4="6-8 недель";
		break;
	case "4":
		var w4=w;
		if(w<10)w4=10;
		cost4=3.09*w4+25;
		s4="6-8 недель";
		break;
	case "5":
		
		var ww = w;
		if(w<10)ww=10;
		cost4=4.09*ww+25;
		s4="7-9 недель";
		break;
}


//Dinpro Avia

switch(tp)
{
	case "1":
		var ww = w;
		if(ww<6)ww=6;
		cost5 = 2.89*ww+15;
		s5 = "7-12 дней";
		break;
}

//Dnipro Sea

switch(tp)
{
	case "1":
		var ww = w;
		if(ww<6)ww=6;
		cost6 = 1.29*ww+15;
		s6="3-5 недель";
		break;
}
if(w>70)
{
	cost5="";
	cost6="";
}
if(w>110 && tp==1){cost4 = "";cost3="";}
if(w>66 && tp==2){cost4 = "";cost3="";}
if(w>70 && tp==3){cost4 = "";cost3="";}
if(w>70 && tp==4){cost4 = "";cost3="";}
if(w>70 && tp==5){cost4 = "";cost3="";}
if(w>70 && tp==6){cost4 = "";cost3="";}

var nt="";
document.getElementById('tbl').style.visibility="visible";
document.getElementById('tbl').style.position="relative";
document.getElementById('tr1').style.visibility="hidden";
document.getElementById('tr2').style.visibility="hidden";
 document.getElementById('tr3').style.visibility="hidden";
document.getElementById('tr4').style.visibility="hidden";
document.getElementById('tr5').style.visibility="hidden";
document.getElementById('tbl').border=1;
 document.getElementById('tr6').style.visibility="hidden";

// document.getElementById('nt').style.visibility="hidden";
document.getElementById('tr1').style.position="absolute";
document.getElementById('tr2').style.position="absolute";
 document.getElementById('tr3').style.position="absolute";
document.getElementById('tr4').style.position="absolute";
document.getElementById('tr5').style.position="absolute";
document.getElementById('tr6').style.position="absolute";
// document.getElementById('tr7').style.position="absolute";
// document.getElementById('tr6').style.position="absolute";
document.getElementById('trh').style.position="relative";



if(cost1!="")
{
        document.getElementById('tr1').style.visibility="visible";
        document.getElementById('tr1').style.position="relative";
        document.getElementById('td1').innerHTML=cost1.toFixed(2);;
        document.getElementById('ts1').innerHTML=ss1;
        nt="1";
}
if(cost2!="")
{
        document.getElementById('tr2').style.visibility="visible";
        document.getElementById('tr2').style.position="relative";
        document.getElementById('td2').innerHTML=cost2.toFixed(2);;
        document.getElementById('ts2').innerHTML=ss2;
        nt="1";
}
if(cost3!="")
{
cost3= cost3.toFixed(2);
}
else
{
	cost3 = "Cвяжитесь с нами для получения информации";
	
}
        document.getElementById('tr3').style.position="relative";
        document.getElementById('tr3').style.visibility="visible";
        document.getElementById('td3').innerHTML=cost3;
         document.getElementById('ts3').innerHTML=s3;
        nt="1";

if(tp!=6)
{
if(cost4!="")
{
// 	alert(cost4);
	cost4= cost4.toFixed(2);
}
else
{
	cost4 = "Cвяжитесь с нами для получения информации";
	
}
	
        document.getElementById('tr4').style.position="relative";
        document.getElementById('tr4').style.visibility="visible";
        document.getElementById('td4').innerHTML=cost4;//.toFixed(2);
        document.getElementById('ts4').innerHTML=s4;
        nt="1";
}
if(tp==1)
{
if(1<0)
{
if(cost5!="")
{
// 	alert(cost4);
	cost5= cost5.toFixed(2);
}
else
{
	cost5 = "Cвяжитесь с нами для получения информации";
	
}
        document.getElementById('tr5').style.position="relative";
        document.getElementById('tr5').style.visibility="visible";
        document.getElementById('td5').innerHTML=cost5;//.toFixed(2);
        document.getElementById('ts5').innerHTML=s5;
        nt="1";

if(cost6!="")
{
// 	alert(cost4);
	cost6= cost6.toFixed(2);
}
else
{
	cost6 = "Cвяжитесь с нами для получения информации";
	
}
        document.getElementById('tr6').style.position="relative";
        document.getElementById('tr6').style.visibility="visible";
        document.getElementById('td6').innerHTML=cost6;//.toFixed(2);
        //document.getElementById('ts6').innerHTML=s2;
        nt="1";
}
}
// if(cost7!="")
// {
//         document.getElementById('tr7').style.position="relative";
//         document.getElementById('tr7').style.visibility="visible";
//         document.getElementById('td7').innerHTML=cost7.toFixed(2);
//         //document.getElementById('ts7').innerHTML=s2;
//         nt="1";
// }

if(nt=="")
{
//      document.getElementById('nt').style.visibility="visible";
//      document.getElementById('tbl').style.visibility="hidden";
}


}
function OnCC(val)
{


}


