function hudInput(elementid)
{
	if($type($(elementid)) != "element")
	{
		return false;
	}
	$(elementid).set('alt',$(elementid).value);
	
	$(elementid).addEvent('blur',function(){
		if(this.value == '')
		{
			this.value = this.alt;
		}
	});
	
	$(elementid).addEvent('focus',function(){
		if(this.value == this.alt)
		{
			this.value = '';
		}
	});
}

function evalLinks()
{
	
	$$('a').each(function(el){
		//si no contiene http lo trabajamos
		el.removeEvents('click');
		var target = '';
		if(el.class != "external")
		{
			el.addEvent('click',function(e)
			{
				e.stop();
				
				target = el.href.replace('http://'+document.domain,'');
				
				var loc = document.location+'';
				partes = loc.split('#');
				
				if(partes[0] != 'http://'+document.domain+'/')
				{
					
					document.location = '/#'+target;
				}
				else
				{
					document.c.request({
						'url':target,
						'history':true,
						'uid':target,
						'div':'content'
					});
				}
				
				
			
			});
			
			el.set('html',el.get('html')+' '+target);
		}
		
	});

}