// ================================================================== /*Javascript for Bubble Tooltips by Alessandro Fulciniti http://pro.html.it - http://web-graphics.com */ function enableTooltips(id){ var links,i,h; if(!document.getElementById || !document.getElementsByTagName) return; AddCss(); h=document.createElement("span"); h.id="btc"; h.setAttribute("id","btc"); h.style.position="absolute"; document.getElementsByTagName("body")[0].appendChild(h); if(id==null) links=document.getElementsByTagName("a"); else links=document.getElementById(id).getElementsByTagName("a"); for(i=0;i23) l=l.substr(0,20)+"..."; b.appendChild(document.createTextNode(l)); tooltip.appendChild(b); setOpacity(tooltip); el.tooltip=tooltip; el.onmouseover=showTooltip; el.onmouseout=hideTooltip; el.onmousemove=Locate; } function Prepare(el){ var tooltip,t,b,s,l; t=el.getAttribute("title"); if(t==null || t.length==0) t=el.getAttribute("alt"); if(t==null || t.length==0) t="" else{ el.removeAttribute("title"); tooltip=CreateEl("span","tooltip"); s=CreateEl("span","top"); s.appendChild(document.createTextNode(t)); tooltip.appendChild(s); b=CreateEl("b","bottom"); l=""; b.appendChild(document.createTextNode(l)); tooltip.appendChild(b); setOpacity(tooltip); el.tooltip=tooltip; el.onmouseover=showTooltip; el.onmouseout=hideTooltip; el.onmousemove=Locate; } } function showTooltip(e){ document.getElementById("btc").appendChild(this.tooltip); Locate(e); } function hideTooltip(e){ var d=document.getElementById("btc"); if(d.childNodes.length>0) d.removeChild(d.firstChild); } function setOpacity(el){ el.style.filter="alpha(opacity:95)"; el.style.KHTMLOpacity="0.95"; el.style.MozOpacity="0.95"; el.style.opacity="0.95"; } function CreateEl(t,c){ var x=document.createElement(t); x.className=c; x.style.display="block"; return(x); } function AddCss(){ var l=CreateEl("link"); l.setAttribute("type","text/css"); l.setAttribute("rel","stylesheet"); l.setAttribute("href","bt.css"); l.setAttribute("media","screen"); document.getElementsByTagName("head")[0].appendChild(l); } function Locate(e){ var posx=0,posy=0; if(e==null) e=window.event; if(e.pageX || e.pageY){ posx=e.pageX; posy=e.pageY; } else if(e.clientX || e.clientY){ if(document.documentElement.scrollTop){ posx=e.clientX+document.documentElement.scrollLeft; posy=e.clientY+document.documentElement.scrollTop; } else{ posx=e.clientX+document.body.scrollLeft; posy=e.clientY+document.body.scrollTop; } } /************* if (posx>640) { posx=posx - 150; var newimage; newImage = "url(/portal/portalaj.nsf/btreverse.gif)"; document.getElementById("btc").getElementsByTagName("span").backgroundImage= newimage; // document.getElementById("btc").getElementsByTagName("span").style.backgroundImage= newimage; }else{ var newimage; newImage = "url(/portal/portalaj.nsf/bt.gif)"; // document.getElementById("btc").getElementsByTagName("span").style.backgroundImage= newimage; } **************/ document.getElementById("btc").style.top=(posy+10)+"px"; document.getElementById("btc").style.left=(posx-20)+"px"; } // ================================================================== function changeClass(id, newClass) { var identity=document.getElementById(id); identity.className=newClass; } // Fin changeClass function QUITADOponerEstilos() { var estilos=document.forms[0].wsfGlobalESTILOS.value.split('#'); var elements=estilos.length; var Temp; if (estilos[0]!="") { for (var i=0; i < elements ; i++) { Temp = new String(estilos[i]); var dia = Temp.substring(0, Temp.indexOf("%", 0)); var estilo = Temp.substring(Temp.indexOf("%") + 1, Temp.length); changeClass(dia,estilo) } } } // Fin ponerEstilos function QUITADODoBuscar() { var f = document.forms[0]; var clave = f.Buscar.value; path=window.location.href; i=path.lastIndexOf(".nsf/"); // Busca ultima "/" if (i==-1) { i=path.lastIndexOf(".NSF/"); // Busca ultima "/" } db=path.substring(0,i) + ".nsf/"; if (clave == "") { alert("Falta informar clau"); f.Buscar.focus(); } else { //********** transforma + en ' ' ************** while (clave.indexOf('+')!=-1) { clave = clave.replace('+',' '); } clave=Trim(clave); var array=clave.split(' '); var i=0; var valor=""; while (i< array.length) { valor = valor + "([wfImpTITULO]=" + array[i] + " OR [wfImpSUBTITULO]=" + array[i] + " OR [wfImpTEXTO]=" + array[i]; valor=valor + " OR [BodyPortal]=" + array[i]+ ")"; valor = valor + " AND " i=i+1 } valor=valor.substr(0,valor.length-5); window.location = db + "wvoResBusqueda?SearchView&Query=" + valor + "&categ=Buscar&Start=1&Count=200&"; } } // Fin DoBuscar function Trim(inputstringTrim) { fixedTrim = ""; lastCh = " "; for(x =0; x < inputstringTrim.length; x++) { ch = inputstringTrim.charAt(x); if ((ch != " ") || (lastCh != " ")) { fixedTrim += ch; } lastCh = ch; } if (fixedTrim.charAt(fixedTrim.length - 1) == " ") { fixedTrim = fixedTrim.substring(0, fixedTrim.length - 1); } return fixedTrim; } // Fin función trim