function setPrice(id,preis,epreis,rabatt)
{

var Total = 0;
Total = preis-rabatt;

if(Total<5) {
Total = 1;
}

else {
/*Total = runde(Total,1);*/
/*Total = Total.toFixed(-1)-1;*/
Total = (Math.round(Total/10)*10)-1;
}


if(rabatt==0) {
Total = epreis;
}


if(preis==0) {
Total = 0;
}


document.getElementById(id).innerHTML = Total;
}



function runde(x, n) {
  if (n < 1 || n > 14) return false;
  var e = Math.pow(10, n);
  var k = (Math.round(x * e) / e).toString();
  if (k.indexOf('.') == -1) k += '.';
  k += e.toString().substring(1);
  return k.substring(0, k.indexOf('.') + n+1);
}



function changeMenu(sel) {

var opt = document.forms["adjust"].elements["s1"].options[document.forms["adjust"].elements["s1"].selectedIndex].value;

if(opt=="abo")
{
document.getElementById('select1').style.display = "inline";
document.getElementById('select2').style.display = "none";
document.getElementById('select3').style.display = "none";
}

else if(opt=="v12")
{
document.getElementById('select1').style.display = "none";
document.getElementById('select2').style.display = "inline";
document.getElementById('select3').style.display = "none";
}


else if(opt=="v24")
{
document.getElementById('select1').style.display = "none";
document.getElementById('select2').style.display = "none";
document.getElementById('select3').style.display = "inline";
}

else{
document.getElementById('select1').style.display = "none";
document.getElementById('select2').style.display = "none";
document.getElementById('select3').style.display = "none";
}

return true;
}



