/* var agent = navigator.userAgent.toLowerCase(); var isIE = (navigator.appName == "Microsoft Internet Explorer") ? true : false; var isNetscape6 = (!document.all && !document.layers && navigator.appName == "Netscape" && parseInt(navigator.appVersion) >=5) ? true : false; var isMac = (agent.indexOf("Mac") != -1) ? true : false; var isIE4 = (agent.indexOf("MSIE") != -1 && agent.indexOf("4.0;") != -1) ? true : false; var isNetscape = (agent.indexOf("Mozilla") != -1 && agent.indexOf("4.") != -1) ? true : false; var win2000 = ((agent.indexOf("winnt") != -1) || (agent.indexOf("windows nt 5.0") != -1)) ? true : false; var winXP = ((agent.indexOf("winnt") != -1) || (agent.indexOf("windows nt 5.1") != -1)) ? true : false; */ function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n]) && d.all) x=d.all[n]; for (i=0;!x&&i < d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i < d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_showHideLayers() { //v3.0 var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i < (args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } obj.visibility=v; } } function hideAllElements() { a = hideAllElements.arguments; id_generic = a[0]; for (i = 1; i < a.length; i++) { whichEl = document.getElementById(id_generic + '_' + a[i]); whichEl.style.display = "none"; } } function showHideElement() { a = showHideElement.arguments; id_generic = a[0]; hide_show = a[1]; if (typeof(window.pageYOffset) == 'number') { whichEl = document.getElementById(id_generic); if (hide_show == null) whichEl.style.display = (whichEl.style.display == "table-row" || whichEl.style.display == "") ? "none" : "table-row"; else if (hide_show == 'show') whichEl.style.display ="table-row"; else whichEl.style.display ="none"; } else { whichEl = eval(id_generic); if (hide_show == null) whichEl.style.display = (whichEl.style.display == "block" || whichEl.style.display == "") ? "none" : "block"; else if (hide_show == 'show') whichEl.style.display ="block"; else whichEl.style.display ="none"; } } function changeImageSource(el, src1, src2) { whichEl = document.getElementById(el); whichEl.src = (whichEl.src.indexOf(src1) != -1) ? src2 : src1; } function trim(inputString) { // Removes leading and trailing spaces from the passed string. Also removes // consecutive spaces and replaces it with one space. If something besides // a string is passed in (null, custom object, etc.) then return the input. if (typeof inputString != "string") { return inputString; } var retValue = inputString; var ch = retValue.substring(0, 1); while (ch == " ") { // Check for spaces at the beginning of the string retValue = retValue.substring(1, retValue.length); ch = retValue.substring(0, 1); } ch = retValue.substring(retValue.length-1, retValue.length); while (ch == " ") { // Check for spaces at the end of the string retValue = retValue.substring(0, retValue.length-1); ch = retValue.substring(retValue.length-1, retValue.length); } while (retValue.indexOf(" ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ")+1, retValue.length); // Again, there are two spaces in each of the strings } return retValue; // Return the trimmed string back to the user } // Ends the "trim" function function makeSearch() { searcher = trim(document.forms[0]['t_list[searcher]'].value); search = trim(document.forms[0]['t_list[search]'].value); if (search != '') { switch (searcher) { case 'hosteltur': return 'hosteltur'; break; case 'document': return 'document'; break; case 'internet': window.open('http://www.google.com/search?q=' + search + '&ie=UTF-8&oe=UTF-8&btnG=B%C3%BAsqueda+en+Google&lr=', 'Google', 'width=800, height=600, titlebar=1, location=1, menubar=1, resizable=1, scrollbars=1, status=1, toolbar=1'); return false; break; default: return false; } } return false; } /* document.styleSheets[0].cssRules: Mozilla, Netscape * document.styleSheets[0].rules: Explorer */ function changeFontSize(size) { if (size == '') size = '11px'; else if (size.indexOf('px') == -1) size += 'px'; if (document.forms[0].font_size) document.forms[0].font_size.value = size; var theRules = new Array(); if (document.styleSheets[0].cssRules) { theRules = document.styleSheets[0].cssRules; theRules[0].style.setProperty('font-size', size, null); } else if (document.styleSheets[0].rules) { theRules = document.styleSheets[0].rules; theRules[0].style.fontSize = size; } return false; } /* Imprime una URL distinta a la actual, sin cargarla vía web. * Sólo funciona en Internet Explorer */ /* function printURL(sHref) { if (document.getElementById && sHref) { if (!self.oPrintElm) { var aHeads = document.getElementsByTagName('HEAD'); if (!aHeads || !aHeads.length) return false; if (!self.oPrintElm) self.oPrintElm = document.createElement('LINK'); self.oPrintElm.rel = 'alternate'; self.oPrintElm.media = 'print'; aHeads[0].appendChild(self.oPrintElm); } self.oPrintElm.href = sHref; self.focus(); alert(self.oPrintElm.href); self.print(); // Anulamos el objeto creado self.oPrintElm.href = ''; self.oPrintElm.rel = ''; self.oPrintElm.media = ''; return true; } else return false; } */ /* Funciona en IE y en Mozilla */ function printURL (url) { if (window.print && window.frames && window.frames.printerIframe) { var html = ''; html += ''; html += ''; html += '