(function ()
{
var thkactive = false;
var thkactivebg = false;
var thktarget = '';

if ( !thkheaderwidth == '100%' ) {
	thkheaderwidth = thkheaderwidth + 'px';
}

document.writeln('<table background="http://3k-hobby.com/header/img/bg.gif" height="40" style="width:' + thkheaderwidth + ';" cellpadding="0" cellspacing="0">');
document.writeln('<tr>');
document.writeln('<td><img src="http://3k-hobby.com/header/site_icon/_.gif" alt="" width="1" height="1" /></td>');
//document.writeln('<td><a href="http://janboo.shop-pro.jp/" target="_blank"><img border="0" src="http://3k-hobby.com/header/logo_janboog.gif" alt="プラモデル・ホビーならJANBOO-Network" /></a><img src="http://3k-hobby.com/header/icon/_.gif" alt="" width="1" height="1" /></td>');
document.writeln('<td><a href="http://3k-hobby.com/" target="_blank"><img border="0" src="http://3k-hobby.com/header/logo.gif" alt="プラモデルならホビーショップ3K" /></a><img src="http://3k-hobby.com/header/icon/_.gif" alt="" width="1" height="1" /></td>');
document.writeln('<td>');
document.writeln('<table cellpadding="0" cellspacing="0">');
document.writeln('<tr>');
document.writeln('<td></td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</td>');
document.writeln('<td align="right" valign="middle">');
document.writeln('<table cellpadding="0" cellspacing="0" style="font-size: 10px">');
document.writeln('<tr>');

var thk_services = {
	janboo: {
		domain:	"afv.3k-hobby.com",
		url:	"http://afv.3k-hobby.com/",
		title:	"ミリタリープラモデル",
		desc:	"ミリタリー"
	},
	torahobi: {
		domain:	"air.3k-hobby.com",
		url:	"http://air.3k-hobby.com/",
		title:	"飛行機プラモデル",
		desc:	"飛行機"
	},
	colleca:{
		domain:	"oogata.3k-hobby.com",
		url:	"http://oogata.3k-hobby.com/",
		title:	"1/350スケール艦船プラモデル",
		desc:	"大型艦船"
	},
	funemoke:{
		domain:	"ship.3k-hobby.net",
		url:	"http://ship.3k-hobby.net/",
		title:	"1/700艦船プラモデル",
		desc:	"1/700艦船"
	},
	tanktype:{
		domain:	"car.3k-hobby.biz",
		url:	"http://car.3k-hobby.biz/",
		title:	"車プラモデル",
		desc:	"車"
	},
	zero:{
		domain:	"bike.3k-hobby.biz",
		url:	"http://bike.3k-hobby.biz/",
		title:	"バイクプラモデル",
		desc:	"バイク"
	},

//	baikumo:{
//		domain:	"link.3k-hobby.com",
//		url:	"http://link.3k-hobby.com/",
//		title:	"プラモデルリンク",
//		desc:	"リンク集"
//	},
//	tomaran:{
//		domain:	"tomaran.net",
//		url:	"http://tomaran.net/",
//		title:	"動くホビーはtomaranで！",
//		desc:	"ミニ四駆"
//	},
//	carpura:{
//		domain:	"carpura.net",
//		url:	"http://carpura.net/",
//		title:	"車プラモデルはcarpuraで！",
//		desc:	"車"
//	},
//	bayking:{
//		domain:	"bayking.net",
//		url:	"http://bayking.net/",
//		title:	"プラモデル完成品のBAYKING",
//		desc:	"プラモデル完成品"
//	},
	gunmo:{
		domain:	"gunpla.3k-hobby.com",
		url:	"http://gunpla.3k-hobby.com/",
		title:	"ガンダムプラモデル",
		desc:	"ガンプラ"
	}
};

for (var service_name in thk_services) {
	var i = thk_services[service_name];
	var re = new RegExp('(www.)?' + i.domain + '$', 'i');
	thk_active = ( re.exec(document.domain) ) ? ' class="thkactive"' : '';

	if (thk_active) {
		thkactivebg = 'thkactivebg';
		thktarget = ' target="_top"';
	} else {
		thkactivebg = 'thkbg';
		thktarget = ' target="_blank"';
	}
	document.writeln('<td' + thk_active + '><a href="' + i.url + '" title="' + i.title + '"' + thktarget + '><img border="0" src="http://3k-hobby.com/header/site_icon/' + service_name + '.gif" alt="' + i.title + '" />' + i.desc + '</a></td><td class="' + thkactivebg + '"><img src="http://3k-hobby.com/header/img/_.gif" alt="" width="5" height="1" /></td>');
}

document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</td>');
document.writeln('<td><img src="http://3k-hobby.com/header/site_icon/_.gif" alt="" width="1" height="1" /></td>');
document.writeln('</tr>');
document.writeln('</table>');
})();

