var gRootPath="";
strs = location.href.split("/");
var count = 0;
if((location.href.match(/.*www.abitus.co.jp.*/))||(location.href.match(/.*210\.199\.213\.196.*/))){
  count = 4;
}else{
  count = 5;
}
for(i=count;i<strs.length;i++){
 gRootPath = gRootPath+"../";
}

// メニューロールオーバー
if (document.images) { 
// 設定開始（使用する画像を設定してください） 
/*　top用メニュー*/
// 画像1 
var cimg1on = new Image();
cimg1on.src = gRootPath+"img/career/common/bt_career0102.jpg"; // ポイント時の画像
var cimg1off = new Image();
cimg1off.src = gRootPath+"img/career/common/bt_career01.jpg"; // 通常の画像

// 画像2 
var cimg2on = new Image();
cimg2on.src = gRootPath+"img/career/common/bt_career0202.jpg";
var cimg2off = new Image();
cimg2off.src = gRootPath+"img/career/common/bt_career02.jpg";

// 画像3 
var cimg3on = new Image();
cimg3on.src = gRootPath+"img/career/common/bt_career0302.jpg";
var cimg3off = new Image();
cimg3off.src = gRootPath+"img/career/common/bt_career03.jpg";

// 画像3 
var cimg4on = new Image();
cimg4on.src = gRootPath+"img/career/common/bt_career0402.jpg";
var cimg4off = new Image();
cimg4off.src = gRootPath+"img/career/common/bt_career04.jpg";



// 設定終了 
} 
// ポイント時の処理 
function On(name) { 

if (document.images) { 
document.images[name].src = eval(name + 'on.src'); 
} 
} 
// 放した時の処理 
function Off(name) { 

if (document.images) { 
document.images[name].src = eval(name + 'off.src'); 
} 

} 


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



//ロールオーバースクリプト

function initRollovers() {
if (!document.getElementById) return

var aPreLoad = new Array();
var sTempSrc;
var aImages = document.getElementsByTagName('img');

for (var i = 0; i < aImages.length; i++) { 
if (aImages[i].className == 'btn') {
var src = aImages[i].getAttribute('src');
var ftype = src.substring(src.lastIndexOf('.'), src.length);
var hsrc = src.replace(ftype, '_ov'+ftype);

aImages[i].setAttribute('hsrc', hsrc);

aPreLoad[i] = new Image();
aPreLoad[i].src = hsrc;

aImages[i].onmouseover = function() {
sTempSrc = this.getAttribute('src');
this.setAttribute('src', this.getAttribute('hsrc'));
} 

aImages[i].onmouseout = function() {
if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_ov'+ftype, ftype);
this.setAttribute('src', sTempSrc);
}
}
}
}

window.onload = initRollovers;

//プリロードイメージスクリプト

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);
}

//ステータスバーの表示
defaultStatus = "株式会社 Abitus"; 


//隠す～見せるのスクリプト
function showImg(id){
	if(document.getElementById){
		if(document.getElementById(id).style.display == "none")
		document.getElementById(id).style.display = "inline";
	}
}
function hydeImg(id){
	if(document.getElementById){
		if(document.getElementById(id).style.display == "inline")
		document.getElementById(id).style.display = "none";
	}
}
