function MM_swapImgRestore() { //v3.0 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; 
}

function MM_preloadImages() { //v3.0 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); 
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) 
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} 
}

function MM_findObj(n, d) { //v3.0 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x; 
}

function MM_swapImage() { //v3.0 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) 
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} 
}

function sbar(st){st.style.backgroundColor='#F0F0F0';}
function cbar(st){st.style.backgroundColor='';}


var rate = 100;
var obj;
var act = 0;
var elmH = 0;
var elmS = 239;
var elmV = 255;
var clrOrg;
var TimerID;
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
    Browser = true;
} else {
    Browser = false;
}
if (Browser) {
    document.onmouseover = doRainbowAnchor;
    document.onmouseout = stopRainbowAnchor;
}
function doRainbow()
{
    if (Browser && act != 1) {
        act = 1;
        obj = event.srcElement;
        clrOrg = obj.style.color;
        TimerID = setInterval("ChangeColor()",100);
    }
}
function stopRainbow()
{
    if (Browser && act != 0) {
        obj.style.color = clrOrg;
        clearInterval(TimerID);
        act = 0;
    }
}
function doRainbowAnchor()
{
    if (Browser && act != 1) {
        obj = event.srcElement;

        while (obj.tagName != 'A' && obj.tagName != 'BODY') {
            obj = obj.parentElement;
            if (obj.tagName == 'A' || obj.tagName == 'BODY')
                break;
        }

        if (obj.tagName == 'A' && obj.href != '') {
            act = 1;
            clrOrg = obj.style.color;
            TimerID = setInterval("ChangeColor()",100);
        }
    }
}
function stopRainbowAnchor()
{
    if (Browser && act != 0) {
        if (obj.tagName == 'A') {
            obj.style.color = clrOrg;
            clearInterval(TimerID);
            act = 0;
        }
    }
}
function ChangeColor()
{
    obj.style.color = makeColor();
}
function makeColor()
{
    if (elmS == 0) {
        elmR = elmV;    elmG = elmV;    elmB = elmV;
    }
    else {
        t1 = elmV;
        t2 = (255 - elmS) * elmV / 255;
        t3 = elmH % 60;
        t3 = (t1 - t2) * t3 / 60;

        if (elmH < 60) {
            elmR = t1;  elmB = t2;  elmG = t2 + t3;
        }
        else if (elmH < 120) {
            elmG = t1;  elmB = t2;  elmR = t1 - t3;
        }
        else if (elmH < 180) {
            elmG = t1;  elmR = t2;  elmB = t2 + t3;
        }
        else if (elmH < 240) {
            elmB = t1;  elmR = t2;  elmG = t1 - t3;
        }
        else if (elmH < 300) {
            elmB = t1;  elmG = t2;  elmR = t2 + t3;
        }
        else if (elmH < 360) {
            elmR = t1;  elmG = t2;  elmB = t1 - t3;
        }
        else {
            elmR = 0;   elmG = 0;   elmB = 0;
        }
    }
    elmR = Math.floor(elmR);
    elmG = Math.floor(elmG);
    elmB = Math.floor(elmB);
    clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
    elmH = elmH + rate;
    if (elmH >= 360)
        elmH = 0;
    return clrRGB;
}
                                  
                                         

function status01() { 
window.status='─ TW520 台灣我愛你聊天網 http://tw520.idv.tw ─ 飄渺的愛情傳說 此刻開始 浪漫相隨...'; 
statustext=setTimeout('status02()',100); } 
function status02() { 
window.status='＼ TW520 台灣我愛你聊天網 http://tw520.idv.tw ＼ 飄渺的愛情傳說 此刻開始 浪漫相隨...'; 
statustext=setTimeout('status03()',100); } 
function status03() {  
window.status='│ TW520 台灣我愛你聊天網 http://tw520.idv.tw │ 飄渺的愛情傳說 此刻開始 浪漫相隨...';  
statustext=setTimeout('status04()',100); } 
function status04() { 
window.status='／ TW520 台灣我愛你聊天網 http://tw520.idv.tw ／ 飄渺的愛情傳說 此刻開始 浪漫相隨...'; 
statustext=setTimeout('status05()',100); } 
function status05() { 
window.status='─ TW520 台灣我愛你聊天網 http://tw520.idv.tw ─ 飄渺的愛情傳說 此刻開始 浪漫相隨...'; 
statustext=setTimeout('status06()',100); } 
function status06() { 
window.status='＼ TW520 台灣我愛你聊天網 http://tw520.idv.tw ＼ 飄渺的愛情傳說 此刻開始 浪漫相隨...'; 
statustext=setTimeout('status07()',100); } 
function status07() { 
window.status='│ TW520 台灣我愛你聊天網 http://tw520.idv.tw │ 飄渺的愛情傳說 此刻開始 浪漫相隨...';  
statustext=setTimeout('status08()',100); } 
function status08() { 
window.status='／ TW520 台灣我愛你聊天網 http://tw520.idv.tw ／ 飄渺的愛情傳說 此刻開始 浪漫相隨...'; 
statustext=setTimeout('status01()',100); } 
status01(); 

