//  All rights reserved to Yaron Shemesh (Ysun.co.il)

function ListEnt (event,Li,tex1,tex2,sel) {
var Key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (event.keyCode==13) {
	
	var Lis = Li;

 Lis.style.height = "1px";
  Lis.style.visibility = "hidden";
tex1.value = Lis[Lis.selectedIndex].value;
if (Lis.selectedIndex == 0) {
tex2.value = document.getElementById("text7").value * sel.value;}

else if (Lis.selectedIndex == 1) {
tex2.value = document.getElementById("text8").value * sel.value;}
else if (Lis.selectedIndex == 2) {
tex2.value = document.getElementById("text9").value * sel.value;}
else if (Lis.selectedIndex == 3) {
tex2.value = document.getElementById("text10").value * sel.value;}


tex2.style.visibility = "visible";
	return true;
	}
}

function Ysunsum (tex1,tex2,tex3,tex4,texsum) {
texsum.value = Number(tex1.value) + Number(tex2.value) + Number(tex3.value) +Number(tex4.value);	
texsum.style.visibility = "visible";
}

/*function color4() {
document.getElementById("text5").style.backgroundColor="gray";
}

function color44() {
document.getElementById("text5").style.backgroundColor="white";
}

function color1() {
document.getElementById("text2").style.backgroundColor="gray";
}

function color11() {
document.getElementById("text2").style.backgroundColor="white";
}

function color2() {
document.getElementById("text3").style.backgroundColor="gray";
}

function color22() {
document.getElementById("text3").style.backgroundColor="white";
}

function color3() {
document.getElementById("text4").style.backgroundColor="gray";
}

function color33() {
document.getElementById("text4").style.backgroundColor="white";
}
*/
