dding-top:3px;" '+(nss[13]?('" class="'+nss[13]+'"'):'')+'>'+text+''; thml+=''; } if (!nss[10]) tab.style.backgroundColor='transparent'; else tab.style.backgroundColor=nss[10]; break; } tab.innerHTML=thml; //Netscape 7.1 fix tab.style.padding="0px"; tab._lChild=tab.childNodes[tab.childNodes.length-1]; //#4DTabs:23052006{ if (this._vMode) { tab.style.height=parseInt(size||this._tabSize)+"px"; tab.style.width=this._height+1+"px"; } else //#} { tab.style.width=parseInt(size||this._tabSize)+"px"; tab.style.height=this._height+1+"px"; } tab._offsetSize=parseInt(size||this._tabSize); return tab; } dhtmlXTabBar.prototype.adjustTabSize=function(tab,size){ var nss=this._getTabStyle(tab.idd); size=size||tab.scrollWidth+(this._TabCloseButton?50:20); tab.style[this._vMode?"height":"width"]=size+"px"; tab.childNodes[2].style[this._vMode?"height":"width"]=size-nss[8]-nss[7]+"px"; tab._offsetSize=size; } /** * @desc: reinitialize tabbar * @type: public * @topic: 0 */ dhtmlXTabBar.prototype.clearAll = function(){ var z=this._conZone.style.backgroundColor; this._content=new Array(); this.tabsId=new Array(); this.rows=new Array(); this._lastActive=null; this._lastHower=null; this.entBox.innerHTML=""; this._glframe=null; this._createSelf(this._vMode); this.setStyle(this._cstyle); if (z) this._conZone.style.backgroundColor=z; this.enableContentZone(this._eczF); } /** * @desc: set path to image folder ( not affect already created element until their state changes ) * @param: path - path to image folder * @type: public * @topic: 0 */ dhtmlXTabBar.prototype.setImagePath = function(path){ this._imgPath=path; } /** * @desc: load tabbar from xml string * @type: public * @param: xmlString - XML string * @param: afterCall - function which will be called after xml loading * @topic: 0 */ dhtmlXTabBar.prototype.loadXMLString=function(xmlString,afterCall){ this.XMLLoader=new dtmlXMLLoaderObject(this._parseXML,this,true,this.no_cashe); this.XMLLoader.waitCall=afterCall||0; this.XMLLoader.loadXMLString(xmlString); }; /** * @desc: load tabbar from xml file * @type: public * @param: file - link too XML file * @param: afterCall - function which will be called after xml loading * @topic: 0 */ dhtmlXTabBar.prototype.loadXML=function(file,afterCall){ this.XMLLoader=new dtmlXMLLoaderObject(this._parseXML,this,true,this.no_cashe); this.XMLLoader.waitCall=afterCall||0; this.XMLLoader.loadXML(file); } dhtmlXTabBar.prototype._getXMLContent=function(node){ var text=""; for (var i=0; i"; this._glframe=z.childNodes[0]; this._conZone.appendChild(this._glframe); } /*return*/ return; break; case "iframes": case "iframes-on-demand": var z=document.createElement("DIV"); z.className="dhx_tabcontent_sub_zone"; z.style.display='none'; z.innerHTML=""; this.setContent(id,z); break; case "ajax": case "ajax-html": var z=document.createElement("DIV"); z.className="dhx_tabcontent_sub_zone"; this.setContent(id,z); break; } this._content[id]._loaded=false; } /** * @desc: return window of tab content for iframe based tabbar * @type: public * @param: tab_id - tab id * @topic: 1 */ dhtmlXTabBar.prototype.tabWindow=function(tab_id){ if (this._hrfmode.indexOf("iframe")==0) return (this._content[tab_id]?this._content[tab_id].childNodes[0].contentWindow:null); } dhtmlXTabBar.prototype._ajaxOnLoad=function(obj,a,b,c,loader){ if (obj[0]._hrfmode=="ajax"){ var z=loader.getXMLTopNode("content"); var val=obj[0]._getXMLContent(z); } else var val=loader.xmlDoc.responseText; obj[0]._resolveContent(obj[1],val); //#size_adjust:18072006{ obj[0].adjustSize(); //#} if (obj[0].dhx_tab_loaded) obj[0].dhx_tab_loaded(obj[1]); } dhtmlXTabBar.prototype._resolveContent=function(id,val){ var z=val.match(/]*>([^<]+)<\/script>/g); if (this._content[id]){ this._content[id].innerHTML=val; if (z) for (var i=0; i]*>/g,"")); } } //#} /** * @desc: set content of tab * @type: public * @param: id - id of tab * @param: nodeId - id of container, or container object * @topic: 3 * @event: onSelect * @eventdesc: event called when any tab selected * @eventparam: id - id of tab * @eventreturn: if false returned the selection aborted */ dhtmlXTabBar.prototype.setOnSelectHandler=function(func){ if (typeof(func)=="function") this._onsel=func; else this._onsel=eval(func); } /** * @desc: set content of tab * @type: public * @param: id - id of tab * @param: nodeId - id of container, or container object * @topic: 1 */ dhtmlXTabBar.prototype.setContent=function(id,nodeId){ if (typeof(nodeId)=="string") nodeId=document.getElementById(nodeId); if (this._content[id]) this._content[id].parentNode.removeChild(this._content[id]); this._content[id]=nodeId; this._content[id]._loaded=true; if (nodeId.parentNode) nodeId.parentNode.removeChild(nodeId); nodeId.style.position="absolute"; if (this._dspN){ nodeId.style.display="none"; nodeId.style.visibility="visible"; } else{ nodeId.style.visibility="hidden"; nodeId.style.display="block"; } nodeId.style.top="0px"; nodeId.style.top="0px"; this._conZone.appendChild(nodeId); if ((this._lastActive)&&(this._lastActive.idd==id)) this._setContent(this._lastActive); } /** * @desc: set content of tab * @type: private * @param: tab - tab in question * @topic: 0 */ dhtmlXTabBar.prototype._setContent=function(tab,stelth){ //#href_support:24052006{ if (this._hrfmode) switch(this._hrfmode){ case "iframe": this._glframe.src=this._hrefs[tab.idd]; return; break; case "iframes": case "iframes-on-demand": if ((this._hrfmode=="iframes-on-demand")&&(!this._content[tab.idd]._loaded)) { this._content[tab.idd].childNodes[0].src=this._hrefs[tab.idd]; this._content[tab.idd]._loaded="true"; } break; case "ajax": case "ajax-html": var z=this._content[tab.idd]; if (!z._loaded) { z.innerHTML="
 Loading...
"; (new dtmlXMLLoaderObject(this._ajaxOnLoad,[this,tab.idd],true,this.no_cashe)).loadXML(this._hrefs[tab.idd]); z._loaded=true; } break; } //#} if (!stelth){ if ((this._lastActive)&&(this._content[this._lastActive.idd])) if (this._dspN) this._content[this._lastActive.idd].style.display='none'; else{ this._content[this._lastActive.idd].style.visibility='hidden'; this._content[this._lastActive.idd].style.zIndex=-1; } if (this._content[tab.idd]) if (this._dspN) this._content[tab.idd].style.display='block'; else{ this._content[tab.idd].style.visibility=''; this._content[tab.idd].style.zIndex=2; } } //#size_adjust:18072006{ this.adjustSize(); //#} } /** * @desc: set content of tab, as HTML string * @type: public * @param: id - id of tab * @param: html - html string * @topic: 1 */ dhtmlXTabBar.prototype.setContentHTML=function(id,html){ var z=document.createElement("DIV"); z.className="dhx_tabcontent_sub_zone"; z.innerHTML=html; this.setContent(id,z); } /** * @desc: set style used for tabbar * @type: public * @param: name - any valid style name * @topic: 0 */ dhtmlXTabBar.prototype.setStyle=function(name){ if (this._styles[name]){ this._cstyle=name; if(this._styles[this._cstyle][12]) this._conZone.style.backgroundColor=this._styles[this._cstyle][12]; } } /** * @desc: enable/disable content zone (enabled by default) * @type: public * @param: mode - true/false * @topic: 0 */ dhtmlXTabBar.prototype.enableContentZone=function(mode){ this._eczF=convertStringToBoolean(mode); this._conZone.style.display=this._eczF?"":'none'; } /** * @desc: enable/disable force hiding mode, solves IE problems with iframes in HTML content, but can cause problems for other dhtmlx components inside tabs * @type: public * @param: mode - true/false * @topic: 0 */ dhtmlXTabBar.prototype.enableForceHiding=function(mode){ this._dspN=convertStringToBoolean(mode); } /** * @desc: allow to set skin specific color, must be used AFTER selecting skin * @type: public * @param: a_tab - color of activ tab * @param: p_tab - color of passive tab * @param: c_zone - color of content zone (optional) * @topic: 0 */ dhtmlXTabBar.prototype.setSkinColors=function(a_tab,p_tab,c_zone){ this._styles[this._cstyle][10]=p_tab; this._styles[this._cstyle][11]=a_tab; this._conZone.style.backgroundColor=c_zone||a_tab; } /** * @desc: get id of current active tab * @type: public * @return: id of current active tab * @topic: 0 */ dhtmlXTabBar.prototype.getActiveTab=function(){ if (this._lastActive) return this._lastActive.idd; return null; } /** * @desc: makes all tabs inactive * @type: private * @topic: 1 */ dhtmlXTabBar.prototype._deactivateTab=function(){ if (!this._lastActive) return; var oss=this._styles[this._cstyle] if (oss["id_"+this._lastActive.idd]) oss=oss["id_"+this._lastActive.idd]; if (oss[10]) this._lastActive.style.backgroundColor=oss[10]; this._lastActive.className=this._lastActive.className.replace(/dhx_tab_element_active/g,"dhx_tab_element_inactive"); if (this._vMode) switch (this._tbst){ case "win_text": if (this._lastActive){ this._lastActive._scrollState=this._conZone.scrollLeft; this._lastActive._lChild.style.backgroundImage='url('+this._imgPath+this._mode+oss[1]+')'; this._lastActive.childNodes[0].childNodes[0].src=this._imgPath+this._mode+oss[0]; this._lastActive.childNodes[1].childNodes[0].src=this._imgPath+this._mode+oss[2]; this._lastActive.style.height=parseInt(this._lastActive.style.height)-oss[9]+"px"; this._lastActive._lChild.style.height=parseInt(this._lastActive._lChild.style.height)-oss[9]+"px"; this._lastActive.style[this._align=="right"?"marginBottom":"marginTop"]="0px" this._lastActive.style.width=this._height+1+"px"; if (this._bMode) this._lastActive._lChild.style.width=this._height+1+"px"; } } else switch (this._tbst){ case "win_text": if (this._lastActive){ this._lastActive._scrollState=this._conZone.scrollTop; this._lastActive._lChild.style.backgroundImage='url('+this._imgPath+this._mode+oss[1]+')'; this._lastActive.childNodes[0].childNodes[0].src=this._imgPath+this._mode+oss[0]; this._lastActive.childNodes[1].childNodes[0].src=this._imgPath+this._mode+oss[2]; this._lastActive.style.width=parseInt(this._lastActive.style.width)-oss[9]+"px"; this._lastActive._lChild.style.width=parseInt(this._lastActive._lChild.style.width)-oss[9]+"px"; this._lastActive.style[this._align=="left"?"marginLeft":"marginRight"]="0px" this._lastActive.style.height=this._height+1+"px"; //#4DTabs:23052006{ if (this._bMode) this._lastActive._lChild.style.height=this._height+1+"px"; //#} } } this._lastActive=null; } /** * @desc: select tab next to active * @type: public * @return: id of current active tab * @topic: 0 */ dhtmlXTabBar.prototype.goToNextTab=function(tab){ var z=tab||this._lastActive; if (z){ if (z.nextSibling.idd){ if (!this._setTabActive(z.nextSibling)) return this.goToNextTab(z.nextSibling); return z.nextSibling.idd; } else if (z.parentNode.nextSibling){ var arow=z.parentNode.nextSibling.childNodes[0]; if (!this._setTabActive(arow)) return this.goToNextTab(arow); return arow.idd; } } return null; } /** * @desc: select tab previous to active * @type: public * @return: id of current active tab * @topic: 0 */ dhtmlXTabBar.prototype.goToPrevTab=function(tab){ var z=tab||this._lastActive; if (z){ if (z.previousSibling){ if (!this._setTabActive(z.previousSibling)) return this.goToPrevTab(z.previousSibling); return this._lastActive.idd; } else if (z.parentNode.previousSibling){ var arow=z.parentNode.previousSibling.childNodes; if ((!arow)||(!arow.tabCount)) return null; arow=arow[arow.tabCount-1]; if (!this._setTabActive(arow)) return this.goToPrevTab(arow); return arow.idd; } } return null; } //#size_adjust:18072006{ /** * @desc: enable disable auto adjusting height and width to inner content * @type: public * @param: autoWidth - enable/disable auto adjusting width * @param: autoHeight - enable/disable auto adjusting height * @topic: 0 */ dhtmlXTabBar.prototype.enableAutoSize=function(autoWidth,autoHeight){ this._ahdj=convertStringToBoolean(autoHeight); this._awdj=convertStringToBoolean(autoWidth); if (this._awdj && this._ahdj) this._conZone.style.overflow='hidden'; else this._conZone.style.overflow='auto'; } /** * @desc: enable / disable auto adjusting height and width to outer conteiner * @type: public * @param: mode - enable/disable * @topic: 0 */ dhtmlXTabBar.prototype.enableAutoReSize=function(mode){ this._EARS=convertStringToBoolean(mode) if (this._EARS){ this.entBox.style.overflow="hidden"; if (arguments.length==1){ if ((this.entBox.style.width||"").indexOf("%")==-1) this.entBox.style.width="100%"; if ((this.entBox.style.height||"").indexOf("%")==-1) this.entBox.style.height="100%"; } var self=this; if(this.entBox.addEventListener){ if ((_isFF)&&(_FFrv<1.8)) window.addEventListener("resize",function (){ window.setTimeout(function(){ self.adjustOuterSize(); },10); },false); else window.addEventListener("resize",function (){ if (self.adjustOuterSize) self.adjustOuterSize(); },false); } else if (window.attachEvent) window.attachEvent("onresize",function(){ if (self._resize_timer) window.clearTimeout(self._resize_timer); if (self.adjustOuterSize) self._resize_timer=window.setTimeout(function(){ self.adjustOuterSize(); },500); }); if (this._lineA) this.adjustOuterSize(); } } /** * @desc: set control size * @type: public * @param: width - new width * @param: height - new height * @param: contentZone - if set to true, than width and height set only to content zone * @topic: 0 */ dhtmlXTabBar.prototype.setSize=function(width,height,contentZone){ height=parseInt(height); width=parseInt(width); if (contentZone){ //#4DTabs:23052006{ if(!this._vMode) height+=20*this.rows.length; else //#} width+=20*this.rows.length; } this.height=height+"px"; this.width=width+"px"; this._lineA.style[this._vMode?"left":"top"]=(this._bMode?0:(this._height+2))+"px"; this._lineA.style[this._vMode?"height":"width"]=this[this._vMode?"height":"width"]; //#4DTabs:23052006{ if(this._vMode){ for (var i=0; iy)){ y=box.scrollHeight+(_isIE?6:4); flag=true; } if ((this._awdj)&&(box.scrollWidth>x)){ x=box.scrollWidth+2; flag=true; } } if (flag) this.setSize(x||this._conZone.offsetWidth,y||this._conZone.offsetHeight,true); if (this._EARS) this.adjustOuterSize(); } //#} /** * @desc: prevent caching in IE by adding random seed to URL string * @param: mode - enable/disable random seed ( disabled by default ) * @type: public * @topic: 2,9 */ dhtmlXTabBar.prototype.preventIECashing=function(mode){ this.no_cashe = convertStringToBoolean(mode); if (this.XMLLoader) this.XMLLoader.rSeed=this.no_cashe; } /** * @desc: hide tab in tabbar * @param: tab - id of tab * @param: mode - if set to true, selection jump from current tab to nearest one * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.hideTab = function(tab,mode){ var tab=this.tabsId[tab]; if (!tab) return; this._goToAny(tab,mode); tab.style.display='none'; var row=tab.parentNode; this._redrawRow(row); } /** * @desc: show hidden tab in tabbar * @param: tab - id of tab * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.showTab = function(tab){ var tab=this.tabsId[tab]; if (!tab) return; tab.style.display='block'; var row=tab.parentNode; this._redrawRow(row) } /** * @desc: enable tab in tabbar * @param: tab - id of tab * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.enableTab = function(tab){ var tab=this.tabsId[tab]; if (!tab) return; tab._disabled=false; tab.className=(tab.className||"").replace(/dhx_tab_element_disabled/g,""); } /** * @desc: disable tab in tabbar * @param: tab - id of tab * @param: mode - if set to true, selection jump from current tab to nearest one * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.disableTab = function(tab,mode){ var tab=this.tabsId[tab]; if (!tab) return; this._goToAny(tab,mode); tab._disabled=true; tab.className+=" dhx_tab_element_disabled"; } /** * @desc: set label of tab * @param: tab - id of tab * @param: value - new label * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.setLabel = function(tab,value){ var tab=this.tabsId[tab]; if (!tab) return; switch(this._tbst){ case 'text': tab.innerHTML=value; break; case 'win_text': tab.childNodes[2].childNodes[this._TabCloseButton?1:0].innerHTML=value; break; } } /** * @desc: get label of tab * @param: tab - id of tab * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.getLabel = function(tab){ var tab=this.tabsId[tab]; if (!tab) return; switch(this._tbst){ case 'text': return tab.innerHTML; break; case 'win_text': return tab.childNodes[2].childNodes[this._TabCloseButton?1:0].innerHTML; break; } } dhtmlXTabBar.prototype.detachTab=function(id) { var WindowName = this.getLabel(id); var tab=this.tabsId[id]; if (!tab) return; var node = this._content[tab.idd]; tab = this._getTabById(id); var tab_w = parseInt(tab.style.width); this.removeTab(id, true); node.style.position = ''; var width = parseInt(this._conZone.style.width)+5; var height = parseInt(this._conZone.style.height)+25; var min_width = 100; var min_height = 50; width = width informacion reiki

 

Valid XHTML 1.0 Transitional