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_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_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];}
}
/* 以下フォルダの各index.htmlファイルで共通
   /doctor/, /nurse/, /pharmacist/, /rt/, /therapist/
*/
function startSearch(prm, prm2) {
/* 2009-06-18 s
	surl=document.URL
	myData = surl.split("/");

	switch (myData[3]) {
	case "doctor":
		jobt="00";
    	break;
	case "nurse":
		jobt="01";
    	break;
	case "pharmacist":
		jobt="02";
    	break;
	case "rt":
		jobt="03";
    	break;
	case "therapist":
		jobt="04";
    	break;
	default:
    	alert("OTHER");
	    break;
	}
*/
	var jobt = "";
	// var nodes = document.getElementsByTagNameNS ('http://www.w3.org/1999/xhtml', 'meta');
	var nodes = document.getElementsByTagName ('meta');
	for (var i = 0, I = nodes.length; i < I; i++) {
    	if ('jobtype' == nodes[i].name)
        	jobt = nodes[i].content ;
	}
//   	alert ( jobt );
	if (jobt == "") { alert ( jobt ); }
// 2009-06-18 e
	document.form1.action = "/cgi-bin/searchjoblist.cgi";
	document.form1.mode.value = prm;
	document.form1.area.value = prm2;
	document.form1.view.value = "10";
	document.form1.pg.value = "1";
	document.form1.jobtype.value = jobt;
	document.form1.partnertype.value = "";
	document.form1.submit();
}
/* 以下フォルダの各index.htmlファイルで共通
   /doctor/, /nurse/, /pharmacist/, /rt/, /therapist/
*/
function showJobDetail(prm) {
	document.form1.action = "/cgi-bin/searchjobdetail.cgi";
	document.form1.ofrcd.value = prm;
	document.form1.submit();
}
/* 以下フォルダの各index.htmlファイルで共通
   /doctor/, /nurse/, /pharmacist/, /rt/, /therapist/
*/
function showPartnerDetail(prm, prm2) {
	lg = getCookie("login");
	if (lg == "on") {
	    document.form1.action = "/cgi-bin/partnerdetail.cgi";
	    document.form1.partnertype.value = prm;
	    document.form1.ptncd.value = prm2;
	    document.form1.submit();
	} else {
	    document.cookie = "mode=" + escape('list') + "; path=/; ";
	    document.cookie = "partnertype=" + escape(prm) + "; path=/; ";
	    document.cookie = "ptncd=" + escape(prm2) + "; path=/; ";
	    document.cookie = "linkpage=" + escape('/cgi-bin/partnerdetail.cgi') + "; path=/; ";

        if (document.domain == "job.amedex.jp") {
            location.href = "https://job.amedex.jp/regist/index.html";
        } else {
            location.href = "/regist/index.html";
//		    surl=document.URL
//		    myData = surl.split("/");
//	        location.href = "https://" + myData[2] + "/regist/index.html";
        }
/*
        if (document.domain != "172.16.11.148") {
		    surl=document.URL
		    myData = surl.split("/");
	        location.href = "https://" + myData[2] + "/regist/index.html";
        } else {
            location.href = "/regist/index.html";
        }
*/
	}
}
//病院/企業リスト　/cgi-bin/template/srh_job_list.htmlのみ使用
function pageLink(prmpg) {
	document.form1.action = "/cgi-bin/searchjoblist.cgi";
	document.form1.pg.value = prmpg;
	document.form1.submit();
}
//病院/企業リスト　/cgi-bin/template/srh_job_list.htmlのみ使用
function showDetail(prmcd) {
	lg = getCookie("login");
	if (lg == "on") {
	    document.form1.action = "/cgi-bin/searchjobdetail.cgi";
	    document.form1.ofrcd.value = prmcd;
	    document.form1.submit();
	} else {
	    document.cookie = "mode=" + escape('list') + "; path=/; ";
	    document.cookie = "ofrcd=" + escape(prmcd) + "; path=/; ";
	    document.cookie = "jobtype=" + escape(document.form1.jobtype.value) + "; path=/; ";
	    document.cookie = "linkpage=" + escape('/cgi-bin/searchjobdetail.cgi') + "; path=/; ";

        if (document.domain == "job.amedex.jp") {
            location.href = "https://job.amedex.jp/regist/index.html";
        } else {
            location.href = "/regist/index.html";
//		    surl=document.URL
//		    myData = surl.split("/");
//	        location.href = "https://" + myData[2] + "/regist/index.html";
        }
/*
        if (document.domain != "172.16.11.148") {
		    surl=document.URL
		    myData = surl.split("/");
	        location.href = "https://" + myData[2] + "/regist/index.html";
        } else {
            location.href = "/regist/index.html";
        }
*/
	}
}
//病院/企業検索　/partnership/index.htmlのみ使用
function showPartnerList(prm) {
	lg = getCookie("login");
	if (lg == "on") {
	    document.form1.partnertype.value = prm;
	    document.form1.view.value = "20";
	    document.form1.pg.value = "1";
	    document.form1.submit();
	} else {
	    document.cookie = "mode=" + escape('list') + "; path=/; ";
	    document.cookie = "partnertype=" + escape(prm) + "; path=/; ";
	    document.cookie = "linkpage=" + escape('/cgi-bin/partnerlist.cgi') + "; path=/; ";

        if (document.domain == "job.amedex.jp") {
            location.href = "https://job.amedex.jp/regist/index.html";
        } else {
            location.href = "/regist/index.html";
//		    surl=document.URL
//		    myData = surl.split("/");
//	        location.href = "https://" + myData[2] + "/regist/index.html";
        }
/*
        if (document.domain != "172.16.11.148") {
		    surl=document.URL
		    myData = surl.split("/");
	        location.href = "https://" + myData[2] + "/regist/index.html";
        } else {
            location.href = "/regist/index.html";
        }
*/
	}
}

function getCookie(key,  tmp1, tmp2, xx1, xx2, xx3) {
    tmp1 = " " + document.cookie + ";";
    xx1 = xx2 = 0;
    len = tmp1.length;
    while (xx1 < len) {
        xx2 = tmp1.indexOf(";", xx1);
        tmp2 = tmp1.substring(xx1 + 1, xx2);
        xx3 = tmp2.indexOf("=");
        if (tmp2.substring(0, xx3) == key) {
            return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
        }
        xx1 = xx2 + 1;
    }
    return("");
}
function swapLink_rg() {
    if (document.domain == "job.amedex.jp") {
        location.href = "https://job.amedex.jp/regist/index.html";
    } else {
        location.href = "/regist/index.html";
//		surl=document.URL
//		myData = surl.split("/");
//	    location.href = "https://" + myData[2] + "/regist/index.html";
    }
/*
    if (document.domain != "172.16.11.148") {
		surl=document.URL
		myData = surl.split("/");
	    location.href = "https://" + myData[2] + "/regist/index.html";
    } else {
        location.href = "/regist/index.html";
    }
*/
}
// 2009-06-11 start 各職種TOP画面の最新求人情報を取得して表示
function GetNewOffers(prm) {
// 2009-10-08 SEO対策:拡張子のないファイルをCGIとして動作させる
//	document.form1.action = "/cgi-bin/getnewoffers.cgi";
	document.form1.action = "/cgi-bin/getnewoffers";
	document.form1.kind.value = prm;
	document.form1.submit();
}
// 2009-06-11 end

// クッキー削除
/* 以下フォルダの各index.htmlファイルで共通
   /doctor/, /nurse/, /pharmacist/, /rt/, /therapist/
  病院/企業リスト　/cgi-bin/template/srh_job_list.html
  病院/企業検索　/partnership/index.html
*/ 
	dTime = new Date();
  	dTime.setYear(dTime.getYear() - 1);
  	document.cookie = "mode=; expires=" + dTime.toGMTString();
  	document.cookie = "partnertype=; expires=" + dTime.toGMTString();
  	document.cookie = "linkpage=; expires=" + dTime.toGMTString();
  	document.cookie = "ptncd=; expires=" + dTime.toGMTString();
  	document.cookie = "ofrcd=; expires=" + dTime.toGMTString();
  	document.cookie = "jobtype=; expires=" + dTime.toGMTString();


