    function Sound(options) {
        
        this.options = options;
        if(this.options == undefined) this.options = new Object();
        
        if(!this.options.swfLocation) {
            this.options.swfLocation = "ObjSomVC.swf";
        }
    
        if(Sound.id_count == undefined) {
            Sound.id_count = 1;
        } else {
            Sound.id_count ++;
        }
        
        if(Sound.instances == undefined) {
            Sound.instances = new Object();
        }
        
        this.object_id = 'object_id_' + Sound.id_count;
        
        Sound.instances[this.object_id] = this;
        
        movie_swf = this.options.swfLocation;
        movie_id = this.object_id;
        
        movie_element = "";
        movie_element += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1" height="1"'; 
        movie_element += ' id="' + movie_id+ '"'; 
        movie_element += ' align="middle">';
        movie_element += '<param name="movie" value="'+movie_swf+'" />';
	  movie_element += '<param name="wmode" value="transparent" />';
        movie_element += '<param name="quality" value="high" />';
        movie_element += '<param name="bgcolor" value="#ffffff" />';
        movie_element += '<param name="FlashVars" value="id='+ movie_id +'"/>';
        movie_element += '<param name="allowScriptAccess" value="always"/>';
        movie_element += '<embed src="'+movie_swf+'" FlashVars="id='+ movie_id +'"'; 
        movie_element += ' allowScriptAccess="always" quality="high" bgcolor="#ffffff" width="1" height="1"'; 
        movie_element += ' name="' + movie_id + '" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
        movie_element += '</object>';    

        if( document.getElementById('__sound_flash__') == undefined) {
            var element = document.createElement("div");
            element.id = "__sound_flash__";
            document.body.appendChild(element);
        }
        
        document.getElementById('__sound_flash__').innerHTML += movie_element; 
        
    }
    
    Sound.prototype.loadSound = function(url, streaming) {
        return Sound.__call('loadSound',this.object_id, url, streaming);
    }
    
    Sound.prototype.start= function() {
        return Sound.__call('start', this.object_id);
    }

    Sound.prototype.stop = function() {
        return Sound.__call('stop', this.object_id);
    }
    
    Sound.prototype.getId3 = function() {
        return Sound.__call('id3', this.object_id);
    }
    
	Sound.prototype.getPan = function() {
    	return Sound.__call('getPan', this.object_id);
	}
	
	Sound.prototype.getTransform = function() {
		return Sound.__call('getTransform', this.object_id);
	}
	
	Sound.prototype.getVolume = function(){
		return Sound.__call('getVolume', this.object_id);
	}
	
	Sound.prototype.setPan = function(value){
    	return Sound.__call('setPan', this.object_id, value);	
	}
	
	Sound.prototype.setTransform = function(transformObject){
    	return Sound.__call('setTransform', this.object_id, transformObject);		
	}
	
	Sound.prototype.setVolume = function(value){
    	return Sound.__call('setVolume', this.object_id, value);			
	}
	
	Sound.prototype.start = function(secondOffset, loops){
	    return Sound.__call('start', this.object_id, secondOffset, loops);
	}
	
	Sound.prototype.getDuration = function(){
	    return Sound.__call('getDuration', this.object_id);
	}
	
	Sound.prototype.setDuration = function(value){
	    return Sound.__call('setDuration', this.object_id, value);	
	}
	
	Sound.prototype.getPosition = function(){
        return Sound.__call('getPosition', this.object_id);		
	}
	
	Sound.prototype.setPosition = function(value){
	    return Sound.__call('setPosition', this.object_id, value);		
	}

	Sound.prototype.getBytesLoaded = function(){
	    return Sound.__call('getBytesLoaded', this.object_id);		
	}
	
	Sound.prototype.getBytesTotal = function(){
        return Sound.__call('getBytesTotal', this.object_id);			
	}
	
	Sound.prototype.onLoad = function(success){
	}	
    
    Sound.onLoad = function(object_id, success) {
        Sound.instances[object_id].onLoad(success);
    }
    
	Sound.prototype.onSoundComplete = function(){
	}	    
    
    Sound.onSoundComplete = function(object_id) {
        Sound.instances[object_id].onSoundComplete;
    }   
    
	Sound.prototype.onID3 = function(){
	}	    
    
    Sound.onID3 = function(object_id) {
        Sound.instances[object_id].onID3();        
    }    
     
    
    Sound.__thisMovie = function(movieName) {
        if (navigator.appName.indexOf("Microsoft") != -1) {
            return window[movieName]
        }
        else {
            return document[movieName]
        }
    }
    
    Sound.__call = function () {
        var functionname = arguments[0];
        var object_id = arguments[1];        
        var justArgs = new Array();
        if (arguments.length > 1)   {
           for (var i = 2; i < arguments.length; i++ ) {
             justArgs.push(arguments[i]);
           }
        }        
        return Sound.__thisMovie(object_id).proxyMethods(functionname, justArgs);
    } 