	function menu()
	{
		var menu = document.getElementById('submenu');
		if( menu.style.display != 'block' ) menu.style.display = 'block';
		else menu.style.display = 'none';
	}

	var arr = null;
	var index = 0;
	var op1 = 10;
	var op2 = 0;
	var timeOut = 4000;
	var slideTimeOut = 70;
	var rotate = false;
		
	var arrowOp = 5;
	var arrow = null;

	function begRot( rotPar )
	{
		var j = 0;
		var container = document.getElementById('People');
		var auxArr = null;		
		
		if(container != null && container.style.display != 'none')
			auxArr = container.childNodes;
		else
		{
			container = document.getElementById('Senior');
			if(container != null && container.style.display != 'none')
				auxArr = container.childNodes;
			else
			{
				container = document.getElementById('contRotator');
				if(container != null && container.style.display != 'none')
					auxArr = container.childNodes;
			}
		}

		if( auxArr == null ) return;	

		arr = new Array();
		for(i=0;i<auxArr.length;i++)
			if(auxArr[i].className == 'itRot')
				arr[j++] = auxArr[i];

		if(arr.length == 0) return;
		chgOpac(op1, arr[0]);
		arr[0].style.visibility = 'visible';
		for(i=1;i<arr.length;i++)
		{
			chgOpac(op2, arr[i]);
			arr[i].style.visibility = 'visible';
		}

		if( rotPar && arr.length > 1 ) setTimeout( "next(1);", timeOut );
		rotate = rotPar;
		arrow = document.getElementById('flechas');
		if(arrow != null) chgOpac(arrowOp, arrow);
	}
		
	function next(dir)
	{
		if( arr.length == 1 ) return;
		var nextIn;
		if( dir > 0 ) nextIn = (((index+dir)==arr.length)?0:(index+dir));
		else nextIn = (((index+dir)<0)?(arr.length-1):(index+dir));
		op1--;
		op2++;
		chgOpac(op1, arr[index]);
		chgOpac(op2, arr[nextIn]);
		if(op1 > 0) setTimeout("next(" + dir + ");", slideTimeOut);
		else
		{
			op1 = 10;
			op2 = 0;
			index = nextIn;
			if( rotate ) setTimeout("next(" + dir + ");", timeOut);
		}
	}

	function show()
	{
		arrowOp++;
		chgOpac(arrowOp, arrow);
		if(arrowOp < 10) setTimeout("show();", slideTimeOut);
	}

	function hide()
	{
		arrowOp--;
		chgOpac(arrowOp, arrow);
		if(arrowOp > 0) setTimeout("hide();", slideTimeOut);
	}

	function chgOpac(opacity, object) 
	{
		object.style.opacity = (opacity / 10);
		object.style.MozOpacity = (opacity / 10);
		object.style.filter = "alpha(opacity=" + (opacity*10) + ")";
	}

	function jump( dest )
	{
		var destObj = document.getElementById(dest);
		var origObj = document.getElementById((dest=='Senior')?'People':'Senior');

		var destTab = document.getElementById('tab' + dest);
		var origTab = document.getElementById('tab' + ((dest=='Senior')?'People':'Senior'));

		destObj.style.display = 'block';
		origObj.style.display = 'none';

		destTab.className = 'active';
		origTab.className = '';

		begRot(false);

	}
	
function correctPNG()
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()

      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText

         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle

         var strNewHTML = "<span " + imgID + imgClass + imgTitle
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;"
             + imgStyle + ";"      + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"

         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}
//window.attachEvent("onload", correctPNG);

