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


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";


function tech1() {

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


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";
    
    

   // alert (keyArray2[0]);
localStorage.setItem('TITLE', keyArrayT[0]);
localStorage.setItem('identify', 0);
localStorage.setItem('topic', topic4);
localStorage.setItem('storage', keyArrayT2[0]);
    localStorage.setItem('link', keyArrayT4[0]);
Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});  
    
}
function tech2() {
var arrayart = localStorage.getItem('techoffline');
var article = JSON.parse(arrayart);


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";

    //alert (keyArray2[1]);
localStorage.setItem('TITLE', keyArrayT[1]);
localStorage.setItem('identify', 1);
localStorage.setItem('topic', topic4);
localStorage.setItem('storage', keyArrayT2[1]);
localStorage.setItem('link', keyArrayT4[1]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});      
}
function tech3() {
    var arrayart = localStorage.getItem('techoffline');
var article = JSON.parse(arrayart);


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";

localStorage.setItem('TITLE', keyArrayT[2]);
localStorage.setItem('storage', keyArrayT2[2]);
localStorage.setItem('identify', 2);
localStorage.setItem('topic', topic4);   
localStorage.setItem('link', keyArrayT4[2]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function tech4() {
    var arrayart = localStorage.getItem('techoffline');
var article = JSON.parse(arrayart);


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";

localStorage.setItem('TITLE', keyArrayT[3]);
localStorage.setItem('storage', keyArrayT2[3]);
localStorage.setItem('identify', 3);
localStorage.setItem('topic', topic4);
localStorage.setItem('link', keyArrayT4[3]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function tech5() {
    var arrayart = localStorage.getItem('techoffline');
var article = JSON.parse(arrayart);


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";

localStorage.setItem('TITLE', keyArrayT[4]);
localStorage.setItem('storage', keyArrayT2[4]);
localStorage.setItem('identify', 4);
localStorage.setItem('topic', topic4);  
localStorage.setItem('link', keyArrayT4[4]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});    
}
function tech6() {
    var arrayart = localStorage.getItem('techoffline');
var article = JSON.parse(arrayart);


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";

localStorage.setItem('TITLE', keyArrayT[5]);
localStorage.setItem('storage', keyArrayT2[5]);
localStorage.setItem('identify', 5);
localStorage.setItem('topic', topic4);      
localStorage.setItem('link', keyArrayT4[5]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function tech7() {
    var arrayart = localStorage.getItem('techoffline');
var article = JSON.parse(arrayart);


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";

localStorage.setItem('TITLE', keyArrayT[6]);
localStorage.setItem('storage', keyArrayT2[6]);
localStorage.setItem('identify', 6);
localStorage.setItem('topic', topic4);      
localStorage.setItem('link', keyArrayT4[6]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function tech8() {
    var arrayart = localStorage.getItem('techoffline');
var article = JSON.parse(arrayart);


var keyArrayT = article.map(function(item) { return item["title"]; });
var keyArrayT2 = article.map(function(item) { return item["article"]; });
var keyArrayT3 = article.map(function(item) { return item["image"]; });
var keyArrayT4 = article.map(function(item) { return item["link"]; });
var topic4 ="Technology";

localStorage.setItem('TITLE', keyArrayT[7]);
localStorage.setItem('storage', keyArrayT2[7]);
localStorage.setItem('identify', 7);
localStorage.setItem('topic', topic);    
localStorage.setItem('link', keyArrayT4[7]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false}); 
}


///////////////////////////////////////////////////////////////////////////////////////
function loadtech() {

var arrayart = localStorage.getItem('techoffline');
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("tech").show();
Apperyio("techcara").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('te1').html(window.title1);
Apperyio('te2').html(window.title2);
Apperyio('te3').html(window.title3);
Apperyio('te4').html(window.title4);    
Apperyio('te5').html(window.title5);    
Apperyio('te6').html(window.title6);    
Apperyio('te7').html(window.title7);
Apperyio('te8').html(window.title8);

Apperyio("tei1").attr("src", keyArray3[0]); 
Apperyio("tei2").attr("src", keyArray3[1]);
Apperyio("tei3").attr("src", keyArray3[2]); 
Apperyio("tei4").attr("src", keyArray3[3]); 
Apperyio("tei5").attr("src", keyArray3[4]);
Apperyio("tei6").attr("src", keyArray3[5]); 
Apperyio("tei7").attr("src", keyArray3[6]); 
Apperyio("tei8").attr("src", keyArray3[7]); 


}