1 2/* 3 ================================================ 4 PVII Equal Height Columns 2 scripts 5 Copyright (c) 2011-2012 Project Seven Development 6 www.projectseven.com 7 Version: 1.0.2 -build 07 8 ================================================ 9 10*/ 11 12var p7EHC={ 13 init: false, 14 built: false, 15 groups:[], 16 currentHeight:[], 17 columns:[], 18 wrappers:[], 19 counter:1 20}; 21function P7_EHCaddLoad(){ 22 if(!document.getElementById){ 23 return; 24 } 25 if(window.addEventListener){ 26 document.addEventListener("DOMContentLoaded",P7_initEHC,false); 27 window.addEventListener("load",P7_initEHC,false); 28 window.addEventListener("unload",P7_EHCrf,false); 29 } 30 else if(window.attachEvent){ 31 document.write("<script id=p7ie_EHC defer src=\"//:\"><\/script>"); 32 document.getElementById("p7ie_EHC").onreadystatechange=function(){ 33 if(this.readyState=="complete"){ 34 P7_initEHC(); 35 } 36 }; 37 window.attachEvent("onload",P7_initEHC); 38 } 39} 40P7_EHCaddLoad(); 41function P7_EHCrf(){ 42 return; 43} 44function P7_initEHC(){ 45 var i,j,nL,cl,sl; 46 if(p7EHC.init){ 47 return; 48 } 49 p7EHC.init=true; 50 nL=document.getElementsByTagName('*'); 51 for(i=0;i<nL.length;i++){ 52 cl=nL[i].className; 53 if(cl && cl.indexOf('p7ehc-')>-1){ 54 sl=cl.split(' '); 55 for(j=0;j<sl.length;j++){ 56 if(sl[j].indexOf('p7ehc-')>-1){ 57 P7_EHCcreate(sl[j],nL[i]); 58 p7EHC.built=true; 59 } 60 } 61 } 62 } 63 if(p7EHC.built){ 64 setInterval("P7_EHCsizer()",20); 65 } 66} 67function P7_EHCcreate(cl,cD){ 68 var i,x,tW,m=false; 69 for(i=0;i<p7EHC.groups.length;i++){ 70 if(p7EHC.groups[i]==cl){ 71 m=true; 72 break; 73 } 74 } 75 if(!m){ 76 i=p7EHC.groups.length; 77 p7EHC.groups[i]=cl; 78 p7EHC.currentHeight[i]=0; 79 p7EHC.columns[i]=[]; 80 p7EHC.wrappers[i]=[]; 81 x=0; 82 } 83 else{ 84 x=p7EHC.columns[i].length; 85 } 86 tW=document.createElement('div'); 87 tW.setAttribute('id','p7EHCd_'+(p7EHC.counter)); 88 p7EHC.counter++; 89 tW.ehcPaddingCounter=0; 90 tW.ehcPaddingTop=false; 91 tW.ehcPaddingBottom=false; 92 cD.appendChild(tW); 93 while(cD.childNodes[0]!=tW){ 94 tW.appendChild(cD.childNodes[0]); 95 } 96 p7EHC.columns[i][x]=cD; 97 p7EHC.wrappers[i][x]=tW; 98 tW.ehcPaddingTimer=setTimeout("P7_EHCcheckPadding('"+tW.id+"')",1); 99} 100function P7_EHCcheckPadding(d,v){ 101 var p,cD,tW=document.getElementById(d); 102 cD=tW.parentNode; 103 tW.ehcPaddingCounter++; 104 if(!tW.ehcPaddingTop){ 105 p=P7_EHCgetStyle(cD,'paddingTop','padding-top'); 106 if(p&&parseFloat(p)!==0){ 107 tW.style.paddingTop=p; 108 cD.style.paddingTop='0px'; 109 tW.ehcPaddingTop=true; 110 } 111 } 112 if(!tW.ehcPaddingBottom){ 113 p=P7_EHCgetStyle(cD,'paddingBottom','padding-bottom'); 114 if(p&&parseFloat(p)!==0){ 115 tW.style.paddingBottom=p; 116 cD.style.paddingBottom='0px'; 117 tW.ehcPaddingBottom=true; 118 } 119 } 120 if(tW.ehcPaddingCounter<50){ 121 if(!tW.ehcPaddingTop || !tW.ehcPaddingBottom){ 122 tW.ehcPaddingTimer=setTimeout("P7_EHCcheckPadding('"+d+"')",10); 123 } 124 } 125} 126function P7_EHCsizer(){ 127 var i,j,oh,h; 128 for(i=0;i<p7EHC.groups.length;i++){ 129 oh=0; 130 for(j=0;j<p7EHC.wrappers[i].length;j++){ 131 if(P7_EHCgetStyle(p7EHC.columns[i][j],'maxHeight','max-height')=='888678px'){ 132 p7EHC.columns[i][j].ehcByPass=true; 133 } 134 else{ 135 p7EHC.columns[i][j].ehcByPass=false; 136 } 137 if(!p7EHC.columns[i][j].ehcByPass){ 138 h=p7EHC.wrappers[i][j].offsetHeight; 139 oh=(h>oh)?h:oh; 140 } 141 } 142 if(oh!=p7EHC.currentHeight[i] && oh!==0){ 143 p7EHC.currentHeight[i]=oh; 144 for(j=0;j<p7EHC.columns[i].length;j++){ 145 if(!p7EHC.columns[i][j].ehcByPass){ 146 p7EHC.columns[i][j].style.height=oh+'px'; 147 } 148 } 149 } 150 } 151} 152function P7_EHCgetStyle(el,s1,s2){ 153 var s=''; 154 if(el.currentStyle){ 155 s=el.currentStyle[s1]; 156 } 157 else{ 158 s=document.defaultView.getComputedStyle(el,"").getPropertyValue(s2); 159 } 160 return s; 161}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.