

var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business";

function bus1() {
var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business"; 

   // alert (keyArray2[0]);
localStorage.setItem('TITLE', keyArrayb[0]);
localStorage.setItem('identify', 0);
localStorage.setItem('topic', topic3);
localStorage.setItem('storage', keyArray2b[0]);
localStorage.setItem('link', keyArrayb4[0]);
Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});  
    
}
function bus2() {
var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business";
    //alert (keyArray2[1]);
localStorage.setItem('TITLE', keyArrayb[1]);
localStorage.setItem('identify', 1);
localStorage.setItem('topic', topic3);
localStorage.setItem('storage', keyArray2b[1]);
localStorage.setItem('link', keyArrayb4[1]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});      
}
function bus3() {
 var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business";
localStorage.setItem('TITLE', keyArrayb[2]);
localStorage.setItem('storage', keyArray2b[2]);
localStorage.setItem('identify', 2);
localStorage.setItem('topic', topic3);   
localStorage.setItem('link', keyArrayb4[2]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function bus4() {
  var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business";
localStorage.setItem('TITLE', keyArrayb[3]);
localStorage.setItem('storage', keyArray2b[3]);
localStorage.setItem('identify', 3);
localStorage.setItem('topic', topic3);
localStorage.setItem('link', keyArrayb4[3]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function bus5() {
var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business";
localStorage.setItem('TITLE', keyArrayb[4]);
localStorage.setItem('storage', keyArray2b[4]);
localStorage.setItem('identify', 4);
localStorage.setItem('topic', topic3);  
localStorage.setItem('link', keyArrayb4[4]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});    
}
function bus6() {
var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business";
localStorage.setItem('TITLE', keyArrayb[5]);
localStorage.setItem('storage', keyArray2b[5]);
localStorage.setItem('identify', 5);
localStorage.setItem('topic', topic3);      
localStorage.setItem('link', keyArrayb4[5]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function bus7() {
var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business";
localStorage.setItem('TITLE', keyArrayb[6]);
localStorage.setItem('storage', keyArray2b[6]);
localStorage.setItem('identify', 6);
localStorage.setItem('topic', topic3);      
localStorage.setItem('link', keyArrayb4[6]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function bus8() {
var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);


var keyArrayb = article.map(function(item) { return item["title"]; });
var keyArray2b = article.map(function(item) { return item["article"]; });
var keyArray3b = article.map(function(item) { return item["image"]; });
var keyArrayb4 = article.map(function(item) { return item["link"]; });
var topic3 ="Business"; 
localStorage.setItem('TITLE', keyArrayb[7]);
localStorage.setItem('storage', keyArray2b[7]);
localStorage.setItem('identify', 7);
localStorage.setItem('topic', topic3);    
localStorage.setItem('link', keyArrayb4[7]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false}); 
}


///////////////////////////////////////////////////////////////////////////////////////
function loadbusiness() {

var arrayart = localStorage.getItem('businessoffline');
var article = JSON.parse(arrayart);

var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2 = article.map(function(item) { return item["article"]; });
var keyArray3 = article.map(function(item) { return item["image"]; });
Apperyio("bus").show();
Apperyio("buscara").show();     

window.title1 = keyArray[0];
window.title2 = keyArray[1];
window.title3 = keyArray[2];
window.title4 = keyArray[3];
window.title5 = keyArray[4];
window.title6 = keyArray[5];
window.title7 = keyArray[6];
window.title8 = keyArray[7];    
    
Apperyio('bu1').html(window.title1);
Apperyio('bu2').html(window.title2);
Apperyio('bu3').html(window.title3);
Apperyio('bu4').html(window.title4);    
Apperyio('bu5').html(window.title5);    
Apperyio('bu6').html(window.title6);    
Apperyio('bu7').html(window.title7);
Apperyio('bu8').html(window.title8);

Apperyio("bui1").attr("src", keyArray3[0]); 
Apperyio("bui2").attr("src", keyArray3[1]);
Apperyio("bui3").attr("src", keyArray3[2]); 
Apperyio("bui4").attr("src", keyArray3[3]); 
Apperyio("bui5").attr("src", keyArray3[4]);
Apperyio("bui6").attr("src", keyArray3[5]); 
Apperyio("bui7").attr("src", keyArray3[6]); 
Apperyio("bui8").attr("src", keyArray3[7]); 


}