var UA = function()
{
var sUA = navigator.userAgent.toLowerCase();
var oReturn = {
bIsWebKit : sUA.indexOf("applewebkit") > -1,
bIsSafari : sUA.indexOf("safari") > -1,
bIsKonq: navigator.product != null && navigator.product.toLowerCase().indexOf("konqueror") > -1,
bIsOpera : sUA.indexOf("opera") > -1,
bIsXML : document.contentType != null && document.contentType.indexOf("xml") > -1,
bHasTransparencySupport : true,
bUseDOM : true,
nFlashVersion : null,
nOperaVersion : null,
nGeckoBuildDate : null,
nWebKitVersion : null
};
oReturn.bIsKHTML = oReturn.bIsWebKit || oReturn.bIsKonq;
oReturn.bIsGecko = !oReturn.bIsWebKit && navigator.product != null && navigator.product.toLowerCase() == "gecko";
if(oReturn.bIsGecko){ oReturn.nGeckoBuildDate = new Number(sUA.match(/.*gecko\/(\d{8}).*/)[1]) };
oReturn.bIsIE = sUA.indexOf("msie") > -1 && !oReturn.bIsOpera && !oReturn.bIsKHTML && !oReturn.bIsGecko;
oReturn.bIsIEMac = oReturn.bIsIE && sUA.match(/.*mac.*/) != null;
if(oReturn.bIsOpera){ oReturn.nOperaVersion = new Number(sUA.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]) };
if(oReturn.bIsIE || (oReturn.bIsOpera && oReturn.nOperaVersion < 7.6)){ oReturn.bUseDOM = false };
if(oReturn.bIsWebKit){ oReturn.nWebKitVersion = new Number(sUA.match(/.*applewebkit\/(\d+).*/)[1]) };
if(window.hasFlash && (!oReturn.bIsIE || oReturn.bIsIEMac)){
var flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description;
oReturn.nFlashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
};
if(sUA.match(/.*(windows|mac).*/) == null ||
oReturn.bIsIEMac || oReturn.bIsKonq ||
(oReturn.bIsOpera && oReturn.nOperaVersion < 7.6) ||
(oReturn.bIsSafari && oReturn.nFlashVersion < 7) ||
(!oReturn.bIsSafari && oReturn.bIsWebKit && oReturn.nWebKitVersion < 124) ||
(oReturn.bIsGecko && oReturn.nGeckoBuildDate < 20020523)){
oReturn.bHasTransparencySupport = false;
};
if(!oReturn.bIsIEMac && !oReturn.bIsGecko && document.createElementNS){
try {
document.createElementNS("http://www.w3.org/1999/xhtml", "i").innerHTML = "";
} catch(e){
oReturn.bIsXML = true;
};
};
oReturn.bUseInnerHTMLHack = oReturn.bIsKonq || (oReturn.bIsWebKit && oReturn.nWebKitVersion < 312) || oReturn.bIsIE;
return oReturn;
}();
/* If executed, the VBScript above checks for Flash and sets the hasFlash variable.
If VBScript is not supported it's value will still be undefined, so we'll run it though another test
This will make sure even Opera identified as IE will be tested */
var hasFlash = function()
{
var nRequiredVersion = 7;
if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1) {
document.write(' \n');
if(window.hasFlash != null){
return window.hasFlash;
}
}
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
var flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description;
var re1=/(\d+)\.(\d*)/;
var result1=flashDescription.match(re1);
return parseInt(result1[1]) >= nRequiredVersion;
}
return false;
}();
flash = {
init : function()
{
myHeader = document.getElementById('flash');
if (myHeader)
flash.insert(myHeader, "header", parseInt(flash.get_current_style(myHeader,'width')), parseInt(flash.get_current_style(myHeader,'height')));
},
createObjectParameter : function(nodeObject, sName, sValue)
{
var node = document.createElement("param");
node.setAttribute("name", sName);
node.setAttribute("value", sValue);
nodeObject.appendChild(node);
},
get_current_style : function(element,property)
{
var ee,i;
try
{
var cs=document.defaultView.getComputedStyle(element,'');
val=cs.getPropertyValue(property);
}
catch(ee)
{
property=property.split("-");
for(i=1;i"].join("");
} else {
nodeFlash = document.createElement("object");
flash.createObjectParameter(nodeFlash, "movie", "skins/zvole/flash/"+myId+".swf");
flash.createObjectParameter(nodeFlash, "quality", "best");
flash.createObjectParameter(nodeFlash, "wmode", "transparent");
nodeFlash.setAttribute("id", "fl"+myId);
nodeFlash.setAttribute("width", myWidth);
nodeFlash.setAttribute("height", myHeight);
nodeFlash.style.width = myWidth+"px";
nodeFlash.style.height = myHeight+"px";
if (!UA.bIsOpera)
{
nodeEmbed = document.createElement("embed");
nodeEmbed.setAttribute("name", "fl"+myId);
nodeEmbed.setAttribute("src", "skins/zvole/flash/"+myId+".swf");
nodeEmbed.setAttribute("quality", "best");
nodeEmbed.setAttribute("wmode", "Transparent");
nodeEmbed.setAttribute("type", "application/x-shockwave-flash");
nodeEmbed.setAttribute("swliveconnect", "true");
nodeEmbed.setAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
nodeEmbed.setAttribute("width", myWidth);
nodeEmbed.setAttribute("height", myHeight);
nodeFlash.appendChild(nodeEmbed);
}
myElement.appendChild(nodeFlash);
}
}
};
if (hasFlash)
evt.add(window, "load", flash.init);