/*スパム対策*/
<!--
function vspam(im,domain) {
  maddress = "mailto:" + im + "@" + domain;
  window.location.href = maddress;
}
// -->


/*ページスクロール*/
function SmoothScroll(targetID){
  if( !document.getElementById ) {return true;}
  var step=1;  //初速度
  var max=200;  //最高速度
  var accel=1;  //加速度
  var interval=1;  //加速インターバル
  var current_y = document.body.scrollTop  || document.documentElement.scrollTop;
  var element=document.getElementById(targetID);
  if (!element){return true;}
  var target_y = 0;
  for (i = element;i.offsetParent;i=i.offsetParent ){
    target_y += i.offsetTop;
  }
  var count=0;
  if ( current_y > target_y ){ step = -(step); accel = -(accel);}
  var timerid = setInterval( function(){
    if (step<max) step += (count*accel);
    if ( Math.abs(current_y-target_y) < Math.abs(step) ){
      window.scrollTo((document.body.scrollTop  || document.documentElement.scrollTop),target_y);
      clearInterval(timerid);
      return false;
    }else{
      window.scrollBy(0,step);
      current_y += step;
      count++;
    }
  },interval);
  return false;
}

function movie00()
{
   window.open('movie/i-medical.html','newWin','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=480,height=410');
}

function movie01()
{
   window.open('movie/language.html','newWin','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=440,height=410');
}

function movie02()
{
   window.open('movie/clinical.html','newWin','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=440,height=410');
}

function movie03()
{
   window.open('movie/emergency.html','newWin','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=440,height=410');
}

function movie04()
{
   window.open('movie/practitioner.html','newWin','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=440,height=410');
}

function tripOc(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = screen.height - (screen.height*0.15);
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/trip_oc.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function jobEx(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = screen.height - (screen.height*0.15);
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/job_ex.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function summerOcSp(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = screen.height - (screen.height*0.15);
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/oc_summer_sp.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function seminerSp(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = 540;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/seminer090808.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function alldays(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = 550;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/alldays.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function ocNamae(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = 640;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/oc_namae.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function fes090830(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = screen.height - (screen.height*0.15);
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/fes090830.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}


function limitNurse(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = 600;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/limit_nurse.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function jobSupport(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = 550;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/job_support.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function graduate(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = 550;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/graduate.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*結果発表*/
function resultWin(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 390;
	var wy = 300;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://i-medical.jp/gouhi/gouhi_input.php?dev=1","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*個別フリー相談会*/
function freeguidance(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 760;
	var wy = 500;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/free_guidance.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*救急救命士*/
function jisseki(){
	var st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	var wx = 600;
	var wy = 900;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://www.i-medical.jp/extra/jisseki.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*ランダム表示*/


function radItem(){
// ランダムに画像を表示する
jmp = new Array();
img = new Array();
// ジャンプ先のアドレス(数字は画像と対応)
jmp[0] = "http://www.i-medical.jp/course/nurse.html";
jmp[1] = "http://www.i-medical.jp/course/language.html";
jmp[2] = "http://www.i-medical.jp/course/clinical.html";
jmp[3] = "http://www.i-medical.jp/course/emergency.html";
jmp[4] = "http://www.i-medical.jp/course/practitioner.html";
// 画像のアドレス(数字はジャンプ先のアドレスと対応)
img[0] = "common/imgs/index/dept_pic_01.jpg";
img[1] = "common/imgs/index/dept_pic_02.jpg";
img[2] = "common/imgs/index/dept_pic_03.jpg";
img[3] = "common/imgs/index/dept_pic_04.jpg";
img[4] = "common/imgs/index/dept_pic_05.jpg";
n = Math.floor(Math.random()*jmp.length);
document.write("<a href='"+jmp[n]+"'>");
document.write("<img src='"+img[n]+"' border='0'>");
document.write("</a>");
}

function noguchiNotHara(url,wx,wy,wName){
	st = "scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no";
	if(wy == ''){
		wy = screen.height - (screen.height*0.15);
	}
	x = (screen.width  - wx) / 2;
	y = ((screen.height - wy) / 2) - 30;
	newwin = window.open(url,wName,"left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}


function formWin(){
		var st = "scrollbars=yes,resizable=yes,toolbar=yes,directories=yes,location=yes,menubar=yes,status=yes";
	var wx = 700;
	var wy = 700;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("https://www.nsg.gr.jp/imedical/form/orderform.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

function ocformWin(){
		var st = "scrollbars=yes,resizable=yes,toolbar=yes,directories=yes,location=yes,menubar=yes,status=yes";
	var wx = 700;
	var wy = 700;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("https://www.nsg.gr.jp/imedical/form/reserve_i.html","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}


function tsushinWin(){
		var st = "scrollbars=yes,resizable=yes,toolbar=yes,directories=yes,location=yes,menubar=yes,status=yes";
	var wx = 950;
	var wy = 700;
	var x = (screen.width  - wx) / 2;
	var y = ((screen.height - wy) / 2) - 30;
	var newwin = window.open("http://tsushin.i-medical.jp/","newWin","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}



