 /* Flash設定
function flash_output(){
	var f_out;
	
	f_out ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=640 HEIGHT=60>';
	f_out+='<param name="movie" value="Main_memu.swf">';
	f_out+='<param name="loop" value="false">';
	f_out+='<param name=quality value=high>';
	f_out+='<param name=bgcolor value=#000000>';
	f_out+='<embed src="Main_memu.swf" loop=false quality=high bgcolor=#000000  WIDTH=640 HEIGHT=60 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed> ';
	f_out+='</object>';

	document.getElementById("flash_out").innerHTML = f_out;
}
 */

function openwin(url) {
 /* 横幅400px、縦幅200pxのウインドウを開く */
 w = window.open(url, 'win','width=500,height=400,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}
function openwin350(url) {
 /* 横幅350px、縦幅350pxのウインドウを開く */
 w = window.open(url, 'win','width=365,height=365,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}
function openwin700_s(url) {
 /* 横幅700px、縦幅200pxのウインドウを開く */
 w = window.open(url, 'win','width=870,height=250,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}
function openwin700_s2(url) {
 /* 横幅700px、縦幅400pxのウインドウを開く */
 w = window.open(url, 'win','width=800,height=380,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}
function openwin700_s3(url) {
 /* 横幅700px、縦幅400pxのウインドウを開く */
 w = window.open(url, 'win','width=800,height=190,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}
function openwin700(url) {
 /* 横幅700px、縦幅200pxのウインドウを開く */
 w = window.open(url, 'win','width=750,height=800,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}
function openwin800(url) {
 /* 横幅700px、縦幅200pxのウインドウを開く */
 w = window.open(url, 'win','width=750,height=800,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}
function openwin1000(url) {
 /* 横幅700px、縦幅200pxのウインドウを開く */
 w = window.open(url, 'win','width=800,height=1100,status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no');
}

//ロールオーバー
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}



/* 説明
　HTMLソース内には以下の記述をします。
　------------------------------------------
　<a href="#"><img src="./テスト_off.gif" alt="テスト" /></a> 
　------------------------------------------

　記述内容の意味
　通常時の画像と、ロールオーバー時の画像を別々で用意して、以下のようにファイル名の最後に「_on」「_off」とつけるだけでオンマウス時の画像が変わります。
　menu_on.png
　menu_off.png
　サンプルはpngですが、jpgとかgifとかでもOKです。

*/

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 Input_check() {
		if (document.form_send.form_name.value == "") {alert("「お名前」が未入力です");
				document.form_send.form_name.focus();
				return(false);
		}

		if (document.form_send.kaitou2.value == "") {alert("「年齢」が未入力です");
				document.form_send.kaitou2.focus();
				return(false);
		}

		if (document.form_send.form_mail.value == "") {alert("「Eメールアドレス」が未入力です");
				document.form_send.form_mail.focus();
				return(false);
		}

		if(document.form_send.form_mail.value.indexOf("@",0)<=0){
				alert("正確なEメールアドレスを入力して下さい。");
				document.form_send.form_mail.focus();
				return(false);
		}

		str=document.form_send.form_mail.value;
		if (!str.match(/^[0-9A-Za-z.\-_]+@[0-9A-Za-z\-_]+\.[0-9A-Za-z.\-_]+[A-Za-z]$/)) {
				alert("正確なEメールアドレスを入力して下さい。");
				document.form_send.form_mail.focus();
				return false;
		}

		if (document.form_send.kaitou3.value == "") {alert("「電話番号」が未入力です");
				document.form_send.kaitou3.focus();
				return(false);
		}

		if (document.form_send.kaitou12.value == "") {alert("「お問合せ内容」が未入力です");
				document.form_send.kaitou12.focus();
				return(false);
		}
		// 200文字（400バイト）を超える場合はエラー
		if (document.form_send.kaitou12.length > 200) {
				alert('「お問合せ内容」は２００文字以内で入力してください');
				return false;
		}

return(true);
}

//拡大画像の表示
function imgopen(imgpass,size_w,size_h){
	var htmldata='';
	size_w=size_w-0;
	size_h=size_h-0;
	
	htmldata+='<html>';
	htmldata+='<head>';
	htmldata+='<meta http-equiv="Content-Type" content="text/html; charset=Shift-JIS" />';
	htmldata+='<title>img</title>';
	htmldata+='<style type="text/css">';
	htmldata+='<!--';
	htmldata+='body{background-color:#000000; text-align:center;}';
	htmldata+='img{margin:10px;}';
	htmldata+='-->';
	htmldata+='</style>';
	htmldata+='</head>';
	htmldata+='<body>';
	htmldata+='<div align="center">';
	htmldata+='<img src="'+imgpass+'">';
	htmldata+='<form style="margin:10px 0px"><input type=button value="CLOSE" onClick="window.close()" style="border:1px solid #666; cursor:pointer;"></form>';
	htmldata+='</div>';
	htmldata+='</body>';
	htmldata+='</html>';
	
	windowoption='resizable=1,width='+size_w+',height='+size_h;
	newwindow = window.open("", "img", windowoption, scrollbars='yes');
	
	newwindow.document.write(htmldata);
	newwindow.document.close();
}


//拡大画像の表示2
function imgopen2(imgpass,size_w,size_h){
	var htmldata='';
	size_w=size_w-0;
	size_h=size_h-0;
	
	htmldata+='<html>';
	htmldata+='<head>';
	htmldata+='<meta http-equiv="Content-Type" content="text/html; charset=Shift-JIS" />';
	htmldata+='<title>img</title>';
	htmldata+='<style type="text/css">';
	htmldata+='<!--';
	htmldata+='body{text-align:center;}';
	htmldata+='img{margin:10px;}';
	htmldata+='-->';
	htmldata+='</style>';
	htmldata+='</head>';
	htmldata+='<body>';
	htmldata+='<div align="center">';
	htmldata+='<img src="'+imgpass+'">';
	htmldata+='<form style="margin:10px 0px"><input type=button value="CLOSE" onClick="window.close()" style="border:1px solid #666; cursor:pointer;"></form>';
	htmldata+='</div>';
	htmldata+='</body>';
	htmldata+='</html>';
	
	windowoption='resizable=1,width='+size_w+',height='+size_h;
	newwindow = window.open("", "img", windowoption, scrollbars='yes');
	
	newwindow.document.write(htmldata);
	newwindow.document.close();
}

