function insertar_flash(nombre, w, h, variables, bgcolor)
{
    
       document.write(" <object style='z-index:0' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='" + w + "' height='" + h + "' id='" + nombre + "' align='middle' VIEWASTEXT>");
       document.write(" <param name='allowScriptAccess' value='sameDomain' />");
       document.write("<param name='movie' value='../flash/" + nombre + ".swf" + variables + "' />");
       document.write("<param name='quality' value='high' />");
       document.write("<embed src='../flash/" + nombre + ".swf" + variables + "' quality='high' bgcolor='" + bgcolor + "' width='" + w + "' height='" + h + "' name='" + nombre + "' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
       document.write("</object>");
}
function flash_transparente(cual, width, height, variables,clase)
{
       document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' class='" + clase + "' width='" + width + "' height='" + height + "' id='" + cual + "' align='middle' VIEWASTEXT>");
       document.write("<param name='allowScriptAccess' value='sameDomain' />");
       document.write("<param name='movie' value='flash/" + cual + ".swf" + variables + "' />");
       document.write("<param name='quality' value='high' />");
       document.write("<param name='wmode' value='transparent'>");
       document.write("<embed  swliveconnect='true' wmode='transparent'  src='flash/" + cual + ".swf" + variables + "' quality='high' width='" + width + "' height='" + height + "' name='" + cual + "' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
       document.write("</object>");
	   
	   
	  
}
function flash_transparente3(cual, width, height, variables,clase)
{
       document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' class='" + clase + "' width='" + width + "' height='" + height + "' id='" + cual + "' align='middle' VIEWASTEXT>");
       document.write("<param name='allowScriptAccess' value='sameDomain' />");
       document.write("<param name='movie' value='2008/flash/" + cual + ".swf" + variables + "' />");
       document.write("<param name='quality' value='high' />");
       document.write("<param name='wmode' value='transparent'>");
       document.write("<embed  swliveconnect='true' wmode='transparent'  src='2008/flash/" + cual + ".swf" + variables + "' quality='high' width='" + width + "' height='" + height + "' name='" + cual + "' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
       document.write("</object>");
	   
	   
	  
}

function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}

function over_menu(x)
{
	if (current != x)
	{
		document.getElementById(x).className = "Texto12 TextoColor3";
	}
}
function out_menu(x)
{
	if (current != x)
	{
		document.getElementById(x).className = "Texto12 TextoColor2";
	}
}

function goTopFrame()
{
    if(window != window.top)
    {
        window.open(window.location.href,"_parent");
    }
}

/* Pre cargar imagenes */
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function precargar()
{
	MM_preloadImages('');
}

function getFlashMovieObject(movieName)
{
  if (parent.window.document[movieName]) 
  {
      return parent.window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
	  
    if (parent.document.embeds && document.embeds[movieName])
      return parent.document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return parent.document.getElementById(movieName);
  }
}
function mover(cual)
{
	parent.document.getElementById('tbl_index').style.display = 'none'
     var flashMovie=getFlashMovieObject("bottom");
	//var flashMovie = document.getElementById('bottom');
    flashMovie.SetVariable("strType",'1');
	parent.menu_v.set_curr(cual,1);
	
}
function visible_mv()
{
	parent.document.getElementById('menu_v').style.display = '';
	parent.document.getElementById('tbl_data').style.display = '';
}
function linea()
{
	try
	{
    var flashMovie=getFlashMovieObject("linea");
    flashMovie.SetVariable("strType",'1');
	}
	catch(e)
	{
	}
}
function cambiar(imagen)
{
	document.getElementById('btn_idioma').src='../Imagenes/' + imagen + '.gif';
}

var curr;
function set_curr(cual, origen)
{
	if (document.getElementById("r_" + curr))
	{
	document.getElementById("r_" + curr).className = 'menu_v';
	document.getElementById("a_" + curr).className = 'menu_v';
	}
	curr = cual;
	document.getElementById("a_" + curr).className = 'menu_v';
	document.getElementById("r_" + curr).className = 'menu_v_sel';
	/*visible_linea(origen);
	parent.titulo.location.href = 'titulo.php?ID=' + cual;
	if (origen == 1)
	{
		parent.texto.location.href = 'texto.php?ID=' + cual + "&ref=1";
	}
	else{
	parent.texto.location.href = 'texto.php?ID=' + cual;
	}*/
}
function m_over(cual)
{
	if (cual != curr)
	{
		document.getElementById("a_" + cual).className = 'menu_v_over';
	}
}
function m_out(cual)
{
	if (cual != curr)
	{
		document.getElementById("a_" + cual).className = 'menu_v';
	}
}
function visible_linea(origen)
{
	var flashMovie=parent.document.getElementById('div_linea2');
	flashMovie.style.display = 'none';
	var flashMovie2=parent.document.getElementById('div_linea');
	flashMovie2.style.display = 'none';
	if (origen == 1)
	{
		flashMovie.style.display = '';
	}
	else
	{
		flashMovie2.style.display = '';
	}
}
var pScroll = 0;
var s;
function iniciar(funcion)
{
    s = window.setInterval(funcion + "()", 180); 
}
function parar()
{
    window.clearInterval(s);
}
function bajar()
{
	var o = document.getElementById("scroll");
	document.getElementById("flecha2").style.visibility = 'visible';
	var w = document.getElementById("tbl_texto").offsetHeight;
	if (pScroll < (w-300))
	{
	    pScroll = pScroll + 30;
	}
	else
	{
		document.getElementById("flecha1").style.visibility = 'hidden';
	}
    o.scrollTop = pScroll;
}
function subir()
{
	var o = document.getElementById("scroll");
	document.getElementById("flecha1").style.visibility = 'visible';
	if (pScroll > 0)
	    pScroll = pScroll - 30;
	else
	{
		document.getElementById("flecha2").style.visibility = 'hidden';
	}
    o.scrollTop = pScroll;
}


function flechas()
{
	var w = document.getElementById("tbl_texto").offsetHeight;
	if (w > 300)
	{
		document.getElementById("flecha1").style.visibility = 'visible';
	}
	else
	{
		document.getElementById("flecha1").style.visibility = 'hidden';
	}
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

