// TABメニューの表示非表示切り替え（アパレル）
function lfTabMenuSwitch(id){
    var obj;
	obj = document.getElementById('ladies');
	obj.style.display = 'none';
	obj = document.getElementById('mens');
	obj.style.display = 'none';
	obj = document.getElementById('other');
	obj.style.display = 'none';
		
	obj = document.getElementById(id);
	obj.style.display = '';
}

// TABメニューの表示非表示切り替え 02（雑貨）
function lfTabMenuSwitch02(id){
    var obj;
	obj = document.getElementById('kokunai');
	obj.style.display = 'none';
	obj = document.getElementById('oubei');
	obj.style.display = 'none';
	obj = document.getElementById('asia');
	obj.style.display = 'none';
	obj = document.getElementById('sonota');
	obj.style.display = 'none';
		
	obj = document.getElementById(id);
	obj.style.display = '';
}

// TABメニューの表示非表示切り替え 03（その他）
function lfTabMenuSwitch03(id){
    var obj;
	obj = document.getElementById('health');
	obj.style.display = 'none';
	obj = document.getElementById('accessory');
	obj.style.display = 'none';
	obj = document.getElementById('elec_pc');
	obj.style.display = 'none';
		
	obj = document.getElementById(id);
	obj.style.display = '';
}


/* バナーブロック作成 */
function InsertBanner( targetId ){
   /* ID指定タグの要素ノードオブジェクト*/
   var target = document.getElementById(targetId);

   /* 新たにulタグの要素ノードを作成する*/
   var ulNode = document.createElement('ul');
   /* 新たにliノードを作成する*/
   var liNode = document.createElement('li');
   
   /* liノードにバナーを追加する   ***********ここを特集の入れ替えで書き換える******** */
   liNode.appendChild( makeBanner( '/op/op2/info_eq.html', '/op/op2/img/info_eq.gif', '598', '20', '', 'largebnr' ) );
   ulNode.appendChild(liNode);
   liNode.appendChild( makeBanner( 'http://navi.toc-buyers.net/products/list.php?category_id=1641', '/op/op2/img/topseller/title.gif', '598', '51', 'トップセラーおすすめ商品', 'largebnr justimg' ) );
   ulNode.appendChild(liNode);
   liNode.appendChild( makeBanner( 'http://navi.toc-buyers.net/products/list.php?category_id=1645', '/op/op2/img/topseller/home.gif', '294', '75', '厳選国内雑貨', 'leftbnr' ) );
   ulNode.appendChild(liNode);
   liNode.appendChild( makeBanner( 'http://navi.toc-buyers.net/products/list.php?category_id=1646', '/op/op2/img/topseller/eu.gif', '294', '75', '厳選欧米雑貨', 'rightbnr' ) );
   ulNode.appendChild(liNode);
   liNode.appendChild( makeBanner( 'http://navi.toc-buyers.net/products/list.php?category_id=1647', '/op/op2/img/topseller/asia.gif', '294', '75', '厳選アジア雑貨', 'leftbnr' ) );
   ulNode.appendChild(liNode);
   liNode.appendChild( makeBanner( 'http://navi.toc-buyers.net/products/list.php?category_id=1648', '/op/op2/img/topseller/other.gif', '294', '75', '厳選その他雑貨', 'rightbnr' ) );
   ulNode.appendChild(liNode);
   liNode.appendChild( makeBanner( 'http://navi.toc-buyers.net/products/list.php?category_id=1649', '/op/op2/img/topseller/health.gif', '294', '75', '厳選美容健康', 'leftbnr' ) );
   ulNode.appendChild(liNode);
   liNode.appendChild( makeBanner( 'http://navi.toc-buyers.net/products/list.php?category_id=1651', '/op/op2/img/topseller/elec.gif', '294', '75', '厳選家電・PC', 'rightbnr' ) );
   ulNode.appendChild(liNode);

   /* タグに、完成したタグを追加する*/
   target.appendChild(ulNode);
}

/* バナー作成 */
function makeBanner( url, imgurl, w, h, alt, cl )
{
   /* 新たにaノードを作成する*/
   var aNode = document.createElement('a');
   aNode.href = url;
   /* 新たにimgノードを作成する*/
   var imgNode = document.createElement('img');
   imgNode.src = imgurl;
   imgNode.width = w;
   imgNode.height = h;
   imgNode.alt = alt;
   imgNode.className = cl;
   aNode.appendChild(imgNode);
   return aNode;
}


/* 人気キーワード */

//	var brNode = document.createElement('br'); 改行する時
//	liNode.appendChild(brNode);

function NinkiKeyword( targetId ){

	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( textLink01('/view/buyer/inquiryproduct/productsearch/productSearch.html?ret=init&key=%e6%87%90%e4%b8%ad%e9%9b%bb%e7%81%af') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( textLink02('/view/buyer/inquiryproduct/productsearch/productSearch.html?ret=init&key=%e5%90%8d%e5%88%ba%e5%85%a5%e3%82%8c') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( textLink03('/view/buyer/inquiryproduct/productsearch/productSearch.html?ret=init&key=%e3%83%a9%e3%83%b3%e3%82%bf%e3%83%b3') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( textLink04('/view/buyer/inquiryproduct/productsearch/productSearch.html?ret=init&key=%e6%97%a5%e5%82%98') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( textLink05('/view/buyer/inquiryproduct/productsearch/productSearch.html?ret=init&key=%e3%82%b5%e3%83%b3%e3%83%80%e3%83%ab') )
		target.appendChild(liNode);
		
}

function textLink01( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("懐中電灯");
		aNode.appendChild(textNode);
	return aNode;
}

function textLink02( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("名刺入れ");
		aNode.appendChild(textNode);
	return aNode;
}

function textLink03( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("ランタン");
		aNode.appendChild(textNode);
	return aNode;
}

function textLink04( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("日傘");
		aNode.appendChild(textNode);
	return aNode;
}

function textLink05( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("サンダル");
		aNode.appendChild(textNode);
	return aNode;
}





/* 人気サプライヤー */
function NinkiSupplier( targetId ){

	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( supName01('/view/buyer/inquiryproduct/suppliertreatmentlist/supplierTreatmentList.html?memberId=20000157') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( supName02('/view/buyer/inquiryproduct/suppliertreatmentlist/supplierTreatmentList.html?memberId=20000113') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( supName03('/view/buyer/inquiryproduct/suppliertreatmentlist/supplierTreatmentList.html?memberId=20000019') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( supName04('/view/buyer/inquiryproduct/suppliertreatmentlist/supplierTreatmentList.html?memberId=20000022') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
	var brNode = document.createElement('br');
		liNode.appendChild(brNode);
		liNode.appendChild( supName05('/view/buyer/inquiryproduct/suppliertreatmentlist/supplierTreatmentList.html?memberId=20000032') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( supName06('/view/buyer/inquiryproduct/suppliertreatmentlist/supplierTreatmentList.html?memberId=20000886') )
		target.appendChild(liNode);
		
	var target = document.getElementById(targetId);
	var liNode = document.createElement('li');
		liNode.appendChild( supName07('/view/buyer/inquiryproduct/suppliertreatmentlist/supplierTreatmentList.html?memberId=20000034') )
		target.appendChild(liNode);
		
}

function supName01( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("株式会社現代百貨");
		aNode.appendChild(textNode);
	return aNode;
}

function supName02( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("Aines inc アインズ");
		aNode.appendChild(textNode);
	return aNode;
}

function supName03( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("秋月貿易");
		aNode.appendChild(textNode);
	return aNode;
}

function supName04( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("丸和貿易");
		aNode.appendChild(textNode);
	return aNode;
}

function supName05( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("グッドモーニングカンパニー");
		aNode.appendChild(textNode);
	return aNode;
}

function supName06( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("センスオブジャパン");
		aNode.appendChild(textNode);
	return aNode;
}

function supName07( url ){
	var aNode = document.createElement('a');
		aNode.href = url;
	var textNode = document.createTextNode("イマトレーディング");
		aNode.appendChild(textNode);
	return aNode;
}








