function pth(valor){
	var i=0;
	var inicio=0;
	var cestr='';
	var valor_on="<img src='/emag_users/pcurso/images/estrella_pequenya_on.gif' width='12' height='12' border='0'>";
	var valor_off="<img src='/emag_users/pcurso/images/estrella_pequenya_off.gif' width='12' height='12' border='0'>";
	if(!valor){
		inicio=1;
		cestr=cestr+"<img src='/emag_users/pcurso/images/estrella_pequenya_0.gif' width='12' height='12' border='0'>";
	}
	for(i=inicio;i<4;i++){
		if(i<valor){cestr=cestr+valor_on;}
		else{cestr=cestr+valor_off;}
	}
	document.write(cestr);
}

function puntuacion(valor,tmno){
	var i=0;var cestr='';anch=15;alto=15;var inicio=0;
	if(tmno=="pequenya"){anch=13;alto=12;}
	if(tmno=="mayor"){anch=21;alto=21;}
	var valor_on='<img src="/emag_users/pcurso/images/estrella_'+tmno+'_on.gif" width="'+anch+'" height="'+alto+'">';
	var valor_off='<img src="/emag_users/pcurso/images/estrella_'+tmno+'_off.gif" width="'+anch+'" height="'+alto+'">';
	if(!valor){
		inicio=1;
		cestr=cestr+'<img src="/emag_users/pcurso/images/estrella_'+tmno+'_0.gif" width="'+anch+'" height="'+alto+'">';
	}
	for(i=inicio;i<4;i++){
		if(i<valor){cestr=cestr+valor_on;}
		else{cestr=cestr+valor_off;}
	}
	document.write(cestr);
}

function ptnd(valor){
	var i=0;var cestr='<span style="white-space:nowrap">';anch=13;alto=12;var inicio=0;
	var valor_on='<img src="/emag_users/pcurso/images/estrella_pequenya_on.gif" width="'+anch+'" height="'+alto+'">';
	var valor_off='<img src="/emag_users/pcurso/images/estrella_pequenya_off.gif" width="'+anch+'" height="'+alto+'">';
	if(valor!=-1){
		if(!valor){
			inicio=1;
			cestr+='<img src="/emag_users/pcurso/images/estrella_pequenya_0.gif" width="'+anch+'" height="'+alto+'">';
		}
		for(i=inicio;i<4;i++){
			if(i<valor){cestr+=valor_on;}
			else{cestr+=valor_off;}
		}
	}
	cestr+='</span>'
	return cestr;
}

function registrar(uti,idus,idop){
	xmlhttpb=creaXML();
	var urlaux="/cursos_gratis/pcurso/act_utility.cfm?utilidad="+uti+"&idusuario="+idus+"&idopinion="+idop;
	xmlhttpb.open("GET",urlaux,true);
	xmlhttpb.onreadystatechange=function() {
		if (xmlhttpb.readyState==4) {
			alert(xmlhttpb.responseText);
		}
	}
	xmlhttpb.setRequestHeader('Accept','message/x-jl-formresult');
	enviou=document.all?null:xmlhttpb.responseText;
	xmlhttpb.send(enviou);
}

function registrar_review(uti,idr){
	xmlhttpb=creaXML();
	var urlaux="/cursos_gratis/pcurso/act_reviews.cfm?utilidad="+uti+"&id_review="+idr;
	xmlhttpb.open("GET",urlaux,true);
	xmlhttpb.onreadystatechange=function() {
		if (xmlhttpb.readyState==4) {
			alert(xmlhttpb.responseText);
		}
	}
	xmlhttpb.setRequestHeader('Accept','message/x-jl-formresult');
	enviou=document.all?null:xmlhttpb.responseText;
	xmlhttpb.send(enviou);
}

function registrar_perfil(idUsuario){
	xmlhttpb=creaXML();
	var urlaux="/cursos_gratis/pcurso/act_usuarios.cfm?idUsuario="+idUsuario;
	xmlhttpb.open("GET",urlaux,true);
	xmlhttpb.onreadystatechange=function() {
		if (xmlhttpb.readyState==4) {
			/*alert(xmlhttpb.responseText);*/
		}
	}
	xmlhttpb.setRequestHeader('Accept','message/x-jl-formresult');
	enviou=document.all?null:xmlhttpb.responseText;
	xmlhttpb.send(enviou);
}




