﻿    
    function showModalPopupViaClient() 
    {
        var modalPopupBehavior;
        modalPopupBehavior = $find('programmaticModalPopupBehavior');
        modalPopupBehavior.show();
    }
    
    function hideModalPopupViaClient() 
    {
        var modalPopupBehavior = $find('programmaticModalPopupBehavior');
        modalPopupBehavior.hide();
    }   
    
    function stAba(menu,conteudo,botao)
	{
		this.menu = menu;
		this.conteudo = conteudo;
		this.botao = botao;
		
	}

	 function stAba(menu,conteudo,botao,href)
	{
		this.menu = menu;
		this.conteudo = conteudo;
		this.botao = botao;
		this.href = href;
		
	}

	var arAbas = new Array();
	arAbas[0] = new stAba('li_fotos','div_fotos','bt_fotos','h_fotos');
	arAbas[1] = new stAba('li_video','div_video','bt_video','h_video');
	arAbas[2] = new stAba('li_download','div_download','bt_download','h_download');
	arAbas[3] = new stAba('li_links','div_links','bt_links','h_links');

	function AlternarAbasMidia(pos)
	{	
	    for (i=0;i<arAbas.length;i++)
		{
			m = document.getElementById(arAbas[i].menu);
			m.className = '';
			c = document.getElementById(arAbas[i].conteudo)
			c.style.display = 'none';
			b = document.getElementById(arAbas[i].botao)
			b.style.display = 'none';
			h = document.getElementById(arAbas[i].href)
			h.className = '';
		}

		m = document.getElementById(arAbas[pos].menu)
		m.className = 'listmenu_on';
		c = document.getElementById(arAbas[pos].conteudo)
		c.style.display = '';
		b = document.getElementById(arAbas[pos].botao)
		b.style.display = '';
		h = document.getElementById('h_links')
		h.className = 'menu_ultimo';
		h = document.getElementById('h_fotos')
		h.className = 'menu_primeiro';

		h = document.getElementById(arAbas[pos].href)
		if (arAbas[pos].href == 'h_fotos')
		    h.className = 'menu_on_primeiro';
        else
            if (arAbas[pos].href == 'h_links')
		    h.className = 'menu_on_ultimo';
		else
		    h.className = 'menu_on';
	}
