var items = {"grp91":[{"vare":"Refurbished 14\" Dell Latitude 5410 - Intel i5 10310U 1,7GHz, 512GB NVMe, 16GB, Win11 Pro - Grade B","pris":3500,"img":"latitude5410","stock":2},{"vare":"Refurbished 14\" Lenovo ThinkPad T495 - AMD Ryzen 5 Pro 3500U 2,1GHz, 256GB NVMe, 8GB, Win11 Pro - Grade A","pris":3000,"img":"t495","stock":1},{"vare":"Refurbished 15.6\" HP EliteBook 850 G8 - Intel i5 1145G7 2,6GHz, 256GB NVMe, 16GB, Win11 Pro - Grade A","pris":4500,"img":"elitebook850g8","stock":1},{"vare":"Refurbished 15.6\" Lenovo ThinkPad L15 Gen 1 - AMD Ryzen 7 Pro 4750U 1,7GHz, 512GB NVMe, 32GB, Touch Screen, Win11 Pro - Grade B","pris":4200,"img":"l15g1","stock":4},{"vare":"Refurbished 15.6\" Lenovo ThinkPad L15 Gen 1 - Intel i5 10210U 1,6GHz, 256GB NVMe, 8GB, Win11 Pro - Grade B","pris":3500,"img":"l15g1","stock":1}],"grp90":[{"vare":"Refurbished Apple iPhone 13 Mini, 128GB, B-Grade","pris":3100,"img":"ip13mini","stock":3},{"vare":"Refurbished Apple iPhone 13, 128GB, B-Grade","pris":3700,"img":"ip13","stock":3},{"vare":"Refurbished Apple iPhone SE 3 (2022), 64GB, B-Grade","pris":2400,"img":"ipse3","stock":2}],"grp97":[{"vare":"Doro Leva L31 4G, Graphite \/ White","pris":1500,"img":"leval31","stock":1},{"vare":"Doro Leva L31 4G, Red \/ White","pris":1500,"img":"leval31","stock":3},{"vare":"Samsung Galaxy A16 5G, 128GB, Light Gray","pris":1800,"img":"a16_graa","stock":2},{"vare":"Samsung Galaxy A16 5G, 128GB, Light Green","pris":1800,"img":"a16_groen","stock":2},{"vare":"Samsung Galaxy A16 5G, 128GB, Sort","pris":1800,"img":"a16_sort","stock":2},{"vare":"Samsung Galaxy A26 5G, 128GB, Mint","pris":2200,"img":"a26_groen","stock":2}],"grp92":[{"vare":"Refurbished Apple iPad 9 (2021), 64GB, B-Grade","pris":2700,"img":"ipad9","stock":2}]};
var kats = ["97"];
document.write('
');
function formatnum(nStr) {
nStr += '';
var x = nStr.split('.');
var x1 = x[0];
var x2 = x.length > 1 ? ',' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + '.' + '$2');
}
return x1 + x2;
}
if (kats.includes('90') && items.grp90) {
document.write('
Telefoner på lager:
');
document.write('
');
items.grp90.forEach(function (item) { document.write('
'+item.vare+''+formatnum(item.pris)+' kr.'+item.stock+' på lager i butikken '); });
document.write('
');
}
if (kats.includes('91') && items.grp91) {
document.write('
Computere på lager:
');
document.write('
');
items.grp91.forEach(function (item) { document.write('
'+item.vare+''+formatnum(item.pris)+' kr.'+item.stock+' på lager i butikken '); });
document.write('
');
}
if (kats.includes('92') && items.grp92) {
document.write('
Tablets på lager:
');
document.write('
');
items.grp92.forEach(function (item) { document.write('
'+item.vare+''+formatnum(item.pris)+' kr.'+item.stock+' på lager i butikken '); });
document.write('
');
}
if (kats.includes('97') && items.grp97) {
document.write('
Telefoner på lager:
');
document.write('
');
items.grp97.forEach(function (item) { document.write('
'+item.vare+''+formatnum(item.pris)+' kr.'+item.stock+' på lager i butikken '); });
document.write('
');
}
if (kats.includes('98') && items.grp98) {
document.write('
Tablets på lager:
');
document.write('
');
items.grp98.forEach(function (item) { document.write('
'+item.vare+''+formatnum(item.pris)+' kr.'+item.stock+' på lager i butikken '); });
document.write('
');
}
if (kats.includes('99') && items.grp99) {
document.write('
Computere på lager:
');
document.write('
');
items.grp99.forEach(function (item) { document.write('
'+item.vare+''+formatnum(item.pris)+' kr.'+item.stock+' på lager i butikken '); });
document.write('
');
}
document.write('
');