= 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)
–
STEPHANE DE SAKUTIN
setImageWidth(“photo0”);
To Netflix viewers, she is among the most famous French faces of the moment, appearing in three hits: “Call My Agent”, “The Crown” and “Emily in Paris”, which returns for a third season on Wednesday.
It is quite a turnaround for Philippine Leroy-Beaulieu, 59, who never expected this level of international fame.
She credits Cedric Klapisch, a director on “Call My Agent”, with pulling her “out of the coffin” after her career stalled in her forties.
But it is her role as Sylvie Grateau, boss of a luxury marketing agency who reluctantly takes on the young naive American, Emily, that has turned Leroy-Beaulieu into a global star.
She relishes the caustic part.
“There is a type of American, like Emily, who wants to conquer the world and thinks they know how to…
