= 0 || a.lastIndexOf(‘iPhone’) >= 0)
return 0;
if (a.lastIndexOf(‘iPad’) >= 0)
return 1;
if (a.lastIndexOf(‘Android’) >= 0)
return 2;
return 3;
}
var bw = browserType();
function setDatePublished(strDate)
{
var node = document.getElementById(‘date_published’);
var year = strDate.substr(0, 4);
var month = strDate.substr(4, 2);
var day = strDate.substr(6, 2);
var hour = strDate.substr(9, 2);
var min = strDate.substr(11, 2);
var secs = strDate.substr(13, 2);
var dd = new Date();
var offset;
dd.setUTCFullYear(year, month – 1, day);
dd.setUTCHours(hour, min, secs);
strDate = dd.toLocaleString();
offset = strDate.lastIndexOf(‘ UTC’);
if (offset > 0)
strDate = strDate.substring(0, offset);
node.textContent = strDate;
}
function VectorLength(x, y)
{
x = parseFloat(x);
y = parseFloat(y);
return Math.sqrt((x*x) + (y*y));
}
function VectorLengthNormalized(x, y)
{
x = parseFloat(x);
y = parseFloat(y);
var length = VectorLength(x, y);
x = x / length;
y = y / length;
return VectorLength(x, y);
}
function nearestMediaForSize(component, mediaSize)
{
var mediaVec = VectorLength(mediaSize.height, mediaSize.width);
var nearest = null;
var nearestVec = 0;
var elementChildren = component.firstElementChild;
var latest = elementChildren;
while (elementChildren != null && latest.nextElementSibling == null)
{
var item = elementChildren;
var width = parseFloat(item.getAttribute(‘width’), 10);
var height = parseFloat(item.getAttribute(‘height’), 10);
var role = item.getAttribute(‘role’);
var href = item.getAttribute(‘href’);
elementChildren = elementChildren.firstElementChild;
latest = item;
if (role != null)
{
if (role.search(‘@2x’) != -1)
{
width /= 2;
height /= 2;
}
var imgVec = VectorLength(height, width);
if (nearestVec == 0)
{
nearest = item;
nearestVec = imgVec;
}
else if (Math.abs(imgVec – mediaVec)
–
Victoria Jones
setImageWidth(“photo1”);
Here are some of the key moments defining the reign of Queen Elizabeth II:
– 1947: Commonwealth broadcast –
As heiress presumptive Princess Elizabeth made a broadcast from Cape Town on her 21st birthday in which she dedicated her life to the service of the Commonwealth.
It was to be the measure of her reign.
– 1952: Princess to queen –
Her father king George VI died aged 56 on February 6, 1952 while Elizabeth was visiting Kenya with her husband, Prince Philip.
Aged 25, she flew back to Britain. Winston Churchill was her first prime minister and brought his experience to bear.
– 1953: The Coronation –
–
–
setImageWidth(“photo3”);
Queen Elizabeth II was…