var txt_recibido='recebeu um total de';
var txt_votaciones_punt='votos, e a sua pontuação média é de';
var txt_aun_no_punt='ainda não recebeu votos';
var txt_contactar_este_usu='Contactar com este utilizador';
var txt_volver_a_la_ficha='Voltar à ficha de <[userName]>';
var txt_seguro_que_quieres_eliminar='De certeza que queres eliminar a imagem seleccionada?';
var txt_seleccionar_una_imagen='Deves seleccionar uma imagem';
var txt_txt_formato_imagen='O formato de imagem seleccionado não é correcto';
var txt_pas_conf_no_coinciden='A password e a confirmação não coincidem.\\nInsere-as novamente';
var txt_debes_especificar_nombre='Deves especificar o nome que aparecerá na tua ficha';
var txt_debes_especificar_mail='Deves especificar um e-mail.';
var txt_debes_introducir_mail='Tens de introduzir o e-mail';
var txt_has_introducir_contr='Tens de introduzir a password';
var txt_opina_sobre_usuario='Dá a tua opinião sobre este utilizador';
var txt_tu_opinion_es_corta='A tua opinião é demasiado pequena. Deveria ter no mínimo 20 caracteres.';
var txt_especificar_nombre='Deves especificar o Nome';
var txt_especicar_algo_cerca_ti='Deves explicar algo sobre ti';
var txt_contactar_mujer_envia_foto='Para contactar com esta mulher é necessário que lhe envies a tua foto.\\n Por favor, insere a tua foto.';
var txt_responder_php_link='responder.php';
function get_XML_DOC(http) {
var xmlobject = (new DOMParser()).parseFromString(http.responseText, "text/xml");
return xmlobject;
}
function creaXML(){
var objetoAjax=false;
try {
/*Para navegadores distintos a internet explorer*/
objetoAjax = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
/*Para explorer*/
objetoAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (E) {
objetoAjax = false;
}
}
if (!objetoAjax && typeof XMLHttpRequest!='undefined') {
objetoAjax = new XMLHttpRequest();
}
return objetoAjax;
}
function loadUserAverage(document, objeto, u){
xmlhttpa=creaXML();
parametrourl="showUserRate.php?u=" + u;
url=parametrourl;
xmlhttpa.open('GET',url,true);
xmlhttpa.onreadystatechange=function() {
if (xmlhttpa.readyState==4) {
docXML=xmlhttpa.responseXML;
try {
nodos=docXML.getElementsByTagName('root')[0].childNodes;
} catch (any){
loadUserAverage(objeto, u);
}
var sex = nodos[0].getAttribute("sex");
var pathImg = nodos[0].getAttribute("pathImg");
var numRate = nodos[0].getAttribute("numRate");
var average = nodos[0].getAttribute("average");
var mainImg = document.getElementById('mainPhoto').src;
objeto.className='';
objeto.innerHTML =
"
";
}
}
xmlhttpa.setRequestHeader('Accept','message/x-jl-formresult');
xmlhttpa.send(xmlhttpa.responseXML);
}
function loadUserAverage2(document,objeto1,objeto2,u1,u2,urlUsr){
var html = "";
xmlhttpa=creaXML();
parametrourl="showUserRate.php?u=" + u1;
url=parametrourl;
xmlhttpa.open('GET',url,true);
xmlhttpa.onreadystatechange=function() {
if (xmlhttpa.readyState==4) {
docXML=xmlhttpa.responseXML;
try {
nodos=docXML.getElementsByTagName('root')[0].childNodes;
} catch (any){
loadUserAverage2(document,objeto1,objeto2,u1,u2,url);
}
var sex = nodos[0].getAttribute("sex");
var pathImg = nodos[0].getAttribute("pathImg");
var numRate = nodos[0].getAttribute("numRate");
var average = nodos[0].getAttribute("average");
var mainImg = new Image();
mainImg.src = document.getElementById('mainPhoto').src;
objeto1.className='';
var html =
"
" +
"
" +
"" +
"
" +
"
";
var nom = document.getElementById("nom");
if (numRate != "0") {
html += "" + nom.innerHTML + " "+txt_recibido+" " + numRate + " "+txt_votaciones_punt+" " + average + ".";
} else {
html += "" + nom.innerHTML + " "+txt_aun_no_punt+".";
}
html += " " +
"
" +
"
";
objeto1.innerHTML = html;
}
}
xmlhttpa.setRequestHeader('Accept','message/x-jl-formresult');
xmlhttpa.send(xmlhttpa.responseXML);
if (u2 != -1) {
xmlhttpa2=creaXML();
parametrourl="showSexyRate.php?u=" + u2;
url=parametrourl;
xmlhttpa2.open('GET',url,true);
xmlhttpa2.onreadystatechange=function() {
if (xmlhttpa2.readyState==4) {
docXML=xmlhttpa2.responseXML;
try {
nodos=docXML.getElementsByTagName('root')[0].childNodes;
} catch (any){
loadSexyAverageHead(document, objeto, u , urlUSr);
}
var sex = nodos[0].getAttribute("sex");
var pathImg = nodos[0].getAttribute("pathImg");
var nom = nodos[0].getAttribute("nom");
var numRate = nodos[0].getAttribute("numRate");
var average = nodos[0].getAttribute("average");
var mainImg = pathImg.replace("grd-","pqn-");
objeto2.className='';
var html =
"
" +
"
" +
"" +
"
" +
"
";
if (numRate != "0") {
html += "" + nom + " "+txt_recibido+" " + numRate + " "+txt_votaciones_punt+" " + average + ".";
} else {
html += "" + nom + " "+txt_aun_no_punt+".";
}
html += " " +
"
" +
"
";
objeto2.innerHTML = html;
}
}
xmlhttpa2.setRequestHeader('Accept','message/x-jl-formresult');
xmlhttpa2.send(xmlhttpa2.responseXML);
}
}
function wait(){};
function loadSexyAverage(document, objeto, u){
xmlhttpa=creaXML();
parametrourl="showSexyRate.php?u=" + u;
url=parametrourl;
xmlhttpa.open('GET',url,true);
xmlhttpa.onreadystatechange=function() {
if (xmlhttpa.readyState==4) {
docXML=xmlhttpa.responseXML;
try {
nodos=docXML.getElementsByTagName('root')[0].childNodes;
} catch (any){
loadUserAverage(objeto, u);
}
var sex = nodos[0].getAttribute("sex");
var pathImg = nodos[0].getAttribute("pathImg");
var nom = nodos[0].getAttribute("nom");
var numRate = nodos[0].getAttribute("numRate");
var average = nodos[0].getAttribute("average");
var mainImg = pathImg;
objeto.className='';
objeto.innerHTML =
"
";
}
}
xmlhttpa.setRequestHeader('Accept','message/x-jl-formresult');
xmlhttpa.send(xmlhttpa.responseXML);
}
function loadSexyAverageHead(document, objeto, u , urlUSr){
xmlhttpa=creaXML();
parametrourl="showSexyRate.php?u=" + u;
url=parametrourl;
xmlhttpa.open('GET',url,true);
xmlhttpa.onreadystatechange=function() {
if (xmlhttpa.readyState==4) {
docXML=xmlhttpa.responseXML;
try {
nodos=docXML.getElementsByTagName('root')[0].childNodes;
} catch (any){
loadSexyAverageHead(document, objeto, u , urlUSr);
}
var sex = nodos[0].getAttribute("sex");
var pathImg = nodos[0].getAttribute("pathImg");
var nom = nodos[0].getAttribute("nom");
var numRate = nodos[0].getAttribute("numRate");
var average = nodos[0].getAttribute("average");
var mainImg = pathImg;
objeto.className='';
objeto.innerHTML =
"