function highlight(li,valor){ if(valor==1){ li.style.backgroundColor = "#EFEFEF"; }else{ li.style.backgroundColor = ""; } } function printMe(){ var prtW = window.open("/print.asp","printW","width=690,height=240,status=1,scrollbars=1,resizable=1"); prtW.focus(); } function getSrc(){ document.getElementById("HTMLsrc").innerHTML = opener.document.getElementById("printSrc").innerHTML; } function opengallery(){ var gallerywindow = window.open("/galeria/index.asp","galeria","menubar=0,width=666,height=424,scrollbars=1"); gallerywindow.focus(); } function openCred(){ var cred = window.open("/credenciales.asp","credenciales","menubar=0,width=640,height=480,scrollbars=1,resizable=1"); cred.focus(); } function ampliarMapa(){ var mapa = window.open("/mapa_espana.asp","Mapa","width=650,height=540,status=1"); mapa.focus(); } function openUSCred(){ var UScred = window.open("/USCredits.asp","UScredits","menubar=0,width=640,height=480,scrollbars=1,resizable=1"); UScred.focus(); } function viewFaq(n){ if(document.getElementById("faqDiv"+n)){ var miDiv = document.getElementById("faqDiv"+n); var vista = (miDiv.style.display == 'none') ? 'block' : 'none'; miDiv.style.display = vista; } } function blogMesAction(mmyyyy){ var pre = "blogMesUl"; if(document.getElementById(pre+mmyyyy)){ var miDiv = document.getElementById(pre+mmyyyy); var vista = (miDiv.style.display == 'none') ? 'block' : 'none'; miDiv.style.display = vista; } } function markPageActive(){ var miDiv = document.getElementById("menuLeftBox"); var misLinks = miDiv.getElementsByTagName("a"); var miPagina = window.document.location.href; for(var a=0;aarrSuggest.length-1){ arrSuggest[arrSuggest.length-1].className = detectStyle(arrSuggest[arrSuggest.length-1]); navSB=0; arrSuggest[navSB].className = "pover"; }else{ arrSuggest[navSB].className = detectStyle(arrSuggest[navSB]); navSB++; arrSuggest[navSB].className = "pover"; } } break; default: if(obj.value){ sendWord(obj.value); } } /*if(obj.value.length>=3){ }*/ } function destroySB(){ sb.style.visibility = "hidden"; sb.innerHTML = ""; navSB = -1; t2.value = ""; bolSBdesplegado = false; } function sendWord(txt){ xmlHttpPText.open("GET", "http://"+location.host+"/buscador/getData.asp?txt=" + escape(txt)); xmlHttpPText.onreadystatechange = processData; xmlHttpPText.send(null); } function processData(){ if(xmlHttpPText.readyState == 4) { var response = xmlHttpPText.responseText; var miXML = xmlHttpPText.responseXML; if(!miXML.documentElement && xmlHttpPText.responseStream){ miXML.load(xmlHttpPText.responseStream); } sb.style.visibility = "visible"; var arrData = miXML.getElementsByTagName("data"); if(arrData.length>0){ fillSuggestBox(arrData); }else{ destroySB(); } } } function fillSuggestBox(arr){ var strValor = ""; var strValor2 = ""; var strHtml = ""; var cont = 0; var myStyle = ""; for(var a=0;a' + strValor + '\n'; cont++; } sb.innerHTML = strHtml; //llenamos el array de suggest arrSuggest = sb.getElementsByTagName("a"); bolSBdesplegado = true; } function makeClick(obj){ setSBText(t1,t2,obj); document.getElementById("buscador").submit(); } function setSBText(objText,objData,link){ if(link){ var strValor = ""; objText.value = link.innerHTML; try{ //IE strValor = link.attributes("cod").value; }catch(err){ //PARA FF strValor = link.attributes.item("cod").value; } objData.value = strValor; sb.style.visibility = "hidden"; } } function chgBg(obj,n){ obj.style.cursor = "hand"; var strClassName = obj.className; n = parseInt(n); if(n==1){ obj.className = "pover"; }else{ obj.className = detectStyle(obj); } } function detectStyle(obj){ var cont = obj.attributes[0].value; if(!cont){ cont = obj.attributes("cont").value; } cont = parseInt(cont); if(cont%2!=0){ return "alter"; }else{ return "noalter"; } } function getElementsByClassName(strClass, strTag, objContElm) { strTag = strTag || "*"; objContElm = objContElm || document; var objColl = objContElm.getElementsByTagName(strTag); if (!objColl.length && strTag == "*" && objContElm.all) objColl = objContElm.all; var arr = new Array(); var delim = strClass.indexOf('|') != -1 ? '|' : ' '; var arrClass = strClass.split(delim); for (var i = 0, j = objColl.length; i < j; i++) { var arrObjClass = objColl[i].className.split(' '); if(delim == ' ' && arrClass.length > arrObjClass.length){ continue} var c = 0; comparisonLoop: for (var k = 0, l = arrObjClass.length; k < l; k++) { for (var m = 0, n = arrClass.length; m < n; m++) { if (arrClass[m] == arrObjClass[k]){ c++} if (( delim == '|' && c == 1) || (delim == ' ' && c == arrClass.length)) { arr.push(objColl[i]); break comparisonLoop; } } } } return arr; } function getStyle(obj, styleProp){ if(obj.currentStyle){ return obj.currentStyle[styleProp]; }else if (window.getComputedStyle){ return document.defaultView.getComputedStyle(obj,null).getPropertyValue(styleProp); } } function getXY(obj){ var curleft = 0; var curtop = 0; var border; var padding; if (obj.offsetParent){ do{ // XXX: If the element is position: relative we have to add borderWidth if (getStyle(obj, 'position') != 'absolute'){ if (border = getStyle(obj, 'border-top-width')) curtop += parseInt(border); if (border = getStyle(obj, 'border-left-width')) curleft += parseInt(border); if (padding = getStyle(obj, 'padding-top')) curtop += parseInt(padding); if (padding = getStyle(obj, 'padding-left')) curleft += parseInt(padding); } curleft += obj.offsetLeft; curtop += obj.offsetTop; }while (obj = obj.offsetParent) }else if (obj.x){ curleft += obj.x; curtop += obj.y; } return {'x': curleft, 'y': curtop}; } function chkRetryForm(){ var codReg = document.getElementById("codReg").value; var secCode = document.getElementById("secCode").value if(codReg!="" && secCode!=""){ if(isNaN(codReg)){ alert("You must fill both fields with your registration ID and security code number"); return false; }else if(isNaN(secCode)){ alert("You must fill both fields with your registration ID and security code number"); return false; } }else{ alert("You must fill both fields with your registration ID and security code number"); return false; } } function addEvent(elm, evType, fn, useCapture){ if (elm.addEventListener){ elm.addEventListener(evType, fn, useCapture); return true; }else if(elm.attachEvent){ var r = elm.attachEvent('on' + evType, fn); return r; }else{ elm['on' + evType] = fn; } } // To cover IE 5.0's lack of the push method Array.prototype.push = function(value) { this[this.length] = value } function goFBFanHome(obj){ if(obj){ location.href = obj.nextSibling.attributes.item('href').value; } } function setInnerText(o,valor){ if(!document.documentElement.innerText){ o.textContent = valor; }else{ o.innerText = valor; } } function setSpanText(id,obj){ var arrValor = obj.getAttribute("valor").split(" / "); for(var i=0;i