var ingles, IMGW;

if (id=='ing') {
 ingles = true;
 IMGW = 405;
} else {
 ingles = false;
 IMGW = 465;
}

// Formulario consulta
html='';
html += '<form method=get action="/comun/fichaemp/fichaemp.asp" name=form1 OnSubmit="return (compr_nombre());">';
html += '<input type=hidden name="id" value="' + id + '">';
html += '<input type=hidden name="tipo" value="FichaEmp">';
html += '<input type=hidden name="nombre2" value="' + nombre + '">';
html += '<input type=hidden name="cod" value="' + emisora + '">';
html += '<table width=100% border=0 cellspacing=0 cellpadding=2 bgcolor=#000000>';
html += '<tr valign=middle>'
html += '<td><img src=/images/shim.gif width=1 height=30></td>';
html += '<td><img src=/' + id + '/images/FichaEmpresa.gif width=200 height=27></td>';
html += '<td align=right>';
if (ingles) {
 html += '<b><font color=#FFFFFF>Name </font></b>';
} else {
 html += '<b><font color=#FFFFFF>Nombre </font></b>';
}
html += '<input type=text name="nombre" size=25 maxlength=40 value="' + nombre + '">';
html += ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ';
if (ingles) {
 html += '<input type=submit name="Buscar" value="Search">';
} else {
 html += '<input type=submit name="Buscar" value="Buscar">';
}
html += '</td></tr></table>';
document.write(html);

// Pestañas
nPX=0;oPX=0;nPY=0;oPY=0;interval=10;IMGH=30;XSAFETY=4;YSAFETY=17;//IMGW=610;
desPY = 34;

var LanzaInfFinan = function (url) {
	var v = window.open(url,'_blank','width=1010,height=660,resizable=yes,status=no,toolbar=yes,scrollbars=yes');
	v.focus();
}

html='';
html += '<table border=0 cellspacing=0 cellpadding=0>';
html += '<tr><td bgcolor=#FFFFFF>';
html += '<table border=0 cellspacing=0 cellpadding=0 align=center>';
// OPERACIONES FINANCIERAS
html += '<tr><td><img src=/images/pestizq.gif width=11 height=22></td>';
html += '<td background=/images/pestfond.gif align=center valign=top nowrap>';
html += '<a href="/comun/of/amplia.asp?nombre=' + URLnombre + '&emisora=' + emisora + '&id=' + id + '">';
if (ingles) {
 html += 'Corporate Actions</a></td>';
} else {
 html += 'Op. Financieras</a></td>';
}
// INF. PERIODICA FINANCIERA
html += '<td><img src=/images/pestcent.gif width=11 height=22></td>';
html += '<td background=/images/pestfond.gif align=center valign=top nowrap>';
if (linkInfPeriodica != '') {
 html += '<a href="' + linkInfPeriodica + '" target="_blank">';
} else if (scontrataVal == '03') {
 html += '<a href="javascript:LanzaInfFinan(\'http://www.latibex.com/comun/marcos.asp?consulta=IFINANCIEROS&idioma=' + id + '&busqueda=' + emisora + '\')">';
} else {
 html += '<a href="javascript:LanzaInfFinan(\'http://www.boletinfinanciero.es/bolsamadrid/' + emisora + '\')">';
}
if (ingles) {
 html += 'Financial Info</a></td>';
} else {
 html += 'Info. Financiera</a></td>';
}
// HECHOS RELEVANTES
html += '<td><img src=/images/pestcent.gif width=11 height=22></td>';
html += '<td background=/images/pestfond.gif align=center valign=top nowrap>';
if (linkHechosRelevantes != '') {
 html += '<a href="' + linkHechosRelevantes + '" target="_blank">';
} else {
 html += '<a href="/comun/empresas/hechosrel.asp?id=' + id + '&emisora=' + emisora +
         '&nombre=' + URLnombre + '&anyo2=' + fecha2.slice(0,4) +
         '&mes2=' + fecha2.slice(4,6) + '&dia2=' + fecha2.slice(6,8) +
         '&anyo1=' + fecha1.slice(0,4) + '&mes1=' + fecha1.slice(4,6) +
         '&dia1=' + fecha1.slice(6,8) + '">';
}
if (ingles) {
 html += 'Relevant Facts</a></td>';
} else {
 html += 'Hechos Relevantes</a></td>';
}
// PERFIL
if (perfil) {
 IMGW += 35;
 html += '<td><img src=/images/pestcent.gif width=11 height=22></td>';
 html += '<td background=/images/pestfond.gif align=center valign=top nowrap>';
 html += '<a href="#Perfil">';
 if (ingles) {
  html += 'Profile</a></td>';
 } else {
  html += 'Perfil</a></td>';
 }
}
// CAPITALIZACIÓN
html += '<td><img src=/images/pestcent.gif width=11 height=22></td>';
html += '<td background=/images/pestfond.gif align=center valign=top nowrap>';
html += '<a href="#Capitalizacion">';
if (ingles) {
 html += 'Capitalization</a></td>';
} else {
 html += 'Capitalizaci&oacute;n</a></td>';
}
// PRECIOS HISTÓRICOS
if (isinVal != "") {
 IMGW += 110;
 html += '<td><img src=/images/pestcent.gif width=11 height=22></td>';
 html += '<td background=/images/pestfond.gif align=center valign=top nowrap>';
 html += '<a href="/comun/empresas/infhist.asp?id=' + id + '&nombre=' + URLnombreVal +
         '&isin=' + isinVal + '&bolsa=' + bolsaVal + '&scontrata=' + scontrataVal + '">';
 if (ingles) {
  html += 'Historic Information</a></td>';
 } else {
  html += 'Informaci&oacute;n Hist&oacute;rica</a></td>';
 }
}
html += '<td><img src=/images/pestdcha.gif width=11 height=22></td>';
html += '</tr></table></td></tr></table>';

if(is.ie4){document.write('<DIV ID="lgtgp" STYLE="position:absolute;display:none;">'+html+'</DIV>');var lg=document.all.lgtgp.style;function Timing(){nPX=document.body.clientWidth-(IMGW+XSAFETY);if(nPX<0)nPX=0;nPY=document.body.scrollTop;if(nPY<desPY)nPY=desPY;if(nPX!=oPX||nPY!=oPY){lg.display="none";lg.left=nPX;oPX=nPX;lg.top=nPY;oPY=nPY;lg.display=""}};setInterval("Timing()",interval)}
if((is.ns4)||(is.ns6)){document.write('<STYLE TYPE="text/css">#lgtgp{position:absolute;}</STYLE>');document.write('<DIV ID="lgtgp" STYLE="position:absolute;top:0px;left:0px">'+html+'</DIV>');var lg;if(is.ns4){lg=document.layers.lgtgp}else{lg=document.getElementById('lgtgp').style};function Refresh(){nPX=XSAFETY;nPY=window.pageYOffset;if(nPY<desPY)nPY=desPY;if(nPX!=oPX){lg.left=XSAFETY;oPX=nPX;}if(nPY!=oPY){lg.top=nPY;oPY=nPY};setTimeout("Refresh()",interval)};Refresh()}

