function Toggle(item) { obj=document.getElementById(item); visible=(obj.style.display!="none") if (visible) { obj.style.display="none"; } else { obj.style.display="block"; } } NS4 = (document.layers) ? true : false; function checkEnter(event) { var code = 0; if (NS4) code = event.which; else code = event.keyCode; if (code==13) document.login.submit(); } function setPreviousOption(ID, price, currency, previous_value, option_array_IDs, option_array_notes, option_array_prices){ //alert('previous_value'+previous_value); if(previous_value != 1) { var next_value = previous_value; next_value--; //alert('next_value'+next_value); var formReference = document.getElementById('add_to_cart_'+ID); formReference.options_1_index.value = next_value; formReference.ID.value = option_array_IDs[next_value]; formReference.options_1_name.value = option_array_notes[next_value]; if(next_value==1) { newPrice=price; } else if(next_value==2){ newPrice=Math.floor(price*1.4); } else { newPrice=price*(next_value-1); } //set price if(document.getElementById){ currency='€'; var priceReference = document.getElementById('productPrice_'+ID); priceReference.innerHTML=newPrice+'.00 '+currency; //alert('productPrice_'+ID); } } } function setNextOption(ID, price, currency, previous_value, option_array_IDs, option_array_notes, option_array_prices){ //alert('previous_value'+previous_value); if(previous_value != 13) { var next_value = previous_value; next_value++; //alert('next_value'+next_value); var formReference = document.getElementById('add_to_cart_'+ID); formReference.options_1_index.value = next_value; formReference.ID.value = option_array_IDs[next_value]; formReference.options_1_name.value = option_array_notes[next_value]; //calculate price if(next_value == 1){ newPrice=price; }else if(next_value == 2){ newPrice=Math.floor(price*1.4); }else{ newPrice=price*(next_value-1); } //set price if(document.getElementById){ currency='€'; var priceReference = document.getElementById('productPrice_'+ID); priceReference.innerHTML=newPrice+'.00 '+currency; //alert('productPrice_'+ID); } } }