1function ShowOpenWin( sName, sUrl, nLeft, nTop, nWidth, nHeight,scroll, nType){ 2 var CreateWin; 3 if( nType == 2 || nType == 3 || nType == 4 || nType == 5 || nType == 6) 4 { 5 nLeft = ( window.screen.availWidth - nWidth) / 2; 6 nTop = ( window.screen.availHeight - nHeight) / 2; 7 if (nLeft < 0) nLeft = 0; 8 if (nTop < 0) nTop = 0; 9 } 10 if( nType == 0) 11 sFeatures = "left="+ nLeft +", top="+ nTop +", width="+ nWidth +", height="+ nHeight; 12 else if( nType ==3) 13 sFeatures = "fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no, left="+ nLeft +", top="+ nTop +", width="+ nWidth +", height="+ nHeight; 14 else if( nType ==4) 15 sFeatures = "fullscreen=no,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes, left="+ nLeft +", top="+ nTop +", width="+ nWidth +", height="+ nHeight; 16 else if( nType ==5) 17 sFeatures = "fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes, left="+ nLeft +", top="+ nTop +", width="+ nWidth +", height="+ nHeight; 18 else if( nType ==6) 19 sFeatures = "fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes, left="+ nLeft +", top="+ nTop +", width="+ nWidth +", height="+ nHeight; 20 else if( nType ==7) 21 sFeatures = "fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scroll+",resizable=no, left="+ nLeft +", top="+ nTop +", width="+ nWidth +", height="+ nHeight; 22 else 23 sFeatures = "fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes, left="+ nLeft +", top="+ nTop +", width="+ nWidth +", height="+ nHeight; 24 25 26 CreateWin = window.open( sUrl, sName, sFeatures); 27} 28 29var rolling_banner = function(ta){ 30 31 this.ta = ta; 32 33 this.ta_id = 'roll_'+(this.ta.id||this.ta.name); 34 35 this.gap = 5; //¿òÁ÷ÀÌ´Â Çȼ¿´ÜÀ§ 36 37 this.gap_count=0; //Ä«¿îÆÃ¿ë:°ÇµéÁö ¸¶¼¼¿ä 38 39 this.gap_time = '1000'; //¿òÁ÷ÀÌ´Â ´ÜÀ§½Ã°£ 40 41 this.gap_sleep = '1000'; //ȸéÀÌ ¸ØÃçÀÖÀ» ´ÜÀ§½Ã°£ 42 43 this.over_stop = true; //¸¶¿ì½º¸¦ ¿Ã·ÈÀ» ¶§ ¸ØÃâ °ÍÀΰ¡? 44 45 this.timer = null; 46 47 eval(this.ta_id+'=this'); 48 49 var temp = eval(this.ta_id); 50 51 this.init_div(); 52 53} 54 55rolling_banner.prototype.start = function(){ //·Ñ¸µ ½ÃÀÛ 56 57 this.ta.readonly =false; 58 59 this.stop =false; 60 61 if(!this.timer){ this.rolling(); } 62 63} 64 65rolling_banner.prototype.stop = function(){ //·Ñ¸µ ½ÃÀÛ 66 67 this.stop =true; 68 69} 70 71rolling_banner.prototype.init_div = function(){ //<div> »©°í ÀüºÎ Á¦°Å , ½ºÅ¸ÀÏ ÃʱâÈ 72 73 this.ta.style.position="relative"; 74 75 this.ta.style.overflow="hidden"; 76 77 this.ta.onmouseover=function(){ eval("this.readOnly=true;"); } 78 79 this.ta.onmouseout=function(){ eval("this.readOnly=false;"); } 80 81 82 83 var child = this.ta.childNodes; 84 85 var ch = this.ta.firstChild; 86 87 var ch2 = null; 88 89 while(ch){ 90 91 ch2 = ch.nextSibling; 92 93 if(ch.nodeName.toLowerCase() !='div'){ 94 95 this.ta.removeChild(ch); 96 97 }else{ 98 99 ch.style.position = "relative"; 100 101 ch.style.borderStyle='none'; 102 103 ch.style.top='0px'; 104 105 } 106 107 ch=ch2; 108 109 } 110 111} 112 113rolling_banner.prototype.strtonum = function(str){ 114 115 var num = parseInt(str); 116 117 if(isNaN(num)) num = '0'; 118 119 return num 120 121} 122 123rolling_banner.prototype.strtopx = function(str){ 124 125 var num = this.strtonum(str); 126 127 return num+'px'; 128 129} 130 131rolling_banner.prototype.rolling = function(){ 132 133 if(this.gap_count==0){ 134 135 this.sleep(); 136 137 this.gap_count+=1; 138 139 return; 140 141 } 142 143 if(!this.ta.readOnly && !this.stop){ 144 145 this.rolling_top(); 146 147 } 148 149 this.timer = null; 150 151 var re = this.ta_id+'.rolling()'; 152 153 this.timer = setTimeout(re,this.gap_time); 154 155} 156 157rolling_banner.prototype.rolling_top = function(){ 158 159 this.gap_count+=parseInt(this.gap); 160 161 var ch1 = this.ta.firstChild; 162 163 var child = this.ta.childNodes; 164 165 var ta_ch = null; 166 167 var top_ori = this.strtonum(child[0].style.top); 168 169 var top = this.strtopx(top_ori-parseInt(this.gap)); 170 171 for(var i=0,m=child.length;i<m;i++){ 172 173 child[i].style.top=top; 174 175 } 176 177 if(this.gap_count >= this.strtonum(ch1.style.height)){ 178 179 var temp =ch1.cloneNode(true); 180 181 this.ta.removeChild(ch1); 182 183 this.ta.appendChild(temp); 184 185 for(var i=0,m=child.length;i<m;i++){ 186 187 child[i].style.top='0px'; 188 189 } 190 191 this.gap_count = 0 192 193 } 194 195} 196
197rolling_banner.prototype.sleep = function(){ 198 199 this.timer = null; 200 201 var re = this.ta_id+'.rolling()'; 202 203 this.timer = setTimeout(re,this.gap_sleep); 204 205}
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.