";
} else {
outputHTML = language[ 4 ];
}
mg_latest.innerHTML = outputHTML;
}
/* set homepage for IE */
function SetHomepage() {
return;
var monkey = new Array();
monkey['img'] = 'ieHomepage_monkey.png';
monkey['url'] = 'javascript:history.go(0);';
monkey['onclick'] = 'onClick="SetHomepageAction(this)"';
monkey['alt'] = 'Set aeats.com as your homepage';
// var petOne = new Array();
// petOne['img'] = 'homepagePetsPush01.jpg';
// petOne['url'] = '/players/en/create-your-yome.php';
// petOne['onclick'] = '';
// petOne['alt'] = 'Adopt a pet now!';
// var petTwo = new Array();
// petTwo['img'] = 'homepagePetsPush02.jpg';
// petTwo['url'] = '/players/en/create-your-yome.php';
// petTwo['onclick'] = '';
// petTwo['alt'] = 'Adopt a pet now!';
var sketchstarPush = new Array();
sketchstarPush['img'] = 'homepage-banner-topright_play.png';
sketchstarPush['url'] = '/sketch-star/';
sketchstarPush['onclick'] = '';
sketchstarPush['alt'] = 'Create Free Animations! Play Sketch Star »';
var randArray = new Array();
// randArray[0] = petOne;
// randArray[1] = petTwo;
randArray[0] = sketchstarPush;
if(document.all && cookie_read('homepageSet') != 'cookieset') {
randArray[2] = monkey;
}
var randResult = Math.floor(Math.random() * randArray.length);
var randShow = randArray[randResult];
document.write('');
}
function SetHomepageAction(object) {
document.body.style.behavior="url(#default#homepage)";
document.body.setHomePage("http://www.aeats.com/");
cookie_create("homepageSet", "cookieset", 365);
statTracker("/click/setHomepage");
}
/* COOKIES */
function cookie_create(name, value, days) {
if(days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
} else {
var expires = "";
}
document.cookie = name + "=" + value + expires + "; path=/";
}
function cookie_read(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0 ) return c.substring(nameEQ.length, c.length);
}
return "";
}
function cookie_erase(name) {
createCookie(name, "", -1);
}
/* CLIPBOARD (IE only - need to add mozilla version) */
function cb_init() {
// check we're not in MSIE
if ( navigator.appName != "Microsoft Internet Explorer" ) {
// grab all the divs
var divs = document.getElementsByTagName( "div" );
// if a copy div replace content
for( var i = 0; i < divs.length; i++ ) {
var div = divs[ i ];
// hide unusable buttons
if ( div.className == "copyButton" ) {
div.innerHTML = language[ 6 ];
}
}
}
}
function cb_copy(item) {
copied = item.createTextRange();
item.focus();
item.select();
copied.execCommand("Copy");
}
/* GENERIC STUFF */
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
function writeEmail(name, display_name) {
address = name + "@" + "aeats.com";
if (display_name == null) {
document.write("" + address + "");
} else {
document.write("" + display_name + "");
}
}
function prerollCreateGame(pr_gamename, pr_gamewidth, pr_gameheight) {
// --------------------------------------------------------------------
// create the code for a flash game, simple function that can be reused
// --------------------------------------------------------------------
str_return = "";
$("video_ad").innerHTML = str_return;
}
var BrowserDetect = {
init: function () {
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function (data) {
for (var i=0;i";
outputHtml = outputHtml + "#sidebarBoxBackground {display:none;}";
outputHtml = outputHtml + "#sidebarBoxForeground {display:none;}";
outputHtml = outputHtml + "#sideBar {margin-top:-5px;}";
outputHtml = outputHtml + "";
document.write(outputHtml);
addLoadEvent(removeSidebarBoxAdComplete);
}
function removeSidebarBoxAdComplete() {
if($("sidebarBoxBackground") != null) {
$("sidebarBoxBackground").innerHTML = "";
}
if($("sidebarBoxForeground") != null) {
$("sidebarBoxForeground").innerHTML = "";
}
}
function insertHomepageVideo( htmlCode ) {
$("homepageVideoInsert").innerHTML = htmlCode;
$("homepageVideoInsert").style.display = "block";
}
function removeHomepageVideo() {
$("homepageVideoInsert").innerHTML = "";
$("homepageVideoInsert").style.display = "none";
}
function resizeFrame( f ) {
$( f ).style.height = "50px";
url = $( f ).contentWindow.location.href;
if(url.indexOf("aeats.com") > 0) {
$( f ).style.height = $( f ).contentWindow.document.body.scrollHeight + "px";
} else {
$( f ).style.height = "500px";
}
}
var shockwaveInstalled = null;
var shockwaveFirstTime = true;
var shockwaveTimeout = null;
function shockwaveIsInstalled() {
var tVersionString = "0";
if (navigator.mimeTypes && navigator.mimeTypes["application/x-director"] && navigator.mimeTypes["application/x-director"].enabledPlugin) {
if (navigator.plugins && navigator.plugins["Shockwave for Director"] && (tVersionIndex = navigator.plugins["Shockwave for Director"].description.indexOf(".")) != - 1) {
tVersionString = navigator.plugins["Shockwave for Director"].description.substring(tVersionIndex-2, tVersionIndex+2);
}
} else if(navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0) {
try {
var obj = new ActiveXObject("SWCtl.SWCtl");
if(obj != null) {
tVersionString = obj.ShockwaveVersion("");
}
} catch(e) {
}
if(obj != null) {
delete obj;
}
}
if(parseInt(tVersionString) >= 11) {
shockwaveInstalled = true;
} else {
shockwaveInstalled = false;
}
return shockwaveInstalled;
}
function shockwaveInstall() {
var showGoldBar = true;
if(shockwaveIsInstalled()) {
// track new installs
if(shockwaveFirstTime == false || cookie_read("sw") == 1) {
statPageview("/sw/newInstall");
cookie_erase("sw");
}
// track total users with install
statTracker("/sw/installed");
// hide installation messaging
$("shockwaveGameContainer").style.display = "block";
$("shockwaveInstallWrapper").style.display = "none";
$("shockwaveInstallBar").style.display = "none";
$("blackOverlay").style.display = "none";
$("shockwaveInstallBar").innerHTML = "";
} else {
// track not installed
if(shockwaveFirstTime == true) {
statPageview("/sw/notInstalled");
cookie_create("sw", "1", 10);
}
var goldbarMessage = "
Adobe Shockwave Required
Installing is easy. When you see the yellow bar above, follow these steps »
";
// if firefox or similar
if(navigator.appName == "Netscape") {
// if version 3
if(navigator.userAgent.indexOf("Firefox/3") >= 0) {
goldbarMessage = goldbarMessage + "
";
$("jsDebugDataBox").innerHTML = $("jsDebugDataBox").innerHTML + outputHtml;
}
var hpto = new Object;
var toolbarHomepageTakeover = false;
var hptoDisplay = false;
function runTakeover(hpto) {
if (hptoDisplay == true) {
return;
}
// ---------
// banner ad
// ---------
if (hpto.MpuURL != undefined) {
hpto_MPU_URL = hpto.MpuURL;
if (hpto.ClickURL != undefined) {
hpto_MPU_URL = hpto_MPU_URL + '?clickTag=' + encodeURIComponent(hpto.ClickURL.replace('[timestamp]', ord));
}
takeoverEmbed = '';
if ($('takeoverMPU') != null) {
$('takeoverMPU').innerHTML = takeoverEmbed;
} else {
document.write(takeoverEmbed);
}
}
// ----
// skin
// ----
if (hpto.ImageURL_1 == undefined) {
hpto_ImageURL_1 = hpto.ImageURL;
} else {
hpto_ImageURL_1 = hpto.ImageURL_1;
}
// Set defaults and fallbacks
if ( hpto_ImageURL_1 != "" ) {
hpto_Image_1 = 'url(' + hpto_ImageURL_1 + ') no-repeat center top !important';
} else {
hpto_Image_1 = '';
}
if (hpto.Colour == '') {
hpto.Colour = '#333333';
}
// Define header options
switch(hpto.Header) {
case 1:
headerHeight = 35;
break;
case 2:
headerHeight = 65;
break;
case 3:
headerHeight = 105;
break;
default:
headerHeight = 0;
}
// Set wrapper/logo visibility
if (hpto.Wrapper == true) {
$('wrapper').style.marginTop = headerHeight + 'px';
hpto.hpto_Logo = 'h1 a, h1 a:hover, h1 { background:url( /images/bg_h1.png ) no-repeat 12px 10px; }';
} else {
$('wrapper').style.background = 'none';
$('wrapper').style.padding = headerHeight + 'px 0 0 0';
if ( hpto.hpto_Logo == false ) {
hpto.hpto_Logo = 'h1, h1 a, h1 a:hover { background: none; }';
} else {
hpto.hpto_Logo = 'h1, h1 a, h1 a:hover { background: url( /images/takeovers/takeoverLogo.png ) no-repeat 12px 10px; }';
}
// adjust tabs
if ($('wrapper') != null) {
$('wrapper').style.paddingTop = String(headerHeight).concat('px');
}
}
if ($("toolbarPush")) {
$("toolbarPush").innerHTML = '';
}
toolbarHomepageTakeover = true;
document.body.style.marginRight = '';
// Clickable Takeover
if (hpto.bgClickURL !== undefined) {
bgClickURL = hpto.bgClickURL;
noBubble = false;
document.body.onclick = function() {
if (noBubble == false) {
location.href = bgClickURL;
}
noBubble = false;
}
$('wrapper').onclick = function() {
noBubble = true;
};
$('footer').onclick = function() {
noBubble = true;
};
document.body.style.cursor = 'pointer';
$('wrapper').style.cursor = 'default';
$('footer').style.cursor = 'default';
} else {
document.body.onclick = null;
}
// Build the Takeover
document.body.style.backgroundColor = hpto.Colour;
document.body.style.backgroundImage = 'url(' + hpto_ImageURL_1 + ')';
document.body.style.backgroundRepeat = 'no-repeat';
document.body.style.backgroundPosition = 'top center';
if($('beta') != null) {
$('beta').style.display = 'none';
}
hideMonkey();
document.write('');
// ------
// footer
// ------
if (hpto.FootURL != undefined) {
if (hpto.FootURL.length > 0) {
var hpto_FootImg = new Image();
hpto_FootImg.src = hpto.FootURL;
$('footerTakeover').innerHTML = '';
}
}
// -----
// stats
// -----
// Get statistics variables from array
hpto_Agency = hpto.Agency;
hpto_Client = hpto.Client;
hpto_Campaign = hpto.Campaign;
// If blank, set unknown.
if(hpto_Agency == undefined) {
hpto_Agency = "unknown";
}
if(hpto_Client == undefined) {
hpto_Client = "unknown";
}
if(hpto_Campaign == undefined) {
hpto_Campaign = "unknown";
}
// tracking
if (hpto.TrackURL != undefined) {
hpto.TrackURL = hpto.TrackURL.replace('[timestamp]', ord);
tracker = new Image();
tracker.src = hpto.TrackURL;
}
hptoDisplay = true;
// Log takeover view to Google Analytics
trackHPTO();
hpto = new Object();
}
function trackHPTO(args) {
// Get statistics variables from array
hpto_Agency = hpto.Agency;
hpto_Client = hpto.Client;
hpto_Campaign = hpto.Campaign;
// If blank, set unknown.
if(hpto_Agency == undefined) {
hpto_Agency = "unknown";
}
if(hpto_Client == undefined) {
hpto_Client = "unknown";
}
if(hpto_Campaign == undefined) {
hpto_Campaign = "unknown";
}
if (args == undefined) {
args = '';
}
var path = '/takeovers/' + encodeURI(hpto_Agency.replace(' ', '-')) + '/' + encodeURI(hpto_Client.replace(' ', '-')) + '/' + encodeURI(hpto_Campaign.replace(' ', '-')) + args;
statTracker(path);
}
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function Ad_that_changes_background_AS1_DoFSCommand(command, args) {
var Ad_that_changes_background_AS1Obj = isInternetExplorer ? document.all.Ad_that_changes_background_AS1 : document.Ad_that_changes_background_AS1;
imagePath = hpto['ImageURL_' + args];
if (imagePath == undefined) {
imagePath = hpto.ImageURL;
}
bgColor = hpto['Colour_' + args];
if (bgColor == undefined) {
bgColor = hpto.Colour;
}
document.body.style.backgroundImage = 'url(' + imagePath + ')';
document.body.style.backgroundColor = bgColor;
trackHPTO('/swapBackground/' + args);
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('\n');
}
function attachTracking() {
var banner_ids = ['banner_leaderboard', 'banner_boxad', 'banner_pushad_small', 'banner_pushad_big', 'ss_pushad_big', 'ss_pushad_small'];
var banner_anchor = null;
for (var i = 0; i < banner_ids.length; i++) {
banner_anchor = $(banner_ids[i]);
if (banner_anchor && banner_anchor.href) {
banner_anchor.onclick = function(e) {
// stop browser from following the link
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
var image = this.getElementsByTagName('img');
var path_list = image[0].src.split("/");
var image_file = path_list[path_list.length - 1].split(".");
var analytics_path = new Array();
analytics_path[0] = 'adserver/click';
analytics_path[1] = adServerProperties;
analytics_path[2] = this.id;
analytics_path[3] = image_file[0];
statTracker(analytics_path.join('/'));
// go to target url
window.location.href = this.href;
return false;
}
var image = banner_anchor.getElementsByTagName('img');
var path_list = image[0].src.split("/");
var image_file = path_list[path_list.length - 1].split(".");
var analytics_path = new Array();
analytics_path[0] = 'adserver/view';
analytics_path[1] = adServerProperties;
analytics_path[2] = banner_anchor.id;
analytics_path[3] = image_file[0];
statTracker(analytics_path.join('/'));
}
}
}
function setBodyMargin() {
if(document.body.offsetWidth % 2 == 1) {
document.body.style.marginRight = "1px";
} else {
document.body.style.marginRight = "0";
}
}
var userAge = 0;
// Newsletter Signup (Added by Ben H - 23/04/09)
function coppaAge(coppa_age, form_id, email) {
// Set Minimum Age Limit
var ageLimit = 13;
var userAge = $(coppa_age).value;
var reg = /^([a-zA-Z0-9_\-\.]+)@((([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4})(\]?)$/;
var address = document.forms[form_id].elements[email].value;
if (userAge < ageLimit) {
$("newsletterForm").innerHTML = '
Sorry!
The News.
';
cookie_create("coppaAge", theYear, 3); // Set a cookie to stop them from trying again
} else {
if ((reg.test(address) == false) || (userAge <= ageLimit)) {
alert('Invalid Email Address');
return false;
} else {
statTracker('/newsletter/signup/');
return true;
}
}
}
function coppaCheck () {
var age = cookie_read("coppaAge");
if (age.length > 0 && age < 13) {
document.getElementById("newsletterForm").innerHTML = '
Sorry!
The Newsletter.
';
}
}
/* Toolbar Push Strip */
function toolbarPush() {
// make sure the game is running on a game page (t_gameId is only available on game pages)
if (typeof(t_gameId) == 'undefined') {
return;
}
// make sure there is space for the toolbar
if (toolbarHomepageTakeover == true) {
return;
}
if ($("toolbarPush")) {
// make sure we're on www
if(document.domain == "www.aeats.com") {
// see if the toolbar can be shown (variable "hidetoolbar" set in some templates)
if (window['hideToolbar'] == undefined) {
// see if the toolbar is installed with the toolbar cookie
var toolbarId = cookie_read("tb_id");
if (toolbarId.length < 1) {
// insert toolbar
outputHtml = '
";
}
}
}
}
mg.innerHTML = output;
}
function toolbar_add( thegameid, refresh_list ) {
var thecook = cookie_read( cookieGame );
thecook.toString();
gameName = $( "tid_" + thegameid ).innerHTML;
// if game already exists...
if ( thecook.indexOf( "^" + thegameid + "~" ) >= 0 ){
alert(language[ 3 ] + " " + gameName + " " + language[ 2 ]);
return;
}
var theline = "";
if ( thecook.length < 5 ) {
theline += "gm1^" + gameName + "~";
theline += "ur1^" + thegameid + "~";
} else {
theline += "gm1^" + gameName + "~";
theline += "ur1^" + thegameid + "~";
theline += thecook;
}
countTheCook = thecook.split( "~" );
toolbarcook = cookie_read( cookName );
cookie_create( cookieGame, theline, 20000 );
toolbar_refresh( 0, "add", gameName );
if( refresh_list == true ) {
toolbar_list();
}
}
function toolbar_delete( gameID ) {
var thecook = cookie_read( cookieGame );
var theline = "";
gameName = $( "tid_" + gameID ).innerHTML;
thegames = thecook.split( "~" );
for( i = 0; i < thegames.length - 2; i = i + 2 ) {
// with the old code gameID could be 1 (3-foot-ninja) and it would delete any game with
// a 1 in it. so i removed indexOf.. /andreas
number = thegames[ i + 1 ].split( "^" );
number = number[1];
if (number == gameID) {
// if( thegames[ i + 1 ].indexOf( gameID ) > -1 ) {
} else {
theline += thegames[ i ] + "~" + thegames[ i + 1 ] + "~";
}
}
cookie_create( cookieGame, theline, 20000 );
toolbar_refresh( 0, "remove", gameName );
toolbar_list();
}
function toolbar_refresh( full, addOrRemove, gameName ){
var thecook = cookie_read( cookieGame );
thecook = thecook.toString();
if (thecook.length > 5) {
if (full == 1) {
alert(msg_noplace);
} else if( addOrRemove == "add" ){
} else if (addOrRemove == "remove") {
//alert (gameName + " " + language[1]);
}
}
}
function hideMonkey() {
if ($('homepageMonkey') != null) {
$('homepageMonkey').innerHTML = '';
}
}
function detectUnityWebPlayer () {
var tInstalled = false;
if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) {
tInstalled = detectUnityWebPlayerActiveX();
} else if (navigator.mimeTypes && navigator.mimeTypes["application/vnd.unity"]) {
if (navigator.mimeTypes["application/vnd.unity"].enabledPlugin && navigator.plugins && navigator.plugins["Unity Player"]) {
tInstalled = true;
}
}
return tInstalled;
}
function initTopTen() {
// only do this if the animation is available
if ($('topTen') == null ) {
return false;
}
var topTenItems = $('topTen').getElementsByTagName('li');
for (var y = 0; y < topTenItems.length; y++) {
topTenItems[y].id = 'topTenItem' + y;
topTenItems[y].onmouseover = function() {
tempTopTenItems = $('topTen').getElementsByTagName('li');
for (var x = 0; x < topTenItems.length; x++) {
tempTopTenItems[x].className = '';
$(tempTopTenItems[x].id + 'Details').style.display = 'none';
}
this.className = 'active';
$(this.id + 'Details').style.display = 'block';
}
}
}
/* Navigation v2 Stuff */
function siteSearchText() {
if ($('siteSearch')) {
var searchMessage = '';
$('siteSearch').value = searchMessage;
$('siteSearch').onfocus = function() {
if (this.value == searchMessage) {
this.value = '';
}
};
$('siteSearch').onblur = function() {
if (this.value == '') {
this.value = searchMessage;
}
};
}
}
var showMoreStatus = false;
function showMoreNav() {
var showMoreStatus = $('moreNavContent').className == "shown";
if (showMoreStatus == true) {
$('moreNavContent').className = "hidden";
$('moreNavShow').innerHTML = "View all games";
$('moreNavShow').style.backgroundPosition = '0px 7px';
} else {
$('moreNavContent').className = "shown";
$('moreNavShow').innerHTML = "Close";
$('moreNavShow').style.backgroundPosition = '0px -9px';
}
if ($('sideBar')) {
var startHeight = 70;
var wideActive = document.body.className.indexOf('bigVideo');
if (showMoreStatus == true) {
if (wideActive < 0) {
$('sideBar').style.marginTop = '-' + startHeight + 'px';
}
showMoreStatus = false;
} else {
if (wideActive < 0) {
$('sideBar').style.marginTop = '-' + ($('moreNavContent').offsetHeight + startHeight) + 'px';
}
showMoreStatus = true;
}
}
return false;
}
function homepageBigAd() {
document.body.className = document.body.className + ' bigVideo';
}
// Alert user if they try to leave an ongoing game
var _inGame = false;
var _text = "";
function lobbyInGame(inGame, text) {
_inGame = inGame;
_text = text;
}
function lobbyConfirmLeave() {
if (_inGame) {
return _text;
}
}
function autoResize(id){
console.log('autoResize: ' + id);
var newheight;
var newwidth;
if(document.getElementById){
newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
}
document.getElementById(id).height= (newheight) + "px";
document.getElementById(id).width= (newwidth) + "px";
}
window.onbeforeunload = lobbyConfirmLeave;
// Equalise Div Heights
matchColumns=function(){
var divs,contDivs,maxHeight,divHeight,d;
divs=document.getElementsByTagName('div');
contDivs=[];
maxHeight=0;
for(var i=0;i elements with class attribute "equal"
if(/\bequal\b/.test(divs[i].className)){
d=divs[i];
contDivs[contDivs.length]=d;
if(d.offsetHeight){
divHeight=d.offsetHeight;
}
else if(d.style.pixelHeight){
divHeight=d.style.pixelHeight;
}
maxHeight=Math.max(maxHeight,divHeight);
}
}
for(var i=0;i= 0 &&
href.indexOf('www') == -1 &&
href.indexOf('devcms') == -1 &&
href.indexOf('cms') == -1) {
links[y].onclick = function() {
return trackLink(this.href);
};
}
}
}
function trackLink (url) {
_gaq.push(['_link', url]);
return true;
}/* [INCLUDE FILE] AC_RunActiveContent */
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved.
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function ControlVersion()
{
var version;
var axo;
var e;
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
try {
// version will be set for 7.X or greater players
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {
}
if (!version)
{
try {
// version will be set for 6.X players only
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
// installed player is some revision of 6.0
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
// so we have to be careful.
// default to the first public version
version = "WIN 6,0,21,0";
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
axo.AllowScriptAccess = "always";
// safe to call for 6.0r47 or greater
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 4.X or 5.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 3.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 2.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
}
}
return version;
}
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
var versionRevision = descArray[3];
if (versionRevision == "") {
versionRevision = descArray[4];
}
if (versionRevision[0] == "d") {
versionRevision = versionRevision.substring(1);
} else if (versionRevision[0] == "r") {
versionRevision = versionRevision.substring(1);
if (versionRevision.indexOf("d") > 0) {
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
}
}
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
// Given "WIN 2,0,0,11"
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
tempString = tempArray[1]; // "2,0,0,11"
versionArray = tempString.split(","); // ['2', '0', '0', '11']
} else {
versionArray = versionStr.split(".");
}
var versionMajor = versionArray[0];
var versionMinor = versionArray[1];
var versionRevision = versionArray[2];
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
} else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
}
}
return false;
}
}
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '';
if (isIE && isWin && !isOpera)
{
str += '';
}
else
{
str += '';
}
return str;
}
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
document.write(AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs));
}
function AC_FL_GetContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
return AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_SW_RunContent(){
var ret =
AC_GetArgs
( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
, null
);
document.write(AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs));
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblclick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "codebase":
case "id":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "menu":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
case "type":
case "swContextMenu":
ret.objAttrs[args[i]] = args[i+1];
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}
/* [INCLUDE FILE] AC_ActiveX */
//v1.1
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AX_RunContent(){
var ret = AC_AX_GetArgs(arguments);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_AX_GetArgs(args){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "pluginspage":
case "type":
case "src":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "data":
case "codebase":
case "classid":
case "id":
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
return ret;
}
function AC_JA_GetArgs(args){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "archive":
case "code":
case "pluginspage":
case "type":
case "src":
case "data":
case "codebase":
case "classid":
case "id":
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
return ret;
}
function AC_GenerateApplet(objAttrs, params, embedAttrs)
{
var str = '';
// alert(str);
document.write(str);
}
function AC_JA_RunContent(){
var ret =
AC_JA_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_GenerateApplet(ret.objAttrs, ret.params, ret.embedAttrs);
}
/* [INCLUDE FILE] tooltips */
//Edit the information between the quotes below with the path to your image.
var imagePath = "/images/tooltiparrow.gif";
function addwarning(){
var thealinks = document.getElementsByTagName("a");
if (!thealinks) { return; }
for(var x=0;x!=thealinks.length;x++){
if(thealinks[x].className.indexOf("addToolTip") != -1){
thealinks[x].setAttribute("tooltiptext",thealinks[x].title);
thealinks[x].removeAttribute("title");
thealinks[x].onmouseover=function gomouseover(){ddrivetip(this.getAttribute("tooltiptext"))};
thealinks[x].onmouseout=function gomouseout(){hideddrivetip();};
}
}
}
var offsetfromcursorX=15; //Customize x offset of tooltip
var offsetfromcursorY=15; //Customize y offset of tooltip
var offsetdivfrompointerX=0; //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=0; //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).
document.write(''); //write out tooltip DIV
document.write(''); //write out pointer image
var ie=document.all;
var ns6=document.getElementById && !document.all;
var enabletip=false;
if (ie||ns6) {
var tipobj=document.all? document.all["theToolTip"] : document.getElementById? document.getElementById("theToolTip") : "";
}
var pointerobj=document.all? document.all["ToolTipPointer"] : document.getElementById? document.getElementById("ToolTipPointer") : "";
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!=="undefined") {tipobj.style.width=thewidth+"px";}
if (typeof thecolor!=="undefined" && thecolor!=="") {tipobj.style.backgroundColor=thecolor;}
tipobj.innerHTML=thetext;
enabletip=true;
return false;
}
}
function positiontip(e){
if (enabletip){
var nondefaultpos=false;
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20;
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20;
var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX;
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY;
var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000;
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge