//拡張開く
function ow_ex4() {
	window.open('/ff11fr/altana/index.html','ex4');
}



var button = new Button();
button.slide = true;
/*
 * SubMenu
 *------------------------------------------------------------------------*/
if (isMatchUrl('https')) var str = 'http://www.playonline.com';
else var str = '';

var sub = new Menu('sub');
sub.slide = true;
/*------------------------------------------------------------------------*/
if(isMatchUrl('index.shtml')){
	sub.slide = false;
	sub.backgroundImage('/ff11fr/imgs/introbt.gif' );
	sub.size(170,693 + 28 + 90);

	button.id('newplayer');
	button.position(0,0,0,0);
	button.size(170,75);
	button.link('/ff11fr/newplayer/index.html');
	button.target('_blank');
	button.alt('');

	button.id('tmp');
	button.position(0,0,0,-75);
	button.size(149,65);
	button.link(null);
	button.alt('');

	button.id('sub1');
	button.position(5,0,-5,-140);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/about/welcom.html?pageID=about');
	button.alt('');

	button.id('sub2');
	button.position(5,0,-5,-162);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/world/index.html');
	button.alt('');

	button.id('sub3');
	button.position(5,0,-5,-184);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/about/live01.html?pageID=about');
	button.alt('');

	button.id('sub4');
	button.position(5,0,-5,-206);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/monster/index.html?pageID=monster');
	button.alt('');

	button.id('sub5');
	button.position(5,0,-5,-228);
	button.size(149,22);
	button.link(str+'/ff11fr/guide/system/index.html?pageID=system');
	button.alt('');

	button.id('sub6');
	button.position(5,0,-5,-250);
	button.size(149,29);
	button.link(null);

	button.id('sub7');
	button.position(5,0,-5,-279);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/extension.html?pageID=extension');
	button.alt('');

	button.id('sub8');
	button.position(5,0,-5,-301);
	button.size(149,22);
	button.link(str+'/ff11fr/promathia/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub9');
	button.position(5,0,-5,-323);
	button.size(149,22);
	button.link(str+'/ff11fr/ahturhgan/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub10');
	button.position(5,0,-5,-345);
	button.size(149,22);
	button.link(str+'/ff11fr/altana/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub11');
	button.position(5,0,-5,-367);
	button.size(149,29);
	button.link(null);

	button.id('sub12');
	button.position(5,0,-5,-396);
	button.size(149,22);
	button.link(str+'/ff11fr/addon/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub13');
	button.position(5,0,-5,-418);
	button.size(149,22);
	button.link(str+'/ff11fr/addon/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub14');
	button.position(5,0,-5,-440);
	button.size(149,22);
	button.link(str+'/ff11fr/addon/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub15');
	button.position(5,0,-5,-462);
	button.size(149,15);
	button.link(null);

	button.id('sub16');
	button.position(5,0,-5,-477);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/shop.html');
	button.alt('');

	button.id('sub17');
	button.position(5,0,-5,-499);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/optional/wd_transfer01.html');
	button.alt('');

	button.id('sub18');
	button.position(5,0,-5,-521);
	button.size(149,22);
	button.link(str+'/ff11fr/topics/optional/regist.html');
	button.alt('');

	button.id('sub19');
	button.position(5,0,-5,-543);
	button.size(149,42);
	button.link(null);
} else if (isMatchUrl('/info/')||isMatchUrl('/polnews')||isMatchUrl('/polff11s')||isMatchUrl('/topics')||isMatchUrl('/server')||isMatchUrl('/service/')||isMatchUrl('/verup/')) {
	
	sub.slide = false;
	sub.backgroundImage('/ff11fr/imgs/introbt2.gif' );
	sub.size(170,681 + 28 + 90);

	button.id('newplayer');
	button.position(0,0,0,0);
	button.size(170,63);
	button.link('/ff11fr/newplayer/index.html');
	button.target('_blank');
	button.alt('');

	button.id('tmp');
	button.position(0,0,0,-63);
	button.size(149,65);
	button.link(null);
	button.alt('');

	button.id('sub1');
	button.position(5,0,-5,-128);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/about/welcom.html?pageID=about');
	button.alt('');

	button.id('sub2');
	button.position(5,0,-5,-150);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/world/index.html');
	button.alt('');

	button.id('sub3');
	button.position(5,0,-5,-172);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/about/live01.html?pageID=about');
	button.alt('');

	button.id('sub4');
	button.position(5,0,-5,-194);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/monster/index.html?pageID=monster');
	button.alt('');

	button.id('sub5');
	button.position(5,0,-5,-216);
	button.size(149,22);
	button.link(str+'/ff11fr/guide/system/index.html?pageID=system');
	button.alt('');

	button.id('sub6');
	button.position(5,0,-5,-238);
	button.size(149,29);
	button.link(null);

	button.id('sub7');
	button.position(5,0,-5,-267);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/extension.html?pageID=extension');
	button.alt('');

	button.id('sub8');
	button.position(5,0,-5,-289);
	button.size(149,22);
	button.link(str+'/ff11fr/promathia/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub9');
	button.position(5,0,-5,-311);
	button.size(149,22);
	button.link(str+'/ff11fr/ahturhgan/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub10');
	button.position(5,0,-5,-333);
	button.size(149,22);
	button.link(str+'/ff11fr/altana/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub11');
	button.position(5,0,-5,-355);
	button.size(149,29);
	button.link(null);

	button.id('sub12');
	button.position(5,0,-5,-384);
	button.size(149,22);
	button.link(str+'/ff11fr/addon/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub13');
	button.position(5,0,-5,-406);
	button.size(149,22);
	button.link(str+'/ff11fr/addon/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub14');
	button.position(5,0,-5,-428);
	button.size(149,22);
	button.link(str+'/ff11fr/addon/index.html');
	button.alt('');
	button.target('_blank');

	button.id('sub15');
	button.position(5,0,-5,-450);
	button.size(149,15);
	button.link(null);

	button.id('sub16');
	button.position(5,0,-5,-465);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/shop.html');
	button.alt('');

	button.id('sub17');
	button.position(5,0,-5,-487);
	button.size(149,22);
	button.link(str+'/ff11fr/intro/optional/wd_transfer01.html');
	button.alt('');

	button.id('sub18');
	button.position(5,0,-5,-509);
	button.size(149,22);
	button.link(str+'/ff11fr/topics/optional/regist.html');
	button.alt('');

	button.id('sub19');
	button.position(5,0,-5,-531);
	button.size(149,42);
	button.link(null);
}

var ss_size = 200 + 28;

function charamake(){
	window.open("/ff11fr/intro/charmake/index.html","chara","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,width=549,height=399");
}

if(isMatchUrl('/intro/')){
	document.write('<img src="/ff11fr/menu/imgs/catl01.gif">');
	sub.backgroundImage('/ff11fr/menu/imgs/subbt01.gif' );
	sub.size(170,528+ss_size);
	
	link = [
	'about&start',
		'/ff11fr/intro/about/welcom.html?pageID=about',
		'/ff11fr/intro/about/history01.html?pageID=about',
		'/ff11fr/intro/about/class01.html?pageID=about',
		'/ff11fr/intro/about/job01.html?pageID=about',
		'/ff11fr/intro/about/live01.html?pageID=about',
		'javascript:charamake();&end',
	'/ff11fr/intro/world/index.html',
	'monster&start',
		'/ff11fr/intro/monster/index.html?pageID=monster',
		'/ff11fr/intro/monster/tribe.html?pageID=monster&end',
	'extension&start',
		'/ff11fr/intro/extension.html?pageID=extension',
		'/ff11fr/promathia/index.html&blank',
		'/ff11fr/ahturhgan/index.html&blank',
		'/ff11fr/altana/index.html&blank&end',
	'/ff11fr/intro/shop.html',
	'/ff11fr/intro/optional/wd_transfer01.html'
	];
}


if(isMatchUrl('/envi/')){
	document.write('<img src="/ff11fr/menu/imgs/catl02.gif">');
	sub.backgroundImage('/ff11fr/menu/imgs/subbt02.gif' );
	sub.size(170,108+ss_size);

	link = [
	'/ff11fr/envi/win/win01.html',
	'/ff11fr/envi/xbox/xbox01.html',
	'/ff11fr/envi/charge.html'
	];
}

if(isMatchUrl('/guide/')){
	document.write('<img src="/ff11fr/menu/imgs/catl03.gif">');
	sub.backgroundImage('/ff11fr/menu/imgs/subbt03.gif' );
	sub.size(170,556+ss_size);
	
	link = [
	'system&start',
		'/ff11fr/guide/system/index.html?pageID=system',
		'/ff11fr/guide/system/quests.html?pageID=system',
		'/ff11fr/guide/system/comm.html?pageID=system',
		'/ff11fr/guide/system/battle.html?pageID=system',
		'/ff11fr/guide/system/other.html?pageID=system',
		'/ff11fr/guide/system/worlds.html?pageID=system',
		'/ff11fr/guide/system/item.html?pageID=system',
		'/ff11fr/guide/system/dictionary01.html?pageID=system&end',
	'development&start',
		'/ff11fr/guide/development/concept01.html?pageID=development',
		'/ff11fr/guide/development/census/index.html&blank',
		'/ff11fr/guide/development/vt2/backnumber/index.html&blank',
		'/ff11fr/guide/development/goblin/main/index.html&end&blank',
		'/ff11fr/guide/mogbon/index.html',
		'/ff11fr/guide/mogtab/index.html',
		'/ff11fr/guide/recruitment01.html',
		'/ff11fr/crs/&blank',
		'/pcd/verup/ff11fr/update.html'
	];
}

if(isMatchUrl('/download/')){
	document.write('<img src="/ff11fr/menu/imgs/catl05.gif">');
	sub.backgroundImage('/ff11fr/menu/imgs/subbt05.gif' );
	sub.size(170,164+ss_size);

	link = [
	'media&start',
		'/ff11fr/download/media/sysinfo01.html?pageID=media',
		'/ff11fr/download/media/benchmark01.html?pageID=media',
		'/ff11fr/download/media/vista01.html?pageID=media&end',
	'/ff11fr/download/wind/index.html'
	];
}

if (isMatchUrl('/rule/')){
	document.write('<img src="/ff11fr/menu/imgs/catl06.gif">');
	sub.backgroundImage('/ff11fr/menu/imgs/subbt06.gif' );
	sub.size(170,472+ss_size);

	link = [
	'/ff11fr/rule/index.html',
	'https://secure.playonline.com/ff11fr/rule/policy.shtml',
	'manner&start',
		'/ff11fr/rule/manner01.html?pageID=manner',
		'/ff11fr/rule/manner02.html?pageID=manner',
		'/ff11fr/rule/manner03.html?pageID=manner',
		'/ff11fr/rule/manner04.html?pageID=manner',
		'/ff11fr/rule/manner05.html?pageID=manner&end',
	'support&start',
		'/ff11fr/rule/support01.html?pageID=support',
		'/ff11fr/rule/support02.html?pageID=support',
		'/ff11fr/rule/support03.html?pageID=support',
		'/ff11fr/rule/support04.html?pageID=support',
		'/ff11fr/rule/support05.html?pageID=support&end',
	'/ff11fr/rule/uacs01.html',
	'/ff11fr/rule/specialtask.html'
	];

}

/*------------------------------------------------------------------------*/

/* SUB MENU */
var slide_header_data = new Object();
var slide_y = new Object();

if(!isMatchUrl('index.shtml')&&!isMatchUrl('/info/')&&!isMatchUrl('/polnews')&&!isMatchUrl('/polff11s')&&!isMatchUrl('/topics')&&!isMatchUrl('/server')&&!isMatchUrl('/service/')&&!isMatchUrl('/verup/')){
	for(var i=0; i<link.length; i++){

		if (link[i].indexOf('&start', 0) != -1) {
			var match_string = new RegExp(/&start/);
			link[i] = link[i].replace(match_string, '');
			button.id(link[i]);
			button.childNodesStart();
			button.size(162,28);
			button.position(0,0,0,i*(-28));

			slide_y[link[i]] = button.button_aggregater[link[i]].background_image_y;
		} else {
			button.id('subbt'+i);
			button.size(162,28);
			button.position(0,0,0,i*(-28));
		}

		if (link[i].indexOf('&blank', 0) != -1) {
			var match_string = new RegExp(/&blank/);
			link[i] = link[i].replace(match_string, '');
			button.target('_blank');
		}

		if (link[i].indexOf('&end', 0) != -1) {
			button.childNodesEnd();
			var match_string = new RegExp(/&end/);
			link[i] = link[i].replace(match_string, '');
		}

		if (link[i].indexOf('http', 0) != -1) {
			button.link(link[i]);
		} else {
			button.link(str+link[i]);
		}

	}
}
if(!isMatchUrl('index.shtml')&&!isMatchUrl('/info/')&&!isMatchUrl('/polnews')&&!isMatchUrl('/polff11s')&&!isMatchUrl('/topics')&&!isMatchUrl('/server')&&!isMatchUrl('/service/')&&!isMatchUrl('/verup/')){
	button.id('subbt'+i);
	button.size(170,24);
	button.position(0,0,0,i*(-28));
	button.link(null);
}

sub.flushFF11(button);
button.cleanup();

if(!isMatchUrl('index.shtml')&&!isMatchUrl('/info/')&&!isMatchUrl('/polnews')&&!isMatchUrl('/polff11s')&&!isMatchUrl('/topics')&&!isMatchUrl('/server')&&!isMatchUrl('/service/')&&!isMatchUrl('/verup/')){
	slideSwitch($GET('pageID'),-170,slide_y[$GET('pageID')]);
}
