<!--
    var sLastControl = "";
    var sLastValue = "";
    var iNextIndex = 0;
    var iLastIndex = 0;

    function ReSetValue(selSelectObject, DisplayObject)
    {
        msg = selSelectObject.options[selSelectObject.selectedIndex].value;
        DisplayObject.value=msg;
        return true	
    }

    function ResetLastVariable() 
    {			
        iNextIndex=0;
        iLastIndex=0;
        return true
    }

    function FindNextText(TextObject, selSelectObject) 
    {
        msg1= ConvertToUpper(TextObject);
        bBegins = -1;
        if (msg1.search("%")!== -1) 
          {
            bBegins = '0';
            msg1=msg1.substr(0,msg1.length-1);
          }
                  

        if (sLastControl==TextObject.name) {		
            if (sLastValue==TextObject.value) {
                    if (iNextIndex==selSelectObject.options.length  ){
                                    iNextIndex=0;
                            }
                            
                     if (iNextIndex==iLastIndex){
                                    iNextIndex=0; 
                            } 
                                            
            }
            else
              {
                       iNextIndex=0;
                       iLastIndex=0;
              }
          }
        else {
           iNextIndex=0;
           iLastIndex=0
          }
        for(i=iNextIndex; i < (selSelectObject.options.length  ); i++)
         {
                msgDesc = (selSelectObject.options[i].text);
                msgDesc = msgDesc.toUpperCase();
                iLastIndex=i;
                
                if (bBegins==0) 
                        {
                                sSubString = msgDesc.substr(0, msg1.length);
                                msg3 =  sSubString.search(msg1); 
                        }
                else
                        {
                                msg3=msgDesc.search(msg1);
                        }	
            if (msg3!== -1)
                        { 
                          selSelectObject.options[i].selected = true; 
                          sLastControl=TextObject.name;
                          sLastValue=ConvertToUpper(TextObject);
                          iNextIndex=i+1;
                          i=selSelectObject.options.length;
                        }
                        
          }	
                  
                return true	
    }		
    
    function RaiseAlert(sText, sSel) 
    {
        ReSetValue(sSel, sText);
        return true
    }

    function ConvertToUpper(sText) 
    {
        retString = new String();        
        retString = sText.value;
        retString = retString.toUpperCase();
        sText.value = retString;
        return retString
    }
    
    function ViewSelection(strSelectBoxName, strPageName)
    {
        lngSelectedIndex = document.getElementById(strSelectBoxName).selectedIndex;
        
        if (lngSelectedIndex == -1)
        {
            lngSelectedIndex = 0;
        }
        
        lngSelectionID = document.getElementById(strSelectBoxName).options[lngSelectedIndex].value;
        window.location = strPageName + "?ID=" + lngSelectionID + "&PAGE=1";
    }
    
    var isNN = (navigator.appName.indexOf("Netscape")!=-1);
    
    function autoTab(input,len, e)
    {
            var keyCode = (isNN) ? e.which : e.keyCode; 
            var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
            if(input.value.length >= len && !containsElement(filter,keyCode)) 
            {
                    input.value = input.value.slice(0, len);
                    input.form[(getIndex(input)+1) % input.form.length].focus();
            }
            
            function containsElement(arr, ele) 
            {
                    var found = false, index = 0;
                    while(!found && index < arr.length)
                            if(arr[index] == ele)
                                    found = true;
                            else
                                    index++;
                    return found;
            }
    
            function getIndex(input)
            {
                    var index = -1, i = 0, found = false;
                    while (i < input.form.length && index == -1)
                            if (input.form[i] == input)index = i;
                            else i++;
                    return index;
            }
            return true;
    }
    
    function ChangeFormat()
    {
        var lngChangeFormat = 0;
        lngChangeFormat = document.getElementById("ChooseFormat").value;
        document.cookie = 'FORMAT=' + lngChangeFormat + '; path=/';
        
        if (document.getElementById("chkMakeDefault").checked == true)
        {
            window.location.href = "/formatmain.php?ID=" + lngChangeFormat;
        }
        else
        {
            window.location.href = "/formatmain.php";
        }
    }
    
    function lookup(Search) {
    if(Search.length < 3) {
        // Hide the suggestion box.
        $('#suggestions').hide();
    } else {
        $.post("autocomplete.php", {queryString: ""+Search+""}, function(data){
            if(data.length >0) {
                $('#suggestions').show();
                $('#autoSuggestionsList').html(data);
            }
        });
    }
	} // lookup
    
    function fill(thisValue)
    {
    	document.getElementById("Search").value = thisValue;
   		$('#suggestions').hide();
	}
	
	function Watch(lngVideoID)
    {
        document.cookie = 'VIDEOID=' + lngVideoID + '; domain=radiocurrents.com';
        playerwindow = window.open('video.php', "_blank", "height=500,width=650,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
        playerwindow.moveTo(0,0);
    }
    
    function Listen(lngSongID)
    {
        document.cookie = 'SONGID=' + lngSongID + '; domain=radiocurrents.com';
        playerwindow = window.open('player.php?SONGID=' + lngSongID, "_blank", "height=440,width=580,status=no,toolbar=no,menubar=no,location=no");
        playerwindow.moveTo(0,0);
    }
    
    function ListenAudio(lngAudioID)
    {
        document.cookie = 'AUDIOID=' + lngAudioID + '; domain=radiocurrents.com';
        playerwindow = window.open('playeraudio.php', "_blank", "height=150,width=175,status=no,toolbar=no,menubar=no,location=no");
        playerwindow.moveTo(0,0);
    }
    
    function Download(lngSongID)
    {
        document.cookie = 'SONGID=' + lngSongID + '; domain=radiocurrents.com';
        playerwindow = window.open('downloadmanual.php', "_blank", "height=180,width=320,status=no,toolbar=no,menubar=no,location=no");
        playerwindow.moveTo(0,0);
    }
    
    function DownloadWav(lngSongID)
    {
        document.cookie = 'SONGID=' + lngSongID + '; domain=radiocurrents.com';
        playerwindow = window.open('downloadmanualwav.php', "_blank", "height=180,width=320,status=no,toolbar=no,menubar=no,location=no");
        playerwindow.moveTo(0,0);
    }
    
    function DownloadAudio(lngAudioID)
    {
        document.cookie = 'AUDIOID=' + lngAudioID + '; domain=radiocurrents.com';
        playerwindow = window.open('downloadmanuala.php', "_blank", "height=180,width=320,status=no,toolbar=no,menubar=no,location=no");
        playerwindow.moveTo(0,0);
    }
    
    function RateIt(lngSongID)
    {
        document.cookie = 'SONGID=' + lngSongID + '; domain=radiocurrents.com';
        playerwindow = window.open('rateit.php', "_blank", "height=350,width=500,status=no,toolbar=no,menubar=no,location=no");
        playerwindow.moveTo(0,0);
    }
    
    
	var lngCurrentRating = 0;
    
    function RotateFeedback()
    {
        var objFeedback = new FeedbackObj("", "", "", "");
    
        if (typeof(arrvarFeedback) != "undefined")
        {
            objFeedback = arrvarFeedback[lngCurrentRating];
            document.getElementById("SPANFeedback").innerHTML = objFeedback.Feedback.replace("|", "<BR>");
            document.getElementById("SPANName").innerHTML = objFeedback.Name; 
            document.getElementById("SPANJobTitle").innerHTML = objFeedback.JobTitle; 
            document.getElementById("SPANStationCompany").innerHTML = objFeedback.Company;
            lngCurrentRating++;
            
            if (lngCurrentRating > lngMaxRow)
            {
                lngCurrentRating = 0;
            }
            
            PauseFeedback();
        }
    }
    
    function PauseFeedback()
    {
        setTimeout('RotateFeedback()', 6000);
    }
    
    function FeedbackObj(strFeedback, strName, strJobTitle, strCompany)
    {
        this.Feedback = strFeedback;
        this.Name = strName;
        this.JobTitle = strJobTitle;
        this.Company = strCompany;
    }
-->