(function(){if(!/*@cc_on!@*/0)return;var e="abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(',');for(var i=0;i<e.length;i++){document.createElement(e[i])}})();
function dP(id){$(id).fadeToggle();}
function sU(txt){$(txt).fade("Out");}
function sD(txt){$(txt).fade("In");}
function fI(txt){$(txt).fade("In");}
function fO(txt){$(txt).fade("Out");}
function off(txt){document.getElementById(txt).style.display = "none";}
function on(txt){document.getElementById(txt).style.display ="";}
function inner(id,txt){document.getElementById(id).innerHTML=txt;}
function foco(id){document.getElementById(id).focus();}
function color(id,txt){document.getElementById(id).style.color = txt;}
function borde(id,txt){document.getElementById(id).style.border = txt;}
function cursor(id,txt){document.getElementById(id).style.cursor = txt;}
function fondo(id,txt){document.getElementById(id).style.backgroundColor = txt;}
function valor(id,txt){document.getElementById(id).value = txt;}
function subm(id){document.getElementById(id).submit();}
function sacavalor(txt){return document.getElementById(txt).value;}
function sacainner(txt){return document.getElementById(txt).innerHTML;}

var geSelection = function() {
	return $try(
		function(){return window.getSelection();},
		function(){return document.getSelection();},
		function(){ 
	        var selection = document.selection && document.selection.createRange();
			if(selection.text){return selection.text;}
				return false;
			}
		)||false;
};
var seleciona=function(e){
	var selection=geSelection();
	if(selection&&(selection=new String(selection).replace(/^\s+|\s+$/g,''))){
		new Request({url:'/letranet/others/seleciona.asp',method:'post',data:'te='+encodeURI(selection)}).send();
	}
}
var kli=function(e){
	var dla=e.page.x-$('cuerpo').offsetLeft;
	new Request({url:'/letranet/others/click.asp',method:'get',data:'xx='+dla+'&yy='+e.page.y}).send();
}
function ytb(){
	var ca=sacavalor("cansion");
	var si=prompt("Enlace?","");
	valor("cansion","[you]"+si+"[/you]\n\n"+ca);
}
function verClicks(){
	var dla=$('cuerpo').offsetLeft;
	new Request({url:'/letranet/others/click.asp',method:'get',evalResponse:true,data:'dl='+dla}).send();
}
function verSeles(){
	new Request({url:'/letranet/others/seleciona.asp',method:'get',evalResponse:true,data:'dl=sho'}).send();
}
function cierrTra(){
	var tn,td=true;
	while(td){
		tn=document.body.lastChild;
		if(tn.get('class')!='punto'){td=false}
		else{document.body.removeChild(tn);}
	}
	off('trasero');
}
function ajx(url,datos){
	var capa='cancion';
	$(capa).tween('height',0);
	new Request({
		url:'/letranet/letras/'+url,
		method:'get',
		data:datos,
		onSuccess:function(responseText){
			inner(capa,responseText);
			$(capa).tween('height',$(capa).getScrollHeight());
		},
	}).send();	
}
function edita(txt,cantante){ajx("buscar.asp","id="+ txt+"&singer="+cantante);}
function cambiadisco(id,disco,cantante){ajx("changedisk.asp","id="+id);}
function nuevacancion(autor,disco){ajx("nueva.asp","autor="+autor+"&disco="+disco+"&ajax=yes");}