var RUTA="http://www.biomedist.com/";
//var RUTA="h:/websites/biomedist/web/";

var btn = new Array(9,3);
var btnIdioma = new Array(1,1);

var strIdioma = new Array(1);
var strTipo = new Array(1);
var	strTipo = new Matriz(1);
var	strNombre = new Matriz(9);
var	btn = new Matriz(9);
var btnIdioma = new Matriz(1);
var button=0;

strNombre[0] = RUTA+"graphics/01";
strNombre[1] = RUTA+"graphics/02";
strNombre[2] = RUTA+"graphics/03";
strNombre[3] = RUTA+"graphics/04";
strNombre[4] = RUTA+"graphics/05";
strNombre[5] = RUTA+"graphics/06";
strNombre[6] = RUTA+"graphics/07";
strNombre[7] = RUTA+"graphics/08";
strNombre[8] = RUTA+"graphics/09";
strNombre[9] = RUTA+"graphics/10";

btn[0][2]="espanol/nuestraempresa.html"; btn[0][3]="english/ourcompany.html";
btn[1][2]="espanol/nuestrossocios.html"; btn[1][3]="english/ourpartners.html";
btn[2][2]="espanol/nuestrosproductos.html"; btn[2][3]="english/ourproducts.html";
btn[3][2]="espanol/infoparapacientes.html"; btn[3][3]="english/infoforpatients.html";
btn[4][2]="espanol/infoparaprofesionales.html"; btn[4][3]="english/infoforprofessionals.html";
btn[5][2]="espanol/infocondmedicas.html"; btn[5][3]="english/infomedicalcond.html";
btn[6][2]="espanol/glosario.html"; btn[6][3]="english/glossary.html";
btn[7][2]="espanol/contactenos.html"; btn[7][3]="english/contactus.html";
btn[8][2]="espanol/enlaces.html"; btn[8][3]="english/links.html";
btn[9][2]="espanol/correo.html"; btn[9][3]="english/email.html";

strIdioma[0] = RUTA+"graphics/btnesp";
strIdioma[1] = RUTA+"graphics/btneng";

btnIdioma[0][0] = new SetImg(strIdioma[0],".gif");
btnIdioma[0][1] = new SetImg(strIdioma[0],"_on.gif");
btnIdioma[1][0] = new SetImg(strIdioma[1],".gif");
btnIdioma[1][1] = new SetImg(strIdioma[1],"_on.gif");

function ruta() 
{
 	document.write('<HEAD> <LINK REL=stylesheet HREF="'+RUTA+'biomedist.css" TYPE="text/css"> </HEAD>');
}

function click() 
{
	if (event.button==2)
	  alert('© BIOMEDIST - Biomedical Distributors \n                                all rights reserved.') 
} 
document.onmousedown=click

function cabecera(opcion,titulo,idioma)   // CABECERA PARA PAGINAS DE DETALLE
{
xopcion=opcion;
ruta();
document.write('<BODY background="'+RUTA+'graphics/bg3.gif" TEXT="#003366" LINK="#003366" VLINK="#003366" bgcolor="#000000" topmargin="0" leftmargin="0">');
document.write('<a name="inicio">');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">');
document.write('<tr align="center">');
document.write('	<td align="center" width="82"></td>');
document.write('	<td width="768">');
document.write('<table width="768" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff">');
document.write('<tr height="5"><td></td></tr>');
document.write('	<tr><td>');
document.write('	<table width="768" border="0" cellspacing="0" cellpadding="0">');
document.write('	<tr height="1">');
document.write('		<TD width="12" bgcolor="#cccccc" height="1"><IMG height="1" src="'+RUTA+'graphics/WhitePix.gif" width=11></td>');
document.write('	    <TD width="9" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('	    <TD width="157" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('   	 	<TD width="12" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('   	 	<TD width="4" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('    	<TD width="513" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('    	<TD width="60" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('    	<TD width="12" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('    	<TD width="1" bgcolor="#cccccc"><IMG height="1" src="'+RUTA+'graphics/GreyPix.gif"></TD>');
document.write('	</tr>');
document.write('	<tr height="22">');
document.write('    	<TD width="12" bgColor="#ffffff" height="22" align="right" valign="top"><IMG height=22 src="'+RUTA+'graphics/single_line.gif" width=1></TD>');
document.write('	    <TD width="166" colspan="2" height="22" bgcolor="#ffffff"></TD>');
document.write('   	 	<TD width="16" colspan="2" bgcolor="#ffffff"></TD>');
document.write('    	<TD width="576" colspan="2" height="22" bgcolor=#ffffff align="right"><img src="'+RUTA+'graphics/mini_biomedist_anim.gif" border="0"></TD>');
document.write('    	<TD width="9"></TD>');
document.write('    	<TD width=1 bgColor=#cccccc height=22><IMG height=1 src="'+RUTA+'graphics/GreyPix.gif" width=1></TD>');
document.write('	</tr>');

if (opcion != 0)	// No muestra menu si la opcion es 0 
{
	document.write('	<tr valign="top"><td rowspan="2" colspan="3" align="left" valign="top">');
	menubiomedist(2,xopcion,idioma);
	document.write('	</td>');

	if (!titulo)
		document.write('<td colspan="3"></td>');
	else
		document.write('<td colspan="1"></td><td colspan="2" bgcolor="#ffffff" valign="bottom"><div class="subtitle"><img src="'+RUTA+'graphics/'+titulo+'"></div></td>');

	document.write('		<td colspan="2" align="right">');
	bothome = (idioma == "english")? "home.gif" : "inicio.gif";
	if (idioma == "english")
	   	document.write('			<a href="'+RUTA+'english/index.html" target="_top">');
	else
		document.write('			<a href="'+RUTA+'espanol/index.html" target="_top">');
	document.write('<img src="'+RUTA+'graphics/'+bothome+'" border="0"></a>');
	document.write('		</td>');
	document.write('    	<TD width=1 bgColor=#cccccc height=22><IMG height=1 src="'+RUTA+'graphics/GreyPix.gif" width=1></TD>');
	document.write('	</tr>');
	document.write('	<tr valign="top">');
	document.write('		<td colspan=2 align="left" valign="top"></td>');
	document.write('		<td colspan=2>');
}	
}

function cabeceraright(titulo)
{
	ruta();
	document.write('<BODY TEXT="#003366" LINK="#003366" VLINK="#003366" bgcolor="#ffffff" topmargin="0" leftmargin="0">');
	document.write('<table width="586" cellspacing="0" cellpadding="0" border="0">');
	document.write('<tr>');
	document.write('	<td width="513" valign="bottom"><div class="subtitle"><img src="'+RUTA+'graphics/'+titulo+'"></div></td>');
	document.write('	<td width="72" align="right">');
	document.write('		<a href="index.html" target="_top"><img src="'+RUTA+'graphics/home.gif" border="0"></a>');
	document.write('	</td>');
	document.write('	<TD width=1 bgColor=#cccccc height=22><IMG height=1 src="'+RUTA+'graphics/GreyPix.gif" width=1></TD>');
	document.write('</tr>');
}

function Idioma(nomBtn, idioma, vlr) 
{
	document [nomBtn].src = (idioma == "espanol")? btnIdioma[0][vlr].src : btnIdioma[1][vlr].src;
}

function SetImg(nArch,tArch) 
{
	var botao = new Image();
	botao.src = nArch + tArch;
	return botao;
}

function menutipo(idioma) 
{
 	strTipo[0] = idioma+".gif";
	strTipo[1] = idioma+"_on.gif";
	for (h=0; h <= strNombre.length; h++) 
	{   
		for (j=0; j <= strTipo.length; j++) 
		{
		 	btn[h][j] = new SetImg(strNombre[h],strTipo[j]);
		}
	}
}

function Matriz(n) 
{
	this.length = n;
	for (i=0; i<=n; i++) 
	{
		this[i] = new Image();
	}
	return this;
}

function Alterna(nomBtn, numBtn, vlr)   // Alterna Imágenes
{
	document [nomBtn].src = btn[numBtn][vlr].src;
}

function Troca(ant)   // Restaura Imágenes 
{
	Alterna('btn'+ant,ant-1,0);
}

function menubiomedist(estilo,opcion,idioma)  // Menu Principal estilo: 1-horizontal / 2-vertical
{
if (idioma == "english") menutipo('eng');  else	menutipo('esp');
col_idioma = (idioma == "espanol")? 2 : 3;
otroidioma = (idioma == "espanol")? "english" : "espanol";
msg_otroidioma = (idioma == "espanol")? "see this page in english..." : "vea esta página es español...";

if (estilo == 2) 
	document.write('<table width="178" valign="top" align="left" border="0" cellspacing="0" cellpadding="0" valign="top"> ');
else
	document.write('<table width="98%" border="0" cellspacing="0" cellpadding="0" align="right">');

document.write('<tr valign="top"><td>');
document.write('<a href="../'+btn[0][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==1) Alterna('btn1',0,1); else Alterna('btn1',0,1); return true\" ");
document.write("onmouseOut=\"if (button==1) Alterna('btn1',0,1); else Alterna('btn1',0,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn1',0,1); button=1\"><img src=\""+btn[0][0].src+"\" border=\"0\" name=\"btn1\"></a> ");
if (estilo==2) document.write('</td></tr><tr valign="top"><td>'); else document.write('</td><td>');

document.write('<a href="../'+btn[1][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==2) Alterna('btn2',1,1); else Alterna('btn2',1,1); return true\" ");
document.write("onmouseOut=\"if (button==2) Alterna('btn2',1,1); else Alterna('btn2',1,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn2',1,1); button=2\"><img src=\""+btn[1][0].src+"\" border=\"0\" name=\"btn2\"></a> ");
if (estilo==2) document.write('</td></tr><tr valign="top"><td>'); else document.write('</td><td>');

document.write('<a href="../'+btn[2][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==3) Alterna('btn3',2,1); else Alterna('btn3',2,1); return true\" ");
document.write("onmouseOut=\"if (button==3) Alterna('btn3',2,1); else Alterna('btn3',2,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn3',2,1); button=3\"><img src=\""+btn[2][0].src+"\" border=\"0\" name=\"btn3\"></a> ");
document.write("</td></tr>");

document.write('<tr valign="top"><td>');
document.write('<a href="../'+btn[3][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==4) Alterna('btn4',3,1); else Alterna('btn4',3,1); return true\" ");
document.write("onmouseOut=\"if (button==4) Alterna('btn4',3,1); else Alterna('btn4',3,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn4',3,1); button=4\"><img src=\""+btn[3][0].src+"\" border=\"0\" name=\"btn4\"></a> ");
if (estilo==2) document.write('</td></tr><tr valign="top"><td>'); else document.write('</td><td>');

document.write('<a href="../'+btn[4][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==5) Alterna('btn5',4,1); else Alterna('btn5',4,1); return true\" ");
document.write("onmouseOut=\"if (button==5) Alterna('btn5',4,1); else Alterna('btn5',4,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn5',4,1); button=5\"><img src=\""+btn[4][0].src+"\" border=\"0\" name=\"btn5\"></a> ");
if (estilo==2) document.write('</td></tr><tr valign="top"><td>'); else document.write('</td><td>');

document.write('<a href="../'+btn[5][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==6) Alterna('btn6',5,1); else Alterna('btn6',5,1); return true\" ");
document.write("onmouseOut=\"if (button==6) Alterna('btn6',5,1); else Alterna('btn6',5,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn6',5,1); button=6\"><img src=\""+btn[5][0].src+"\" border=\"0\" name=\"btn6\"></a> ");
document.write("</td></tr>");

//document.write('<tr valign="top"><td>');
//document.write('<a href="../'+btn[6][col_idioma]+'" target="_top" ');
//document.write("onmouseover=\"if (button==7) Alterna('btn7',6,1); else Alterna('btn7',6,1); return true\" ");
//document.write("onmouseOut=\"if (button==7) Alterna('btn7',6,1); else Alterna('btn7',6,0); return true\" ");
//document.write("onclick=\"if (button>0) Troca(button); Alterna('btn7',6,1); button=7\"><img src=\""+btn[6][0].src+"\" border=\"0\" name=\"btn7\"></a> ");
//if (estilo==2) document.write('</td></tr><tr valign="top"><td>'); else document.write('</td><td>');

document.write('<tr valign="top"><td>');

document.write('<a href="../'+btn[7][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==8) Alterna('btn8',7,1); else Alterna('btn8',7,1); return true\" ");
document.write("onmouseOut=\"if (button==8) Alterna('btn8',7,1); else Alterna('btn8',7,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn8',7,1); button=8\"><img src=\""+btn[7][0].src+"\" border=\"0\" name=\"btn8\"></a> ");
if (estilo==2) document.write('</td></tr><tr valign="top"><td>'); else document.write('</td><td>');

document.write('<a href="../'+btn[8][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==9) Alterna('btn9',8,1); else Alterna('btn9',8,1); return true\" ");
document.write("onmouseOut=\"if (button==9) Alterna('btn9',8,1); else Alterna('btn9',8,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn9',8,1); button=9\"><img src=\""+btn[8][0].src+"\" border=\"0\" name=\"btn9\"></a> ");
if (estilo==2) document.write('</td></tr><tr valign="top"><td>'); else document.write('</td><td>');

document.write('<a href="../'+btn[9][col_idioma]+'" target="_top" ');
document.write("onmouseover=\"if (button==10) Alterna('btn10',9,1); else Alterna('btn10',9,1); return true\" ");
document.write("onmouseOut=\"if (button==10) Alterna('btn10',9,1); else Alterna('btn10',9,0); return true\" ");
document.write("onclick=\"if (button>0) Troca(button); Alterna('btn10',9,1); button=10\"><img src=\""+btn[9][0].src+"\" border=\"0\" name=\"btn10\"></a> ");
document.write("</td></tr>");

if (estilo == 2) 
{ 
  document.write('<tr><td><br>');
  document.write('<form method="GET" action="http://www.google.com/custom">');
  document.write('  <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0">');
  document.write('  <tr align="left"><td>');
  document.write('	  	  <input type="text" name="q" size="11" maxlength="255" value="">');

  if (idioma == "espanol")
    document.write('	      <input type="image" src="../graphics/bt_buscar.gif" border="0">');
  else
    document.write('	      <input type="image" src="../graphics/bt_search.gif" border="0">');

  document.write('      </td></tr>');
  document.write('  <tr valign="top"><td>');
  document.write('  	      <font face="verdana" size="1">'); 
  document.write('          <input type="radio" name="sitesearch" value="biomedist.com" checked>');
  document.write('          Biomedist.com<br>');
  document.write('		  <input type="radio" name="sitesearch" value="">');

  if (idioma == "espanol")
    document.write('          en Internet<br>');
  else
    document.write('          in Web<br>');

  document.write('      </td></tr>');
  document.write('</table>');
  document.write('</form>');
  document.write("</td></tr>");
}

if (estilo==2) document.write("<tr><td>&nbsp;&nbsp;"); else document.write("<tr><td colspan=\"2\"></td><td align=\"center\">");

document.write('<a href="../'+otroidioma+'/index.html" target="_top" ');
document.write("onmouseOver=\"Idioma('btn_idioma',otroidioma,1); window.status=msg_otroidioma; return true\" ");
document.write("onmouseOut=\"Idioma('btn_idioma',otroidioma,0); window.status=''; return true\">");
if (idioma == "espanol")
   document.write("<img src=\""+RUTA+"graphics/btneng.gif\" border=\"0\" name=\"btn_idioma\"></a></td> ");
else
   document.write("<img src=\""+RUTA+"graphics/btnesp.gif\" border=\"0\" name=\"btn_idioma\"></a></td> ");
	
document.write("</td></tr>");

document.write("</table>");
if (opcion != 0) Alterna('btn'+opcion,opcion-1,1);
button=opcion;	
}

function pie(idioma)   // PIE PARA PAGINAS DE DETALLE
{
document.write('		<br><br><br><br><br></td>');
document.write('		<td width=12 bgColor=#ffffff height=20 align="right"></TD>');
document.write('		<td width=1 bgColor=#cccccc height=20 align="right"></TD>');
document.write('	</tr>');
document.write('	<tr>');
bottop = (idioma == "english")? "top.gif" : "subir.gif";
document.write('		<TD width="21" colspan="3" height=40><a href="#inicio"><IMG height=40 src="'+RUTA+'graphics/'+bottop+'" border="0"></a></TD>');
document.write('    	<TD valign=top colspan=5 height=40></td>');
document.write('		<td bgcolor=#cccccc width=1><img src="'+RUTA+'graphics/GreyPix.gif" height=40 width=1></td>');
document.write('	</tr>');
document.write('	<tr>');
document.write('		<TD width=780 bgColor=#cccccc colSpan=8 height=1><IMG height=1 src="'+RUTA+'graphics/WhitePix.gif" width=10></td>');
document.write('	</tr>');
document.write('	</table>');
document.write('	<center>');
document.write('		<FONT size=1>Copyright © 2003-2006, BIOMEDIST - Biomedical Distributors. &nbsp;');

if (idioma == "english")
	document.write('All rights reserved. ');
else
	document.write('Todos los derechos reservados. ');

document.write('|&nbsp;</FONT>');
//document.write('<A class="navig" href="index.html" target="_top"><FONT size=1>');

//if (idioma == "english")
//	document.write('home');
//else
//	document.write('inicio');

//document.write('</FONT></A> |&nbsp;');  
document.write('<A class="navig" href="mailto:biomedist@biomedist.com"><FONT size=1>biomedist@biomedist.com</FONT></A>');
document.write('</center></td></tr>');
document.write('<tr height="8"><td></td></tr>');
document.write('</table>');
document.write('</body>');
}

function ShowPopup(FileURL,vAncho,vAlto,vScroll,vResize,centrado)
// vScroll -> 0(NO) / 1(SI) -  vResize -> 0(NO) / 1(SI) - centrado -> 0(NO) / 1(SI)
{
	if (centrado == 1)
	{ 
		Arriba=((screen.height/2) - (vAlto/2))-3;
		Izquierda=screen.width/2 - (vAncho/2);
	}
	else
	{
		Arriba=50;
		Izquierda=2;
	}
	features = "width="+vAncho+", height="+vAlto+", scrollbars="+vScroll+", left="+ Izquierda +", top="+ Arriba + ", resizable="+vResize+", location=0";	
	var popup=window.open(FileURL,FileURL.value,features);
	if ( navigator.appName.substring(0,8) == "Netscape" ) popup.location = FileURL;
}
