// JavaScript Document
TAB = 'new';
function Tab(id){
	TAB = id;
	document.getElementById('top_tab_new').style.background = "url('/__image__/other/homepage/tab_new.gif')";
	document.getElementById('top_tab_mainstay').style.background = "url('/__image__/other/homepage/tab_mainstay.gif')";
	document.getElementById('top_tab_industry').style.background = "url('/__image__/other/homepage/tab_industry.gif')";
	document.getElementById('top_tab_work').style.background = "url('/__image__/other/homepage/tab_work.gif')";
	document.getElementById('top_tab_' + TAB).style.background = "url('/__image__/other/homepage/tab_" + TAB + "_now.gif')";
	document.getElementById('top_tab_' + TAB).blur();
	
	document.getElementById('top_tab-window_new').style.display = "none";
	document.getElementById('top_tab-window_mainstay').style.display = "none";
	document.getElementById('top_tab-window_industry').style.display = "none";
	document.getElementById('top_tab-window_work').style.display = "none";
	document.getElementById('top_tab-window_' + TAB).style.display = "block";
}
function TabMouseOver(id) {
	if(TAB != id){
		document.getElementById('top_tab_' + id).style.background = "url('/__image__/other/homepage/tab_" + id + "_on.gif')";
		document.getElementById('top_tab_' + id).style.cursor="pointer";
	}else{
		document.getElementById('top_tab_' + TAB).style.cursor="default";
	}
}
function TabMouseOut(id) {
	document.getElementById('top_tab_' + id).style.background = "url('/__image__/other/homepage/tab_" + id + ".gif')";
	document.getElementById('top_tab_' + TAB).style.background = "url('/__image__/other/homepage/tab_" + TAB + "_now.gif')";
}

function SideStyle(Category,Page){
	if(Category){
		if(document.getElementById('sub-' + Page)){
			document.getElementById('sub-' + Page).style.color = "#CC0000";
			document.getElementById('sub-' + Page).style.fontWeight = "bold";
			document.getElementById('side-sub-menu_' + Category).style.display = "block";
			document.getElementById('side-menu_' + Category).style.background = "url('/__image__/other/left_triangle_now.gif') #CC0000 no-repeat right center";
		}else{
			document.getElementById('side-menu_' + Category).style.backgroundColor = "#CC0000";
		}
		document.getElementById('side-menu_' + Category).style.color = "#FFFFFF";
	}
}
function SideOpen(ID){
	OorC = document.getElementById('side-sub-menu_' + ID).style;
	if(OorC.display == "block"){
		OorC.display = "none";
	}else{
		OorC.display = "block";
	}
	document.getElementById('side-menu_' + ID).blur();
}

function disp(url){ 
window.open(url, "popup", "width=550,height=550,scrollbars=yes"); 
}

Loaddata = new Array("/__image__/other/menu_products_on.gif","/__image__/other/menu_case_on.gif","/__image__/other/menu_service_on.gif","/__image__/other/menu_news_on.gif","/__image__/other/menu_partner_on.gif","/__image__/other/menu_company_on.gif","/__image__/other/menu_inquiry_on.gif",'/__image__/other/homepage/tab_new.gif','/__image__/other/homepage/tab_new_on.gif','/__image__/other/homepage/tab_mainstay_on.gif','/__image__/other/homepage/tab_mainstay_now.gif','/__image__/other/homepage/tab_industry_on.gif','/__image__/other/homepage/tab_industry_now.gif','/__image__/other/homepage/tab_work_on.gif','/__image__/other/homepage/tab_work_now.gif');
prImg = new Array();
for (i=0;i<Loaddata.length;i++){
prImg[i] = new Image();
prImg[i].src = Loaddata[i];
}

function openImageSizedWindow(src){
    var i = new Image(); 
    i.onload = function() {
		var left = (screen.width-i.width)/2;
		var top = (screen.height-i.height)/2;
        var pop_win = window.open(
                          "",
                          "_blank",
                          "width="+i.width+",height="+i.height+",scrollbars=no,resizable=yes,left="+left+",top="+top+",screenX="+left+",screenY="+top
                      );
        if ( pop_win ) {
            pop_win.window.document.open();
            pop_win.window.document.write(
             '<html>'
            +'<head><title>'+i.alt+'</title></head>'
            +'<body style="margin:0;padding:0;border:0;">'
            +'<a href="javascript:window.close()" title="•Â‚¶‚é"><img src="'+i.src+'" width="100%" alt="" border="0" /></a>'
            +'</body>'
            +'</html>'
            );
            pop_win.window.document.close();
        } else {
            location.href = i.src;
        }
        i.onload = function(){};
    }
    i.src = src;
}