if (actualVersion >= requiredVersion) {
// ...then we'll redirect them to the flash page, unless we've
// been told not to redirect.
if (useRedirect) {
// Need javascript1.1 to do location.replace
if(jsVersion > 1.0) {
// It's safe to use replace(). Good...we won't break the back button.
window.location.replace(flashPage);
} else {
// JavaScript version is too old, so use .location to load
// the flash page.
OpenWin ("pagina", centro, centro, width, height);
}
}
// If we got here, we didn't redirect. So we make a note that we should
// write out the object/embed tags later.
hasRightVersion = true;
} else {
// The user doesn't have a new enough version.
// If the redirection option is on, load the appropriate alternate page.
if (useRedirect) {
// Do the same .replace() call only if js1.1+ is available.
if(jsVersion > 1.0) {
window.location.replace((actualVersion >= 2) ? upgradePage : noFlashPage);
} else {
if(actualVersion >= 2) location.href = upgradePage
else OpenWin ("pagina", centro, centro, width, height);
}
}
}
}