/*
	$Id: javascript.js,v1 $

	Medio by Ki2 Corporation Japan'sWEB
	Copyright (c) 2007. Ki2 Corporation Japan
	Create and Design by Seiki Nishijima

======================================================================
  Memo
  

======================================================================
*/


/*------------------------------------
  画像読み込み
-------------------------------------*/
if (navigator.appVersion > "3") {
	MM01d = new Image(); MM01d.src = './switch/mm01d.gif';
	MM01o = new Image(); MM01o.src = './switch/mm01o.gif';
	MM02d = new Image(); MM02d.src = './switch/mm02d.gif';
	MM02o = new Image(); MM02o.src = './switch/mm02o.gif';
	MM03d = new Image(); MM03d.src = './switch/mm03d.gif';
	MM03o = new Image(); MM03o.src = './switch/mm03o.gif';
	MM04d = new Image(); MM04d.src = './switch/mm04d.gif';
	MM04o = new Image(); MM04o.src = './switch/mm04o.gif';
	MM05d = new Image(); MM05d.src = './switch/mm05d.gif';
	MM05o = new Image(); MM05o.src = './switch/mm05o.gif';
	MM06d = new Image(); MM06d.src = './switch/mm06d.gif';
	MM06o = new Image(); MM06o.src = './switch/mm06o.gif';

	MM11d = new Image(); MM11d.src = '../switch/mm01d.gif';
	MM11o = new Image(); MM11o.src = '../switch/mm01o.gif';
	MM12d = new Image(); MM12d.src = '../switch/mm02d.gif';
	MM12o = new Image(); MM12o.src = '../switch/mm02o.gif';
	MM13d = new Image(); MM13d.src = '../switch/mm03d.gif';
	MM13o = new Image(); MM13o.src = '../switch/mm03o.gif';
	MM14d = new Image(); MM14d.src = '../switch/mm04d.gif';
	MM14o = new Image(); MM14o.src = '../switch/mm04o.gif';
	MM15d = new Image(); MM15d.src = '../switch/mm05d.gif';
	MM15o = new Image(); MM15o.src = '../switch/mm05o.gif';
	MM16d = new Image(); MM16d.src = '../switch/mm06d.gif';
	MM16o = new Image(); MM16o.src = '../switch/mm06o.gif';
}


/*------------------------------------
  通常イメージチェンジ
-------------------------------------*/
function icT01(imgName3,imgNum3) {
	if (navigator.appVersion > "3") {
		document.images[imgName3].src = eval(imgNum3 + '.src');
	}
}

/*------------------------------------
  ヒット時２カ所切り替え
-------------------------------------*/
function icT02(imgName1,imgNum1,imgName2,imgNum2) {
	if (navigator.appVersion > "3") {
		document.images[imgName1].src = eval(imgNum1 + '.src');
		document.images[imgName2].src = eval(imgNum2 + '.src');
	}
}

/*------------------------------------
  オープンウィンド1、窓サイズ500*415　スクロール有り／リサイズ可
-------------------------------------*/
function oW01(url) {
	window.open(url,"_blank","menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=auto,resizable=yes,width=500,height=415");
}
/*------------------------------------
  オープンウィンド2、窓サイズ700*700　スクロール有り／リサイズ可
-------------------------------------*/
function oW02(url) {
	window.open(url,"_blank","menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=auto,resizable=yes,width=700,height=700");
}
/*------------------------------------
  レイヤー表示切り替え
------------------------------------*/
function show_op(layerName,Attest) {
	switch(layerName)
	{
		case "NewTVge":
			if_new.location.replace("./SyohinItiran.aspx?Width=555&CatID=1");
			break;
		case "NewPCge":
			if_new.location.replace("./SyohinItiran.aspx?Width=555&CatID=2");
			break;
		case "NewDVD":
			if_new.location.replace("./SyohinItiran.aspx?Width=555&CatID=3");
			break;
		case "NewHobby":
			if_new.location.replace("./SyohinItiran.aspx?Width=555&CatID=4");
			break;
		case "ShopTVge":
		    if_new.location.replace("./SyohinItiran.aspx?Width=762&CatID=1&TenpoID=" + strTenpoID);
		    break;
		case "ShopPCge":
			if_new.location.replace("./SyohinItiran.aspx?Width=762&CatID=2&TenpoID=" + strTenpoID);
			break;
		case "ShopDVD":
			if_new.location.replace("./SyohinItiran.aspx?Width=762&CatID=3&TenpoID=" + strTenpoID);
			break;
		case "ShopHobby":
			if_new.location.replace("./SyohinItiran.aspx?Width=762&CatID=4&TenpoID=" + strTenpoID);
			break;
		default:
			break;
	}
	var objID=document.getElementById(layerName);
		objID.style.display='block';
		objID.className='open';
}

function show_cl(layerName) {
	var objID=document.getElementById(layerName);
		objID.style.display='none';
	objID.className='close';
}

    /*
    −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
       関　数　名　　： readCookie
       処　　　理　　： クッキーの読み込み処理
    −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
    */
	function readCookie(kword)
    {
        if(typeof(kword) == "undefined")
            return "";
        kword = kword + "=";
        kdata = "";
        scookie = document.cookie + ";";
        start = scookie.indexOf(kword);
        if (start != -1){
            end = scookie.indexOf(";", start);
            kdata = unescape(scookie.substring(start + kword.length, end));
        }
        return kdata;
    }
    
    /*
    −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
       関　数　名　　： writeCookie
       処　　　理　　： クッキーの書き込み処理
    −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
    */
    function writeCookie(strKword, strKdata)
    {
        document.cookie = strKword + "=" + escape(strKdata)  + "; path=/;";
    }	