var tiempo;
var sint = null;
var i = 1;
function muestracapa(capa){
	if(capa == "blotraswebs"){
		clearTimeout(tiempo);
		document.getElementById(capa).style.display='block';
	}else{
		document.getElementById(capa).style.display='block';
	}
}
function ocultacapa(capa){
	if(capa == "blotraswebs"){
		tiempo = setTimeout(function(){document.getElementById(capa).style.display='none';},200);
	}else{
		document.getElementById(capa).style.display='none';
	}
}
var vcheck;
function checkradio(este){
vcheck = este;
}
function cargaplayer(archivo) {
	var video = archivo.split("|");
var so = new SWFObject('http://www.fsmgroup.es/mediaplayer/player.swf','mpl','276','179','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file',video[0]);
so.addVariable('image','imagenes/videos/'+ video[1]);
so.addVariable('backcolor','113864');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('lightcolor','ffffff');
so.addVariable('screencolor','000000');
so.addVariable('autostart','false');
so.write('divVideo');
}
function logfocus(campo) {
	if(campo.value == 'introduce tu nick o email' || campo.value == 'password') {
	campo.value = '';
	}
}
function logblur(campo) {
	if(campo.value == '') {
		if(campo.name == 'userSPS') { campo.value = 'introduce tu nick o email'; }
		if(campo.name == 'passSPS') { if(document.getElementById("userSPS").value == 'introduce tu nick o email'){ campo.value = 'password'; } }
	}
}
function inputlogin(x,y,campo){
	campo.style.backgroundPosition = ''+ x +'px '+ y +'px';
}
function faceshare(url) {
	window.open('http://www.facebook.com/sharer.php?u=http://www.spaceofsound.com/'+ url,'faceshare','width=600,height=400,scrollbars=no,directories=no,toolbar=no,left=50,top=50');
}
function postearcomentario(idC,idE){
comentario = document.getElementById('textComentario').value;
objajaxpost('divcomentarios','inc/ajax.comentarios.php','s='+ idC +'&id='+ idE +'&comentario='+ comentario,document);
document.getElementById('textComentario').value = '';
}
function limiteCaracteres(elemento,maximo){
var limitet;
    if(elemento.value.length > maximo){
		limitet = elemento.value.substr(0,maximo);
		alert("El texto no puede superar los "+ maximo +" caracteres.");
		elemento.value = limitet;
	}
} 
function newsletter() {
	try {
		if(document.forms.fnews.newsop[0].checked) { op = 'alta'; } else { op = 'baja'; }
    	objajax('bnews','inc/ajax.newsletter.php?email='+ document.getElementById('newsemail').value +'&movil='+ document.getElementById('newsmovil').value +'&op='+ op,document);
	} catch(e) {
		objajax('bnews','inc/ajax.newsletter.php',document);
	}
}