/* ------------------------------------------------------------ *//* Script Libraries for ITCS Website                            *//* 2007.12 : p53*design                                         *//* ------------------------------------------------------------ *//* check Browsers */var macIE = false;var winIE = false;var macMozilla = false;var winMozilla = false;if(navigator.appVersion.indexOf("MSIE")!=-1){	if(navigator.appVersion.indexOf("Mac")!=-1){		macIE = true;	}else{		winIE = true;	}}else if(navigator.userAgent.indexOf("Firefox")!=-1){	if(navigator.appVersion.indexOf("Windows")!=-1){		winMozilla = true;	}else{		macMozilla = true;	}}/* greybox */GB_ROOT_DIR="./scripts/greybox/";loadExtScript();/* アクティブページのナビを強調表示 */function litNavi(obj){	if(document.getElementById){		document.getElementById(obj).style.backgroundPosition="left -24px";	}}/* アクティブウインドウの高さ取得 */if(window.innerHeight){	var tmpH = window.innerHeight-120;}else if(document.documentElement){	var tmpH = document.documentElement.clientHeight-120;	if(tmpH<550){tmpH = 550;}}else{	var tmpH = 550;}/*var tmpH = 550;*//* 個人情報保護方針表示 */function showPrivacyPolicy(inqFlag){	return openPopup('privacy_policy.html','個人情報保護方針',600,tmpH,inqFlag);}/* サイトマップ */function showSiteMap(inqFlag){	return openPopup('sitemap.html','サイトマップ',580,500,inqFlag);}/* バックナンバー */function showBacknumber(){	return openPopup('backnumber.html','過去のお知らせ',600,tmpH);}/* 主な実績 */function showPastResults(){	return openPopup('past_results.html','主な実績',600,tmpH);}/* 技術領域 */function showTechDomain(){	return openPopup('technical_domain.html','技術領域',600,tmpH);}/* ポップアップ処理 */function openPopup(hrefStr,hrefName,winW,winH,inqFlag){	var winName="popup";	/* 表示ファイル設置URL */	if(hrefStr.indexOf("http")!=-1){		var gbStr = hrefStr;	}else{		var gbStr = "http://itcs.jp/"+hrefStr;		/*var gbStr = "http://itcs.jp/(sub_directory_name)" + hrefStr;*/	}if((!macIE)&&(!inqFlag)){		return GB_show(hrefName,gbStr,winH,winW);	}else{		popup = window.open(hrefStr,winName,'width='+winW+',height='+winH+',scrollbars=yes,resizable=yes,menubars=no');		return false;	}}	/* スクリプトローダ *//* MacIEでエラーが出るのを回避 */function loadExtScript(){	if(!macIE){		document.write('<script src="scripts/greybox/AJS.js" type="text/javascript"><\/script>\n');		document.write('<script src="scripts/greybox/AJS_fx.js" type="text/javascript"><\/script>\n');		document.write('<script src="scripts/greybox/gb_scripts.js" type="text/javascript"><\/script>\n');		document.write('<link rel="stylesheet" type="text/css" href="scripts/greybox/gb_styles.css" />\n');	}}/* Flashタグ生成 */function writeFlashCode(swf,width,height){	var swf="home01";	var width="758";	var height="238";	if((!macMozilla)&&(!winMozilla)&&(!macIE)){		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="'+swf+'" align="middle">\n');		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');		document.write('<param name="movie" value="'+swf+'.swf" />\n');		document.write('<param name="quality" value="autohigh" />\n');		document.write('<param name="bgcolor" value="#000000" />\n');		document.write('<param name="wmode" value="transparent" />\n');		document.write('</object>\n');	} else {		document.write('<embed src="'+swf+'.swf" quality="autohigh" wmode="transparent" bgcolor="#000000" width="'+width+'" height="'+height+'" name="'+swf+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');	}}/* サブメニュー展開 */var menuCounts=4;/*メニュー数*/var currentMenu=1;/*現在のアクティブメニュー*/var insideSub=false;/*サブメニュー領域判定フラグ*//* カレントメニュー設定 */function setCurrentMenu(menuNum,subNum){	currentMenu=menuNum;	showSubMenu(currentMenu);	if(subNum!=''){		var currentSubMenu="sub0"+menuNum+"-0"+subNum;		if(document.getElementById(currentSubMenu)){			document.getElementById(currentSubMenu).className="current";			}		}	}function showSubMenu(menuNum){	var subName="subnavi0"+menuNum;	var navName="navi0"+menuNum;	if(document.getElementById(subName)){		clearSubMenu();		document.getElementById(subName).style.display="block";		document.getElementById(navName).style.backgroundPosition="left -24px";	}}function clearSubMenu(){	for(var i=0;i<menuCounts+1;i++){		var subName="subnavi0"+i;		var navName="navi0"+i;		if(document.getElementById(subName)){			document.getElementById(subName).style.display="none";			document.getElementById(navName).style.backgroundPosition="left 0px";		}	}}function hideSubMenu(){	timeoutID=setTimeout('hideSub()',1200);}function hideSub(){	if(!insideSub){		showSubMenu(currentMenu);	}	clearTimeout(timeoutID);}function inSub(menuNum){	insideSub=true;	}function outSub(menuNum){	insideSub=false;	}	/* ---------------------------------------------------- *//* トップページ最新情報 *//* ---------------------------------------------------- */function setNewsLink(){	for (var i=0;i<document.getElementById("news").getElementsByTagName("a").length;i++){		if(document.getElementById("news").getElementsByTagName("a")[i].target == "popup"){			document.getElementById("news").getElementsByTagName("a")[i].onclick=function(){				openPopup(this.href,this.href.text,600,tmpH,true);				return false;			}		}	}}function setBackNumberLink(){	for(var i=0;i<document.getElementsByTagName("a").length;i++){		if(document.getElementsByTagName("a")[i].target == "popup"){			document.getElementsByTagName("a")[i].onclick=function(){				openPopup(this.href,this.href.text,600,tmpH,true);				return false;			}		}	}}
