// JavaScript Document
// funcion que oculta y muestra texto
function cambiar(esto)
{
	vista=document.getElementById(esto).style.display;
	if (vista=='none')
		vista='block';
	else
		vista='none';

	document.getElementById(esto).style.display = vista;
}


// funcion que cambiael color de tituloy esconde el texto

function cambiar_1(esto,otro)
{
	if( esto == "ejemplo" )
	{
		 vista=document.getElementById("custodias_l").className="titulo2";
		 vista=document.getElementById("custodias_f").className="titulo";
	}
	else
	{
		 vista=document.getElementById("custodias_l").className="titulo";
		 vista=document.getElementById("custodias_f").className="titulo2";		
    }
	vista=document.getElementById(esto).style.display='block';
	vistazo=document.getElementById(otro).style.display='none';
	
		
}

//funcion para menu desplegable ce correo e intranet o cualquier link

var maximizado = false;
function carga()
{
    //Para Firefox,Crhome
	if(navigator.appName == "Netscape"){
		//document.getElementById("menu").addEventListener('click',maximizar,false);
	}else{	
	//Para IE(Microsoft)
		//document.getElementById("menu").attachEvent('onclick',maximizar);
    }
}
	
function maximizar()
{
	if( !maximizado)
	{
		$(".statusbar2").animate( {width:"213px"},600);
		$("#link").css( {visibility:"visible"} );
		document.getElementById("link").innerHTML = "<img src=\"menu/slide-button.gif\" />";
		maximizado = true;
	}else
	{
		$(".statusbar2").animate( {width:"23px"},600);
		//$("#link").css( {visibility:"hidden"} );
		document.getElementById("link").innerHTML = "<img src=\"menu/slide-button-active.gif\" />";
		maximizado = false;	
	}
}

    //cambiar de color el menu
	function cambiar_img(id,nuevaimg) { //v3.0
     		document.getElementById(id).src=nuevaimg;  
  			}


//--> para los botones de Flash

	//Maneja todos los mensajes de FSCommands en una película
    function java_DoFSCommand(command, args)
	{
    //var botonObj = InternetExplorer ? boton : document.boton;
    //Aquí va a ir nuestro código de manejo
	   
		//DoWork(command,args);
		alert(command+" "+args);
    }
     
    if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1)
    {
		document.write('<SCRIPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('Sub java_FSCommand(ByVal command, ByVal args)\n');
		document.write(' call java_DoFSCommand(command, args)\n');
		document.write('end sub\n');
		document.write('</SCRIPT\> \n');
    }

// funcion abrir ventana para el boton de flash
function abrir_ventana(n)
{
window.open(n);
}













