123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <div id="adModule" style="width:150px;height:432px;z-index: 1000">
- <!-- <img src="../images/position.png" alt=""> -->
- </div>
- <script>
- var Rimifon = {
- "Ads": new Object,
- "NewFloatAd": function (imgUrl, strLink) {
- var ad = document.getElementById("adModule");
- ad.DirV = true;
- ad.DirH = true;
- ad.AutoMove = true;
- ad.Image = new Image;
- ad.Seed = Math.random();
- ad.Timer = setInterval("Rimifon.Float(" + ad.Seed + ")", 50);
- this.Ads[ad.Seed] = ad;
- ad.Image.Parent = ad;
- ad.style.position = "fixed";
- ad.style.left = 0;
- ad.style.top = 0;
- ad.Image.src = imgUrl;
- ad.onmouseover = function () { this.AutoMove = false; }
- ad.onmouseout = function () { this.AutoMove = true; }
- var close = document.createElement("a");
- close.setAttribute("class", "closedd");
- ad.setAttribute("class", "closed_box");
- var countMessage = document.createElement('p');
- countMessage.setAttribute("class", 'jsMessage');
- if (strLink) {
- ad.href = strLink;
- ad.Image.border = 0;
- ad.target = "_blank";
- }
- ad.appendChild(ad.Image);
- ad.appendChild(close);
- ad.appendChild(countMessage);
- close.append('x');
- document.body.appendChild(ad);
- return ad;
- },
- "Float": function (floatId) {
- var ad = this.Ads[floatId];
- if (ad.AutoMove) {
- var curLeft = parseInt(ad.style.left);
- var curTop = parseInt(ad.style.top);
- if (ad.offsetWidth + curLeft > document.documentElement.clientWidth + document.body.scrollLeft - 1) {
- curLeft = document.body.scrollLeft + document.documentElement.clientWidth - ad.offsetWidth;
- ad.DirH = false;
- }
- if (ad.offsetHeight + curTop > document.documentElement.clientHeight + document.body.scrollTop - 1) {
- curTop = document.body.scrollTop + document.documentElement.clientHeight - ad.offsetHeight;
- ad.DirV = false;
- }
- if (curLeft < document.body.scrollLeft) {
- curLeft = document.body.scrollLeft;
- ad.DirH = true;
- }
- if (curTop < document.body.scrollTop) {
- curTop = document.body.scrollTop;
- ad.DirV = true;
- }
- ad.style.left = curLeft + (ad.DirH ? 3 : - 3) + "px";
- ad.style.top = curTop + (ad.DirV ? 3 : - 3) + "px";
- }
- }
- }
- </script>
- <script>
- var ad = Rimifon.NewFloatAd("/images/szxy.jpg");
- ad.style.left = 500;
- ad.style.top = 456;
- $(".closed_box").on("click", function () {
- window.open("http://www.creditprt.org.cn/index/center/code/NjMxLzc5My8wLzA=");
- })
- $(".closedd").on("click", function () {
- $(this).closest("div").remove();
- })
- </script>
|