
var StyleButton=new Array(
	'https://www.salusline.com/webutils/pngtext.php?FONT=fradm&SIZE=9&COLOR=000000&ALIGN=l&BGCOLOR=FFFFFF&WIDTH=148&HEIGHT=20&XPAD=15&YPAD=2&ICON=ic_cubored,2,7&text=',
	'https://www.salusline.com/webutils/pngtext.php?FONT=fradm&SIZE=9&COLOR=000000&ALIGN=l&BGCOLOR=FFFFFF&WIDTH=148&HEIGHT=20&XPAD=15&YPAD=2&ICON=ic_cubored,2,7&text=');

/*
var StyleButton=new Array(
	'http://webutils.ari.es/giftext.php?FONT=fradm&SIZE=11&COLOR=000000&ALIGN=l&BGCOLOR=FFFFFF&WIDTH=148&HEIGHT=20&XPAD=15&YPAD=3&ICON=ic_cruz,1,5&text=',
	'http://webutils.ari.es/giftext.php?FONT=fradm&SIZE=11&COLOR=000000&ALIGN=r&BGCOLOR=FFFFFF&WIDTH=148&HEIGHT=20&XPAD=10&YPAD=3&ICON=ic_cruz,170,5&text=');

*/
var selected=false;

function GetStyleButton(texto,OnOff) {
//alert(texto);
//  texto = texto.replace(" ", "+"); 
//  texto = texto.replace("\n","\D13");
  var res=StyleButton[OnOff] + escape(texto);

  return res;
}

function SetOption(n) {
  var linkdata;
  if (selected) {
	linkdata=botones[selected];
	document.images['boton_' + selected].src=GetStyleButton(linkdata,0);
  }
  linkdata=botones[n];
  document.images['boton_' + n ].src=GetStyleButton(linkdata,1);
  selected=n;
  
}

function CreaBotonera(botones,vertical) {
	var res='';
	var i;
	for (i in botones) {
		linkdata=botones[i];
		res+='<tr><td><a href="./index.php?SEC=modulos&MOD=' + i + '" onClick="SetOption(\'' + i + '\')" onFocus="javascript:blur();">' +
		'<img name="boton_' + i + '" border=0 align=absmiddle src="'+ GetStyleButton(linkdata,(selected==i)+0) + '" ></a></td></tr>';
		
	}
 return res;
}
