function linkable_img(i,h,w,l)
{
	if(l!='')
		document.write('<a target="_new" href="'+l+'">');
	document.write('<img src="'+i+'" border="0" width="'+w+'" height="'+h+'"/>');
	if(l!='')
		document.write('</a>');
	
}

function img(i,c)
{
	if (i.length > 0)
	{
	document.write('<a href="home.asp?to_do=CONTENIDO&id_contenido='+c+'"><img src="'+i+'" border="0"/></a>');
	}
}

function img_link(i,d)
{
	if (i.length > 0)
	{
	document.write('<a href="'+d+'"><img src="'+i+'" border="0"/></a>');
	}
}

function flash(f,c)
{
		if (f.length > 0)
	{
	var strf;
	strf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID="home" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  hspace="0" vspace="0" align="middle" border="0">';
	strf = strf + '<param name="movie" value="'+f+'"/>';
    strf = strf + '<param name="quality" value="high"/>';
    strf = strf + '<param name="LOOP" value="true"/>';
    strf = strf + '<embed NAME="home" src="'+f+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"  loop="false" align="middle">';
    strf = strf + '</embed>';
    strf = strf + '</object>';
    document.write('<a href="home.asp?to_do=CONTENIDO&id_contenido='+c+'">');
	document.write(strf);
	document.write('</a>');
	}
}
function flash_vit(f,c)
{
		if (f.length > 0)
	{
	var strf;
	strf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID="home" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  hspace="0" vspace="0" align="middle" border="0" height="132" width="189">';
	strf = strf + '<param name="movie" value="'+f+'"/>';
    strf = strf + '<param name="quality" value="high"/>';
    strf = strf + '<param name="LOOP" value="true"/>';
    strf = strf + '<embed NAME="home" src="'+f+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"  loop="false" align="middle" height="132" width="189">';
    strf = strf + '</embed>';
    strf = strf + '</object>';
    document.write('<a href="home.asp?to_do=CONTENIDO&id_contenido='+c+'">');
	document.write(strf);
	document.write('</a>');
	}
}

function flash_link(f,d)
{
	if (f.length > 0)
	{
	var strf;
	strf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID="home" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  hspace="0" vspace="0" align="middle" border="0" height="132" width="189">';
	strf = strf + '<param name="movie" value="'+f+'"/>';
    strf = strf + '<param name="quality" value="high"/>';
    strf = strf + '<param name="LOOP" value="true"/>';
    strf = strf + '<embed NAME="home" src="'+f+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"  loop="false" align="middle" height="132" width="189">';
    strf = strf + '</embed>';
    strf = strf + '</object>';
    document.write('<a href="'+d+'">');
	document.write(strf);
	document.write('</a>');
	}
}

function espacio(num)
{
	var i;
	i = 1;
	while(i<=num)
	{	
		document.write('&nbsp;');
		i++;
	}
}

function producto(nom,id)
{
	
	var n;
	n = nom.replace('+--+','<span class="contblanco11"><b>');
	n = n.replace('/--/','</b></span>');	

	document.write('<a class="contblanco" href="home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+n+'</a>');
}

function productoF(nom,id)
{
	
	var n;
	n = nom.replace('+--+','<span class="contblanco11"><b>');
	n = n.replace('/--/','</b></span>');	

	document.write('<a class="contblanco" href="fundacion.asp?to_do=CONTENIDO&id_contenido='+id+'">'+n+'</a>');
}

function productoE(nom,id,p)
{
	
	var n;
	n = nom.replace('+--+','<span class="contblanco11"><b>');
	n = n.replace('/--/','</b></span>');
	
	document.write('<a class="contblanco" href="'+p+'?to_do=CONTENIDO&id_contenido='+id+'">'+n+'</a>');
}


function producto_busqueda(nom,dir,id)
{
	document.write('<a class="contverde5" href="'+dir+'/home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+nom+'</a>');
}

function producto_estatica(nom,link)
{
	document.write('<a class="contverde5" href="'+link+'">'+nom+'</a>');
}


function producto_mapa_personas(nom,id)
{
	document.write('- <a class="txtmapasitio" href="personas/home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+nom+'</a>');
}

function producto_mapa_empresas(nom,id)
{
	document.write('- <a class="txtmapasitio" href="empresas/home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+nom+'</a>');
}

function producto_mapa_corpora(nom,id)
{
	document.write('- <a class="txtmapasitio" href="corpora/home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+nom+'</a>');
}


function producto_div_personas(nom,id)
{
	document.write('<a class="ppersonas" href="personas/home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+nom+'</a>');
}

function producto_div_empresas(nom,id)
{
	document.write('<a class="pempresas" href="empresas/home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+nom+'</a>');
}

function producto_div_corpora(nom,id)
{
	document.write('<a class="pcorp" href="corpora/home.asp?to_do=CONTENIDO&id_contenido='+id+'">'+nom+'</a>');
}
function img_div(nElems)
{
	document.write('<img src="/pbimages/0.gif" width="10" height="' + (19+(13*nElems)) + '" border="0">');
}

function TABULA_Bxml(s)
{
	var st;
	
	st = s.replace('+---+','<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td  class=azultit bgcolor=#FFFFFF align=center>&#160;&#160;&#160;');
	st = st.replace('/---/','&#160;</td></tr></table>');
	document.write(st);
}

function BrXml(s)
{
	var st;
	var expresionregular = new RegExp('------','gi') ;
	st = s.replace(expresionregular,'');
	document.write('<p align=left>'+st+'</p>');
	/*document.write(st);*/
	
}
function BrTXml(s)
{
	var st;
	var expresionregular = new RegExp('------','gi') ;
	st = s.replace(expresionregular,'<br>');	
	st = st.replace('+--+','</span><br><span class=contazul1>');
	document.write(st);

}
function busca_int(np)
{
	if(document.form1.textfield.value.length <= 0 )
	{
		alert("Debe introducir alguna palabra para realizar la búsqueda");
	}
	else
	{
		document.form1.action='../resultado_busqueda.asp';
		document.form1.nopag.value=np;
		document.form1.submit();
	}
}

function busca(np)
{
	if(document.form1.textfield.value.length <= 0 )
	{
		alert("Debe introducir alguna palabra para realizar la búsqueda");
	}
	else
	{
		document.form1.action="resultado_busqueda.asp";
		document.form1.nopag.value=np;
		document.form1.submit();
	}
}



function link_texto_normal(texto,id_c)
{
	document.write('<a href="home.asp?to_do=CONTENIDO&id_contenido='+id_c+'" class="contverde">');
	document.write(texto);
	document.write('</a>');
}
function link_texto_link(texto,direc)
{
	document.write('<a href="'+ direc +'" class="contverde">');
	document.write(texto);
	document.write('</a>');
}
function link_texto_home(texto,id_c,dir)
{
	document.write('<a href="'+dir+'/home.asp?id_contenido='+id_c+'" class="contblanco">');
	document.write(texto);
	document.write('</a>');
}
function img_home(i,c,dir)
{
	if (i.length > 0)
	{
	document.write('<a href="'+dir+'/home.asp?id_contenido='+c+'"><img src="'+i+'" border="0"/></a>');
	}
}


function flash_home(f,c,dir)
{
	var strf;
	strf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID="home" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  hspace="0" vspace="0" align="middle" border="0">';
	strf = strf + '<param name="movie" value="'+f+'"/>';
    strf = strf + '<param name="quality" value="high"/>';
    strf = strf + '<param name="LOOP" value="true"/>';
    strf = strf + '<embed NAME="home" src="'+f+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"  loop="false" align="middle">';
    strf = strf + '</embed>';
    strf = strf + '</object>';
    document.write('<a href="'+dir+'/home.asp?id_contenido='+c+'">');
	document.write(strf);
	document.write('</a>');
}

function link_informacion()
{
	document.form1.action="solicitud_informacion.asp";
	document.form1.submit();
}

function link_solicita()
{
	document.form1.action="solicitud_producto.asp";
	document.form1.submit();
}

function input_hidden_prod(prod)
{	
	
	
	document.write('<input type="hidden" name="codigo_producto" value="'+prod+'"/>');
}

function input_hidden_mail(prod)
{	
	
	document.write('<input type="hidden" name="email" value="'+prod+'"/>');
}

function input_hidden_id(prod)
{	
	
	document.write('<input type="hidden" name="id_contenido" value="'+prod+'"/>');
}

function print_option(prod)
{
	document.write('<option value="'+prod+'">'+prod+'</option>');
}

function decimales(numero)
{
	
	
	document.write(numero.substr(0,(numero.length-2)));
}
function opendemo()
{

window.open('/popups/demo.htm','','width=600,height=350');	
	
}
