 
setInterval('updatePanel()', 60000)

var nextPanel = 0
var nextPanelType;
function updatePanel()
{
     
    switch(nextPanel)
    {
        case 0:
        nextPanel = (nextPanel + 1) % 3
        nextPanelType = 'popularDomains'

        break;
        
        case 1:
        nextPanel = (nextPanel + 1) % 3
        nextPanelType = 'people'

        break;
        
        case 2:
        nextPanel = (nextPanel + 1) % 3
        nextPanelType = 'comments'

        break;
    }
    
    var update = new Ajax.Request(
	    web_base+"my/Services/UpdatePanel.ashx", 
	    {
    	    method: 'post', 
    	    postBody: 'type=' + nextPanelType,
    	    onSuccess: function(t) { updatePanelContent(t.responseText) },
    	    onFailure: function(t) { alert('Error' + t.responseText) }
 	    })
    
}


function updatePanelContent(content)
{   
    switch (nextPanelType)
    {
        case "popularDomains":
            var popularDomainTable = $('popularDomainTable')
            
            if(popularDomainTable)
            {
                popularDomainTable.innerHTML = content
            }
            
            break
        case "people":
            var peopleTable = $('peopleTable')
            
            if(peopleTable)
            {
                peopleTable.innerHTML = content
            }

            break
        case "comments":
            var commentList = $('commentList')
            
            if(commentList)
            {
                commentList.innerHTML = content
            }
            break
        default:
            return
    }
}