/*************************************** musicObject version 2.5.10 written by Chris van Rensburg Copyright 1996-1998 Headspace, Inc. All Rights Reserved ***************************************/ /*** customizable properties ***/ mo_enabled = true; mo_requiredMinVersion = ''; mo_silentIfInadequate = false; mo_showCompatibilityPrompt = true; mo_ignoreJavaDisabled = false; mo_debugToJavaConsole = true; mo_debugToAlert = false; mo_debugToStatus = true; mo_ignoreNotReady = true; /*** global properties & functions ***/ mo_hasBeatnik = false; mo_BeatnikType = ''; mo_BeatnikVersion = ''; mo_hasCallbackIssue = false; mo_windowOnloadStr = ''; mo_onloadStored = false; mo_globalNoteNo = 0; mo_minFadeInterval = 100; function mo_debug (errorMessage,errorURL,errorLineNo) { var errorStr = '\n**** JAVASCRIPT ERROR ****\n TYPE: ' + errorMessage + '\n LINE# ' + errorLineNo + '\n FILE: ' + errorURL + '\n'; if (mo_debugToJavaConsole && typeof (java) != 'undefined') java.lang.System.out.println (errorStr); if (mo_debugToAlert) alert (errorStr); if (mo_debugToStatus) window.defaultStatus = errorStr; return true; } window.onerror = mo_debug; top.onerror = mo_debug; parent.onerror = mo_debug; 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 (mo_BeatnikVersion,minRequiredVersion); } function mo_supportedBrowser (_name,_platform,_minVersion) { this.name = _name; this.platform = _platform; this.minVersion = _minVersion; } mo_supportedBrowsers = new Array ( new mo_supportedBrowser ('Netscape','Win32','3.01'), new mo_supportedBrowser ('Netscape','MacPPC','3.01') /* new mo_supportedBrowser ('Microsoft Internet Explorer','Win32','4.0') */ ); function mo_stringHasAny (sourceStr) { var result = false; for (var argNo = 1; argNo < mo_stringHasAny.arguments.length && !result; argNo++) result = sourceStr.indexOf (mo_stringHasAny.arguments [argNo]) != -1 ; return result; } with (navigator) { if (mo_stringHasAny (userAgent,'Win95','Windows 95','WinNT','Windows NT','Win98','Windows 98')) { mo_platform = 'Win32'; } else if (userAgent.indexOf ('PPC') != -1) { mo_platform = 'MacPPC'; } mo_browserVersion = mo_retrieveVersion (navigator.appVersion); mo_browserSupported = false; for (mo_browserNo in mo_supportedBrowsers) { mo_browser = mo_supportedBrowsers [mo_browserNo]; if (mo_browser.name == appName && mo_browser.platform == mo_platform && mo_meetsMinVersion (mo_browserVersion,mo_browser.minVersion)) { mo_browserSupported = true; break; } } if (mo_browserSupported) { if (appName == 'Netscape') { mo_BeatnikType = 'Plug-in'; for (mo_pluginNo = 0; mo_pluginNo < plugins.length; mo_pluginNo++) { if (plugins [mo_pluginNo].name.indexOf ('Beatnik') != -1 && plugins [mo_pluginNo].name.indexOf ('Stub') == -1) { mo_BeatnikVersion = mo_retrieveVersion (plugins [mo_pluginNo].name); if (mo_BeatnikVersion == '' && mo_platform == 'Mac') mo_BeatnikVersion = '1.1.7'; mo_hasBeatnik = true; break; } } mo_hasCallbackIssue = mo_browserVersion.indexOf ('4.') == 0 && mo_hasMinVersion ('1.3') && navigator.javaEnabled (); } else if (appName == 'Microsoft Internet Explorer') { mo_BeatnikType = 'ActiveX'; document.writeln ( '' + '' + '' + '' ); mo_hasBeatnik = typeof (document.mo_testInstance.getVersion) != 'undefined'; if (mo_hasBeatnik) mo_BeatnikVersion = mo_retrieveVersion (document.mo_testInstance.getVersion ()); } } } mo_attrNames = new Array ('SRC','TYPE','WIDTH','HEIGHT','NAME','AUTOSTART','LOOP','VOLUME','ALIGN','HSPACE','VSPACE','BGCOLOR','PLUGINSPAGE','HIDDEN','DISPLAY','MODE','GROOVOID','ONREADY','ONPLAY','ONPAUSE','ONSTOP','ONMETAEVENT','CALLBACKS','METAEVENTS'); mo_attribs = new Array (); mo_noteNumbers = new Array (); mo_noteNumbers ['c'] = 0; mo_noteNumbers ['d'] = 2; mo_noteNumbers ['e'] = 4; mo_noteNumbers ['f'] = 5; mo_noteNumbers ['g'] = 7; mo_noteNumbers ['a'] = 9; mo_noteNumbers ['b'] = 11; mo_noteNames = new Array ('C','C#','D','D#','E','F','F#','G','G#','A','A#','B'); function mo_promptClose () { if (typeof (mo_promptWindow) == 'object') mo_promptWindow.close (); window.focus (); } function mo_promptUser (heading,message,okText,okAction,cancelText,cancelAction,showStatus) { mo_promptWindow = window.open ('','mo_promptWindow','toolbar=no,location=no,directories=no,status=' + ((showStatus || navigator.appName == 'Microsoft Internet Explorer') ? 'yes' : 'no') + ',menubar=no,scrollbars=no,resizable=yes,width=400,height=300'); if (typeof (okAction) != 'string' || okAction == '') okAction = 'mo_promptClose ()'; if (typeof (cancelAction) != 'string' || cancelAction == '') cancelAction = 'mo_promptClose ()'; if (typeof (heading) != 'string') heading = ''; with (mo_promptWindow.document) { open ('text/html'); writeln ( '' + heading + '
Make your own free website on Tripod.com
' + '
' ); if (heading != '') writeln (''); writeln ( '
' + heading + '
' + message + '

' + '
' ); if (typeof (cancelText) == 'string' && cancelText != '') writeln ('') ; writeln (''); if (typeof (okText) == 'string' && okText != '') writeln ('') ; writeln ('

'); close (); if (typeof (Event) != 'undefined') { mo_promptWindow.captureEvents (Event.KEYUP); mo_promptWindow.onKeyUp = new Function ('event','if (event.which == 13) {' + okAction + '} else if (event.which == 27) {' + cancelAction + '}; return false'); mo_promptWindow.focus (); } } } function mo_installBeatnik () { mo_promptWindow = window.open ('http://www.headspace.com/beatnik/player/install-wizard.html','mo_promptWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width=400,height=300'); } function mo_indexOf (sourceStr,searchStr,startPos) { var result = sourceStr.indexOf (searchStr,startPos); if (result == -1) result = sourceStr.length; return result; } function mo_voice_free () { with (this) { if (musicObjectID.ready) { musicObjectID.playerID.noteOff (channelNo,noteNo,127); clearTimeout (noteOffTimeout); channelNo = 0; } } } function mo_voice (musicObjectID,channelNo,noteNo) { /*** Constructor Variables ***/ this.musicObjectID = musicObjectID; this.channelNo = channelNo; this.noteNo = noteNo; /*** Instance State Variables ***/ this.timeStamp = 0; this.noteOffTimeout = setTimeout ('',0); /*** Object's Exposed Methods ***/ this.free = mo_voice_free; } mo_polyphony = 32; mo_voices = new Array (); mo_newVoice = new mo_voice (null,0,0); for (mo_voiceNo = 0; mo_voiceNo < mo_polyphony; mo_voiceNo++) mo_voices [mo_voiceNo] = new mo_voice (null,0,0) ; function mo_isPlayerCompatible (minVersion,silentIfInadequate,showCompatibilityPrompt) { if (mo_browserSupported) { if (typeof (silentIfInadequate) == 'boolean') mo_silentIfInadequate = silentIfInadequate; if (typeof (showCompatibilityPrompt) == 'boolean') mo_showCompatibilityPrompt = showCompatibilityPrompt; else showCompatibilityPrompt = mo_showCompatibilityPrompt; if (typeof (minVersion) == 'string') mo_requiredMinVersion = minVersion; else minVersion = mo_requiredMinVersion; if (mo_hasBeatnik) { if (mo_hasMinVersion (minVersion)) { return true; } else { if (showCompatibilityPrompt) mo_promptUser ('Please Upgrade Beatnik','This page has been optimized for the features of version ' + minVersion + ' (or higher) of the Beatnik Player. The currently installed version in your browser is ' + mo_BeatnikVersion + '.

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_installBeatnik ()','IGNORE','mo_promptClose ()'); return false; } } else { if (showCompatibilityPrompt) 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_installBeatnik ()','IGNORE','mo_promptClose ()'); return false; } } else return false; } function mo_requireJava () { mo_ignoreJavaDisabled = true; if (navigator.appName == 'Netscape' && !navigator.javaEnabled ()) { 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 ()'); } } /*** musicObject class definition ***/ function mo_null () { if (this.ready) mo_debug ('Attempted to use a method not supported in this version of the Beatnik Player.',window.location.href,'unknown'); else if (!mo_ignoreNotReady) mo_debug ('musicObject instance "' + this.objectName + '" is not yet ready for scripting control.',window.location.href,'unknown'); } function mo_execCallback (callbackFunction) { if (typeof (callbackFunction) == 'string') eval (callbackFunction); else if (typeof (callbackFunction) == 'function') callbackFunction (); } function mo_execWindowOnload () { eval (mo_windowOnloadStr); if (typeof (mo_windowOnload) == 'function') mo_windowOnload (); } function mo_magicEmbed (embedTag) { if (typeof (mo_playerCompatible) != 'boolean') mo_playerCompatible = mo_isPlayerCompatible (mo_requiredMinVersion,null,mo_showCompatibilityPrompt); var subChar, isMethod = typeof (this.playerID) != 'undefined' ; if (!isMethod || typeof (this.playerName) != 'string') { for (var attrNo in mo_attrNames) mo_attribs [mo_attrNames [attrNo]] = null; with (this) { mo_attribs ['TYPE'] = ''; if (isMethod) { this.playerName = objectName + 'Plugin'; mo_attribs ['NAME'] = playerName; mo_attribs ['ONREADY'] = objectName + '.setReady ()'; mo_attribs ['ONPLAY'] = objectName + '.execOnPlay ()'; mo_attribs ['ONPAUSE'] = objectName + '.execOnPause ()'; mo_attribs ['ONSTOP'] = objectName + '.execOnStop ()'; mo_attribs ['ONMETAEVENT'] = objectName + '.execOnMetaEvent ()'; mo_attribs ['METAEVENTS'] = 'FALSE'; } mo_attribs ['AUTOSTART'] = 'TRUE'; mo_attribs ['WIDTH'] = '144'; mo_attribs ['HEIGHT'] = '60'; mo_attribs ['HSPACE'] = '0'; mo_attribs ['VSPACE'] = '0'; mo_attribs ['BGCOLOR'] = document.bgColor; mo_attribs ['VOLUME'] = '100'; mo_attribs ['PLUGINSPAGE'] = 'http://www.headspace.com/to/?plug-in'; var tagEndFound = false, tagStartPos = 0, spacePos = mo_indexOf (embedTag,' ',tagStartPos), closePos = mo_indexOf (embedTag,'>',tagStartPos), tagNameEndPos = spacePos ; if (closePos < tagNameEndPos) { tagNameEndPos = closePos; tagEndFound = true; } var tagName = embedTag.substring (tagStartPos + 1,tagNameEndPos).toUpperCase (); if (tagName == 'EMBED') { var attrStartPos = tagNameEndPos; while (!tagEndFound) { var attrFound = false; while (!tagEndFound && !attrFound) { subChar = embedTag.charAt (attrStartPos); if (subChar != ' ') { if (subChar == '>') tagEndFound = true; else attrFound = true; } else attrStartPos++; } if (attrFound) { var equalPos = mo_indexOf (embedTag,'=',attrStartPos), spacePos = mo_indexOf (embedTag,' ',attrStartPos), closePos = mo_indexOf (embedTag,'>',attrStartPos), attrNameEndPos = equalPos, hasValue = true ; if (spacePos < attrNameEndPos) { attrNameEndPos = spacePos; hasValue = false; } if (closePos < attrNameEndPos) { attrNameEndPos = closePos; hasValue = false; tagEndFound = true; } var attrName = embedTag.substring (attrStartPos,attrNameEndPos).toUpperCase (), attrValuePos = attrNameEndPos + 1, attrValue = '' ; if (hasValue) { var charCount = 0, attrValueEndFound = false, quoteChar = '', inEscape = false ; while (!attrValueEndFound && !tagEndFound) { subChar = embedTag.charAt (attrValuePos); if (subChar == '"' || subChar == "'") { if (charCount == 0) { quoteChar = subChar; subChar = ''; } else if (subChar == quoteChar && !inEscape) { attrValueEndFound = true; subChar = ''; } } else if (subChar == ' ') { if (quoteChar == '') { attrValueEndFound = true; subChar = ''; } } else if (subChar == '>') { if (quoteChar == '') { attrValueEndFound = true; tagEndFound = true; subChar = ''; } } else if (subChar == '\\') { if (!inEscape) { inEscape = true; subChar = ''; } else inEscape = false; } if (subChar != '\\') inEscape = false; attrValue += subChar; attrValuePos++; charCount++; } } attrStartPos = attrValuePos; mo_attribs [attrName] = attrValue; if (attrName == 'SRC' && mo_attribs ['TYPE'] == '') mo_attribs ['TYPE'] = 'audio/rmf'; } } } if (mo_attribs ['SRC'] == '') mo_attribs ['SRC'] = null; if (mo_attribs ['TYPE'] == '') mo_attribs ['TYPE'] = 'audio/rmf'; if (mo_attribs ['HIDDEN'] == '') mo_attribs ['HIDDEN'] = 'TRUE'; if (isMethod) { if (mo_attribs ['NAME'] == '') mo_attribs ['NAME'] = playerName; playerName = mo_attribs ['NAME']; } if (isMethod) { if (mo_hasCallbackIssue) { mo_attribs ['CALLBACKS'] = 'FALSE'; delayAutostart = mo_attribs ['AUTOSTART'].toUpperCase () == 'TRUE'; mo_attribs ['AUTOSTART'] = 'FALSE'; if (!mo_onloadStored) { mo_onloadStored = true; mo_windowOnload = window.onload; window.onload = mo_execWindowOnload; } mo_windowOnloadStr += objectName + '.enable ();'; } this.volume = mo_attribs ['VOLUME'] - 0; } with (document) { if (mo_enabled && mo_browserSupported && mo_hasBeatnik && (mo_playerCompatible || !mo_silentIfInadequate)) { if (mo_BeatnikType == 'Plug-in') { var newEmbedTag = '' + callbackHandler + ''); } } writeln (''); for (var attrNo in mo_attrNames) { if (mo_attribs [mo_attrNames [attrNo]] != null) writeln ('') ; } writeln (''); } } else { var tableDims = ' WIDTH=' + mo_attribs ['WIDTH'] + ' HEIGHT=' + mo_attribs ['HEIGHT'] + ' HSPACE=' + mo_attribs ['HSPACE'] + ' VSPACE=' + mo_attribs ['VSPACE'] + ((mo_attribs ['ALIGN'] != null) ? (' ALIGN=' + mo_attribs ['ALIGN']) : 'LEFT'); if (mo_enabled && mo_browserSupported && (mo_attribs ['HIDDEN'] == null || mo_attribs ['HIDDEN'].toUpperCase () != 'TRUE')) { writeln ('
' + (mo_hasBeatnik ? 'Upgrade' : 'Get') + ' Beatnik!
'); } else { writeln ('
'); } } } } } } function mo_stubEmbed (stubURL) { this.magicEmbed ('