var tel="<b>+7 (495) 785-92-72</b>";
var ind="<a href='http://www.literaa.ru'>Главная</a> <span>&nbsp;&raquo;&nbsp;</span>";
var pagecontacts="<h3><b>+7 (495) 518-72-50</b><br /><br /><b>+7 (495) 785-92-72</b><br /><br /><h3>Менеджеры:</h3><b>8-926-181-09-82</b> <br>Алексей (с 10:00 до 23:00)<br /><br /><b>8-926-580-80-66</b><br> Андрей (с 10:00 до 18:00)<br /><br /><h3>Электронная почта:</h3><a href='mailto:literaa-moscow@yandex.ru'>literaa-moscow@yandex.ru</a></b><br /><br /><h3>ICQ:</h3><b>275885436</b>";

function Calc(a) {
	var price_material;
	var price_rezka=0.05;
	var price_count;
	var countA4;
	var result;
	switch (a.format.selectedIndex) {
		case 0: price_rezka=0; countA4=Math.ceil(a.count.value); break;
		case 1: price_rezka=price_rezka*1; countA4=Math.ceil(a.count.value/2); break;
		case 2: price_rezka=price_rezka*2; countA4=Math.ceil(a.count.value/3); break;
		case 3: price_rezka=price_rezka*2; countA4=Math.ceil(a.count.value/4); break;
		case 4: price_rezka=price_rezka*4; countA4=Math.ceil(a.count.value/8); break;
	}
	switch (a.material.selectedIndex) {
		case 0: price_material=0; break;
		case 1: price_material=0.3; break;
		case 2: price_material=1.2; break;
		case 3: price_material=0.9; break;
		case 4: price_material=1.7; break;
		case 5: price_material=3.8; break;
	}
	switch (a.printt.selectedIndex) {
		case 0:
			if (countA4<=25000) price_count=Math.round(60+0.7*countA4/Math.pow(countA4,0.1)-0.5*countA4*Math.pow(countA4,-0.25));
			if (countA4>25000) price_count=0.21*countA4;
			break;
		case 1:
			if (countA4<=25000) price_count=Math.round(95+1.44*(1/Math.pow(countA4,0.1249))*countA4);
			if (countA4>25000) price_count=0.41*countA4;
			break;
	}
	result=price_count+countA4*(price_rezka+price_material);
	a.result.value=Math.round(result);
}

