// JavaScript Document

function ver(objeto) 
{
	obj = document.getElementById(objeto);
	obj.style.visibility = 'visible';
}

function ocultar(objeto)
{
	obj=document.getElementById(objeto);	
    	obj.style.visibility = 'hidden';
}

function ocultar2(objeto)
{
	obj=document.getElementById(objeto);
	obj.style.visibility = 'hidden';
	obj.style.MozOpacity = 0;
	obj.style.opacity = 0;
    	obj.style.filter = 'alpha(opacity=0)';
}

function mostrar2(objeto)
{
	obj=document.getElementById(objeto);
	obj.style.visibility = 'visible';
	obj.style.MozOpacity = 1;
	obj.style.opacity = 1;
    	obj.style.filter = 'alpha(opacity=100)';
}

function wait(msecs)
{
	var start = new Date().getTime();
	var cur = start	
	while(cur - start < msecs)
	{
		cur = new Date().getTime();
	}
} 

function cambiar_src(objeto,source)
{
	obj=document.getElementById(objeto);
	obj.src = source;
}

function cambiar_href(objeto,ref)
{
	obj=document.getElementById(objeto);
	obj.href = ref;
}

function fnFavorito()
{
	//Para internet explorer
	if ((navigator.appName=='Microsoft Internet Explorer') && (parseInt(navigator.appVersion)>=4)) 
	{
		var url='http://www.atlantisuniversity.org/';
		var titulo='Atlantis University';
		window.external.AddFavorite(url,titulo);
	}
	//Para Netscape y Firefox
	else 
	{
		if(navigator.appName == 'Netscape')
		alert ('Press Crtl+D to add this site to your Bookmarks');  //Puedes personalizar este mensaje
	}
}


function getElementByClass(theClass)
{
	//Create Array of All HTML Tags
	var allHTMLTags = new Array();
	allHTMLTags=document.getElementsByTagName("*");

	//Loop through all tags using a for loop
	for (i=0; i<allHTMLTags.length; i++)
	{
		//Get all tags with the specified class name.
		if (allHTMLTags[i].className==theClass)
		{
			//Place any code you want to apply to all
			//pages with the class specified.
			//In this example is to “display:none;” them
			//Making them all dissapear on the page.
			allHTMLTags[i].style.display='none';
		}
	}
}
