﻿// JScript 檔
var backColor ="#000000";
var foreColor ="#ffffff";

function onmouseoutColor(source)
{
    source.style.backgroundColor=backColor;
    source.style.color=foreColor;
}

function onmouseoverColor(source,type)
{
    //暫存原來的顏色
    backColor = source.style.backgroundColor;
    foreColor = source.style.color;
    
    //套用新顏色
    switch(type)
    {
        case 'U':    
            //source.style.backgroundColor='Green';
            source.style.backgroundColor='LemonChiffon';
            source.style.color='#000000';
            break;
        case 'C':
            source.style.backgroundColor='Lavender';
            source.style.color='#000000';
            break;
        case 'H':
            //source.style.backgroundColor='#FFC125';
            source.style.backgroundColor='lightgreen';
            source.style.color='#000000';
        case 'A':
            //source.style.backgroundColor='#7EC0EE';
            source.style.backgroundColor='LemonChiffon';
            source.style.color='#000000';     
        break;
    }
    
}