function fromID(id) {
return document.getElementById(id );
}
function show_alert(msg, type, time) {
var layer_obj = fromID("alert_layer");
var layer_text= fromID("alert_text");
var line_height = (document.documentElement.scrollTop == 0) ? document.body.scrollTop : document.documentElement.scrollTop;
layer_text.innerHTML = msg;
with(layer_obj.style) {
zIndex = 999;
상단 = line_height-40;
왼쪽 = document.body.clientWidth/3;
표시 = "차단";
위치 = "절대";
if(type == "error") {
background = "url(http://" style_domain "/snake/index/msgbox_right_bg2.jpg)";
}
}
layer_obj.filters[0].opacity = "0.8"; //속도명도为 80%
if(time == undefine) time = 3000;
다른 시간 = 시간*1000;
var top = line_height-40;
var 속도 = 1.5;
시간-= 1000;
//控窗口向下移动至页face边缘
move_down = function MoveFplogo() {
top = speed;
layer_obj.style.top = 상단;
if(top < line_height) setTimeout("move_down()", 1);
else setTimeout("close_alert_win()", time);
}
move_down();
}
function close_alert_win() {
var layer_obj = fromID("alert_layer");
//控조제窗구渐渐消失
if(layer_obj.filters[0].opacity < 0.02) {
layer_obj.style.display = "none";
참을 반환합니다.
}
layer_obj.filters[0].opacity-= 0.02;
setTimeout("close_alert_win()", 1);
}
document.writeln(" filter:progid:DXImageTransform.Microsoft.BasicImage();">");
document.writeln(" ");
document.writeln(" " );
document.writeln("");