<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
message = "Java-Da! ジャヴァ・ダ! JavaScripts Freeだよ サンプル 使ってー! ;;_;; ";
colors = new Array('blue','red','pink','brown','green','cyan')
msg_size = 30;
message = message.split(' ');
speed=40;
timer = null;
clr_pos = 0;
msg_pos = 0;
jog = 1;
curr_step = 6;
step = 4;
ns = (document.layers)?1:0;
viz = (document.layers)?'hide':'hidden';
if (ns)
document.write("<div id='T' style='position:absolute'></div><br>");
else {
document.write("<div style='position:absolute'>");
document.write("<div align='center' style='position:relative'>");
document.write("<div id='T' style='position:absolute;width:0;height:0;font-family:Arial;font-size:0'>kurt</div>");
document.write("</div></div><br>");
}
function disp_msg() {
var pageHeight = (document.layers)?window.innerHeight:window.document.body.offsetHeight;
var pageWidth = (document.layers)?window.innerWidth:window.document.body.offsetWidth;
if (ns) {
ypos = pageHeight / 2;
var Write = '<div align="center" style="width:0px;height:0px;font-family:Arial,'+
'Verdana;font-size:'+curr_step/4+'px;color:'+colors[clr_pos]+'">'+message[msg_pos]+'</div>';
document.T.top = ypos + -curr_step / 8 + window.pageYOffset;
document.T.document.write(Write)
document.T.document.close();
}
else {
ypos = pageHeight / 2;
xpos = pageWidth / 2;
T.style.width = curr_step;
T.style.pixelTop = ypos + -curr_step / 16 + document.body.scrollTop;
T.style.pixelLeft = (xpos - 20)+ -curr_step / 2;
T.style.fontSize = curr_step / 8;
T.innerHTML = message[msg_pos];
T.style.color = colors[clr_pos];
}
if (ns)step += 5;
else step += 10;
curr_step += step
if (ns) {
if (curr_step > pageWidth) {
curr_step = 6;
step = 4;
msg_pos += jog;
clr_pos += jog;
}
if (clr_pos >= colors.length) clr_pos = 0;
}
else {
if (curr_step > pageWidth * msg_size) {
curr_step = 6;
step = 4;
msg_pos += jog;
clr_pos += jog;
}
if (clr_pos >= colors.length) clr_pos = 0;
}
if (msg_pos >= message.length) {
clearTimeout(timer);
if (ns) document.T.visibility = viz;
else T.style.visibility = viz;
}
timer = setTimeout("disp_msg()",speed)
}
//-->
</SCRIPT>
</HEAD>
<BODY onLoad="disp_msg()">
</BODY>
</HTML>
|