/********** TITLE: Music Object Component - Compatibility VERSION: 3.2.2 AUTHOR: Chris van Rensburg COPYRIGHT: 1996-1999 Beatnik, Inc. All Rights Reserved **********/ function mo_stringHasAny (sourceStr) { var args = mo_stringHasAny.arguments; for (var argNo = 1; argNo < args.length; argNo++) { if (sourceStr.indexOf (args [argNo]) != -1) return true; } return false; } function mo_openWindow (_URL,_name,_width,_height,showStatus,properties) { if (typeof (properties) != 'string') properties = ''; var positionStr = ''; if (typeof (screen) != 'undefined') { var xpos = Math.max (Math.floor ((screen.width - _width - 10) / 2),0), ypos = Math.max (Math.floor ((screen.height - _height - 40) / 2),0) ; positionStr = 'screenx=' + xpos + ',screeny=' + ypos + ',left=' + xpos + ',top=' + ypos + ','; } return window.open (_URL,_name,properties + ',toolbar=no,location=no,directories=no,status=' + ((typeof (showStatus) == 'boolean' && showStatus) ? 'yes' : 'no') + ',menubar=no,scrollbars=no,resizable=yes,' + positionStr + 'width=' + _width + ',height=' + _height + ',' + properties); } function mo_promptClose () { if (Music.promptWindow != null) { Music.promptWindow.close (); Music.promptWindow = null; window.focus (); } } function mo_promptUser (heading,message,okText,okAction,cancelText,cancelAction,showStatus) { Music.promptWindow = mo_openWindow ('','mo_promptWindow',500,295,showStatus); if (typeof (okAction) != 'string' || okAction == '') okAction = 'mo_promptClose ()'; if (typeof (cancelAction) != 'string' || cancelAction == '') cancelAction = 'mo_promptClose ()'; if (typeof (heading) != 'string') heading = ''; with (Music.promptWindow.document) { open ('text/html'); writeln ( '' + heading + '' + '
' + ((heading != '') ? ('') : '') + '
' + heading + '
' + message + '' + '
' + '

' + ((typeof (cancelText) == 'string' && cancelText != '') ? ('') : '') + '' + ((typeof (okText) == 'string' && okText != '') ? ('') : '') + '
' ); close (); if (typeof (Event) != 'undefined') { Music.promptWindow.captureEvents (Event.KEYUP); Music.promptWindow.onKeyUp = new Function ('event','if (event.which == 13) {' + okAction + '} else if (event.which == 27) {' + cancelAction + '}; return false'); } } Music.promptWindow.focus (); } function mo_installPlayer () { var optionsStr = ''; for (var option in Music.installerOptions) optionsStr += ((optionsStr != '') ? '&' : '') + option + '=' + escape (Music.installerOptions [option]) ; Music.promptWindow = mo_openWindow ('http://www.beatnik.com/to/install-player.html?' + optionsStr,'mo_promptWindow',500,295,true); } function mo_retrieveVersion (appName) { var versionStr = '', numerals = '0123456789', charNo = appName.length - 1, currentChar, inVersion = false, parensLevel = 0 ; while (charNo >= 0) { currentChar = appName.charAt (charNo); if (currentChar == ')') { parensLevel++; } else if (currentChar == '(') { parensLevel--; } else if (parensLevel == 0) { if (inVersion || numerals.indexOf (currentChar) != -1) { inVersion = true; if (currentChar == ' ') charNo = 0; else if (currentChar == '.' || numerals.indexOf (currentChar) != -1) versionStr = currentChar + versionStr; } } charNo--; } return versionStr; } function mo_meetsMinVersion (versionToTest,minRequiredVersion) { var versionA = mo_retrieveVersion (versionToTest), versionB = mo_retrieveVersion (minRequiredVersion) ; if (versionA.length < versionB.length) versionA += '.0.0.0.0.0.0.0.0.0.0.0.0'.substring (0,versionB.length - versionA.length); return versionA >= versionB; } function mo_hasMinVersion (minRequiredVersion) { return mo_meetsMinVersion (Music.playerVersion,minRequiredVersion); } function mo_isPlayerCompatible (minVersion,silentIfInadequate,showCompatibilityPrompt) { var result = false; if (Music.clientSupported) { if (typeof (minVersion) == 'string') Music.requiredMinVersion = minVersion; if (typeof (silentIfInadequate) == 'boolean') Music.silentIfInadequate = silentIfInadequate; if (typeof (showCompatibilityPrompt) == 'boolean') Music.showCompatibilityPrompt = showCompatibilityPrompt; if (Music.hasPlayer) { if (mo_hasMinVersion (Music.requiredMinVersion)) { result = true; } else { if (Music.client.upgradable && Music.showCompatibilityPrompt) mo_upgradePrompt (); } } else { if (Music.client.upgradable && Music.showCompatibilityPrompt) mo_installPrompt (); } } if (!result && Music.silentIfInadequate) mo_kill (); return Music.playerCompatible = result; } function mo_requireJava () { if (!Music.ignoreJavaDisabled) { Music.ignoreJavaDisabled = true; if (Music.clientSupported && Music.client.name == 'Netscape' && !navigator.javaEnabled ()) mo_enableJavaPrompt (); } } function mo_playerSubstitute (attribs) { var result = '', panelW = attribs.WIDTH - 0, panelH = attribs.HEIGHT - 0, tableDims = ' WIDTH=' + panelW + ' HEIGHT=' + panelH + ' HSPACE=' + attribs.HSPACE + ' VSPACE=' + attribs.VSPACE + ((attribs.ALIGN != null) ? (' ALIGN=' + attribs.ALIGN) : 'LEFT') ; if (Music.enabled && Music.clientSupported && Music.client.upgradable && (attribs.HIDDEN == null || attribs.HIDDEN.toUpperCase () != 'TRUE')) { var getPlayerText = Music.hasPlayer ? Music.upgradePlayerText : Music.getPlayerText, getPlayerLink = '' ; if (typeof (Music.getPlayerImagesPath) == 'string' && panelW == 144 && (panelH == 60 || panelH == 45 || panelH == 15)) { result = getPlayerLink + '' + getPlayerText + ''; } else { if (panelW >= 90 && panelH >= 15) result = '
' + getPlayerLink + '' + getPlayerText + '
'; } } return ((result != '') ? result : ('
')); } function mo_checkForPlayer () { if (Music.clientSupported) { if (Music.playerType == 'Plug-in') { with (navigator) { for (var pluginNo = 0; pluginNo < plugins.length; pluginNo++) { if (plugins [pluginNo].name.indexOf ('Beatnik') != -1 && plugins [pluginNo].name.indexOf ('Stub') == -1) { Music.playerVersion = mo_retrieveVersion (plugins [pluginNo].name); if (Music.playerVersion == '') { if (Music.platform == 'Mac') { Music.playerVersion = '1.1.7'; } else if (Music.platform == 'WebTV') { Music.playerVersion = '0.9.0'; } } Music.hasPlayer = true; break; } } Music.hasCallbackIssue = mo_hasMinVersion ('1.3') && navigator.javaEnabled (); } } else { document.writeln ( '' + '' + '' + '' + '' ); Music.hasPlayer = typeof (document.mo_testInstance.getVersion) != 'undefined'; if (Music.hasPlayer) Music.playerVersion = mo_retrieveVersion (document.mo_testInstance.getVersion ()); } } } /*** Standalone Support ***/ if (typeof (Music) == 'undefined') { Music = new Object (); Music.playerType = (navigator.appName == 'Microsoft Internet Explorer') ? 'ActiveX' : 'Plug-in'; } /*** English Language Module ***/ function mo_upgradePrompt () { mo_promptUser ('Please Upgrade Beatnik','This page has been optimized for the features of version ' + Music.requiredMinVersion + ' (or higher) of the Beatnik Player. The currently installed version in your browser is ' + Music.playerVersion + '.

If you choose to IGNORE this message, the page will continue to load normally, but may not function properly as designed by the author.','UPGRADE BEATNIK >>>','mo_installPlayer ()','IGNORE','mo_promptClose ()'); } function mo_installPrompt () { mo_promptUser ('Beatnik Enhanced Content !!','This page has been optimized for the audio features of the Beatnik Player. It appears you do not have the Beatnik Player installed.

If you choose to IGNORE this message, the page will continue to load normally, except there will be no Beatnik audio.','INSTALL BEATNIK >>>','mo_installPlayer ()','IGNORE','mo_promptClose ()'); } function mo_enableJavaPrompt () { mo_promptUser ('Please Enable Java','This page makes use of the interactive audio features of the Beatnik Player. Java is currently not enabled in your browser. In order for the page to function correctly with Beatnik, you must have Java enabled.

This page will continue to load normally, but some interactive audio functionality may be absent.',' OK ','mo_promptClose ()'); } Music.upgradePlayerText = 'Upgrade Beatnik'; Music.getPlayerText = 'Get Beatnik'; /*** Static Methods ***/ Music.hasMinVersion = mo_hasMinVersion; Music.installPlayer = mo_installPlayer; Music.isPlayerCompatible = mo_isPlayerCompatible; Music.promptClose = mo_promptClose; Music.promptUser = mo_promptUser; /*** Static Properties ***/ Music.ignoreJavaDisabled = false; Music.playerCompatible = null; Music.requiredMinVersion = ''; Music.showCompatibilityPrompt = true; Music.silentIfInadequate = false; Music.installerOptions = new Array (); /*** Static Read-only Properties ***/ Music.hasPlayer = false; Music.playerVersion = ''; /*** Private Properties ***/ Music.absMinVersion = ''; Music.promptWindow = null; Music.supportedClients = new Array (); function mo_addSupportedClient (_name,_platform,_minVersion,_upgradable) { var ref = Music.supportedClients [Music.supportedClients.length] = new Object (); ref.name = _name; ref.platform = _platform; ref.minVersion = _minVersion; ref.upgradable = _upgradable; } mo_addSupportedClient ('Netscape','Win32','3.01',true); mo_addSupportedClient ('Netscape','MacPPC','3.01',true); mo_addSupportedClient ('Microsoft Internet Explorer','Win32','4.0',true); mo_addSupportedClient ('WebTV Plus Receiver','WebTV','3.0',false); mo_addSupportedClient ('WebTV Satellite Receiver','WebTV','3.0',false); with (navigator) { if (mo_stringHasAny (userAgent,'Win95','Windows 95','WinNT','Windows NT','Win98','Windows 98')) { Music.platform = 'Win32'; } else if (userAgent.indexOf ('PPC') != -1) { Music.platform = 'MacPPC'; } else if (userAgent.indexOf ('WebTV') != -1) { Music.platform = 'WebTV'; } else { Music.platform = (typeof (platform) == 'undefined') ? 'Unknown' : platform; } Music.clientVersion = mo_retrieveVersion (appVersion); Music.clientSupported = false; for (mo_clientNo = 0; mo_clientNo < Music.supportedClients.length; mo_clientNo++) { Music.client = Music.supportedClients [mo_clientNo]; if (Music.client.name == appName && Music.client.platform == Music.platform && mo_meetsMinVersion (Music.clientVersion,Music.client.minVersion)) { Music.clientSupported = true; break; } } } if (typeof (mo_delayPlayerCheck) == 'undefined') mo_checkForPlayer ();