        function PageQuery(q) {
            if(q.length > 1) this.q = q.substring(1, q.length);
            else this.q = null;
            this.keyValuePairs = new Array();
            if(q) {
                for(var i=0; i < this.q.split("&").length; i++) {
                    this.keyValuePairs[i] = this.q.split("&")[i];
                }
            }
            this.getKeyValuePairs = function() { return this.keyValuePairs; }
            
            this.getValue = function(s) {
                for(var j=0; j < this.keyValuePairs.length; j++) {
                    if(this.keyValuePairs[j].split("=")[0] == s)
                    return this.keyValuePairs[j].split("=")[1];
                }
                return false;
            }
            
            this.getParameters = function() {
                var a = new Array(this.getLength());
                for(var j=0; j < this.keyValuePairs.length; j++) {
                    a[j] = this.keyValuePairs[j].split("=")[0];
                }
                return a;
            }
            
            this.getLength = function() { return this.keyValuePairs.length; }
         }
         
         function queryString(key){
            var page = new PageQuery(window.location.search);
            return unescape(page.getValue(key));
         }
       	    
	    function PlayTune(sTune)
	    {
	        if (sTune != "")
	        {
	            var file = sTune;
	            var ext = file.slice(file.lastIndexOf(".")).toLowerCase();
	            
	            /*if (ext == ".mp3") {
                    AC_FL_RunContent ("id", "24Audio", "minversion", "8,0,0,0", "bgcolor", "#7ED300", "menu", "false", "movie", "24Audio", "src", "../flash/24AudioPlayer?mp3Source=" + sTune, "width", "422", "height", "42", "name", "24Audio");
                }
                else
                {*/
                    document.write("<object width='422' id='GameShow' height='42' viewastext='true' type='audio/basic' standby='Loading Microsoft Windows Media Player Components...' codebase='http://www.apple.com/qtactivex/qtplugin.cab' wmode='transparent' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'>" +
                                   "<param value='" + sTune + "' name='filename'/>" + 
                                   "<embed width='422' height='42' volume='100' currentposition='0' name='objMediaPlayer' type='application/x-mplayer2' src='" + sTune + "'/>" +
                                   "<param value='1' name='showcontrols'/>" +
                                   "<param value='0' name='showstatusbar'/>" +
                                   "<param value='false' name='showdisplay'/>" +
                                   "<param value='false' name='animationatstart'/>" +
                                   "<param value='true' name='transparent'/>" +
                                   "<param value='true' name='transparentatstart'/>" +
                                   "<param value='1' name='autostart'/>" +
                                   "<param value='1' name='autosize'/>" +
                                   "<param value='transparent' name='wmode'/>" +
                                   "</object>");
              // }
           }
       }
       
       function showDL(showthis,hidethis,hidethis)
        {
            document.getElementById(showthis).style.display='block';
            document.getElementById(hidethis).style.display='none';
            document.all[showthis].style.display = 'block';
            document.all[hidethis].style.display = 'none';
        }
	    
	    function DownloadTune(sTune)
	    {
	        if (sTune != "") 
	        {
	            window.location.href=sTune;
	        }   
	    }
	    
	    // ENCODES, IN UNICODE FORMAT, ALL TEXT AND THEN ESCAPES THE OUTPUT
        function encodeTxt(s){
            s=escape(s);
            var ta=new Array();
            for(i=0;i<s.length;i++)ta[i]=s.charCodeAt(i)+7; 
            return ""+escape(eval("String.fromCharCode("+ta+")"))+7; 
        } 