/* COMMENTARY FUNCTIONS */
function switchVisibility(id) {
	if(document.getElementById(id).style.display == 'none')
		document.getElementById(id).style.display = 'block';
	else
		document.getElementById(id).style.display = 'none';
}
function switchOn(id) {
    document.getElementById(id).src = 'data/images/'+id+'_on.jpg';
}
function switchOff(id) {
    document.getElementById(id).src = 'data/images/'+id+'_off.jpg';
}

function previewGuest(id) {
    name = document.getElementById('name').value;
    homepage = document.getElementById('homepage').value;
    email = document.getElementById('email').value;
    message = document.getElementById('message').value;

    url = 'ajax_preview.php5';
    attributes = 'name='+name+"&homepage="+homepage+"&email="+email+"&message="+message;

    setRequest(url,attributes,id);
}

function sendOrder(id) {
    firstname = document.getElementById('firstname').value;
    lastname = document.getElementById('lastname').value;
    email = document.getElementById('email').value;

    //tickets = document.getElementById('tickets').value;
    tickets = document.orderform.tickets[document.orderform.tickets.selectedIndex].value;
    message = document.getElementById('message').value;

    url = 'ajax_order.php5';
    attributes = 'firstname='+firstname+"&lastname="+lastname+"&email="+email+"&message="+message+"&tickets="+tickets;

    setRequest(url,attributes,id);

    if(tickets != "" && firstname != "" && lastname != "" && email != "" && EMail(email)) {
        document.getElementById('firstname').value = "";
        document.getElementById('lastname').value = "";
        document.getElementById('email').value = "";
        document.getElementById('message').value = "";
    }
}

function EMail(s) {
    var a = false;
    var res = false;
    if(typeof(RegExp) == 'function') {
        var b = new RegExp('abc');
        if(b.test('abc') == true){a = true;}
    }

    if(a == true) {
        reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+
                         '(\\@)([a-zA-Z0-9\\-\\.]+)'+
                         '(\\.)([a-zA-Z]{2,4})$');
        res = (reg.test(s));
    }else{
        res = (s.search('@') >= 1 &&
        s.lastIndexOf('.') > s.search('@') &&
        s.lastIndexOf('.') >= s.length-5)
    }
    return(res);
}

/**
 * FlashObject v1.2.3: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2005 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof com == "undefined") var com = new Object();
if(typeof com.deconcept == "undefined") com.deconcept = new Object();
if(typeof com.deconcept.util == "undefined") com.deconcept.util = new Object();
if(typeof com.deconcept.FlashObjectUtil == "undefined") com.deconcept.FlashObjectUtil = new Object();
com.deconcept.FlashObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, redirectUrl, detectKey){
   this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
   this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY);
   this.params = new Object();
   this.variables = new Object();
   this.attributes = new Array();

   if(swf) this.setAttribute('swf', swf);
   if(id) this.setAttribute('id', id);
   if(w) this.setAttribute('width', w);
   if(h) this.setAttribute('height', h);
   if(ver) this.setAttribute('version', new com.deconcept.PlayerVersion(ver.toString().split(".")));
   if(c) this.addParam('bgcolor', c);
   var q = quality ? quality : 'high';
   this.addParam('quality', q);
   this.setAttribute('redirectUrl', '');
   if(redirectUrl) this.setAttribute('redirectUrl', redirectUrl);
   if(useExpressInstall) {
   // check to see if we need to do an express install
   var expressInstallReqVer = new com.deconcept.PlayerVersion([6,0,65]);
   var installedVer = com.deconcept.FlashObjectUtil.getPlayerVersion();
      if (installedVer.versionIsValid(expressInstallReqVer) && !installedVer.versionIsValid(this.getAttribute('version'))) {
         this.setAttribute('doExpressInstall', true);
      }
   } else {
      this.setAttribute('doExpressInstall', false);
   }
}
com.deconcept.FlashObject.prototype.setAttribute = function(name, value){
	this.attributes[name] = value;
}
com.deconcept.FlashObject.prototype.getAttribute = function(name){
	return this.attributes[name];
}
com.deconcept.FlashObject.prototype.getAttributes = function(){
	return this.attributes;
}
com.deconcept.FlashObject.prototype.addParam = function(name, value){
	this.params[name] = value;
}
com.deconcept.FlashObject.prototype.getParams = function(){
	return this.params;
}
com.deconcept.FlashObject.prototype.getParam = function(name){
	return this.params[name];
}
com.deconcept.FlashObject.prototype.addVariable = function(name, value){
	this.variables[name] = value;
}
com.deconcept.FlashObject.prototype.getVariable = function(name){
	return this.variables[name];
}
com.deconcept.FlashObject.prototype.getVariables = function(){
	return this.variables;
}
com.deconcept.FlashObject.prototype.getParamTags = function(){
   var paramTags = ""; var key; var params = this.getParams();
   for(key in params) {
        paramTags += '<param name="' + key + '" value="' + params[key] + '" />';
    }
   return paramTags;
}
com.deconcept.FlashObject.prototype.getVariablePairs = function(){
	var variablePairs = new Array();
	var key;
	var variables = this.getVariables();
	for(key in variables){
		variablePairs.push(key +"="+ variables[key]);
	}
	return variablePairs;
}
com.deconcept.FlashObject.prototype.getHTML = function() {
    var flashHTML = "";
    if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
        flashHTML += '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') + '" name="'+ this.getAttribute('id') +'"';
		var params = this.getParams();
        for(var key in params){ flashHTML += ' '+ key +'="'+ params[key] +'"'; }
		pairs = this.getVariablePairs().join("&");
        if (pairs.length > 0){ flashHTML += ' flashvars="'+ pairs +'"'; }
        flashHTML += '></embed>';
    } else { // PC IE
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
        flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') +'">';
        flashHTML += '<param name="movie" value="' + this.getAttribute('swf') + '" />';
		var tags = this.getParamTags();
        if(tags.length > 0){ flashHTML += tags; }
		var pairs = this.getVariablePairs().join("&");
        if(pairs.length > 0){ flashHTML += '<param name="flashvars" value="'+ pairs +'" />'; }
        flashHTML += '</object>';
    }
    return flashHTML;
}
com.deconcept.FlashObject.prototype.write = function(elementId){
	if(this.skipDetect || this.getAttribute('doExpressInstall') || com.deconcept.FlashObjectUtil.getPlayerVersion().versionIsValid(this.getAttribute('version'))){
		if(document.getElementById){
		   if (this.getAttribute('doExpressInstall')) {
		      this.addVariable("MMredirectURL", escape(window.location));
		      document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		      this.addVariable("MMdoctitle", document.title);
		   }
			document.getElementById(elementId).innerHTML = this.getHTML();
		}
	}else{
		if(this.getAttribute('redirectUrl') != "") {
			document.location.replace(this.getAttribute('redirectUrl'));
		}
	}
}
/* ---- detection functions ---- */
com.deconcept.FlashObjectUtil.getPlayerVersion = function(){
   var PlayerVersion = new com.deconcept.PlayerVersion(0,0,0);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (window.ActiveXObject){
	   try {
   	   var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
   		PlayerVersion = new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
	   } catch (e) {}
	}
	return PlayerVersion;
}
com.deconcept.PlayerVersion = function(arrVersion){
	this.major = parseInt(arrVersion[0]) || 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
}
com.deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
com.deconcept.util.getRequestParameter = function(param){
	var q = document.location.search || document.location.href.hash;
	if(q){
		var startIndex = q.indexOf(param +"=");
		var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
		if (q.length > 1 && startIndex > -1) {
			return q.substring(q.indexOf("=", startIndex)+1, endIndex);
		}
	}
	return "";
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use / backwards compatibility */
var getQueryParamValue = com.deconcept.util.getRequestParameter;
var FlashObject = com.deconcept.FlashObject;


/*!
   SoundManager 2: Javascript Sound for the Web
   --------------------------------------------
   http://schillmania.com/projects/soundmanager2/

   Copyright (c) 2008, Scott Schiller. All rights reserved.
   Code licensed under the BSD License:
   http://schillmania.com/projects/soundmanager2/license.txt

   V2.95a.20090717
*/

var soundManager = null;

function SoundManager(smURL,smID) {

  this.flashVersion = 8;           // version of flash to require, either 8 or 9. Some API features require Flash 9.
  this.debugMode = true;           // enable debugging output (div#soundmanager-debug, OR console if available + configured)
  this.useConsole = true;          // use firebug/safari console.log()-type debug console if available
  this.consoleOnly = false;        // if console is being used, do not create/write to #soundmanager-debug
  this.waitForWindowLoad = false;  // force SM2 to wait for window.onload() before trying to call soundManager.onload()
  this.nullURL = 'null.mp3';       // path to "null" (empty) MP3 file, used to unload sounds (Flash 8 only)
  this.allowPolling = true;        // allow flash to poll for status update (required for whileplaying() events, peak, sound spectrum functions to work.)
  this.useFastPolling = false;     // uses 1 msec flash timer interval (vs. default of 20) for higher callback frequency, best combined with useHighPerformance
  this.useMovieStar = false;	   // enable support for Flash 9.0r115+ (codename "MovieStar") MPEG4 audio + video formats (AAC, M4V, FLV, MOV etc.)
  this.bgColor = '#ffffff';	       // movie (.swf) background color, '#000000' useful if showing on-screen/full-screen video etc.
  this.useHighPerformance = false; // position:fixed flash movie can help increase js/flash speed, minimize lag
  this.flashLoadTimeout = 1000;    // msec to wait for flash movie to load before failing (0 = infinity)
  this.wmode = null;	   		   // mode to render the flash movie in - null, transparent, opaque (last two allow layering of HTML on top)
  this.allowFullScreen = true;     // enter full-screen (via double-click on movie) for flash 9+ video

  this.defaultOptions = {
    'autoLoad': false,             // enable automatic loading (otherwise .load() will be called on demand with .play(), the latter being nicer on bandwidth - if you want to .load yourself, you also can)
    'stream': true,                // allows playing before entire file has loaded (recommended)
    'autoPlay': false,             // enable playing of file as soon as possible (much faster if "stream" is true)
    'onid3': null,                 // callback function for "ID3 data is added/available"
    'onload': null,                // callback function for "load finished"
    'whileloading': null,          // callback function for "download progress update" (X of Y bytes received)
    'onplay': null,                // callback for "play" start
    'onpause': null,               // callback for "pause"
    'onresume': null,              // callback for "resume" (pause toggle)
    'whileplaying': null,          // callback during play (position update)
    'onstop': null,                // callback for "user stop"
    'onfinish': null,              // callback function for "sound finished playing"
    'onbeforefinish': null,        // callback for "before sound finished playing (at [time])"
    'onbeforefinishtime': 5000,    // offset (milliseconds) before end of sound to trigger beforefinish (eg. 1000 msec = 1 second)
    'onbeforefinishcomplete':null, // function to call when said sound finishes playing
    'onjustbeforefinish':null,     // callback for [n] msec before end of current sound
    'onjustbeforefinishtime':200,  // [n] - if not using, set to 0 (or null handler) and event will not fire.
    'multiShot': true,             // let sounds "restart" or layer on top of each other when played multiple times, rather than one-shot/one at a time
    'multiShotEvents': false,      // fire multiple sound events (currently onfinish() only) when multiShot is enabled
    'position': null,              // offset (milliseconds) to seek to within loaded sound data.
    'pan': 0,                      // "pan" settings, left-to-right, -100 to 100
    'volume': 100                  // self-explanatory. 0-100, the latter being the max.
  };

  this.flash9Options = {           // flash 9-only options, merged into defaultOptions if flash 9 is being used
    'isMovieStar': null,	  	   // "MovieStar" MPEG4 audio/video mode. Null (default) = auto detect MP4, AAC etc. based on URL. true = force on, ignore URL
    'usePeakData': false,          // enable left/right channel peak (level) data
    'useWaveformData': false,      // enable sound spectrum (raw waveform data) - WARNING: CPU-INTENSIVE: may set CPUs on fire.
    'useEQData': false,            // enable sound EQ (frequency spectrum data) - WARNING: Also CPU-intensive.
    'onbufferchange': null,	   	   // callback for "isBuffering" property change
    'ondataerror': null			   // callback for waveform/eq data access error (flash playing audio in other tabs/domains)
  };

  this.movieStarOptions = {        // flash 9.0r115+ MPEG4 audio/video options, merged into defaultOptions if flash 9 + movieStar mode is enabled
    'onmetadata': null,		   	   // callback for when video width/height etc. are received
    'useVideo': false,		   	   // if loading movieStar content, whether to show video
    'bufferTime': null		   	   // seconds of data to buffer before playback begins (null = flash default of 0.1 seconds - if AAC playback is gappy, try up to 3 seconds)
  };

// jslint global declarations
/*global SM2_DEFER, sm2Debugger, alert, console, document, navigator, setTimeout, window */

var SMSound = null; // defined later

var _s = this;
this.version = null;
this.versionNumber = 'V2.95a.20090717';
this.movieURL = null;
this.url = null;
this.altURL = null;
this.swfLoaded = false;
this.enabled = false;
this.o = null;
this.id = (smID||'sm2movie');
this.oMC = null;
this.sounds = {};
this.soundIDs = [];
this.muted = false;
this.isFullScreen = false; // set later by flash 9+
this.isIE = (navigator.userAgent.match(/MSIE/i));
this.isSafari = (navigator.userAgent.match(/safari/i));
this.debugID = 'soundmanager-debug';
this.debugURLParam = /([#?&])debug=1/i;
this.specialWmodeCase = false;
this._onready = [];
this._debugOpen = true;
this._didAppend = false;
this._appendSuccess = false;
this._didInit = false;
this._disabled = false;
this._windowLoaded = false;
this._hasConsole = (typeof console != 'undefined' && typeof console.log != 'undefined');
this._debugLevels = ['log','info','warn','error'];
this._defaultFlashVersion = 8;
this._oRemoved = null;
this._oRemovedHTML = null;

var _$ = function(sID) {
return document.getElementById(sID);
};

this.filePatterns = {
flash8: /\.mp3(\?.*)?$/i,
flash9: /\.mp3(\?.*)?$/i
};

this.netStreamTypes = ['aac','flv','mov','mp4','m4v','f4v','m4a','mp4v','3gp','3g2']; // Flash v9.0r115+ "moviestar" formats
this.netStreamPattern = new RegExp('\\.('+this.netStreamTypes.join('|')+')(\\?.*)?$','i');

this.filePattern = null;
this.features = {
buffering: false,
peakData: false,
waveformData: false,
eqData: false,
movieStar: false
};

this.sandbox = {
'type': null,
'types': {
  'remote': 'remote (domain-based) rules',
  'localWithFile': 'local with file access (no internet access)',
  'localWithNetwork': 'local with network (internet access only, no local access)',
  'localTrusted': 'local, trusted (local + internet access)'
},
'description': null,
'noRemote': null,
'noLocal': null
};

this._setVersionInfo = function() {
if (_s.flashVersion != 8 && _s.flashVersion != 9) {
  alert('soundManager.flashVersion must be 8 or 9. "'+_s.flashVersion+'" is invalid. Reverting to '+_s._defaultFlashVersion+'.');
  _s.flashVersion = _s._defaultFlashVersion;
}
_s.version = _s.versionNumber+(_s.flashVersion==9?' (AS3/Flash 9)':' (AS2/Flash 8)');
// set up default options
if (_s.flashVersion > 8) {
  _s.defaultOptions = _s._mergeObjects(_s.defaultOptions,_s.flash9Options);
  _s.features.buffering = true;
}
if (_s.flashVersion > 8 && _s.useMovieStar) {
  // flash 9+ support for movieStar formats as well as MP3
  _s.defaultOptions = _s._mergeObjects(_s.defaultOptions,_s.movieStarOptions);
  _s.filePatterns.flash9 = new RegExp('\\.(mp3|'+_s.netStreamTypes.join('|')+')(\\?.*)?$','i');
  _s.features.movieStar = true;
} else {
  _s.useMovieStar = false;
  _s.features.movieStar = false;
}
_s.filePattern = _s.filePatterns[(_s.flashVersion!=8?'flash9':'flash8')];
_s.movieURL = (_s.flashVersion==8?'soundmanager2.swf':'soundmanager2_flash9.swf');
_s.features.peakData = _s.features.waveformData = _s.features.eqData = (_s.flashVersion>8);
};

this._overHTTP = (document.location?document.location.protocol.match(/http/i):null);
this._waitingforEI = false;
this._initPending = false;
this._tryInitOnFocus = (this.isSafari && typeof document.hasFocus == 'undefined');
this._isFocused = (typeof document.hasFocus != 'undefined'?document.hasFocus():null);
this._okToDisable = !this._tryInitOnFocus;

this.useAltURL = !this._overHTTP; // use altURL if not "online"

var flashCPLink = 'http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html';

this.strings = {
notReady: 'Not loaded yet - wait for soundManager.onload() before calling sound-related methods',
appXHTML: 'soundManager._createMovie(): appendChild/innerHTML set failed. May be app/xhtml+xml DOM-related.',
localFail: 'soundManager: Loading this page from local/network file system (not over HTTP?) Flash security likely restricting JS-Flash access. Consider adding current URL to "trusted locations" in the Flash player security settings manager at '+flashCPLink+', or simply serve this content over HTTP.',
waitFocus: 'soundManager: Special case: Waiting for focus-related event..',
waitImpatient: 'soundManager: Getting impatient, still waiting for Flash.. ;)',
waitForever: 'soundManager: Waiting indefinitely for Flash...',
needFunction: 'soundManager.onready(): Function object expected'
};

// --- public methods ---

this.supported = function() {
return (_s._didInit && !_s._disabled);
};

this.getMovie = function(smID) {
return _s.isIE?window[smID]:(_s.isSafari?_$(smID)||document[smID]:_$(smID));
};

this.loadFromXML = function(sXmlUrl) {
try {
  _s.o._loadFromXML(sXmlUrl);
} catch(e) {
  _s._failSafely();
  return true;
}
};

this.createSound = function(oOptions) {
var _cs = 'soundManager.createSound(): ';
if (!_s._didInit) {
  throw _s._complain(_cs+_s.strings.notReady,arguments.callee.caller);
}
if (arguments.length == 2) {
  // function overloading in JS! :) ..assume simple createSound(id,url) use case
  oOptions = {'id':arguments[0],'url':arguments[1]};
}
var thisOptions = _s._mergeObjects(oOptions); // inherit SM2 defaults
var _tO = thisOptions; // alias
if (_tO.id.toString().charAt(0).match(/^[0-9]$/)) { // hopefully this isn't buggy regexp-fu. :D
  var complaint = _cs+'Warning: Sound ID "'+_tO.id+'" should be a string, starting with a non-numeric character';
  _s._wD(complaint,2);
}
_s._wD(_cs+_tO.id+' ('+_tO.url+')',1);
if (_s._idCheck(_tO.id,true)) {
  _s._wD(_cs+_tO.id+' exists',1);
  return _s.sounds[_tO.id];
}
if (_s.flashVersion > 8 && _s.useMovieStar) {
  if (_tO.isMovieStar === null) {
    _tO.isMovieStar = (_tO.url.match(_s.netStreamPattern)?true:false);
  }
  if (_tO.isMovieStar) {
    _s._wD(_cs+'using MovieStar handling');
  }
  if (_tO.isMovieStar && (_tO.usePeakData || _tO.useWaveformData || _tO.useEQData)) {
    _s._wD('Warning: peak/waveform/eqData features unsupported for non-MP3 formats');
    _tO.usePeakData = false;
    _tO.useWaveformData = false;
    _tO.useEQData = false;
  }
}
_s.sounds[_tO.id] = new SMSound(_tO);
_s.soundIDs[_s.soundIDs.length] = _tO.id;
// AS2:
if (_s.flashVersion == 8) {
  _s.o._createSound(_tO.id,_tO.onjustbeforefinishtime);
} else {
  _s.o._createSound(_tO.id,_tO.url,_tO.onjustbeforefinishtime,_tO.usePeakData,_tO.useWaveformData,_tO.useEQData,_tO.isMovieStar,(_tO.isMovieStar?_tO.useVideo:false),(_tO.isMovieStar?_tO.bufferTime:false));
}
if (_tO.autoLoad || _tO.autoPlay) {
  // TODO: does removing timeout here cause problems?
    if (_s.sounds[_tO.id]) {
      _s.sounds[_tO.id].load(_tO);
    }
}
if (_tO.autoPlay) {
  _s.sounds[_tO.id].play();
}
return _s.sounds[_tO.id];
};

this.createVideo = function(oOptions) {
if (arguments.length==2) {
  oOptions = {'id':arguments[0],'url':arguments[1]};
}
if (_s.flashVersion >= 9) {
  oOptions.isMovieStar = true;
  oOptions.useVideo = true;
} else {
  _s._wD('soundManager.createVideo(): flash 9 required for video. Exiting.',2);
  return false;
}
if (!_s.useMovieStar) {
  _s._wD('soundManager.createVideo(): MovieStar mode not enabled. Exiting.',2);
}
return _s.createSound(oOptions);
};

this.destroySound = function(sID,bFromSound) {
// explicitly destroy a sound before normal page unload, etc.
if (!_s._idCheck(sID)) {
  return false;
}
for (var i=0; i<_s.soundIDs.length; i++) {
  if (_s.soundIDs[i] == sID) {
    _s.soundIDs.splice(i,1);
    continue;
  }
}
// conservative option: avoid crash with ze flash 8
// calling destroySound() within a sound onload() might crash firefox, certain flavours of winXP + flash 8??
// if (_s.flashVersion != 8) {
  _s.sounds[sID].unload();
// }
if (!bFromSound) {
  // ignore if being called from SMSound instance
  _s.sounds[sID].destruct();
}
delete _s.sounds[sID];
};

this.destroyVideo = this.destroySound;

this.load = function(sID,oOptions) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].load(oOptions);
};

this.unload = function(sID) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].unload();
};

this.play = function(sID,oOptions) {
if (!_s._didInit) {
  throw _s._complain('soundManager.play(): '+_s.strings.notReady,arguments.callee.caller);
}
if (!_s._idCheck(sID)) {
  if (typeof oOptions != 'Object') {
    oOptions = {url:oOptions}; // overloading use case: play('mySound','/path/to/some.mp3');
  }
  if (oOptions && oOptions.url) {
    // overloading use case, creation + playing of sound: .play('someID',{url:'/path/to.mp3'});
    _s._wD('soundController.play(): attempting to create "'+sID+'"',1);
    oOptions.id = sID;
    _s.createSound(oOptions);
  } else {
    return false;
  }
}
_s.sounds[sID].play(oOptions);
};

this.start = this.play; // just for convenience

this.setPosition = function(sID,nMsecOffset) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].setPosition(nMsecOffset);
};

this.stop = function(sID) {
if (!_s._idCheck(sID)) {
  return false;
}
_s._wD('soundManager.stop('+sID+')',1);
_s.sounds[sID].stop();
};

this.stopAll = function() {
_s._wD('soundManager.stopAll()',1);
for (var oSound in _s.sounds) {
  if (_s.sounds[oSound] instanceof SMSound) {
    _s.sounds[oSound].stop(); // apply only to sound objects
  }
}
};

this.pause = function(sID) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].pause();
};

this.pauseAll = function() {
for (var i=_s.soundIDs.length; i--;) {
  _s.sounds[_s.soundIDs[i]].pause();
}
};

this.resume = function(sID) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].resume();
};

this.resumeAll = function() {
for (var i=_s.soundIDs.length; i--;) {
  _s.sounds[_s.soundIDs[i]].resume();
}
};

this.togglePause = function(sID) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].togglePause();
};

this.setPan = function(sID,nPan) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].setPan(nPan);
};

this.setVolume = function(sID,nVol) {
if (!_s._idCheck(sID)) {
  return false;
}
_s.sounds[sID].setVolume(nVol);
};

this.mute = function(sID) {
if (typeof sID != 'string') {
  sID = null;
}
if (!sID) {
  _s._wD('soundManager.mute(): Muting all sounds');
  for (var i=_s.soundIDs.length; i--;) {
    _s.sounds[_s.soundIDs[i]].mute();
  }
  _s.muted = true;
} else {
  if (!_s._idCheck(sID)) {
    return false;
  }
  _s._wD('soundManager.mute(): Muting "'+sID+'"');
  _s.sounds[sID].mute();
}
};

this.muteAll = function() {
_s.mute();
};

this.unmute = function(sID) {
if (typeof sID != 'string') {
  sID = null;
}
if (!sID) {
  _s._wD('soundManager.unmute(): Unmuting all sounds');
  for (var i=_s.soundIDs.length; i--;) {
    _s.sounds[_s.soundIDs[i]].unmute();
  }
  _s.muted = false;
} else {
  if (!_s._idCheck(sID)) {
    return false;
  }
  _s._wD('soundManager.unmute(): Unmuting "'+sID+'"');
  _s.sounds[sID].unmute();
}
};

this.unmuteAll = function() {
_s.unmute();
};

this.toggleMute = function(sID) {
if (!_s._idCheck(sID)) {
return false;
}
_s.sounds[sID].toggleMute();
};

this.getMemoryUse = function() {
if (_s.flashVersion == 8) {
  // not supported in Flash 8
  return 0;
}
if (_s.o) {
  return parseInt(_s.o._getMemoryUse(),10);
}
};

this.disable = function(bNoDisable) {
// destroy all functions
if (typeof bNoDisable == 'undefined') {
  bNoDisable = false;
}
if (_s._disabled) {
  return false;
}
_s._disabled = true;
_s._wD('soundManager.disable(): Shutting down',1);
for (var i=_s.soundIDs.length; i--;) {
  _s._disableObject(_s.sounds[_s.soundIDs[i]]);
}
_s.initComplete(bNoDisable); // fire "complete", despite fail
// _s._disableObject(_s); // taken out to allow reboot()
};

this.canPlayURL = function(sURL) {
return (sURL?(sURL.match(_s.filePattern)?true:false):null);
};

this.getSoundById = function(sID,suppressDebug) {
if (!sID) {
  throw new Error('SoundManager.getSoundById(): sID is null/undefined');
}
var result = _s.sounds[sID];
if (!result && !suppressDebug) {
  _s._wD('"'+sID+'" is an invalid sound ID.',2);
  // soundManager._wD('trace: '+arguments.callee.caller);
}
return result;
};

this.onready = function(oMethod,oScope) {
// queue a callback, with optional scope
// a status object will be passed to your handler
/*
soundManager.onready(function(oStatus) {
  alert('SM2 init success: '+oStatus.success);
});
*/
if (oMethod && oMethod instanceof Function) {
  if (_s._didInit) {
    _s._wD('soundManager.onready(): Queueing handler');
  }
  if (!oScope) {
    oScope = window;
  }
  _s._addOnReady(oMethod,oScope);
  _s._processOnReady();
  return true;
} else {
  throw _s.strings.needFunction;
}
};

this.oninitmovie = function() {
// called after SWF has been appended to the DOM via JS (or retrieved from HTML)
// this is a stub for your own scripts.
};

this.onload = function() {
// window.onload() equivalent for SM2, ready to create sounds etc.
// this is a stub for your own scripts.
soundManager._wD('soundManager.onload()',1);
};

this.onerror = function() {
// stub for user handler, called when SM2 fails to load/init
};

// --- "private" methods ---

this._idCheck = this.getSoundById;

this._complain = function(sMsg,oCaller) {
// Try to create meaningful custom errors, w/stack trace to the "offending" line
var sPre = 'Error: ';
if (!oCaller) {
  return new Error(sPre+sMsg);
}
var e = new Error(''); // make a mistake.
var stackMsg = null;
if (e.stack) {
  // potentially dangerous: Try to return a meaningful stacktrace where provided (Mozilla)
  try {
    var splitChar = '@';
    var stackTmp = e.stack.split(splitChar);
    stackMsg = stackTmp[4]; // try to return only the relevant bit, skipping internal SM2 shiz
  } catch(ee) {
    // oops.
    stackMsg = e.stack;
  }
}
if (typeof console != 'undefined' && typeof console.trace != 'undefined') {
  console.trace();
}
var errorDesc = sPre+sMsg+'. \nCaller: '+oCaller.toString()+(e.stack?' \nTop of stacktrace: '+stackMsg:(e.message?' \nMessage: '+e.message:''));
// See JS error/debug/console output for real error source, stack trace / message detail where possible.
return new Error(errorDesc);
};

var _doNothing = function() {
return false;
};

_doNothing._protected = true;

this._disableObject = function(o) {
for (var oProp in o) {
  if (typeof o[oProp] == 'function' && typeof o[oProp]._protected == 'undefined') {
    o[oProp] = _doNothing;
  }
}
oProp = null;
};

this._failSafely = function(bNoDisable) {
// general failure exception handler
if (typeof bNoDisable == 'undefined') {
  bNoDisable = false;
}
if (!_s._disabled || bNoDisable) {
  _s._wD('soundManager: Failed to initialise.',2);
  _s.disable(bNoDisable);
}
};

this._normalizeMovieURL = function(smURL) {
var urlParams = null;
if (smURL) {
  if (smURL.match(/\.swf(\?.*)?$/i)) {
    urlParams = smURL.substr(smURL.toLowerCase().lastIndexOf('.swf?')+4);
    if (urlParams) {
      return smURL; // assume user knows what they're doing
    }
  } else if (smURL.lastIndexOf('/') != smURL.length-1) {
    smURL = smURL+'/';
  }
}
return(smURL && smURL.lastIndexOf('/')!=-1?smURL.substr(0,smURL.lastIndexOf('/')+1):'./')+_s.movieURL;
};

this._getDocument = function() {
return (document.body?document.body:(document.documentElement?document.documentElement:document.getElementsByTagName('div')[0]));
};

this._getDocument._protected = true;

this._setPolling = function(bPolling,bHighPerformance) {
if (!_s.o || !_s.allowPolling) {
  return false;
}
_s.o._setPolling(bPolling,bHighPerformance);
};

this._createMovie = function(smID,smURL) {
var specialCase = null;
var remoteURL = (smURL?smURL:_s.url);
var localURL = (_s.altURL?_s.altURL:remoteURL);
if (_s.debugURLParam.test(window.location.href.toString())) {
  _s.debugMode = true; // allow force of debug mode via URL
}
if (_s._didAppend && _s._appendSuccess) {
  return false; // ignore if already succeeded
}
_s._didAppend = true;

// safety check for legacy (change to Flash 9 URL)
_s._setVersionInfo();
_s.url = _s._normalizeMovieURL(_s._overHTTP?remoteURL:localURL);
smURL = _s.url;

if (_s.useHighPerformance && _s.useMovieStar && _s.defaultOptions.useVideo === true) {
  specialCase = 'soundManager note: disabling highPerformance, not applicable with movieStar mode + useVideo';
  _s.useHighPerformance = false;
}

_s.wmode = (!_s.wmode && _s.useHighPerformance && !_s.useMovieStar?'transparent':_s.wmode);
if (_s.wmode !== null && _s.flashLoadTimeout !== 0 && !_s.useHighPerformance && !_s.isIE && navigator.platform.match(/win32/i)) {
  _s.specialWmodeCase = true;
  // extra-special case: movie doesn't load until scrolled into view when using wmode = anything but 'window' here
  // does not apply when using high performance (position:fixed means on-screen), OR infinite flash load timeout
  _s._wD('soundManager note: Removing wmode, preventing off-screen SWF loading issue');
  _s.wmode = null;
}

if (_s.flashVersion == 8) {
  _s.allowFullScreen = false;
}

var oEmbed = {
  name: smID,
  id: smID,
  src: smURL,
  width: '100%',
  height: '100%',
  quality: 'high',
  allowScriptAccess: 'always',
  bgcolor: _s.bgColor,
  pluginspage: 'http://www.macromedia.com/go/getflashplayer',
  type: 'application/x-shockwave-flash',
  wmode: _s.wmode,
  allowfullscreen: (_s.allowFullScreen?'true':'false')
};

if (!_s.wmode) {
  delete oEmbed.wmode; // don't write empty attribute
}

var oMovie = null;
var tmp = null;

if (_s.isIE) {
  // IE is "special".
  oMovie = document.createElement('div');
  var movieHTML = '<object id="'+smID+'" data="'+smURL+'" type="application/x-shockwave-flash" width="100%" height="100%"><param name="movie" value="'+smURL+'" /><param name="AllowScriptAccess" value="always" /><param name="quality" value="high" />'+(_s.wmode?'<param name="wmode" value="'+_s.wmode+'" /> ':'')+'<param name="bgcolor" value="'+_s.bgColor+'" /><param name="allowFullScreen" value="'+(_s.allowFullScreen?'true':'false')+'" /><!-- --></object>';
} else {
  oMovie = document.createElement('embed');
  for (tmp in oEmbed) {
    if (oEmbed.hasOwnProperty(tmp)) {
      oMovie.setAttribute(tmp,oEmbed[tmp]);
    }
  }
}

var oD = document.createElement('div');
oD.id = _s.debugID+'-toggle';
var oToggle = {
  position: 'fixed',
  bottom: '0px',
  right: '0px',
  width: '1.2em',
  height: '1.2em',
  lineHeight: '1.2em',
  margin: '2px',
  textAlign: 'center',
  border: '1px solid #999',
  cursor: 'pointer',
  background: '#fff',
  color: '#333',
  zIndex: 10001
};

oD.appendChild(document.createTextNode('-'));
oD.onclick = _s._toggleDebug;
oD.title = 'Toggle SM2 debug console';

if (navigator.userAgent.match(/msie 6/i)) {
  oD.style.position = 'absolute';
  oD.style.cursor = 'hand';
}

for (tmp in oToggle) {
  if (oToggle.hasOwnProperty(tmp)) {
    oD.style[tmp] = oToggle[tmp];
  }
}

var oTarget = _s._getDocument();

if (oTarget) {

  _s.oMC = _$('sm2-container')?_$('sm2-container'):document.createElement('div');

  if (!_s.oMC.id) {
    _s.oMC.id = 'sm2-container';
    _s.oMC.className = 'movieContainer';
    // "hide" flash movie
    var s = null;
    var oEl = null;
    if (_s.useHighPerformance) {
      s = {
    position: 'fixed',
    width: '8px',
        height: '8px', // must be at least 6px for flash to run fast. odd? yes.
        bottom: '0px',
        left: '0px',
    overflow: 'hidden'
    // zIndex:-1 // sit behind everything else - potentially dangerous/buggy?
      };
    } else {
      s = {
        position: 'absolute',
    width: '8px',
        height: '8px',
        top: '-9999px',
        left: '-9999px'
      };
    }
    var x = null;
    for (x in s) {
      if (s.hasOwnProperty(x)) {
        _s.oMC.style[x] = s[x];
      }
    }
    try {
      if (!_s.isIE) {
        _s.oMC.appendChild(oMovie);
      }
      oTarget.appendChild(_s.oMC);
      if (_s.isIE) {
        oEl = _s.oMC.appendChild(document.createElement('div'));
        oEl.className = 'sm2-object-box';
        oEl.innerHTML = movieHTML;
      }
      _s._appendSuccess = true;
    } catch(e) {
      throw new Error(_s.strings.appXHTML);
    }
  } else {
    // it's already in the document.
    _s.oMC.appendChild(oMovie);
    if (_s.isIE) {
      oEl = _s.oMC.appendChild(document.createElement('div'));
      oEl.className = 'sm2-object-box';
      oEl.innerHTML = movieHTML;
    }
    _s._appendSuccess = true;
  }

  if (!_$(_s.debugID) && ((!_s._hasConsole||!_s.useConsole)||(_s.useConsole && _s._hasConsole && !_s.consoleOnly))) {
    var oDebug = document.createElement('div');
    oDebug.id = _s.debugID;
    oDebug.style.display = (_s.debugMode?'block':'none');
    if (_s.debugMode && !_$(oD.id)) {
      try {
        oTarget.appendChild(oD);
      } catch(e2) {
        throw new Error(_s.strings.appXHTML);
      }
      oTarget.appendChild(oDebug);
    }
  }
  oTarget = null;
}

if (specialCase) {
  _s._wD(specialCase);
}

_s._wD('-- SoundManager 2 '+_s.version+(_s.useMovieStar?', MovieStar mode':'')+(_s.useHighPerformance?', high performance mode, ':', ')+((_s.useFastPolling?'fast':'normal')+' polling mode')+(_s.wmode?', wmode: '+_s.wmode:'')+' --',1);
_s._wD('soundManager._createMovie(): Trying to load '+smURL+(!_s._overHTTP && _s.altURL?' (alternate URL)':''),1);
}
}
var set = 0;

function start_stop_sound() {

	if(set == 0) {
		soundManager.play('id','http://www.laut.fm/flash/lautfm.swf?skincolor=000000&login=sorf');
		document.getElementById('soundimage').src = "images/sound_pause.jpg";
		set=1;
	}else if(set==1){
		soundManager.pause('id');
		document.getElementById('soundimage').src = "images/sound_play.jpg";
		set=2;
	}else{
		soundManager.resume('id');
		document.getElementById('soundimage').src = "images/sound_pause.jpg";
		set=1;
	}
}