/************************************************
 * 
 * 入力フィールド色変動処理
 * 
 * Author        : $Author: ando_eriko_gn $
 * Last Modified : $Date: 2006/07/26 06:01:28 $
 * Version       : $Revision: 1.1 $
 * 
 * (c) CYBER AGENT.LTD
 * 
 ************************************************/

//------------------------------- カラー変動処理用
function ChangeColor(thisPAS,bgCL,bdCL) {
    if (!document.all && document.getElementById) { //-- NN6以上
        thisPAS.style.backgroundColor = bgCL;
//        thisPAS.style.borderColor = bdCL;
    } else if(document.all) {                       //-- IE4.x以上
        thisPAS.style.backgroundColor = bgCL;
//        thisPAS.style.borderColor = bdCL;
    }
}

function SetChgColor(thisPAS,num, override) {
    if(override && thisPAS.className.indexOf("error") > -1){
        num =9;
    }

    switch (num) {
    case 0:         // onBlur 離れた時
        ChangeColor(thisPAS,"#ffffff","#CCCCCC");
        break;
    case 1:         // onFocus フォーカスが与えられた時
        ChangeColor(thisPAS,"#CCFFCC","#CCFFCC");
        break;
    case 9:         // エラー
        ChangeColor(thisPAS,"#FFCC99","#000000");
        break;
    }
}
