<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 
?>

<script language="JavaScript1.2">
<!--

/*
Typing Scroller
Submitted by bengaliboy00@hotmail.com (hp: http://www.angelfire.com/nt/bengaliboy/)
With modifications by Dynamicdrive.com
For full source code, usage terms, and 100s more scripts, visit http://dynamicdrive.com
*/

//Secify scroller contents
var line=new Array()
<?  for ($i=0; $i<count($list); $i++) { ?>
	line[<?=$i?>+1]="<?=$list[$i][subject]?>"
<? } ?>

<? if (count($list) == 0) { ?>line[0]="게시물이 없습니다.";<? } ?>

//Specify font size for scoller
var ts_fontsize="12px"

//--Don't edit below this line

var longestmessage=1
for (i=2;i<line.length;i++){
if (line[i].length>line[longestmessage].length)
longestmessage=i
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById){

document.write('<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">')
document.write('<form name="bannerform">')
document.write('<tr><td width="65">한줄 광고 : </td><td>')
document.write('<input type="text" name="banner"')
//document.write('style="width:100%;height=17px;background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family:
document.write('style="width:100%;height=17px; background-color:#f9fae8; color: #555555; font-family: verdana; font-size: '+ts_fontsize+'; border:0;">')
document.write('</td></tr>')
document.write('</form>')
document.write('</table>')

}

temp=""
nextchar=-1;
nextline=1;
cursor="_"
function animate(){

if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
nextline++;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",6400)}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
nextline=1;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",6400)}
else{
nextstep()}}

function nextstep(){

if (cursor=="\\"){
cursor="|"}
else if (cursor=="|"){
cursor="/"}
else if (cursor=="/"){
cursor="-"}
else if (cursor=="-"){
cursor="\\"}


nextchar++;
temp+=line[nextline].charAt(nextchar);
document.bannerform.banner.value=temp+cursor
setTimeout("animate()",16)}

//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate
// -->

</script>
