//Estas func se usan en la funciones comprar(), cantidadMenos(i) y cantidadMas(i) de cesta_comprar.js
function precioalfombr_cesta(i){ 
cant = window.parent.frames["arriba"].compra_prods[i].cant*1;
if(cant<5) pu=5.95;
if(cant>=5 && cant<10) pu=5.65;
if(cant>=10 && cant<20) pu=5.35;
if(cant>=20 && cant<50) pu=4.95;
if(cant>=50 && cant<100) pu=4.65;
if(cant>=100 && cant<200) pu=4.35;
if(cant==200) pu=3.95;
if(window.parent.frames["arriba"].compra_prods[i].caract.indexOf('- Medidas: 19 cm de diámetro')!=-1)
 pu += 1;
window.parent.frames["arriba"].compra_prods[i].precio = pu;
}
function preciominicamis_cesta(i){
cant = window.parent.frames["arriba"].compra_prods[i].cant*1;
if(cant<5) pu=12.95;
if(cant>=5 && cant<10) pu=10.95;
if(cant>=10 && cant<20) pu=9.95;
if(cant>=20 && cant<50) pu=8.95;
if(cant>=50 && cant<100) pu=7.95;
if(cant>=100 && cant<200) pu=6.95;
if(cant==200) pu=4.95;
window.parent.frames["arriba"].compra_prods[i].precio = pu;
}
function preciodelantalbot_cesta(i){
cant = window.parent.frames["arriba"].compra_prods[i].cant*1;
if(cant<5) pu=9.95;
if(cant>=5 && cant<10) pu=7.95;
if(cant>=10 && cant<20) pu=6.95;
if(cant>=20 && cant<50) pu=5.95;
if(cant>=50 && cant<100) pu=4.95;
if(cant>=100 && cant<200) pu=3.95;
if(cant==200) pu=2.95;
window.parent.frames["arriba"].compra_prods[i].precio = pu;
}
function preciodelantal_cesta(i){
cant = window.parent.frames["arriba"].compra_prods[i].cant*1;
if(cant<5) pu=12.95;
if(cant>=5 && cant<10) pu=11.95;
if(cant>=10 && cant<20) pu=10.95;
if(cant>=20 && cant<50) pu=9.95;
if(cant>=50 && cant<100) pu=8.95;
if(cant>=100 && cant<200) pu=7.95;
if(cant>=200 && cant<500) pu=6.95;
if(cant>=500 && cant<1000) pu=5.95;
if(cant>=1000 && cant<2000) pu=4.95;
if(cant==2000) pu=3.95;
window.parent.frames["arriba"].compra_prods[i].precio = pu;
}
function preciobabero_cesta(i){
cant = window.parent.frames["arriba"].compra_prods[i].cant*1;
if(cant<5) pu=7.95;
if(cant>=5 && cant<10) pu=6.95;
if(cant>=10 && cant<20) pu=5.95;
if(cant>=20 && cant<50) pu=4.95;
if(cant>=50 && cant<100) pu=3.95;
if(cant==100) pu=2.95;
window.parent.frames["arriba"].compra_prods[i].precio = pu;
}
function preciopuzzle_cesta(i){
cant = window.parent.frames["arriba"].compra_prods[i].cant*1;
if(window.parent.frames["arriba"].compra_prods[i].caract.indexOf('- Medidas: 19 x 27 cm')!=-1){
 if(cant<5) pu=16.95;
 if(cant>=5 && cant<10) pu=15.95;
 if(cant>=10 && cant<20) pu=11.95;
 if(cant>=20 && cant<100) pu=10.95;
 if(cant>=100 && cant<200) pu=9.95;
 if(cant>=200 && cant<400) pu=7.95;
 if(cant==400) pu=6.95;
 }else{ // 27 x 38 cm:
   if(cant<5) pu=19.95;
   if(cant>=5 && cant<10) pu=18.95;
   if(cant>=10 && cant<20) pu=14.95;
   if(cant>=20 && cant<100) pu=13.95;
   if(cant>=100 && cant<200) pu=11.95;
   if(cant>=200 && cant<400) pu=9.95;
   if(cant==400) pu=8.95;
	 }
window.parent.frames["arriba"].compra_prods[i].precio = pu;
}
function preciocachirulo_cesta(i){
// Tb. se usa para los pañuelos de fiestas.
cant = window.parent.frames["arriba"].compra_prods[i].cant*1;
if(window.parent.frames["arriba"].compra_prods[i].caract.indexOf('- Medidas: 70 x 70 x 100 cm')!=-1){
 if(cant<20) pu=14.95;
 if(cant>=20 && cant<50) pu=9.95;
 if(cant>=50 && cant<100) pu=8.95;
 if(cant>=100 && cant<200) pu=6.95;
 if(cant>=200 && cant<500) pu=5.95;
 if(cant>=500 && cant<1000) pu=4.95;
 if(cant>=1000 && cant<2000) pu=3.95;
 if(cant==2000) pu=2.95;
 }else{ // 57 x 57 x 80 cm:
	 if(cant<20) pu=13.95;
   if(cant>=20 && cant<50) pu=8.95;
   if(cant>=50 && cant<100) pu=7.95;
   if(cant>=100 && cant<200) pu=5.95;
   if(cant>=200 && cant<500) pu=4.95;
	 if(cant>=500 && cant<1000) pu=4.95;
	 if(cant>=1000 && cant<2000) pu=3.95;
   if(cant==2000) pu=2.95;
	 }
window.parent.frames["arriba"].compra_prods[i].precio = pu;
}
