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


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
var topic ="UK";
function uk1() {
var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
    
    

   // alert (keyArray2[0]);
localStorage.setItem('TITLE', keyArray[0]);
localStorage.setItem('identify', 0);
localStorage.setItem('topic', topic);
localStorage.setItem('storage', keyArray2u[0]);
localStorage.setItem('link', keyArray4u[0]);
Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});  
    
}
function uk2() {
var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
    //alert (keyArray2[1]);
localStorage.setItem('TITLE', keyArray[1]);
localStorage.setItem('identify', 1);
localStorage.setItem('topic', topic);
localStorage.setItem('storage', keyArray2u[1]);
localStorage.setItem('link', keyArray4u[1]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});      
}
function uk3() {
    var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
localStorage.setItem('TITLE', keyArray[2]);
localStorage.setItem('identify', 2);
localStorage.setItem('topic', topic);
localStorage.setItem('storage', keyArray2u[2]);
localStorage.setItem('link', keyArray4u[2]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});   
}
function uk4() {
    var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
localStorage.setItem('TITLE', keyArray[3]);
localStorage.setItem('storage', keyArray2u[3]);
localStorage.setItem('identify', 3);
localStorage.setItem('topic', topic);
localStorage.setItem('link', keyArray4u[3]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function uk5() {var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
localStorage.setItem('TITLE', keyArray[4]);
localStorage.setItem('storage', keyArray2u[4]);
localStorage.setItem('identify', 4);
localStorage.setItem('topic', topic);  
localStorage.setItem('link', keyArray4u[4]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});    
}
function uk6() {
    var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
localStorage.setItem('TITLE', keyArray[5]);
localStorage.setItem('storage', keyArray2u[5]);
localStorage.setItem('identify', 5);
localStorage.setItem('topic', topic);      
localStorage.setItem('link', keyArray4u[5]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function uk7() {
    var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
localStorage.setItem('TITLE', keyArray[6]);
localStorage.setItem('storage', keyArray2u[6]);
localStorage.setItem('identify', 6);
localStorage.setItem('topic', topic);      
localStorage.setItem('link', keyArray4u[6]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false});
}
function uk8() {
    var arrayart = localStorage.getItem('ukoffline');
var article = JSON.parse(arrayart);


var keyArray = article.map(function(item) { return item["title"]; });
var keyArray2u = article.map(function(item) { return item["article"]; });
var keyArray3u = article.map(function(item) { return item["image"]; });
var keyArray4u = article.map(function(item) { return item["link"]; });
localStorage.setItem('TITLE', keyArray[7]);
localStorage.setItem('storage', keyArray2u[7]);
   localStorage.setItem('identify', 7);
localStorage.setItem('topic', topic);    
localStorage.setItem('link', keyArray4u[7]);
    Apperyio.navigateTo('feed',
    {transition: 'none',
     reverse: false}); 
}


///////////////////////////////////////////////////////////////////////////////////////
function loadregional() {

var arrayart = localStorage.getItem('ukoffline');
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"]; });


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('wka1').html(window.title1);
Apperyio('wka2').html(window.title2);
Apperyio('wka3').html(window.title3);
Apperyio('wka4').html(window.title4);    
Apperyio('wka5').html(window.title5);    
Apperyio('wka6').html(window.title6);    
Apperyio('wka7').html(window.title7);
Apperyio('wka8').html(window.title8);

Apperyio("uki1").attr("src", keyArray3[0]); 
Apperyio("uki2").attr("src", keyArray3[1]);
Apperyio("uki3").attr("src", keyArray3[2]); 
Apperyio("uki4").attr("src", keyArray3[3]); 
Apperyio("uki5").attr("src", keyArray3[4]);
Apperyio("uki6").attr("src", keyArray3[5]); 
Apperyio("uki7").attr("src", keyArray3[6]); 
Apperyio("uki8").attr("src", keyArray3[7]); 


}