Вы находитесь на странице: 1из 2

<style type="text/css"> .et-tab{font-size:8pt;font-weight:bold;padding:3px 10px;background:url("/_layout s/images/selbg.png") repeat-x;display:inline-block;cursor:pointer;} .et-activetab{background-color:#57ff3d;border:solid 1px #57ff3d;color:#382500;} .et-inactivetab{background-color:#5fbf00;border:solid 1px #5fbf00;color:#4c5b72; } .et-separator{height:5px;background-color:#57ff3d;} .et-tabrow{white-space:nowrap;} .

et-offscreen{position:absolute;max-height:1px;max-width:1px;top:-9999px;} </style> <script type="text/javascript"> /* Easy Tabs v 5.0 * Copyright (c) 2009-2010 Christophe Humbert * http://www.pat htosharepoint.com */ (function(){ var AP="",sec=0,Header="",Split="No",Expand="",Print=""; if (document.forms[0].elements["_wikiPageMode.value"]=="true" document.forms[0] .elements["MSOLayout_InDesignMode"].value=="1"){return;} var el=document.getElementsByTagName("SCRIPT"),p=el[el.length-1],sT,a,sep,tabRow ; do {p=p.parentNode;sT=p.innerHTML.split("MSOZoneCell_WebPart");}while (sT.length <4 && p.parentNode.id!="MSO_ContentTable") if (p.getAttribute("contenteditable")=="true"){return;} if (p.nodeName=="DIV"){sep=document.createElement("div");p.insertBefore(sep,p.fi rstChild);tabRow=document.createElement("div");p.insertBefore(tabRow,p.firstChil d);} else{sep=document.createElement("td");var sepTR=document.createElement("tr");sep TR.appendChild(sep);tabRow=document.createElement("td");var tabTR=document.creat eElement("tr");tabTR.appendChild(tabRow);if (p.nodeName=="TBODY"){p.insertBefore (sepTR,p.firstChild);p.insertBefore(tabTR,p.firstChild);}else if (p.nodeName=="T R"){p.parentNode.insertBefore(tabTR,p);p.parentNode.insertBefore(sepTR,p);}else {return;}} sep.className="et-separator";tabRow.className="et-tabrow";var children=p.childNo des;p=p.parentNode;var etRoot=[],etHeader=[],etTab=[],tabsID=[]; for (var j=0;j<children.length;j++){try{var d=children[j].getElementsByTagName(" td");for (i=0;i<d.length;i++) {if(d[i].id.indexOf("WebPartTitle")==0){var WPid=d [i].id.replace(/WebPartTitle/,"");if (d[i].innerHTML.indexOf("(Hidden)")==-1) {v ar up=d[i];while (up!=children[j]){if (up.parentNode.innerHTML.indexOf('id=WebPa rt'+WPid+' ')>=0 up.parentNode.innerHTML.indexOf('id="WebPart'+WPid+'" ')>=0){W Pid="et"+WPid;etHeader[WPid]=up;etRoot[WPid]=children[j];etTab[WPid]=d[i].getEle mentsByTagName("span")[0].cloneNode(true);etTab[WPid].id=WPid;etTab[WPid].classN ame="et-tab et-inactivetab";etTab[WPid].onclick=function(){activateTab(this);};t abRow.appendChild(etTab[WPid]);tabsID.push(WPid);break;}up=up.parentNode;}}}}}ca tch(e){}} var Tabs=tabRow.getElementsByTagName("span"),TabCount=Tabs.length; if (Split=="Yes") {var sd=document.createElement("div"),index=Math.floor(TabCoun t*0.5);tabRow.insertBefore(sd,Tabs[index]);} if(AP.length && sec>0) {sec=sec*1000;interval="";a=document.createElement("span" );a.innerHTML=" >";a.className="et-tab et-inactivetab";a.onclick=function(){if(i nterval==""){this.innerHTML=" ";interval=window.setInterval(function(){Autoplay ();},sec)}else{this.innerHTML=" >";window.clearInterval(interval);interval=""}}; tabRow.appendChild(a);var Autoplay=function(){for(i=0;i<TabCount;i++)if(Tabs[i]. className=="et-tab et-activetab"){var j=(i+1)%TabCount;activateTab(Tabs[j]);brea k}};if (AP=="Play"){a.innerHTML=" ";interval=window.setInterval(function(){Auto play();},sec)};} if (Expand.length) {a=document.createElement("span");a.innerHTML=Expand;a.classN ame="et-tab et-inactivetab";a.onclick=function(){for(i=0;i<tabsID.length;i++){et Tab[tabsID[i]].className="et-tab et-inactivetab";etRoot[tabsID[i]].className=etR oot[tabsID[i]].className.replace(/et-offscreen/g,"");etRoot[tabsID[i]].style.pag eBreakAfter="always";etHeader[tabsID[i]].style.display="";}};tabRow.appendChild( a);}

if (Print.length) {a=document.createElement("span");a.innerHTML=Print;a.classNam e="et-tab et-inactivetab";a.onclick=function(){this.style.display="none";var f=d ocument.getElementById("s4-workspace") document.getElementsByTagName("body")[0] ,ed=p.parentNode.insertBefore(document.createElement(p.nodeName),p);f.appendChil d(p);for (j=0;j<f.childNodes.length-1;j++) {try{f.childNodes[j].className+=" etoffscreen";}catch(e){}}a=document.createElement("span");a.innerHTML="Back to Pag e";a.className="et-tab et-inactivetab";a.onclick=function(){this.previousSibling .style.display="inline-block";this.parentNode.removeChild(this);ed.parentNode.in sertBefore(p,ed);ed.parentNode.removeChild(ed);for (j=0;j<f.childNodes.length;j+ +) {try{f.childNodes[j].className=f.childNodes[j].className.replace(/\s*et-offsc reen/g,"");}catch(e){}}};tabRow.appendChild(a);};tabRow.appendChild(a);} function activateTab(t){document.cookie=tabsID.join("_")+"="+t.id+";path=/";for( i=0;i<tabsID.length;i++){etHeader[tabsID[i]].style.display=Header;if(t.id==tabsI D[i]){etTab[tabsID[i]].className="et-tab et-activetab";etRoot[tabsID[i]].classNa me=etRoot[tabsID[i]].className.replace(/\s*et-offscreen/g,"");}else{etTab[tabsID [i]].className="et-tab et-inactivetab";etRoot[tabsID[i]].className+=" et-offscre en";}}}var m=GetCookie(tabsID.join("_"))?GetCookie(tabsID.join("_")):tabsID[0];a ctivateTab(etTab[m]);})(); </script>

Вам также может понравиться