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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openWindow1() {
  window.open('mobile/mobile2.html','mobile','width=248,height=160,top=0,left=0');
}
 function openWin(URL,winName, Width, Height, Scroll){
  var top = (screen.height-Height)/2 ;
  var left = (screen.width -Width)/2 ;
  w = window.open(URL,'Loading','width=' + Width+',height='+Height+',screenX='+left+',screenY='+top+',left='+left+',top='+top+',status=no,toolbar=no,titlebar=no,scrollbars='+Scroll+'');
}
function stChg(){
	if(document.form1.select.value == "east"){
		location.href = "st.html";
	}else if(document.form1.select.value == "west"){
		location.href = "st_w01.html";
	}else{
		location.href = "st_overseas.html";
	}
}
function ssChg(){
	if(document.form1.select.value == "east"){
		location.href = "ss.html";
	}else{
		location.href = "ss_w01.html";
	}
}
function stdChg(){
	if(document.form1.select.value == "east"){
		location.href = "std.html";
	}else{
		location.href = "std_w01.html";
	}
}
function stnyChg(){
	if(document.form1.select.value == "east"){
		location.href = "stny.html";
	}else{
		location.href = "stny_w01.html";
	}
}
function stpcChg(){
	if(document.form1.select.value == "east"){
		location.href = "stpc.html";
	}else{
		location.href = "stpc_w01.html";
	}
}
function tiaraChg(){
	if(document.form1.select.value == "east"){
		location.href = "tiara.html";
	}else{
		location.href = "tiara_w01.html";
	}
}
function vegaChg(){
	if(document.form1.select.value == "east"){
		location.href = "vega.html";
	}else{
		location.href = "vega_w01.html";
	}
}
function vhChg(){
	if(document.form1.select.value == "east"){
		location.href = "vh.html";
	}else{
		location.href = "vh_w01.html";
	}
}	
function kingzChg(){
	if(document.form1.select.value == "east"){
		location.href = "kingz.html";
	}else{
		location.href = "kingz_w01.html";
	}
}
function airportChg(){
	if(document.form1.select.value == "east"){
		location.href = "airport.html";
	}else{
		location.href = "airport_w01.html";
	}
}

function chk(){
	var msg="";
	var msg2="";
	
	if(document.form1.syokusyu.value==""){
		msg +="希望職種\n";
	}	
	if((document.form1.name_01.value=="") || (document.form1.name_02.value=="")){
		msg +="お名前\n";
	}
	if((document.form1.kana_01.value=="") || (document.form1.kana_01.value=="")){
		msg +="フリガナ\n";
	}
	if((document.form1.sex[0].checked==false) && (document.form1.sex[1].checked==false)){
		msg +="性別\n";
	}
	if((document.form1.zip_01.value=="") || (document.form1.zip_02.value=="")){
		msg +="郵便番号\n";
	}
	if((document.form1.zip_01.value=="") || (document.form1.zip_02.value=="")){
		msg +="ご住所\n";
	}
	if((document.form1.email_01.value =="") || (document.form1.email_02.value =="")){
		msg +="E-mail\n";
	}else{
		if(document.form1.email_01.value != document.form1.email_02.value){
			msg2 +="確認用には、同じE-mailを入れてください\n";
		}else{
			n = document.form1.email_01.value.match("^[0-9A-Za-z._-]+@[0-9A-Za-z._-]+$");
			if(n == null){
				msg2 +="E-mailを正しく入力してください。\n";
			}
		}
	}
	if(msg!=""){
		if(msg2!=""){
			alert("下記の項目を入力してください\n\n"+msg+"\n"+msg2);
			return false;
		}else{
			alert("下記の項目を入力してください\n\n"+msg);
			return false;
		}
	}else{
		if(msg2!=""){
			alert(msg2);
			return false;
		}else{
			//document.form1.submit();
		}
	}
}
