// Preload
data = new Array(
"/common/img/blt_otherpages.gif");
prImg= new Array();
for (i=0; i<data.length; i++) {
	prImg[i] = new Image(); prImg[i].src = data[i];
	} 


// swap image
// ul.menu li a img の場合だけマウスオーバー効果をつける

function swapImg(){

$("ul.menu li a img").mouseover(function() {
	this.src = this.src.split(".gif")[0]+"_on.gif";
	});

$("ul.menu li a img").mouseout(function() {
	this.src = this.src.split("_on.gif")[0]+".gif";
	});

}

// .btn というクラス名をつけたものにマウスオーバーをつける

function swapBtn(){

$(".btn").mouseover(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
    }).mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
    })
}


// News
// クリックでサブメニュー

flag = false;

function treeMenu(tName) {
  tMenu = document.getElementById(tName).style;
  if(tMenu.display == 'none') tMenu.display = "block";
  else tMenu.display = "none";
}

function change(iName,imgA,imgB) {
		iObj = document.images[iName];
		n = iObj.src.lastIndexOf("/") + 1;
		iSrc = iObj.src.substring(n,iObj.src.length);
		iS = "/company/img/";
		if (iSrc == imgA) iObj.src = iS + imgB; else iObj.src = iS + imgA;
}

// クリック簡単ナビチェック済用
function change(no){
checkid = "#check"+ no;
$(checkid).addClass("on");
}


// アンカースクロール
function anchor(anchorid){
	var targetOffset = $(anchorid).offset().top;
	$('html,body').animate({scrollTop: targetOffset}, 500);
}


// 新ヘッダサイト内検索用
/*function switchTextBox(idBox)
{
    var box;
    var defaultText = ['', 'サイト内検索'];
    
    switch (idBox) {
        case 0:
            box = document.AccelaBizSearchASPForm2.q2;
            break;
        case 1:
            box = document.AccelaBizSearchASPForm.q;
            break;
    }
    
    if (box.value == defaultText[idBox])
        box.value = '';
     else if (box.value == '')
        box.value = defaultText[idBox];
}*/

