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


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";


function health1() {
var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
   // alert (keyArray2[0]);
localStorage.setItem('TITLE', keyArrayh[0]);
localStorage.setItem('identify', 0);
localStorage.setItem('topic', topic2);
localStorage.setItem('storage', keyArray2h[0]);
localStorage.setItem('link', keyArrayh4[0]);    
Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});  
    
}
function health2() {
var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
    //alert (keyArray2[1]);
localStorage.setItem('TITLE', keyArrayh[1]);
localStorage.setItem('identify', 1);
localStorage.setItem('topic', topic2);
localStorage.setItem('storage', keyArray2h[1]);
localStorage.setItem('link', keyArrayh4[1]); 
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});      
}
function health3() {
    var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
localStorage.setItem('TITLE', keyArrayh[2]);
localStorage.setItem('storage', keyArray2h[2]);
localStorage.setItem('identify', 2);
localStorage.setItem('topic', topic2);   
localStorage.setItem('link', keyArrayh4[2]); 
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function health4() {
    var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
localStorage.setItem('TITLE', keyArrayh[3]);
localStorage.setItem('storage', keyArray2h[3]);
localStorage.setItem('identify', 3);
localStorage.setItem('topic', topic2);
localStorage.setItem('link', keyArrayh4[3]); 
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function health5() {
    var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
localStorage.setItem('TITLE', keyArrayh[4]);
localStorage.setItem('storage', keyArray2h[4]);
localStorage.setItem('identify', 4);
localStorage.setItem('topic', topic2);  
localStorage.setItem('link', keyArrayh4[4]); 
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});    
}
function health6() {
    var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
localStorage.setItem('TITLE', keyArrayh[5]);
localStorage.setItem('storage', keyArray2h[5]);
localStorage.setItem('identify', 5);
localStorage.setItem('topic', topic2);      
localStorage.setItem('link', keyArrayh4[5]); 
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function health7() {
    var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
localStorage.setItem('TITLE', keyArrayh[6]);
localStorage.setItem('storage', keyArray2h[6]);
localStorage.setItem('identify', 6);
localStorage.setItem('topic', topic2);      
localStorage.setItem('link', keyArrayh4[6]); 
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function health8() {
    var arrayart = localStorage.getItem('healthoffline');
var article = JSON.parse(arrayart);


var keyArrayh = article.map(function(item) { return item["title"]; });
var keyArray2h = article.map(function(item) { return item["article"]; });
var keyArray3h = article.map(function(item) { return item["image"]; });
var keyArrayh4 = article.map(function(item) { return item["link"]; });
var topic2 ="Health";
localStorage.setItem('TITLE', keyArrayh[7]);
localStorage.setItem('storage', keyArray2h[7]);
localStorage.setItem('identify', 7);
localStorage.setItem('topic', topic);    
localStorage.setItem('link', keyArrayh4[7]); 
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false}); 
}


///////////////////////////////////////////////////////////////////////////////////////
function loadhealth() {

var arrayart = localStorage.getItem('healthoffline');
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("health").show();
Apperyio("healthcara").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('he1').html(window.title1);
Apperyio('he2').html(window.title2);
Apperyio('he3').html(window.title3);
Apperyio('he4').html(window.title4);    
Apperyio('he5').html(window.title5);    
Apperyio('he6').html(window.title6);    
Apperyio('he7').html(window.title7);
Apperyio('he8').html(window.title8);

Apperyio("hei1").attr("src", keyArray3[0]); 
Apperyio("hei2").attr("src", keyArray3[1]);
Apperyio("hei3").attr("src", keyArray3[2]); 
Apperyio("hei4").attr("src", keyArray3[3]); 
Apperyio("hei5").attr("src", keyArray3[4]);
Apperyio("hei6").attr("src", keyArray3[5]); 
Apperyio("hei7").attr("src", keyArray3[6]); 
Apperyio("hei8").attr("src", keyArray3[7]); 


}