The bottom right corner of the page pops up the form

Source: Internet
Author: User
Tags gety cmath

<!--start-up
<style type= "Text/css" >
#msg_win {position:absolute;right:0px;display:none;overflow:hidden;z-index:99;border:1px solid #c00; background:# f9effc;width:210px;font-size:12px;margin:0px;}
#msg_win. Icos{position:absolute;top:2px;*top:0px;right:2px;z-index:9;}
. Icos a{float:left;color: #FFFFFF; margin:1px;text-align:center;font-weight:bold;width:14px;height:22px; Line-height:22px;padding:1px;text-decoration:none;font-family:webdings;}
. Icos a:hover{color: #FFCC00;}
#msg_title {background: #FA6705, border-bottom:1px solid #710B97, border-top:1px solid #FFF, border-left:1px solid #FFF; Color: #FFFFFF; height:25px;line-height:25px;text-indent:5px;font-weight:bold;}
#msg_content {margin:1px;margin-right:0;width:210px;height:160px;overflow:hidden; Text-align:center}
</style>
< end!---

<div id= "Msg_win" style= "display:block;top:503px;visibility:visible;opacity:1;" >
<div class= "Icos" ><a id= "Msg_min" title= "minimized" href= "Javascript:void 0" >_</a><a id= "Msg_close" Title= "Off" href= "Javascript:void 0" >x</a></div>
<div id= "Msg_title" > title
</div>
<div id= "Msg_content" >
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
Codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width= "210" Height= ">"
<param name= "movie" value= "Flvplayer.swf?vcastr_file=userlogin/video/qlg.flv&isautoplay=1"/>
<param name= "Quality" value= "High"/>
<param name= "allowFullScreen" value= "true"/>
<embed src= "Flvplayer.swf?vcastr_file=userlogin/video/qlg.flv&isautoplay=1" allowFullScreen= "true" quality = "High"
Pluginspage= "Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" width= "the" Height = "></embed>"
</object>
</div>
</div>
<script type= "Text/javascript" >
var Message = {
Set:function () {//Minimize and revert state toggle
var set = This.minbtn.status = = 1? [0, 1, ' block ', this.char[0], ' minimized ']: [1, 0, ' none ', this.char[1], ' recover '];
This.minbtn.status = set[0];
This.win.style.borderBottomWidth = set[1];
This.content.style.display = set[2];
This.minbtn.innerHTML = set[3]
This.minbtn.title = set[4];
This.win.style.top = This.gety (). Top;
},
Close:function () {//Off
This.win.style.display = ' None ';
Document.all.xhs1.stop ();
Window.onscroll = null;
},
Setopacity:function (x) {//Set transparency
var v = x >= 100? ': ' Alpha (opacity= ' + x + ') ';
this.win.style.visibility = x <= 0? ' Hidden ': ' Visible '; IE has a bug that absolute or relative positioning content does not change with the parent's transparency
This.win.style.filter = v;
this.win.style.opacity = x/100;
},
Show:function () {//Fade
Clearinterval (THIS.TIMER2);
var me = this, FX = this.fx (0, 0.1), t = 0;
This.timer2 = setinterval (function () {
t = FX ();
Me.setopacity (T[0]);
if (t[1] = = 0) {clearinterval (Me.timer2)}
}, 6); Ten to 6
},
Fx:function (A, B, c) {//Buffer calculation
var cmath = math[(A-B) > 0? "Floor": "Ceil"], c = C | | 0.1;
return function () {return [A + = Cmath ((b-a) * c), A-b]}
},
Gety:function () {//calculate moving coordinates
var d = document, B = document.body, E = document.documentelement;
var s = Math.max (B.scrolltop, e.scrolltop);
var h =/backcompat/i.test (Document.compatmode)? B.clientheight:e.clientheight;
var h2 = This.win.offsetHeight;
return {foot:s + H + H2 + 2 + ' px ', top:s + h-h2-2 + ' px '}
},
Moveto:function (y) {//Move animation
Clearinterval (This.timer);
var me = this, a = parseint (this.win.style.top) | | 0;
var FX = this.fx (A, parseint (y));
var t = 0;
This.timer = setinterval (function () {
t = FX ();
Me.win.style.top = t[0] + ' px ';
if (t[1] = = 0) {
Clearinterval (Me.timer);
Me.bind ();
}
}, 6); Ten to 6
},
Bind:function () {//Bind window scrollbar with size Change event
var me = This, St, RT;
Window.onscroll = function () {
Cleartimeout (ST);
Cleartimeout (ME.TIMER2);
Me.setopacity (0);
st = SetTimeout (function () {
Me.win.style.top = Me.gety (). Top;
Me.Show ();
}, 100); MoD 100
};
Window.onresize = function () {
Cleartimeout (RT);
RT = SetTimeout (function () {me.win.style.top = Me.gety (). Top}, 100);
}
},
Init:function () {//Create HTML
function $ (ID) {return document.getElementById (ID)};
This.win = $ (' Msg_win ');
var set = {minbtn: ' Msg_min ', closebtn: ' Msg_close ', title: ' Msg_title ', content: ' Msg_content '};
for (var Id in set) {This[id] = $ (set[id])};
var me = this;
This.minbtn.onclick = function () {me.set (); This.blur ()};
This.closebtn.onclick = function () {me.close ()};
This.char = Navigator.userAgent.toLowerCase (). IndexOf (' Firefox ') + 1? [' _ ', ':: ', ' X ']: [' 0 ', ' 2 ', ' R ']; FF does not support Webdings fonts
This.minbtn.innerHTML = this.char[0];
This.closebtn.innerHTML = this.char[2];
SetTimeout (function () {//Initialize first position
Me.win.style.display = ' block ';
Me.win.style.top = Me.gety (). Foot;
Me.moveto (Me.gety (). top);
}, 0);
return this;
}
};
Message.init ();
</script>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.