﻿document.onmousedown=click
var d=document;
function click()
{
   if ((event.button==2) || (event.button==3))
   {
       alert(" :::歡迎光臨長頸鹿 English Online::: ");
   }
}
//=============================================================================
var w=null;
function MM_openBrWindow(theURL,winName,features) 
{
  w=window.open(theURL,winName,features); //開新視窗的語法
}

function onTop()
{
  //檢查子母視窗的優先處理序,一層一層開啟的視窗需先完成工作並關閉才能繼續使用
  //檢查當新視窗已開啟並且是無關閉狀態,便永遠置於最上層
  if(w!=null)
  {
   if(!w.closed)
   {
     if(w.blur){w.focus();}
   }
  }
}

setTimeout('onTop()',100);

function printPage()
{
	MM_openBrWindow("ShowScoreUnit.aspx","列印成果","height=600,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
}
//=============================================================================
function scroll(seed)
{
var m1 = ":::長頸鹿 English Online:::                             "
var m2 = ":::瀏覽本站最佳瀏覽器為IE6.0，螢幕解析度請調至1024*768。"
var msg=m1+m2;
var out = " ";
var c = 1;
    if (seed > 100) 
    {
        seed--;
        var cmd="scroll(" + seed + ")";
        timerTwo=window.setTimeout(cmd,100);
    }
    else if (seed <= 100 && seed > 0) 
    {
        for (c=0 ; c < seed ; c++) 
        {
            out+=" ";
        }
        out+=msg;
        seed--;
        var cmd="scroll(" + seed + ")";
        window.status=out;
        timerTwo=window.setTimeout(cmd,100);
    } 
    else if (seed <= 0) 
    {
        if (-seed < msg.length) 
        {
            out+=msg.substring(-seed,msg.length);
            seed--;
            var cmd="scroll(" + seed + ")";
            window.status=out;
            timerTwo=window.setTimeout(cmd,100);
        }
        else 
        {
            window.status=" ";
            timerTwo=window.setTimeout("scroll(100)",7);
        }
    }
}
timerONE=window.setTimeout('scroll(100)',50);
