   
   
    function ShowHide(id) {
       if (document.getElementById(id).style.display == 'none'){
	    document.getElementById(id).style.display = '';
	    } else {
	    document.getElementById(id).style.display = 'none';
	    }
    }
    
    function onUpdating(){       
        var div = $get('updateProgressDiv'); 
        div.style.display = '';        
    }

    function onUpdated() {
       var updateProgressDiv = $get('updateProgressDiv'); 
       document.body.style.cursor = "";
       updateProgressDiv.style.display = 'none';
    }
    
    function hideModalImagePresse() {
       // ev.preventDefault();        
        var modalPopup = $find('ModalPopupBehaviorPresse');
        modalPopup.hide();
    }

    function hideModalImageTermine() {
       // ev.preventDefault();        
        var modalPopup = $find('ModalPopupBehaviorTermine');
        modalPopup.hide();
    }


    function hidePopUpLogin() {  
        var modalPopup = $find('ModalLoginBehavior');
        modalPopup.hide();
    }
    
    function showModalLogin() {
        var modalPopup = $find('ModalLoginBehavior');
        modalPopup.show();
    }

    function openSongDownload(id) {
         window.open("Songdownload.aspx?songId=" + id, "SongDownload", "width=300,height=400,left=100,top=200");
    }
     
     
  //######################## Charts ########################################
 
     
     function OnChartsLoadedError(exception) {
        alert(exception);
     }
     
     
     function PreviousCharts() {
        pageIndexCharts--;
        chartcounter = (pageIndexCharts * maxItemsCharts) - maxItemsCharts+1;
        GetCharts();
        
     }
     
     function NextCharts() {
        pageIndexCharts++;
        GetCharts();
     }

   
   //######################## NewComer ########################################
   
    function ShwoBuySongPopUp(id) {
        window.open('Songdownload.aspx?songId=' + id);
    }
 
     function previousLatestSongs() {
        pageIndex--;
        getLatestPublishedSongs();
        
     }
     
     function nextLatestSongs() {
        pageIndex++;
        getLatestPublishedSongs();
     }
     
     
     function onLatestPublishedSongsError(exception) {
        alert(exception);
     }
     
     //####################### Misc #############################


    function setText(element, text)
    {
        if (typeof element.textContent != 'undefined')
        {
            element.textContent = text;
        }
        else if (typeof element.innerText != 'undefined')
        {
            element.innerText = text;
        }
    }
    
    
    function setTextFeaturedArtist(element, text)
        {
            if (typeof element.innerText != 'undefined')
            {
                element.innerHTML += text;
            }
            else if (typeof element.textContent != 'undefined')
            {
                element.innerHTML += text;
            }
    }
