var menu1=new Array()
menu1[0]='<a href="news/index.html" target=_self>ニュース・イベントTOP</a>'
menu1[1]='<a href="news/press/index.html" target=_self>ニュースリリース</a>'
menu1[2]='<a href="news/press/archives.html" target=_self>過去のニュースリリース</a>'
//menu1[2]='<a href="news/archives/newsletter/index.html" target=_self>ニューズレター</a>'
//menu1[3]='<a href="news/contact/index.html" target=_self>報道機関からのお問い合わせ</a>'
menu1[3]='<a href="news/events/index.html" target=_self>イベント情報</a>'
menu1[4]='<a href="news/accessnews/index.html" target=_self>メディア掲載</a>'

var menu2=new Array()
menu2[0]='<a href="products/index.html" target=_self>製品情報TOP</a>'
menu2[1]='<a href="products/platforms/index.html" target=_self>プラットフォーム</a>'
menu2[2]='<a href="products/nf_mobile/index.html" target=_self>モバイル向けソリューション</a>'
menu2[3]='<a href="products/nf/index.html" target=_self>情報家電向けソリューション</a>'
menu2[4]='<a href="products/solutions/index.html" target=_self>サーバ・ソリューション&amp;サービス</a>'
menu2[5]='<a href="products/networksolutions/index.html" target=_self>ネットワーク・ソリューション</a>'
menu2[6]='<a href="products/embedded/index.html" target=_self>その他の組み込み製品</a>'
menu2[7]='<a href="products/media/index.html" target=_self>メディアサービス</a>'
menu2[8]='<a href="products/products_list.html" target=_self>製品一覧</a>'
menu2[9]='<a href="products/downloads/index.html" target=_self>ダウンロード</a>'
menu2[10]='<a href="products/focus/index.html" target=_self>Product &amp; Service Focus</a>'
menu2[11]='<a href="products/powered/index.html" target=_self>ACCESS Powered Devices</a>'

var menu3=new Array()

var menu4=new Array()
menu4[0]='<a href="partners/index.html" target=_self>パートナーTOP</a>'
menu4[1]='<a href="partners/ace/index.html" target=_self>ACE パートナープログラム概要</a>'
menu4[2]='<a href="partners/ace/directory.html" target=_self>ACE パートナー 参加企業</a>'

var menu5=new Array()
menu5[0]='<a href="about/index.html" target=_self>会社概要</a>'
menu5[1]='<a href="about/executive/index.html" target=_self>経営陣</a>'
menu5[2]='<a href="about/values/index.html" target=_self>企業理念</a>'
menu5[3]='<a href="about/customers/index.html" target=_self>主要取引先・提携先</a>'
menu5[4]='<a href="about/industry/index.html" target=_self>参加協会・団体一覧</a>'
menu5[5]='<a href="about/opensource/index.html" target=_self>ACCESS & オープンソース</a>'
//menu5[6]='<a href="investors/index.html" target=_self>株主・投資家情報</a>'
menu5[6]='<a href="about/jobs/index.html" target=_self>採用情報</a>'
menu5[7]='<a href="about/global/index.html" target=_self>ACCESS グループ</a>'
menu5[8]='<a href="about/mobile_website/index.html" target=_self>モバイルサイト</a>'
menu5[9]='<a href="about/iso9001/index.html" target=_self>ISO9001</a>'
menu5[10]='<a href="about/contact/index.html" target=_self>お問い合わせ</a>'
menu5[11]='<a href="about/legal/index.html" target=_self>使用条件</a>'

var menu6=new Array()

var menu7=new Array()
menu7[0]='<a href="investors/index.html" target=_self>IR情報TOP</a>'
menu7[1]='<a href="investors/library/index.html" target=_self>IR関連資料</a>'
menu7[2]='<a href="investors/calendar.html" target=_self>IRカレンダー</a>'
menu7[3]='<a href="investors/shareholders.html" target=_self>株主総会</a>'
menu7[4]='<a href="investors/public_notice.html" target=_self>電子公告・決算公告</a>'
menu7[5]='<a href="investors/stock_quote.html" target=_self>株価情報</a>'
menu7[6]='<a href="investors/contact.html" target=_self>お問い合わせ</a>'


var menuwidth='185px'; //default menu width
var menuheight='30px'; //default menu width
var menubgcolor='#f0f0f0';  //menu bgcolor
var disappeardelay=0;  //menu disappear speed onMouseout (in miliseconds) 
var hidemenu_onclick="yes"; //hide menu when user clicks within menu?

var ie4=document.all;
var ns6=document.getElementById&&!document.all;

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>');

function getposOffset(what, offsettype)
{
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null)
	{
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth)
{
	if (ie4||ns6)
		dropmenuobj.style.left=dropmenuobj.style.top="-500px";

	if (menuwidth!="")
	{
		dropmenuobj.widthobj=dropmenuobj.style;
		dropmenuobj.widthobj.width=menuwidth;
	}
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
		obj.visibility=visible;
	else if (e.type=="click")
		obj.visibility=hidden;
}

function iecompattest()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function clearbrowseredge(obj, whichedge)
{
	var edgeoffset=0;
	if (whichedge=="rightedge")
	{
		var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15;
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
			edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth;
	}
	else
	{
		var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset;
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
		{ 
			edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight;
			if ((dropmenuobj.y-topedge) < dropmenuobj.contentmeasure) 
				edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge;
		}
	}
	return edgeoffset;
} 

function populatemenu(what)
{
	if (ie4||ns6)
		dropmenuobj.innerHTML=what.join("");
}


function dropdownmenu(obj, e, menucontents, menuwidth, tab, selected)  
{
	if (window.event) { event.cancelBubble=true; }
	else if (e.stopPropagation) { e.stopPropagation(); }
	
	clearhidemenu();
	dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv;
	populatemenu(menucontents);
	
	dropmenuobj.tab = tab;
	dropmenuobj.selected = selected; 
	
	swapImageBack(); 
	 
	swapImage();
	
	if ( dropmenuobj.tab == "software" || dropmenuobj.tab == "support" || dropmenuobj.tab == "developers" || dropmenuobj.tab == "home" || menuwidth =="0px")  
	{ 
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth); 
		return clickreturnvalue(); 
	}
	
	if (ie4||ns6)
	{
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth);
		dropmenuobj.x=getposOffset(obj, "left");
		dropmenuobj.y=getposOffset(obj, "top");
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px";
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px";
	}
	
	return clickreturnvalue();
}

function clickreturnvalue()
{
	if (ie4||ns6) { return false; }
	else { return true; }
}

function contains_ns6(a, b) 
{
	while (b.parentNode)
	{
		if ((b = b.parentNode) == a) { return true; }
	}
			
	return false;
}

function dynamichide(e)
{
	if (ie4&&!dropmenuobj.contains(e.toElement))
		delayhidemenu();
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhidemenu();
}

function hidemenu(e)
{
	if (typeof dropmenuobj!="undefined") 
	{
		if (ie4||ns6)
		{
			dropmenuobj.style.visibility="hidden";
		}
	}
	swapImageBack();
}

function delayhidemenu()
{
	if (ie4||ns6)
	{
		delayhide=setTimeout("hidemenu()",disappeardelay);
	}
	
}

function clearhidemenu()
{
	if (typeof delayhide!="undefined") 
		clearTimeout(delayhide);
}

function swapImage()
{
	switch (dropmenuobj.tab)
	{
		case 'news':
			img1.src = "/access/assets/images/access_corporation/img/header/news_over.gif";
			return (false);
		case 'products':
			img2.src = "/access/assets/images/access_corporation/img/header/products_over.gif";
			return (false);
		case 'developers':
			img3.src = "/access/assets/images/access_corporation/img/header/developers_over.gif";
			return (false);
		case 'partners':
			img4.src = "/access/assets/images/access_corporation/img/header/partners_over.gif";
			return (false);
		case 'corporate':
			img5.src = "/access/assets/images/access_corporation/img/header/corporate_over.gif";
			return (false);
		case 'support':
			img6.src = "/access/assets/images/access_corporation/img/header/support_over.gif";
			return (false);
		case 'investors':
			img7.src = "/access/assets/images/access_corporation/img/header/investors_over.gif";
			return (false);
	}
}

function swapImageBack()
{
	if (dropmenuobj.selected == 'news')
		img1.src = "/access/assets/images/access_corporation/img/header/news_select.gif";
	else
		img1.src = "/access/assets/images/access_corporation/img/header/news.gif";
	
	if (dropmenuobj.selected == 'products')
		img2.src = "/access/assets/images/access_corporation/img/header/products_select.gif";
	else
		img2.src = "/access/assets/images/access_corporation/img/header/products.gif";
		
	if (dropmenuobj.selected == 'developers')
		img3.src = "/access/assets/images/access_corporation/img/header/developers_select.gif";
	else
		img3.src = "/access/assets/images/access_corporation/img/header/developers.gif";
		
	if (dropmenuobj.selected == 'partners')
		img4.src = "/access/assets/images/access_corporation/img/header/partners_select.gif";
	else
		img4.src = "/access/assets/images/access_corporation/img/header/partners.gif";
	
	if (dropmenuobj.selected == 'corporate')	
		img5.src = "/access/assets/images/access_corporation/img/header/corporate_select.gif";
	else
		img5.src = "/access/assets/images/access_corporation/img/header/corporate.gif";
		
	if (dropmenuobj.selected == 'support')	
		img6.src = "/access/assets/images/access_corporation/img/header/support_select.gif";
	else
		img6.src = "/access/assets/images/access_corporation/img/header/support.gif";
		
	if (dropmenuobj.selected == 'investors')	
		img7.src = "/access/assets/images/access_corporation/img/header/investors_select.gif";
	else
		img7.src = "/access/assets/images/access_corporation/img/header/investors.gif";
		
	if(dropmenuobj.selected == ''){
		return false;
	}
} 

browser_version = parseInt(navigator.appVersion);
browser_type = navigator.appName;

if(navigator.userAgent.indexOf("Firefox") != -1)
{
	browser_type = "Firefox";
}

if (browser_type == "Netscape") 
{
	document.write("<link rel=\"stylesheet\" href=\"/access/assets/images/access_corporation/common/css/styles_mac.css\" type=\"text/css\">");
	document.write("<link rel=\"shortcut icon\" href=\"/access/assets/images/access_corporation/img/favicon.ico\">");
} 
else if (browser_type == "Firefox")
{
	document.write("<link rel=\"stylesheet\" href=\"/access/assets/images/access_corporation/common/css/styles_moz.css\" type=\"text/css\">");
	document.write("<link rel=\"shortcut icon\" href=\"/access/assets/images/access_corporation/img/favicon.ico\">");
}
else  
{
	document.write("<link rel=\"stylesheet\" href=\"/access/assets/images/access_corporation/common/css/styles_ie.css\" type=\"text/css\">");
	document.write("<link rel=\"shortcut icon\" href=\"/access/assets/images/access_corporation/img/favicon.ico\">");
}


function selectLang(theForm) 
{
		var option = theForm.Language.options[theForm.Language.selectedIndex].value
		window.location = option;
		return true;
}

/********************************************************************
 * Function	: initDisplay
 * Summary	: 初期表示設定(TOPメニューの背景画像指定)
 * Parameters	:
		   e : 
		   menucontents : 
		   selected : topnav上で選択しているカテゴリ名
 * Return Value	: 
 * Comments	: 
 * Since	: 2009/6/22
 * Author	: Y.Yamashita
 * Sample	: initDisplay(event, '[[TopMenuSwicher? &docID_top=`57`]]')
********************************************************************/

function initDisplay(e, selected)
{
	if (window.event) { event.cancelBubble=true; }
	else if (e.stopPropagation) { e.stopPropagation(); }
	
	clearhidemenu();
	dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv;
	
	dropmenuobj.selected = selected; 
	
	swapImageBack(); 
	 
	return clickreturnvalue();
}
