﻿// Script ファイル

//ロールオーバー
//'imgName' ：IMGタグ名
//'imgSrc'  ：imageSrc
function ImgSwap(imgName, imgSrc)
{
    //ブラウザ判別用
    var appVer=parseInt(navigator.appVersion);
    var isNC=false,isN6=false,isIE=false;

    //ブラウザ判別
    if (document.all && appVer >= 4) isIE=true; else
        if (document.getElementById && appVer > 4) isN6=true; else
            if (document.layers && appVer >= 4) isNC=true;

    //イメージの入れ替え
    if (isNC||isN6||isIE) {
        if (document.images) {
            var img = document.images[imgName];
            if (!img) img = imgSrc;
            if (img) img.src = imgSrc;
        }
    }

}

//コントロールの表示非表示
//引数はID
//'ctrlid' ：コントロールのID
function ShowOrHideByID( ctrlid )
{
    
    //ブラウザ判別
    if( document.getElementById ){ 
    
        //表示していれば隠す、逆なら表示
        if(document.getElementById( ctrlid ).style.display == "none"){ 
            document.getElementById( ctrlid ).style.display = "block"; 
        }else{ 
            document.getElementById( ctrlid ).style.display = "none";
        }
    
    } 
}

//Topics全文表示
//Topics用
//引数
//'tagid'       ：変更するTDのID
//'hftagid'     ：フラグを格納しているHiddenField
//'str_text1'   ：省略文
//'str_text2'   ：全文
function Change_Contents(tagid, hftagid, str_text1, str_text2)
{
    //Hiddenの値を検査して
    if (document.getElementById(hftagid).value == 0) {
        //全文表示
        document.getElementById(tagid).innerHTML = str_text2;
        document.getElementById(hftagid).value = 1;
    }
    else{
        //タイトルに戻す
        document.getElementById(tagid).innerText = str_text1;
        document.getElementById(hftagid).value = 0;
    }
}

//Move_Home();
function Move_Home()
{
    window.location.href = "http://www.snkobe.com/Default.aspx";
}

//ReturnBack();
function Move_Back(strurl)
{
    if(strurl){
        window.location.href = strurl;
    }
    else{
        window.location.href = "Default.aspx";
    }

    return;

}    
