
var StyleButton=new Array(
	'/webutils/pngtext.php?FONT=fradm&SIZE=6&COLOR=E1BD60&ALIGN=l&BGCOLOR=000000&WIDTH=148&HEIGHT=20&XPAD=13&YPAD=4&ICON=ic_cubored,1,5&text=',
	'/webutils/pngtext.php?FONT=fradm&SIZE=6&COLOR=E1BD60&ALIGN=l&BGCOLOR=000000&WIDTH=148&HEIGHT=20&XPAD=13&YPAD=4&ICON=ic_cubored,1,5&text=');

/*****
var StyleButton=new Array(
	'http://webutils.ari.es/giftext.php?FONT=fradm&SIZE=11&COLOR=E1BD60&ALIGN=l&BGCOLOR=000000&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=E1BD60&ALIGN=r&BGCOLOR=000000&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,obj;
  if (selected) {
	linkdata=botones[selected];
	obj=document.getElementById('boton_'+selected);
	obj.style.backgroundColor=obj.style.prevstyle;
	//document.images['boton_' + selected].src=GetStyleButton(linkdata,0);
  }
  linkdata=botones[n];
  obj=document.getElementById('boton_'+n);
  if (!obj.prevstyle) obj.prevstyle=obj.style.backgroundColor;
  obj.style.backgroundColor='#d7c320';
  //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+='<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>';
		if (vertical) res+='<br>';
	}
*/
	
	for (i in botones) {
		linkdata=botones[i];
		res+='<a id="boton_'+i+'" class="menuleft" href="./index.php?SEC=modulos&MOD=' + i + 
			'" onClick="SetOption(\'' + i + '\')" onFocus="this.blur();"'+
			' style="color:white">' +
		linkdata +
		'</a>';
		if (vertical) res+='<br>';
	}


 return res;
}