function window1(url){
window.open(url,"name","width=380,height=480,toolbar=no,scrollbars=no,resizable=yes,menubar=no");
}

function window2(url){
window.open(url,"name","width=380,height=510,toolbar=no,scrollbars=no,resizable=yes,menubar=no");
}

function top_link () {
	var r = 0;    var a = 0;
	var b = 0;    var msg_dat_max = 0;
	for(i=0;i<2;i++) {
	if(i) {
		msg_dat_max = a;
		r = Math.floor(Math.random() * msg_dat_max);
		r++;
}
	a=0;b=0;
	b=a;a+= 20 ;if(i&&b<r&&r<=a) md= '<ul><li><a href="http://www.pokemon-search.com/search/rank.cgi?mode=r_link&id=8106" target="_blank">PokemonSearch</a></li><li><a href="http://game.linksquare.net/" target="_blank">ゲーム攻略リンク広場</a></li><li><a href="http://pokemonmax.s25.xrea.com/search/" target="_blank">POKeMON * Skyline</a></li><li><a href="http://fairylandss.org/game/" target="_blank">ゲーム情報ルネサンス</a></li><li><a href="http://www.pokemon-dp.com/" target="_blank">ポケモン！ダイヤモンド＆パール広場</a></li><li><a href="http://www.paw.hi-ho.ne.jp/kumachiyan/" target="_blank">ゲムステ</a></li><li><a href="http://xn--rckteqa2e.com/" target="_blank">ポケモン共和国</a></li><li><a href="http://pokepa.com/" target="_blank">PokeData</a></li></ul><ul><li><a href="http://www5.atwiki.jp/syjnyj/" target="_blank">ポケモン ダイヤモンド・パール 徹底攻略</a></li><li><a href="http://takoweb.com/~rot/game/pokemon/" target="_blank">ポケモン ダイヤモンド パール 攻略星</a></li><li><a href="http://www.pokemon-lab.com/" target="_blank">ポケットモンスター研究所</a></li><li><a href="http://xn--ols92r4wd66u.com/daipa/" target="_blank">ポケモンダイヤモンド・パール攻略Ω</a></li><li><a href="http://www.pokemon-master.com/" target="_blank">めざせポケモンマスター！</a></li></ul><ul><li><a href="http://gamac.web.fc2.com/pokemon/" target="_blank">ポケモンダイヤモンド・パール攻略マスター</a></li><li><a href="http://diamond-pearl.jugem.jp/" target="_blank">ポケットモンスター ダイヤモンド＆パール攻略</a></li><li><a href="http://pokemon.capture-room.com/" target="_blank">ポケモン攻略の部屋</a></li><li><a href="http://yakkun.com/php/link/?p=in;id=267" target="_blank">ポケモン徹底攻略</a></li><li><a href="http://pokemon-ds.net/" target="_blank">ポケモン ドリームスター</a></li><li><a href="http://banner.meganebu.com/~skyblue/pokemon/" target="_blank">ポケモンルーム</a></li></ul><ul><li><a href="http://xn--rckteqa2e6038anjua.com/" target="_blank">ポケモン　ダイヤモンド･パール極限攻略データベース</a></li><li><a href="http://kouryakuwiki.com/" target="_blank">攻略Wiki.com</a></li><li><a href="http://www.pokemon-style.com/" target="_blank">PokemonStyle</a></li><li><a href="http://pokemon.is.land.to/" target="_blank">Pokemon World</a></li><li><a href="http://www22.tok2.com/home/pokesupe/" target="_blank">ポケモンスペース</a></li><li><a href="http://aaa222.fc2web.com/pokemon/1-1top.html" target="_blank">ポケモン ダイヤモンド・パール 攻略+裏技</a></li></ul><ul><li><a href="http://zapanet.info/pokemon/dp/" target="_blank">ポケモン ダイヤモンド・パール攻略Wiki</a></li><li><a href="http://isave.xxxxxxxx.jp/" target="_blank">僕が地球を救う！</a></li><li><a href="http://pdp.s216.xrea.com/" target="_blank">ポケモン ダイヤモンド・パール完全攻略</a></li><li><a href="http://www.gamewander.com/pokemon/" target="_blank">ポケモン攻略支援所 ダイヤ・パール</a></li><li><a href="http://www4.pf-x.net/~blueocean/poke/" target="_blank">ダイヤモンド・パール攻略 BLUE OCEAN</a></li></ul><ul><li><a href="http://netland.ddo.jp/ken/" target="_blank">ｋｅｎのページ</a></li><li><a href="http://shinoh.holy.jp/" target="_blank">SHINOH -シンオウ-</a></li><li><a href="http://game.gaym.jp/pokemon/dp/" target="_blank">GAYM Games</a></li><li><a href="http://www.game-kouryakuweb.com/pokemon/" target="_blank">ポケットモンスター ダイヤモンド・パール 攻略WEB</a></li></ul>';
}
document.write(md);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function init(theme){
	if(!theme) {
		theme = getcookie("THEME");
		if(!theme) theme = "basis";
	}
	if(theme == "et") theme = "basis";

	if(theme == "basis") {
		setbasictheme();
	}
}

function setbasictheme(){
	var js = get();
	document.write("<SCRIPT src=\"/index" + js + ".js\"></SCRIPT>");
}

function change(num){
	if(!num) num = 0;
	document.cookie = "ad=" + num + "; " + "expires=Thu, 31-Dec-2020 23:59:59 GMT; " + "path=/;";
	location.reload();
}

function get(){
	var js = getcookie("ad");
	if (!js) js = 0;
	return js;
}
function getcookie(key){
	tmp1 = " " + document.cookie + ";";
	xx1 = xx2 = 0;
	len = tmp1.length;
	while (xx1 < len) {
		xx2 = tmp1.indexOf(";", xx1);
		tmp2 = tmp1.substring(xx1 + 1, xx2);
		xx3 = tmp2.indexOf("=");
		if (tmp2.substring(0, xx3) == key) {
			return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
		}
		xx1 = xx2 + 1;
	}
	return 1;
}

init("basis");