function updateGesamtpreis( buecher, preis, versandkosten )
{
var gesamtpreis = 0;
if ( buecher > 0 )
{
gesamtpreis = buecher * preis + versandkosten;
}
if ( document.getElementById('gesamtpreis') )
{
var vorkomma = new String(parseInt(gesamtpreis/100, 10));
var nachkomma = new String(parseInt(gesamtpreis%100, 10));
while ( nachkomma.length < 2 )
{
nachkomma = "0" + nachkomma;
}
gesamtpreis_text = vorkomma + "," + nachkomma;
document.getElementById('gesamtpreis').innerHTML = gesamtpreis_text + " &euro;";
return true;
}
return false;
}
function showandhide(obj1,obj2,obj2change) {
if(obj1 && obj2 && obj2change)
{
var status_obj1 = "block";
var status_obj2 = "none";
if(obj2change == "2")
{
status_obj1 = "none";
status_obj2 = "block";
}
obj1.style.display = status_obj1;
obj2.style.display = status_obj2;
}
}
