1/* 2 * æµ®å¨å¹¿åæä»¶ 3 * 4 */ 5 6function EIPFloatAD(settings){ 7 this.PositionID = settings.PositionID //广åä½ID 8 this.PaddingLeft =(typeof settings.PaddingLeft === 'number')?settings.PaddingLeft:0; //å·¦å è¾¹è· èµ·å§ä½ç½® 9 this.PaddingTop = (typeof settings.PaddingTop === 'number')?settings.PaddingTop:0; //ä¸å è¾¹è· è¶ å§ä½ç½® 10 this.Width = (typeof settings.Width === 'number')?settings.Width:100; //广åä½å®½ 11 this.Height =(typeof settings.Height === 'number')?settings.Height:100; //广åä½é« 12 this.Step =(typeof settings.Step === 'number')?settings.Step:1; //é»è®¤ä¸º1 13 this.Delay = (typeof settings.Delay === 'number')?settings.Delay:20;//é»è®¤ä¸º20; 14 this.WindowHeight = (typeof settings.WindowHeight === 'number')?settings.WindowHeight:0;//é»è®¤ä¸º0 15 this.WindowWidth = (typeof settings.WindowWidth === 'number')?settings.WindowWidth:0;//é»è®¤ä¸º0 16 this.Yon = (typeof settings.Yon === 'number')?settings.Yon:0; //é»è®¤ä¸º0 17 this.Xon = (typeof settings.Xon === 'number')?settings.Xon:0; //é»è®¤ä¸º0 18 this.Pause = true; //æåç¶æ 19 this.Interval = null; 20 this.SysPath=(settings.SysPath===null)?"/":settings.SysPath;//é»è®¤ä¸º"/" 21 this.SiteID=(typeof settings.SiteID === 'number')?settings.SiteID:0; // é»è®¤ä¸º0 22 this.URL=(settings.URL===null)?"/":settings.URL; 23 24 /* 25 * ADID: 广åID 26 * Titleï¼å¹¿åæ é¢ 27 * LinkUrl:广å龿¥å°å 28 * ImageUrl:广åå¾çæflashè·¯å¾ 29 * ADType:广åç±»åï¼imageæflashï¼ 30 */ 31 this.ADContent=settings.ADContent; //广åå 容 32 return this; 33}; 34 35 36/* 37 * å¯å¨ 38 */ 39EIPFloatAD.prototype.start=function(){ 40 var self=this; 41 console.log(self.PaddingLeft); 42function showADContent() { 43 // alert(self.ADContent); 44 var str = "<div id='ZCMSAD_" + self.PositionID + "' style='left:" + self.PaddingLeft + "px;top:" + self.PaddingTop + "px;width:" + self.Width + "px; height:" + self.Height + "px; position: absolute;visibility: visible;z-index:999999;' >"; 45 var json = self.ADContent; 46 for(var i=0;i<self.ADContent.length;i++) 47 { 48 if (self.ADContent[i].ADType == "image") { 49 str += "<a href='" + self.ADContent[i].LinkUrl + "' target='" + self.ADContent[i].Target+ "'>"; 50 str += "<img title='" + self.ADContent[i].Title + "' src='" + self.ADContent[i].ImageUrl + "' width='" + self.Width + "' height='" + self.Height + "' onerror=\"this.src='"+self.SysPath+"res/images/nofile.jpg'\" style='border:0px;'>"; 51 str += "</a>"; 52 } else if (self.ADContent[i].ADType == "flash") { 53 document.write(" ");//è³å°è¦è¾åºä¸ä¸ªåï¼ä¸ç¶IE䏿¾ç¤º 54 str += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='"+self.Width+"' height='"+self.Height+"' id='FlashAD_"+self.ADContent[i].ADID+"' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'>"; 55 str += "<param name='movie' value='"+self.ADContent[i].ImageUrl+"' />"; 56 str += "<param name='quality' value='autohigh' />"; 57 str += "<param name='wmode' value='opaque'/>"; 58 str += "<embed wmode='opaque' src='"+self.ADContent[i].ImageUrl+"' quality='autohigh' name='flashad' swliveconnect='TRUE' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+self.Width+"' height='"+self.Height+"'></embed>"; 59 str += "</object>"; 60 } 61 } 62 // alert(str); 63 str += "<div style='text-align:right;'><a href='#' class='aclose' onclick='javascript:document.getElementById(\"ZCMSAD_" + self.PositionID + "\").style.display=\"none\"'>å ³é</a></div>"; 64 str += "</div>"; 65 66 document.write(str); 67 } 68 69 70 function changePos(float) { 71 float.WindowWidth = document.documentElement.clientWidth; 72 float.WindowHeight = document.documentElement.clientHeight; 73 document.getElementById("ZCMSAD_" + float.PositionID).style.left = (float.PaddingLeft + document.documentElement.scrollLeft) + "px"; 74 document.getElementById("ZCMSAD_" + float.PositionID).style.top = (float.PaddingTop + document.documentElement.scrollTop) + "px"; 75 if (float.Yon) { 76 float.PaddingTop = float.PaddingTop + float.Step; 77 } else {
78 float.PaddingTop = float.PaddingTop - float.Step; 79 } 80 if (float.PaddingTop < 0) { 81 float.Yon = 1; 82 float.PaddingTop = 0; 83 } 84 if (float.PaddingTop >= (float.WindowHeight - float.Height)) { 85 float.Yon = 0; float.PaddingTop = (float.WindowHeight - float.Height); 86 } 87 if (float.Xon) { 88 float.PaddingLeft = float.PaddingLeft + float.Step; 89 } else { 90 float.PaddingLeft = float.PaddingLeft - float.Step; 91 } 92 if (float.PaddingLeft < 0) { 93 float.Xon = 1; 94 float.PaddingLeft = 0; 95 } 96 if (float.PaddingLeft >= (float.WindowWidth - float.Width)) { 97 float.Xon = 0; 98 float.PaddingLeft = (float.WindowWidth - float.Width); 99 } 100} 101 102 103function doStart(float) { 104 return function() { 105 changePos(float); 106 } 107 108 109} 110 111function pause(float) 112{ 113 if (float.Pause) { 114 clearInterval(float.Interval); 115 float.Pause = false; 116 } else { 117 float.Interval = setInterval(doStart(float), float.Delay); 118 float.Pause = true; 119 } 120} 121 122showADContent(); 123//doStart(self); 124self.Interval = setInterval(doStart(self), self.Delay); 125 126$("#ZCMSAD_"+self.PositionID).mouseover(function(){ 127 pause(self); 128 }); 129 $("#ZCMSAD_"+self.PositionID).mouseout(function(){ 130 pause(self); 131 }); 132return self; 133 134}; 135
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.