



/* for highlighting the left navigation current page link */

function extractPageName(hrefString)
{
	var arr = hrefString.split('/');
	return  (arr.length<2) ? hrefString : arr[arr.length-2].toLowerCase() + arr[arr.length-1].toLowerCase();               
}

function setActiveMenu(arr, crtPage)
{
	for (var i=0; i<arr.length; i++)
	{
		if(extractPageName(arr[i].href) == crtPage)
		{
			if (arr[i].parentNode.tagName != "div")
			{
				arr[i].className = "itemcurrent";

			}
		}
	}
}

function setPage()
{
	hrefString = document.location.href ? document.location.href : document.location;

	if (document.getElementById("subnav")!=null)
		setActiveMenu(document.getElementById("subnav").getElementsByTagName("a"), extractPageName(hrefString));
}

var pausecontentindex=new Array()
pausecontentindex[0]='<div class="testimonialquoteText">無理なお願いも臨機応変に対応してくださり感謝しています。今後もどうぞよろしくお願いいたします。</div><DIV class="testimonialname"><IMG src="img/index/icn-comment.png" alt="" width="18" height="15" border=0 />R.M さま<BR /><DIV class="designation">東京大学</div></div>'
pausecontentindex[1]='<div class="testimonialquoteText">満足しているので、また使わせていただきたいと思っている。</div><DIV class="testimonialname"><IMG src="img/index/icn-comment.png" alt="" width="18" height="15" border=0 />N.S さま<BR /><DIV class="designation">大阪大学大学院</div></div>'
pausecontentindex[2]='<div class="testimonialquoteText">数々のご無理を申し上げたにもかかわらず、丁寧に相談にのっていただき、かつ仕上がりも迅速で、たいへん助かりました。とても満足しております。 </div><DIV class="testimonialname"><IMG src="img/index/icn-comment.png" alt="" width="18" height="15" border=0 />匿名希望<BR /><DIV class="designation">愛知教育大学</div></div>'
pausecontentindex[3]='<div class="testimonialquoteText">初めての利用でしたが、満足なサービスでした。</div><DIV class="testimonialname"><IMG src="img/index/icn-comment.png" alt="" width="18" height="15" border=0 />I.N さま<BR /><DIV class="designation">大阪大学医学部附属病院</div></div>'
pausecontentindex[4]='<div class="testimonialquoteText">分かり易く訳して頂きありがとうございました。 内容も分かり易く、メールでのやり取りもスムーズでありとてもよかったです。有難うございました。</div><DIV class="testimonialname"><IMG src="img/index/icn-comment.png" alt="" width="18" height="15" border=0 />M.N さま<BR /><DIV class="designation">名古屋記念病院</div></div>'
pausecontentindex[5]='<div class="testimonialquoteText">この機会にサポートを頂く事が出来まして、大変感激しております。これからも是非よろしくお願い申し上げます</div><DIV class="testimonialname"><IMG src="img/index/icn-comment.png" alt="" width="18" height="15" border=0 />R.M さま<BR /><DIV class="designation">MV Communications</div></div>'
function pausescroller(content,divId,divClass,delay){this.content=content
this.tickerid=divId
this.delay=delay
this.mouseoverBol=0
this.hiddendivpointer=1
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; text-align:left; overflow: hidden; min-height:125px"><div class="innerDiv" style="position: absolute; width: 100%; text-align:left" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; margin-left:0px; text-align:left; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if(window.addEventListener)
window.addEventListener("load",function(){scrollerinstance.initialize()},false)
else if(window.attachEvent)
window.attachEvent("onload",function(){scrollerinstance.initialize()})
else if(document.getElementById)
setTimeout(function(){scrollerinstance.initialize()},500)}
pausescroller.prototype.initialize=function(){this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv,this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if(window.attachEvent)
window.attachEvent("onunload",function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()},this.delay)}
pausescroller.prototype.animateup=function(){var scrollerinstance=this
if(parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()},50)}
else{this.getinline(this.hiddendiv,this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()},this.delay)}}
pausescroller.prototype.swapdivs=function(){var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer}
pausescroller.prototype.getinline=function(div1,div2){div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight,div1.offsetHeight)+"px"}
pausescroller.prototype.setmessage=function(){var scrollerinstance=this
if(this.mouseoverBol==1)
setTimeout(function(){scrollerinstance.setmessage()},100)
else{var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)?0:i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()}}
pausescroller.getCSSpadding=function(tickerobj){if(tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if(window.getComputedStyle)
return window.getComputedStyle(tickerobj,"").getPropertyValue("padding-top")
else
return 0}
var speed=50;var pic,numImgs,arrLeft,i,totalWidth,n,myInterval;$(window).load(function(){pic=$("#slider").children("img");numImgs=pic.length;arrLeft=new Array(numImgs);for(i=0;i<numImgs;i++){totalWidth=0;for(n=0;n<i;n++){totalWidth+=$(pic[n]).width();}
arrLeft[i]=totalWidth;$(pic[i]).css("left",totalWidth);}
myInterval=setInterval("flexiScroll()",speed);$('#imageloader').hide();$(pic).show();});function flexiScroll(){for(i=0;i<numImgs;i++){arrLeft[i]-=1;if(arrLeft[i]==-($(pic[i]).width())){totalWidth=0;for(n=0;n<numImgs;n++){if(n!=i){totalWidth+=$(pic[n]).width();}}
arrLeft[i]=totalWidth;}
$(pic[i]).css("left",arrLeft[i]);}}
