﻿// JScript 文件

function OnBtnSelClick(obj)
{
    var strSelValue=obj.id;
    //alert(strSelValue);
    var vRes;
    if(document.getElementById('imgOptionA')!=null)
    {
        if(strSelValue=="imgOptionA")
        {
            vRes="1;";
        }
        else
        {
            vRes="0;";
        }
    }
    if(document.getElementById('imgOptionB')!=null)
    {
        if(strSelValue=="imgOptionB")
        {
            vRes+="1;";
        }
        else
        {
            vRes+="0;";
        }
    }
    if(document.getElementById('imgOptionC')!=null)
    {
        if(strSelValue=="imgOptionC")
        {
            vRes+="1;";
        }
        else
        {
            vRes+="0;";
        }
    }
    if(document.getElementById('imgOptionD')!=null)
    {
        if(strSelValue=="imgOptionD")
        {
            vRes+="1;";
        }
        else
        {
            vRes+="0;";
        }
    }
    if(document.getElementById('imgOptionE')!=null)
    {
        if(strSelValue=="imgOptionE")
        {
            vRes+="1;";
        }
        else
        {
            vRes+="0;";
        }
    }    
    //alert(vRes);
    var vCorrect=document.getElementById('HiddenQuestionAnsw').value;
    //alert(vCorrect);
    if(vCorrect==vRes)
    {
        //alert("Right!"); 
        document.getElementById('divW').style.display="none";       
        document.getElementById('divR').style.display="";
        document.ObjectRF.LoadMovie(1,'Images/RightF.swf');        
        setTimeout("document.getElementById('divR').style.display='none';",1000); 
    }
    else
    {
        //alert("Wrong!");
        document.getElementById('divR').style.display="none";
        document.getElementById('divW').style.display="";
        document.ObjectWF.LoadMovie(1,'Images/WrongF.swf');        
        setTimeout("document.getElementById('divW').style.display='none';",1000); 
    }    
}

var OpImgObj;
function JpgMouseOver(firstChar,obj)
{
    OpImgObj=obj.src;
    var vStrJpg="Images/"+firstChar+"r.jpg";
    obj.src=vStrJpg;
}
function JpgMouseOut(firstChar,obj)
{
    //var vStrJpg="Images/"+firstChar+"b.jpg";
    //obj.src=vStrJpg;
    obj.src=OpImgObj;
}