/*document.write('<link href="/jp/contents/css/jp_contents_header.css" rel="stylesheet" type="text/css" media="screen,tv,print">');*/

function headimg(){ return; }

function global_header_region_selector(obj){
	if(obj.options[obj.selectedIndex].value !="") location.href=obj.options[obj.selectedIndex].value;
	return false;
}

function sendModQuery(e) {
	if (!e) var e = window.event;
	if (e.keyCode == 13) {
		sendQuery();
		return false;
	}
}

function setQuery(obj) {
	if(search_words_flag == 0){
		obj.value="";
		obj.style.color = "#444";
		search_words_flag++;
	}
	return;
}
var search_words_flag = 0;
function sendQuery(){
	var strQuery = encodeURIComponent(document.search_co.search_words.value);
	var strType  = "";
	window.open("http://search.justsystems.com/co/search?query=" + strQuery + "&labelTypeValue=" + strType, "");
	return false;
}


function headnavi(arg){

document.write('<div id="jp_region_header_wrap"><div id="jp_region_header">'
+ '<a href="http://www.justsystems.com/jp/"><img src="/jp/contents/css/images/global_logo.gif" width="97" height="43" alt="JustSystems Home"></a>'
+ '<div id="jp_region_header_selector" style="width:340px;">');

if( (document.URL.match(/epts-/)) || ( (arguments.length>1) && (arguments[1]!='search') ) ){
} else { document.write('<form name="search_co" action="">'
+ '<input type="text" name="search_words" value="一太郎 2012" onclick="setQuery(this);" onkeypress="return sendModQuery(event);" style="text-align:left;color:#ccc;width:194px;"/>'
+ ' <input type="button" value="検索" style="color:#555;font-size:10.5px;" onclick="sendQuery();" onkeypress="sendQuery();return false;" />'
+ '<div style="position:relative;height:1.2em;margin-top:2px;">'
+ '<div style="float:left;">'
+ '<input type="hidden" name="search_type" value="products" checked="checked" />'
+ '<span style="font-size:10.5px;">Webカタログ＋ニュースリリース</span></div>'
+ '<div style="float:right;font-size:10.5px;padding-top:6px;">'
+ '<a href="http://support.justsystems.com/jp/" title="サポートFAQ" style="display:block;font-size:10.5px;">サポートFAQはこちら</a></div></div></form>');
}
document.write('</div></div>');

	if(arg == "hide"){
		document.write('<div id="jp_region_header_navigation_hide">\&nbsp;</div></div>');
	}
	else {
		document.write('<div id="jp_region_header_navigation">'
		+ '<a id="jp_region_header_navigation1" href="http://www.justsystems.com/jp/software/name.html" title="製品・サービス" onMouseover="closePanel();">製品・サービス</a>'
		+ '<a id="jp_region_header_navigation2" href="http://www.justsystems.com/jp/sol/" title="導入事例" onMouseover="closePanel();">導入事例</a>'
		+ '<a id="jp_region_header_navigation3" href="http://www.justsystems.com/jp/wtp/" title="ご購入" onMouseover="closePanel();">ご購入</a>'
		+ '<a id="jp_region_header_navigation4" href="http://www.justsystems.com/jp/spdl/" title="サポート・ダウンロード">サポート・ダウンロード</a>'
		+ '<a id="jp_region_header_navigation5" href="http://www.justsystems.com/jp/just/" title="企業情報" onMouseover="closePanel();">企業情報</a>'
		+ '<a id="jp_region_header_navigation6" href="http://www.justsystems.com/jp/contact/" title="お問い合わせ" onMouseover="closePanel();">お問い合わせ</a></div></div>');

		if (!document.getElementsByTagName) { return; }
		var selAry = {
		'products' : '1',		'01' : '1',
		'software' : '1',		'02' : '3',
		'solutions': '2',		'03' : '4',
		'sol'      : '2',		'05' : '6',
		'purchase' : '3',		'06' : '6',
		'wtp'      : '3',		'07' : '5',
		'support'  : '4',		'1'  : '1',
		'download' : '4',		'2'  : '3',
		'spdl'     : '4',		'3'  : '4',
		'corporate': '5',		'5'  : '6',
		'company'  : '5',		'6'  : '6',
		'contact'  : '6',		'7'  : '5',
		'contactus': '6' 		
		};
		if(selAry[arg]) document.getElementById('jp_region_header_navigation'+selAry[arg]).style.backgroundPosition = "0 -27px";

		if(!document.all) window.document.captureEvents(Event.CLICK);
		document.getElementById('jp_region_header_navigation4').onclick = popupPanel;

		document.write('<div id="jp_region_header_pulldown" style="left:'+ ((document.getElementById('jp_region_header_navigation4').offsetLeft-0)+2) +'px;">'
		+ '<div id="jp_region_header_pulldown_menu">'
		+ '<a href="javascript:closePanel();" id="jp_region_header_pulldown_close">&nbsp;</a>'
		+ '<ul>'
		+ '<li><a href="http://support.justsystems.com/jp/">個人&mdash;デスクトップ製品</a><br /></li>'
		+ '<li><a href="http://support.justsystems.com/jp/index_jl.html">法人&mdash;ライセンス製品</a><br /></li>'
		+ '<li><a href="http://www.justsystems.com/jp/spdl/">法人&mdash;システム製品・他</a><br /></li>'
		+ '</ul>'
		+ '</div>'
		+ '</div>');
	}
	return;
}

function printCopyright(sel){
	document.write ('\&#169;'+ ((sel=='eternal')?'':' 2012') + ' JustSystems Corporation');
	return;
}

function printStatement(sel){
	document.write ('<a href="http://www.justsystems.com/jp/legal/termsofuse.html" title="コピーライト等に関する事項">コピーライト等に関する事項</a> | '
	+ '<a href="http://www.justsystems.com/jp/msg/privacy.html" title="プライバシーポリシー">プライバシーポリシー</a>'
	+ ((sel=='spoil')?'':' | <a href="http://www.justsystems.com/jp/sitemap/" title="サイトマップ">サイトマップ</a>'));
	return;
}

function popupPanel(evt) {
	if(document.all)evt = event;
	document.getElementById('jp_region_header_pulldown').style.left = evt.x + 5 + "px";
	document.getElementById('jp_region_header_pulldown').style.visibility = "visible";
	return false;
}

function closePanel() {
	document.getElementById('jp_region_header_pulldown').style.visibility = "hidden";
}

