function arte_vp_getInternetExplorerVersion()
{
var engine = -1;
if (window.navigator.appName == "Microsoft Internet Explorer") {
// This is an IE browser. What mode is the engine in?
if (document.documentMode) {// IE8 or later
engine = document.documentMode;
} else {// IE 5-7
engine = 5; // Assume quirks mode unless proven otherwise
if (document.compatMode)
{
if (document.compatMode == "CSS1Compat")
engine = 7; // standards mode
}
// There is no test for IE6 standards mode because that mode
// was replaced by IE7 standards mode; there is no emulation.
}
// the engine variable now contains the document compatibility mode.
}
return engine;
}
var player_code = '
';
player_code = player_code.replace('%rendering_place%',encodeURIComponent(window.location.href));
var random = Math.round(Math.random()*10000000000000001);
player_code = player_code.replace('arte_vp_embed_iframe','arte_vp_embed_iframe'+random);
document.write(player_code);
var playerWidth = "";
var playerHeight = "";
if(arte_vp_getInternetExplorerVersion()>-1 && arte_vp_getInternetExplorerVersion()<9)
{
playerWidth = 640;
playerHeight = 360;
}
else
{
playerWidth = window.getComputedStyle(document.getElementById('arte_vp_embed_iframe'+random), null).getPropertyValue("width").slice(0,-2);
playerHeight = playerWidth*9/16;
}
document.getElementById('arte_vp_embed_iframe'+random).style.height = playerHeight +"px";