2つの解決策があります。1。onclick以下で定義されているwdd(またはを使用する)イベントに対して個別のCSSクラスを宣言します。2。に設定されてからテストさ!importantれるフラグ変数を使用します。trueonclickonmouseout
onclick="changeto('wdl');flag=true;" 
onmouseout="if (!flag) changeto('wdd')"
CSSとJavascriptを使用した簡単な例を次に示します。
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Example</title>
        <style>
            #whl {
                background: #e0e0ff;
                line-height: 150px;
                text-align: center;
                width: 150px;
            }
            #wdl {
                background: #e0ffe0;
                line-height: 150px;
                text-align: center;
                width: 150px;
            }
            #whl:hover {
                background: #ffcccc;
            }
            #wdl:hover {
                background: #ffcccc;
            }
            #whl.selected {
                background: #ffcccc;
            }
            #wdl.selected {
                background: #ffcccc;
            }
        </style>
        <script>
            function doClick(el) {
                document.getElementById("whl").className = document.getElementById("whl").className.replace( /(?:^|\s)selected(?!\S)/ , '' );
                document.getElementById("wdl").className = document.getElementById("wdl").className.replace( /(?:^|\s)selected(?!\S)/ , '' );
                el.className += "selected";
            }
        </script>
    </head>
    <body>
        <div id="whl" onclick="doClick(this);">WHL</div>
        <div id="wdl" onclick="doClick(this);">WDL</div>
    </body>
</html>
これは色で機能し、あなたの場合、色を背景画像(CSS内)に置き換える必要があります。