function arrayNavigation(array, key){
var len = array.length;
var data = [];
key = parseInt(key);
data['current'] = key;
data['prev'] = (key+len-1)%len;
data['next'] = (key+1)%len;
return data;
}
function arrayNavigation(array, key){
var len = array.length;
var data = [];
key = parseInt(key);
data['current'] = key;
data['prev'] = (key+len-1)%len;
data['next'] = (key+1)%len;
return data;
}