
function selectcolor(sel) {
if (sel == 0) {
document.getElementById("colorr").innerHTML = "Односторонние визитки, напечатанные черным цветом";
document.getElementById("select2").innerHTML = "1+0";}
if (sel == 1) { document.getElementById("colorr").innerHTML = "Двухсторонние визитки, напечатанные черным цветом";
document.getElementById("select2").innerHTML = "1+1";}
if (sel == 2) { document.getElementById("colorr").innerHTML = "Цветная печать на одной стороне визитки";
document.getElementById("select2").innerHTML = "4+0";}
if (sel == 3) { document.getElementById("colorr").innerHTML = "Цветная печать на одной стороне визитки, и черным цветом с другой стороны";
document.getElementById("select2").innerHTML = "4+1";}
if (sel == 4) { document.getElementById("colorr").innerHTML = "Двухсторонние визитки с полноцветной печатью на обеих сторонах";
document.getElementById("select2").innerHTML = "4+4";}
}

function agreeForm(f) {
 
	 document.getElementById("select4").innerHTML = document.forms[0].temp.options[document.forms[0].temp.selectedIndex].innerHTML;
      
	 if (document.forms[0].temp.options[document.forms[0].temp.selectedIndex].value != 1) {
	   f.delivery.disabled = 1;
	   document.getElementById("select5").style.backgroundImage = "url(images/disabled.png)";
	   document.getElementById("select5").innerHTML = "Нет" ;
	   document.forms[0].delivery.value = 1;
	   	   	} else { f.delivery.disabled = 0; 
			document.getElementById("select5").style.backgroundImage = "url(images/select.png)";
			}
	}
function del(form) {
	if (document.forms[0].delivery.options[document.forms[0].delivery.selectedIndex].value == 1) {
	   document.getElementById("select5").innerHTML = "Нет"; }
	if (document.forms[0].delivery.options[document.forms[0].delivery.selectedIndex].value == 1.5) {
	   document.getElementById("select5").innerHTML = "Доставка курьером по МКАД"; }
	   }

function koll(form) {
document.getElementById("select1").innerHTML = document.forms[0].kol.options[document.forms[0].kol.selectedIndex].innerHTML;
}
function paperr(form) {
document.getElementById("select3").innerHTML = document.forms[0].paper.options[document.forms[0].paper.selectedIndex].innerHTML;
}


function price(form) {

var color_col = [[320,360,650,910,1400,2550,4500,6500,10500,20000],
	          [420,480,780,1250,1850,3150,5500,8000,13000,25000],
	          [450,530,1000,1450,2250,4150,6500,9500,15000,28500],
	          [510,700,1180,1650,2450,4200,7000,10500,17000,32500],
	          [640,780,1250,1800,2750,4800,8500,12000,20000,38500]];
var x = document.forms[0].color.options[document.forms[0].color.selectedIndex].value;
var y = document.forms[0].kol.options[document.forms[0].kol.selectedIndex].value;
var z = document.forms[0].paper.options[document.forms[0].paper.selectedIndex].value;
var q = document.forms[0].temp.options[document.forms[0].temp.selectedIndex].value;
var total = color_col[x][y]*z*q;

if ((document.forms[0].delivery.value == 1.5)&&(color_col[x][y]<2000)){
total = total+300;}


document.getElementById("dialog").innerHTML = "&nbsp;" + total + "&nbsp;<br />рублей";
document.forms[0].zakaz.disabled = 0;
}