/* ========================================================================	*/
/*																																					*/
/*												共通処理																					*/
/*																																					*/
/* ========================================================================	*/
/* ------------------------------------------------- 	*/
/*						トップメニューを表示（FLASH）						*/
/* -------------------------------------------------	*/
function display_top_menu(page){

	str = "						<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"730\" height=\"40\" id=\"top_image\" align=\"middle\">"
			+ "							<param name=\"allowScriptAccess\" value=\"always\" />"
			+ "							<param name=\"movie\" value=\"http://www.es4-mag.com/img/top_menu.swf?page=" + page + "\" />"
			+ "							<param name=\"quality\" value=\"high\" />"
			+ "							<param name=\"bgcolor\" value=\"#ffffff\" />"
			+ "							<embed src=\"http://www.es4-mag.com/img/top_menu.swf?page=" + page + "\" quality=\"high\" bgcolor=\"#ffffff\" width=\"730\" height=\"40\" name=\"top_image\" align=\"middle\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"
			+ "						</object>"
			;
//			+ "							<param name=\"allowScriptAccess\" value=\"sameDomain\" />"
//			+ "							<embed src=\"http://www.es4-mag.com/img/top_menu.swf?page=" + page + "\" quality=\"high\" bgcolor=\"#ffffff\" width=\"730\" height=\"40\" name=\"top_image\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"

	document.write(str);

}

/* ------------------------------------------------- 	*/
/*						トップメニューを表示（HTML）						*/
/* -------------------------------------------------	*/
function display_html_menu(page){

	sepa_str = "<span class=\"sepa\">&nbsp;|&nbsp;</span>";
	style_str = " style=\"color:#ff9900\"";

	str = "";
	str = str + "<a href=\"http://www.es4-mag.com/index.html\"";
	if( page == "home" ){	str = str + style_str; }
	str = str + ">HOME</a>" + sepa_str;

	str = str + "<a href=\"http://www.es4-mag.com/about/index.html\"";
	if( page == "about" ){	str = str + style_str; }
	str = str + ">ABOUT eS4</a>" + sepa_str;

//	str = str + "<a href=\"http://www.es4-mag.com/gallery/index.html\"";
	str = str + "<a href=\"javascript:alert_jyunbi();\"";
	if( page == "gallery" ){	str = str + style_str; }
	str = str + ">GALLERY</a>" + sepa_str;

	str = str + "<a href=\"http://www.es4-mag.com/event/index.html\"";
//	str = str + "<a href=\"javascript:alert_jyunbi();\"";
	if( page == "event" ){	str = str + style_str; }
	str = str + ">EVENT</a>" + sepa_str;

	str = str + "<a href=\"http://www.es4-mag.com/download/index.html\"";
	if( page == "download" ){	str = str + style_str; }
	str = str + ">DOWNLOAD</a>" + sepa_str;

	str = str + "<a href=\"http://www.es4-mag.com/links/index.html\"";
	if( page == "links" ){	str = str + style_str; }
	str = str + ">LINKS</a>" + sepa_str;

	str = str + "<a href=\"http://www.es4-mag.com/mt/index.html\"";
	if( page == "blog" ){	str = str + style_str; }
	str = str + ">BLOG</a>" + sepa_str;

	str = str + "<a href=\"http://www.es4-mag.com/contact/index.html\"";
//	str = str + "<a href=\"javascript:alert_jyunbi();\"";
	if( page == "contact" ){	str = str + style_str; }
	str = str + ">CONTACT eS4</a>";

	document.write(str);

}

/*	工事中	*/
function alert_jyunbi() {
	alert('只今、準備中です。\nしばらくお待ちください。');
}


/* ========================================================================	*/
/*																																					*/
/*												トップ（index）																		*/
/*																																					*/
/* ========================================================================	*/
/* ------------------------------------------------- 	*/
/*						画像切り替えフラッシュ表示							*/
/* -------------------------------------------------	*/
function display_top_image(){

	str = "						<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"730\" height=\"270\" id=\"top_image\" align=\"middle\">"
			+ "							<param name=\"allowScriptAccess\" value=\"sameDomain\" />"
			+ "							<param name=\"movie\" value=\"./img/top_image.swf\" />"
			+ "							<param name=\"quality\" value=\"high\" />"
			+ "							<param name=\"bgcolor\" value=\"#ffffff\" />"
			+ "							<embed src=\"./img/top_image.swf\" quality=\"high\" bgcolor=\"#ffffff\" width=\"730\" height=\"270\" name=\"top_image\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"
			+ "						</object>"
			;

	document.write(str);

}

/* ------------------------------------------------- 	*/
/*				販売店一覧表示ウィンドウ・オープン					*/
/* -------------------------------------------------	*/
function dealer_open(){ 
	window.open("./dealer_list.html", "window_name", "width=650,height=550,resizable=yes,scrollbars=yes"); 
}

/* ------------------------------------------------- 	*/
/*		プライバシー＆注意表示ウィンドウ・オープン			*/
/* -------------------------------------------------	*/
function privacy_caution_open(){ 
	window.open("./privacy_and_caution.html", "window_name", "width=650,height=550,resizable=yes,scrollbars=yes"); 
}

/* ------------------------------------------------- 	*/
/*		訂正表示ウィンドウ・オープン			*/
/* -------------------------------------------------	*/
function sorry_open(){ 
	window.open("./sorry.html", "window_name", "width=650,height=550,resizable=yes,scrollbars=yes"); 
}

/* ========================================================================	*/
/*																																					*/
/*												GALLERY																						*/
/*																																					*/
/* ========================================================================	*/
/* ------------------------------------------------- 	*/
/*						画像表示ウィンドウオープン							*/
/* -------------------------------------------------	*/
function disp_picture( kind, num ){
//		"http://www.es4-mag.com/gallery/gallery_displayer.html",
	document.myform.kind.value = kind;
	document.myform.num.value = num;

	window.open(
		"./gallery_displayer.html",
		"detail" ,
		"width=640,height=520,toolbar=no,stauts=no,scrollbars=no,resizable=yes"
	);

}
/* ------------------------------------------------- 	*/
/*						画像表示FLASH表示												*/
/* -------------------------------------------------	*/
function display_picture( kind, num ){

	kind = window.opener.document.myform.kind.value;
	num = window.opener.document.myform.num.value;

	str = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"600\" height=\"500\" id=\"gallery_displayer\" align=\"middle\">"
			+ "	<param name=\"allowScriptAccess\" value=\"sameDomain\" />"
			+ "	<param name=\"movie\" value=\"./img/gallery_displayer.swf?kind=" + kind + "&num=" + num + "\" />"
			+ "	<param name=\"quality\" value=\"high\" />"
			+ "	<param name=\"bgcolor\" value=\"#323232\" />"
			+ "	<embed src=\"./img/gallery_displayer.swf?kind=" + kind + "&num=" + num + "\" quality=\"high\" bgcolor=\"#323232\" width=\"600\" height=\"500\" name=\"gallery_displayer\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"
			+ "</object>"
			;

	document.write(str);

}

/* ========================================================================	*/
/*																																					*/
/*												EVENT																							*/
/*																																					*/
/* ========================================================================	*/
/* ------------------------------------------------- 	*/
/*					詳細情報表示ウィンドウオープン						*/
/* -------------------------------------------------	*/
function popup_modal_event(url){
/*
	window.showModalDialog(
		url,
		"detail",
		"dialogWidth=700px; dialogHeight=600px; status:false; scroll=auto; help=no"
	);
*/
	window.open(
		url,
		"detail" ,
		"width=700,height=600,toolbar=no,stauts=no,scrollbars=yes,resizable=yes"
	);
}


/* ========================================================================	*/
/*																																					*/
/*												BLOG																							*/
/*																																					*/
/* ========================================================================	*/
/* ------------------------------------------------- 	*/
/*						ブログ用サイトロゴ表示									*/
/* -------------------------------------------------	*/
function display_logo_banner(){

	str = "						<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"155\" height=\"155\" id=\"logo_banner\" align=\"middle\">"
			+ "							<param name=\"allowScriptAccess\" value=\"sameDomain\" />"
			+ "							<param name=\"movie\" value=\"http://www.es4-mag.com/img/es4web_logo.swf\" />"
			+ "							<param name=\"quality\" value=\"high\" />"
			+ "							<param name=\"bgcolor\" value=\"#ffffff\" />"
			+ "							<embed src=\"http://www.es4-mag.com/img/es4web_logo.swf\" quality=\"high\" bgcolor=\"#ffffff\" width=\"155\" height=\"155\" name=\"logo_banner\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"
			+ "						</object>"
			;

	document.write(str);

}

/* ========================================================================	*/
/*																																					*/
/*												LINK																							*/
/*																																					*/
/* ========================================================================	*/
/* ------------------------------------------------- 	*/
/*						メール送信															*/
/* -------------------------------------------------	*/
function send_mail(kind){
	var ml_1 = 'es4';
	var ml_2 = '-web';
	var ml_3 = '-con';
	var ml_4 = 'tact@';
	var ml_5 = 'geibunsha.co.jp';
	var str = ml_1 + ml_2 + ml_3 + ml_4 + ml_5;

	var mt1 = 'mai';
	var mt2 = 'lto';

	var sb1 = 'sub';
	var sb2 = 'ject';

	var sb_kind = '';
	if(kind=="link"){
		sb_kind = "about link";
	}else if(kind=="e_meeting"){
		sb_kind = "about eS4 EURO MEETING";
	}else{
		sb_kind = "contact eS4";
	}
	
	location.href = mt1 + mt2 + ':' + str + '?' + sb1 + sb2 + '=' + sb_kind;
}

