function escribeMenuSup (donde) {	

	var opciones=new Array("Inicio","Ayuntamiento","&Aacute;reas de Gobierno","Conoce Caniles","Noticias","Contacto","Mapa Web","Tu Correo");

	var links=new Array("index.php","index.php?option=com_content&task=view&id=29&Itemid=36","index.php?option=com_content&task=view&id=25&Itemid=46","index.php?option=com_content&amp;task=view&amp;id=50&amp;Itemid=80","index.php?option=com_content&task=category&sectionid=1&id=1&Itemid=2","index.php?option=com_content&task=view&id=28&Itemid=47","index.php?option=com_content&task=view&id=37&Itemid=2","http://webmail.caniles.es/");

	var texto="";

	

	//Sacamos el texto

	for (var cont=0; cont<opciones.length; cont++) {

		if (opciones[cont]=="Tu Correo") texto+='<a href="'+links[cont]+'" target="_blank"><span style="font-family:Arial, Helvetica, sans-serif; color:#444444; font-weight:bold;" onmouseover="this.style.color=\'#c64934\'" onmouseout="this.style.color=\'#444444\'"><b>'+opciones[cont]+'</b></span></a> | ';

		else texto+='<span style="font-family:Arial, Helvetica, sans-serif; color:#666666; font-weight:bold; cursor:pointer" onmouseover="this.style.color=\'#006731\'" onmouseout="this.style.color=\'#666666\'" onClick="window.location=\''+links[cont]+'\';">'+opciones[cont]+'</span> | ';

		//texto+='<span style="font-family:Arial, Helvetica, sans-serif; color:#666666; font-weight:bold; cursor:pointer" onmouseover="this.style.color=\'#c64934\'" onmouseout="this.style.color=\'#666666\'" onClick="alert(\''+links[cont]+'\');">'+opciones[cont]+'</span> | ';

	}

	texto=texto.substr(0,texto.length-3);

	

	if (donde=="interior") {

		document.write (texto);		

	} else {

		document.write ("<br /><br /><br /><br /><table width='100%' border='0'><tr><td width='320px'>&nbsp;</td><td>");

		document.write (texto);

       	document.write ("</td></tr></table>");		

	}	

}

function generaTextoImagen (ancho, alto, texto1, texto2, fuente, tamanioFuente, coorX, coorY, colorR, colorG, colorB, fondoR, fondoG, fondoB, angulo, color2R, color2G, color2B, fondo2R, fondo2G, fondo2B, over, out, onClick, alineacion, alinearVert, alinearHor) {		

	//generaTextoImagen(50,7,"leer más >", "leer más >", "../fuentes/ARLRDBD.TTF", 7,0, 9, <?php echo $colorR.",".$colorG.",".$colorB; ?>, 300, 300, 300, 0, 51, 51, 51, 300, 300, 300,"", "", "middle", "top", "middle");

		

	var urlParametros1="generaImagenTexto.php?texto="+texto1;

	var urlParametros2="generaImagenTexto.php?texto="+texto2;

	

	//Ahora vamos componiendo la direccion en funcion de los datos de los que dispongamos

	if (ancho!=0) urlParametros1+="&ancho="+ancho;

	if (alto!=0) urlParametros1+="&alto="+alto;

	if (fuente!="") urlParametros1+="&fuente="+fuente;

	if (coorX!=0) urlParametros1+="&coorX="+coorX;

	if (coorY!=0) urlParametros1+="&coorY="+coorY;

	urlParametros1+="&colorR="+colorR;

	urlParametros1+="&colorG="+colorG;

	urlParametros1+="&colorB="+colorB;

	urlParametros1+="&fondoR="+fondoR;

	urlParametros1+="&fondoG="+fondoG;

	urlParametros1+="&fondoB="+fondoB;

	urlParametros1+="&angulo="+angulo;

	if (tamanioFuente!=0) urlParametros1+="&tamanioFuente="+tamanioFuente;

	urlParametros1+="&alinearVert="+alinearVert;

	urlParametros1+="&alinearHor="+alinearHor;

	

	

	//Ahroa vamos con la imagen de sustitucion, si es que tenemos que hacerla

	if (texto2!="") {

		if (ancho!=0) urlParametros2+="&ancho="+ancho;

		if (alto!=0) urlParametros2+="&alto="+alto;

		if (fuente!="") urlParametros2+="&fuente="+fuente;

		urlParametros2+="&coorX="+coorX;

		urlParametros2+="&coorY="+coorY;

		urlParametros2+="&colorR="+color2R;

		urlParametros2+="&colorG="+color2G;

		urlParametros2+="&colorB="+color2B;

		urlParametros2+="&fondoR="+fondo2R;

		urlParametros2+="&fondoG="+fondo2G;

		urlParametros2+="&fondoB="+fondo2B;			

		urlParametros2+="&angulo="+angulo;

		urlParametros2+="&tamanioFuente="+tamanioFuente;

		urlParametros2+="&alinearVert="+alinearVert;

		urlParametros2+="&alinearHor="+alinearHor;

	}

	//Ahora, en funcion de los parametros construimos

	var orden='<img src="librerias/'+urlParametros1+'" alt="'+texto1+'" ';

	//Si tiene alineacion

	if (alineacion!="") orden+=' align="'+alineacion+'" ';

	if ((onClick!="") || (over!="") || (texto2!="")) orden+=' style="cursor:pointer; border:0" ';

	else orden+=' style="border:0" ';		

	//Si tiene over

	if ((texto2!="") && (over!="")) orden+='onMouseOver="this.src=\'funciones/'+urlParametros2+'\'; '+over+';" onMouseOut="'+out+'; this.src=\'funciones/'+urlParametros1+'\'" ';

	else {

		if (texto2!="") orden+='onMouseOver="this.src=\'funciones/'+urlParametros2+'\';" onMouseOut="this.src=\'funciones/'+urlParametros1+'\'" ';

		if (over!="") orden+='onMouseOver="'+over+'" ';

		if (out!="") orden+='onMouseOut="'+out+'" ';

	}

	//Si tiene onclick		

	if (onClick!="") orden+=' onClick="'+onClick+'"'; 		

	orden+='>';

	document.write (orden);

}
