function test()	{
alert('OK');
}

function P1(w1){window.open(w1,"_self")}

function ImageActualSize( image_url )	{
	window.open( image_url, "actual_image" ,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=640,height=500');
}

//共通関数-----------------------------------------------------------
function NewWindow( url ){
var newwin;
newwin = window.open('','fwindow','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=690,height=600');
newwin.location.href = url;
}

function sendRequest( thisForm )	{
	var id_list = '';
	var railway_id;
	var i;
	var url;
	
	for ( i = 0; i < thisForm.req_list.length; i++ )	{
		if ( thisForm.req_list[i].checked )	{
			if  ( id_list == '' )	{
				id_list = thisForm.req_list[i].value;
			} else	{
				id_list = id_list + ' ' + thisForm.req_list[i].value;
			}
		}
	}
	
	railway_id = thisForm.railway_id.value;
	
	url = 	'../cgi-dir/01realsys/na_list_request.cgi?req_list=' + id_list + '&act=entry&railway=' + railway_id;
	NewWindow( url );
}

function inputCheck(val)	{
//未入力チェック

	if (val == "" || val ==null)	{
		return 1;
	}
	return 0;
	
}
function checkEmail(val)	{
//メールアドレスチェック
	if( !val.match(/[!-?A-~]+@[!-?A-~]+\.[!-?A-~]+/) ){
		return 1;
	}
	return 0;
}

function checkPasswd(val)	{
//値が8桁以上の英数字であるかチェック
	if( !val.match(/^\w{8,}$/) ){
		return 1;
	}
	return 0;
}

function checkNumber(val)	{
//数値かどうかチェック
	if( val.match(/[^0-9-]/g) ){
		return 1;
	}
	return 0;
}



//物件問い合わせフォーム入力チェック
function SendCheck(thisForm)	{

	if(document.frm_request.name.value==""){
		alert("「お名前」を入力してください。");
		return false;
	}
	if(document.frm_request.email.value==""){
		alert("「メールアドレス」を入力してください。");
		return false;
	}
	if(document.frm_request.email.value.indexOf("@")<=0){
		alert("「メールアドレス」が正しくありません。");
		return false;
	}
	if(document.frm_request.elements[15].checked == true&&document.frm_request.fax.value==""){
		alert("「FAX番号」を入力してください。");
		return false;
	}
	if(document.frm_request.elements[17].checked == true&&document.frm_request.addrs.value==""){
		alert("「ご住所」を入力してください。");
		return false;
	}
return true;
}

function ResetValue( thisForm )	{
//問い合わせフォームの入力内容をリセットする

		thisForm.name.value = '';
		thisForm.kana.value = '';
		thisForm.zip.value = '';
		thisForm.addrs.value = '';
		thisForm.tel.value = '';
		thisForm.fax.value = '';
		thisForm.email.value = '';
		
		for ( var i = 0; i <= 2; i++ )	{
			thisForm.wish[i].checked = false;
		}
		
		for ( var i = 0; i <= 2; i++ )	{
			thisForm.forwarding[i].checked = false;
		}
	
		thisForm.dm.checked = false;
	
	return;
}

function EntryBack( thisForm )	{
// 戻る処理を埋め込んで送信
	thisForm.act.value = 'back';
	return;
}

function JampToPage(  select )	{
	var url;
	if ( select.value == 0 )	{
		url = './index.html';
	} else	{
		url = './index' + select.value + '.html';
	}
	location.href = url;

}

