



// Flash Field ---------------------- START ------------------------

// HTML内から下記のフォーマットで呼び出す
// runflaobj("XXX.swf","幅","高さ","ID","背景色");

function runflaobj(fFile,fW,fH,fID,fBg) {
	//単純なFlash配置
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+fW+'" height="'+fH+'" id="'+fID+'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+fFile+'" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="'+fBg+'" />');
	document.write('<embed src="'+fFile+'" menu="false" quality="high" bgcolor="'+fBg+'" width="'+fW+'" height="'+fH+'" name="'+fID+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

// Flash Field ---------------------- END ------------------------




// Style Select ---------------------- START ------------------------

var stylesheet ="";

if (navigator.platform=="MacPPC" || navigator.platform=="MacIntel") {
	stylesheet = "mac";
} else {
	stylesheet = "win";
}


function styleSetL(tarL) {
	pathbase="../";
	tarpath="";
	
	for(i=0;i<=tarL;i++) {
		if(i>=1) {
			tarpath+=pathbase;
		}
	}
	
	if(stylesheet != ""){
		document.write('<link rel="stylesheet" type="text/css" href="'+tarpath+'css/textsets_'+stylesheet+'.css" />');
		thislevel=tarL;
		bugkicker();
	}
}


function bugkicker() {
	pathbase="../";
	tarpath="";
	
	for(i=0;i<=thislevel;i++) {
		if(i>=1) {
			tarpath+=pathbase;
		}
	}
	
	if(stylesheet=="win" && navigator.userAgent.lastIndexOf("MSIE")>=0) {
		//Win版 IE用
		document.write('<link rel="stylesheet" type="text/css" href="'+tarpath+'css/style_winie.css" />');
	}
}

// Style Select ---------------------- END ------------------------




// Image Change ---------------------- START ------------------------

//第1階層 画像のスワップ用
function imgcngtop(contNum,imgName,contState,fileType) {
	document.images[contNum].src="images/common_btn_"+imgName+"_"+contState+"."+fileType;
}


//第2階層 メニュー用
menuNameArray=new Array("vision","migration","products","solutions");

function imgcngmenu(contName,contState) {
	document.images[contName].src="../images/menu_"+contName+"_"+contState+".gif";
	if(contName!="vision" && contState=="on") {
		showSubMenus(contName);
		clearTimeout(hideMenuTimer);
	} else {
		hideTimer();
	}
}

function showSubMenus(contName) {
	document.getElementById("submenus").style.display="block";
	document.getElementById("pagetopfield").style.background="url(../images/common_bg_pagetop_on.gif) repeat-x top #ffffff";
	for(i=1;i<=3;i++) {
		if(menuNameArray[i]==contName) {
			document.getElementById(menuNameArray[i]+"sub").style.display="block";
		} else {
			document.getElementById(menuNameArray[i]+"sub").style.display="none";
		}
	}
}

function hideTimer() {
	hideMenuTimer=setTimeout("hideSubMenus()",300);
}

function hideSubMenus() {
	document.getElementById("submenus").style.display="none";
	document.getElementById("pagetopfield").style.background="url(../images/common_bg_pagetop_off.gif) repeat-x top #ffffff";
	for(i=1;i<=3;i++) {
		document.getElementById(menuNameArray[i]+"sub").style.display="none";
	}
}


function imgcngsubmenu(contName,contState) {
	if(contName=="hspa1" || contName=="hspa2") {
		contName2="hspa";
	} else if(contName=="lte1" || contName=="lte2") {
		contName2="lte";
	} else {
		contName2=contName;
	}
	document.images[contName].src="../images/submenu_"+contName2+"_"+contState+".gif";
	if(contState=="on") {
		clearTimeout(hideMenuTimer);
	} else {
		hideTimer();
	}
}


//第2階層 単純スワップ
function imgcng(contName,contState) {
	document.images[contName].src="../images/common_"+contName+"_"+contState+".gif";
}



// Image Change ---------------------- END ------------------------




// Scroll to Top ---------------------- START ------------------------

//必ずDOCTYPEをCSS用に指定する事

var scrOldY=10000;

if(navigator.platform=="MacPPC" || navigator.platform=="MacIntel") {
	scrPlat="mac";
} else {
	scrPlat="win";
}

if(navigator.userAgent.lastIndexOf("Firefox")>=0) {
	scrName="Firefox";
} else if(navigator.userAgent.lastIndexOf("Safari")>=0) {
	scrName="Safari";
} else if(navigator.userAgent.lastIndexOf("Netscape")>=0) {
	scrName="Netscape";
} else if(navigator.userAgent.lastIndexOf("MSIE")>=0) {
	scrName="IE";
} else {
	scrName="Other";
}


function scrtop() {
	speed=5;
	
	if((scrPlat=="mac"&&scrName=="IE")||scrName=="Safari"||(scrPlat=="win"&&scrName=="Netscape")) {
		if(document.body.scrollTop>scrOldY) {
			scrEnd();
		} else {
			movY=Math.floor((0-document.body.scrollTop)/speed);
			window.scrollBy(0,movY);
			scrOldY=document.body.scrollTop;
		}
	} else {
		if(document.documentElement.scrollTop>scrOldY) {
			scrEnd();
		} else {
			movY=Math.floor((0-document.documentElement.scrollTop)/speed);
			window.scrollBy(0,movY);
			scrOldY=document.documentElement.scrollTop;
		}
	}
	
	if(movY==0 || scrOldY==10000) {
		scrEnd();
	} else {
		scrTimer=setTimeout("scrtop()",30);
	}
}

function scrEnd() {
	scrOldY=10000;
	clearTimeout(scrTimer);
}

// Scroll to Top ---------------------- END ------------------------




// Case Tab Actions ---------------------- START ------------------------

soluCaseset1base=11;
soluCaseset1Nums=11-1+2;

function caseact(tarcate,tarNum) {
	if(tarcate=="solu" && (tarNum>=11 && tarNum<20)) {
		baseNum=soluCaseset1base;
		maxNum=soluCaseset1Nums;
	} else if(tarcate=="solu" && (tarNum>=21 && tarNum<30)) {
		baseNum=soluCaseset2base;
		maxNum=soluCaseset2Nums;
	}
	
	for(i=baseNum;i<=maxNum;i++) {
		if(i==tarNum) {
			document.getElementById("caseelm"+i).style.display="block";
			document.getElementById("casemenu"+i).style.background="#999999";
		} else {
			document.getElementById("caseelm"+i).style.display="none";
			document.getElementById("casemenu"+i).style.background="#bbbbbb";
		}
	}
}

// Case Tab Actions ---------------------- END ------------------------




// Fig Zoom ---------------------- START ------------------------

figZoomArray=new Array('fig27');
figStateArray=new Array(false,false);
zoomCount=0;
zoomSpeed=5;
toSize="";

function zoomfig(tarElm) {
	for(i=0;i<=figZoomArray.length-1;i++) {
		if(figZoomArray[i]==tarElm) {
			if(! figStateArray[i]) {
				toSize="big";
				figStateArray[i]=true;
			} else {
				toSize="small";
				figStateArray[i]=false;
			}
		}
	}
	
	if(toSize=="big") {
		zoomCount=0;
		zoomAct(tarElm);
	} else {
		zoomCount=zoomSpeed;
		zoomAct(tarElm);
	}
}

function zoomAct(tarElm) {
	if(toSize=="big") {
		zoomCount++;
		tarWbase=Math.floor((774-516)/zoomSpeed);
		if(zoomCount>=zoomSpeed) {
			tarW=774;
		} else {
			tarW=516+(tarWbase*zoomCount);
		}
	} else if(toSize=="small") {
		zoomCount--;
		tarWbase=Math.floor((774-516)/zoomSpeed);
		tarW=516+(tarWbase*zoomCount);
	}
	document.getElementById(tarElm).style.width=tarW+"px";
	document.getElementById(tarElm+"t").style.width=tarW+"px";
	
	if((toSize=="big" && zoomCount<zoomSpeed) || (toSize=="small" && zoomCount>0)) {
		zoomTimer=setTimeout("zoomAct('"+tarElm+"')",30);
	} else {
		clearTimer('zoomTimer()');
	}
}



// Fig Zoom ---------------------- START ------------------------




