function anime_open() {
    var attributes = {   
       height: { from: 1 , to: 411 }   
    };   
      
    var myAnim = new YAHOO.util.Anim('searchTopSKimgSP', attributes);   
    myAnim.duration = 1.0;
    myAnim.animate();   
}

function anime_close() {
    var attributes = {   
       height: { to: 1 }   
    };   
      
    var myAnim = new YAHOO.util.Anim('searchTopSKimgSP', attributes);   
    myAnim.duration = 1.0;
    myAnim.animate();   

    setTimeout( "document.getElementById('searchTopSK').style.display = 'none'; document.getElementById('searcharea').style.display = 'block';"  , 1000);

}
function key_open() {
    document.getElementById("searchTopSK").style.display = 'block';
    document.getElementById("searcharea").style.display = 'none';
    anime_open();

    setTimeout("showKeyboardCategoryVer();" , 1000);
}

function key_close() {
    anime_close();
    setTimeout( "document.getElementById('searchTopSK').style.display = 'none'; document.getElementById('searcharea').style.display = 'block';"  , 1000);
}

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;


//Keybord表示用JS

/**
 * カテゴリ用のキーボードを表示する処理
 * テンプレートの構造・仕様にあわせて書き換えてください。
 */
function showKeyboardCategoryVer(){

    document.getElementById("searchTopSK").style.display = 'none';
    document.getElementById("flashcontent").style.display = 'block';

    var categoryPath = document.getElementById('srchPath').value;
    var categoryName = document.getElementById('srchName').value;

    var defaultQuery = document.getElementById('srchTxt').value;

    var selectCategoryFlag = 'n';

    if(document.getElementById('srchY').checked == true){
        selectCategoryFlag = 'y';
    }

    showKeyboard('flashcontent',defaultQuery,categoryPath,categoryName,selectCategoryFlag);

}

/**
 * キーボードを閉じる処理
 * Flashから呼び出されます。
 * テンプレートの構造・仕様にあわせて書き換えてください。
 */
function hiddenKeyboard(query,categoryPath){

    document.getElementById('flashcontent').innerHTML='';

    document.getElementById('srchTxt').value = query;

    document.getElementById("searchTopSK").style.display = 'block';
    document.getElementById("flashcontent").style.display = 'none';
    key_close();
}

function showKeyboardButton(){

if (xLBenv.flash.isInstall && xLBenv.flash.version >= 8) {

document.write('<div id="srchKeybord"><a href="JavaScript:key_open();"><img src="http://i.yimg.jp/images/kids/category_new/srch_img.gif" alt="マウスでかんたん入力！　ソフトキーボードを使う" width="217" height="53" class="img"></a><a href="JavaScript:showHelp(\'category\');"><img src="http://i.yimg.jp/images/kids/category_new//srch_howto_img.gif" alt="使い方" width="50" height="27" class="howto"></a></div>');

}else{
document.write('<div id="srchKeybord"><a href="http://help.yahoo.co.jp/help/jp/kids/tools/tools-10.html"><img src="http://i.yimg.jp/images/kids/category_new/srch_img2.gif" alt="ソフトキーボードを使うときはAdobe Flash Playerが必要だよ！　くわしくはこちら" width="217" height="49" class="img"></a></div>');

}



}



