
function get_os_type(){
	if(navigator.userAgent.indexOf("Win") != -1){
		return "win";
	}else if(navigator.userAgent.indexOf("Mac") != -1){
		return "mac";
	}else{
		return "else";
	}
	
}

function load_css(){

	os = get_os_type();

	if (document.all) {
		if (os == "win"){
			main_css_path = "./css/main_winie.css";
		}
	}else if (document.getElementById) {
		if (os == "win"){
			main_css_path = "./css/main_winns.css";
		}else if (os == "mac"){
			main_css_path = "./css/main_macsf.css";
		}
	}

	if(main_css_path){
		document.write('<link rel="stylesheet"')
		document.write('href="'+main_css_path+'" ')
		document.write('type="text/css" ')
		document.write('/>')
	}

}

function init(){
	//MouseOnなどで使用する画像の先読み込み
	HpbImgPreload('i0', '/img/menu/c_top_on.gif', '/img/menu/c_top_on.gif');
	HpbImgPreload('i1', '/img/menu/c_information_on.gif', '/img/menu/c_information.gif');
	HpbImgPreload('i2', '/img/menu/c_works_on.gif', '/img/menu/c_works.gif');
	HpbImgPreload('i3', '/img/menu/c_products_on.gif', '/img/menu/c_products.gif');
	HpbImgPreload('i4', '/img/menu/c_recruit_on.gif', '/img/menu/c_recruit.gif');
	HpbImgPreload('i5', '/img/menu/c_contact_on.gif', '/img/menu/c_contact.gif');
	HpbImgPreload('i1_0', '/img/menu/profile_on.gif', '/img/menu/profile.gif');
	HpbImgPreload('i1_1', '/img/menu/guide_on.gif', '/img/menu/guide.gif');
	HpbImgPreload('i1_2', '/img/menu/message_on.gif', '/img/menu/message.gif');
	HpbImgPreload('i1_3', '/img/menu/history_on.gif', '/img/menu/history.gif');
	HpbImgPreload('i1_4', '/img/menu/organization_on.gif', '/img/menu/organization.gif');
	HpbImgPreload('i1_5', '/img/menu/map_on.gif', '/img/menu/map.gif');
	HpbImgPreload('i1_6', '/img/menu/activity_on.gif', '/img/menu/activity.gif');	//20071228_ohno_insert
	HpbImgPreload('i2_0', '/img/menu/power1_on.gif', '/img/menu/power1.gif');
	HpbImgPreload('i2_1', '/img/menu/power2_on.gif', '/img/menu/power2.gif');
	HpbImgPreload('i2_2', '/img/menu/power3_on.gif', '/img/menu/power3.gif');
	HpbImgPreload('i2_3', '/img/menu/jisseki_on.gif', '/img/menu/jisseki.gif');
	//20070808_ohno_delete HpbImgPreload('i3_0', '/img/menu/djvu_on.gif', '/img/menu/djvu.gif');
	//20070808_ohno_delete HpbImgPreload('i3_1', '/img/menu/spf_on.gif', '/img/menu/spf.gif');
	HpbImgPreload('i3_2', '/img/menu/siharai_on.gif', '/img/menu/siharai.gif');			//20080808_ohno_insert
	HpbImgPreload('i3_3', '/img/menu/sou_on.gif', '/img/menu/sou.gif');			//20080808_ohno_insert
	HpbImgPreload('i3_4', '/img/menu/led_on.gif', '/img/menu/led.gif');	
	HpbImgPreload('i4_0', '/img/menu/student_on.gif', '/img/menu/student.gif');
	HpbImgPreload('i4_1', '/img/menu/career_on.gif', '/img/menu/career.gif');
	//20070627_ohno_delete HpbImgPreload('i4_2', '/img/menu/internship_on.gif', '/img/menu/internship.gif');
}

// HpbImgPreload: 画像のプリロードを行ないます
//
var swImg; swImg=new Array;
function HpbImgPreload(_imgName,msOnSrc,msOutSrc)
{
  var appVer=parseInt(navigator.appVersion);
  var isNC=(document.getElementById && (appVer >= 4)); // Netscape 4.0 or later
  var isIE=(document.all    && (appVer >= 4)); // Internet Explorer  4.0 or later
  if (isNC || isIE)
  {
    if (document.images)
    {
		var imgName = _imgName;
		swImg[imgName] = new Array(2);
		swImg[imgName][0] = new Image();
		swImg[imgName][0].src = msOnSrc;
		swImg[imgName][1] = new Image();
		swImg[imgName][1].src = msOutSrc;
    }
  }
}


function t_over(id){
	img_id   = 'i' + id;
	document.getElementById(img_id).src = swImg[img_id][0].src;
	if((id != 0) && (id != 5) ){
		layer_id = 'layer' + id;
		document.getElementById(layer_id).style.display = 'block' ;
		document.getElementById(layer_id).style.visibility = 'visible';
	}
}

function t_out(id){
	img_id   = 'i' + id;
	document.getElementById(img_id).src = swImg[img_id][1].src;
	if((id != 0) && (id != 5) ){
		layer_id = 'layer' + id;
//		document.getElementById(layer_id).style.display = 'none' ;
		document.getElementById(layer_id).style.visibility = 'hidden';
	}
}

function s_over(t_id,s_id){
	img_id   = 'i' + t_id + '_' + s_id;
	document.getElementById(img_id).src = swImg[img_id][0].src;
}

function s_out(t_id,s_id){
	img_id   = 'i' + t_id + '_' + s_id;
	document.getElementById(img_id).src = swImg[img_id][1].src;
}

load_css();
init();




//-->