// 初期設定
function firstInit () {
    imgArray = firstInit.arguments;
    overImg = new Array ();
    
    for (i=0; i<(imgArray.length); i++) {
        overImg[i] = new Image().src = imgArray[i];
    }
}

// ロールオーバー処理
function changeImages (imgId, imgSrc) {
    if (document.getElementById) {
        document.getElementById(imgId).src = imgSrc;
    }
}

// ポップアップ
function popWin (path,addPath,w,h) {
    popwin = window.open(path + "js/pop.html?addPath=" + addPath + "","pop","width=" + w + ", height=" + h + ", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no");
    wx = w;
    wy = h;
    x  = (screen.availWidth -  wx) / 2;
    y  = (screen.availHeight - wy) / 2;
    popwin.moveTo(x,y);
}

// ポップアップ画面描画
function popWrite () {
    var add = window.location.search.split ("=");
    document.write ("<a href=\"javascript:window.close ();\"><img src=\"" + add[1] + "\" alt=\"\" /></a>\n");
}

// レイヤー表示
function showLayer (layerId) {
    if (document.getElementById) {
        document.getElementById(layerId).style.visibility = "visible";
    }
}

// レイヤー非表示
function hideLayer (layerId) {
    if (document.getElementById) {
        document.getElementById(layerId).style.visibility = "hidden";
    }
}