﻿

/*Example message arrays for the two demo scrollers*/

var pausecontent=new Array()
/*pausecontent[0]='<strong>More business news & events?</strong><br /><div align="center"><img src="/img/logos/logo_EEN_news.png" /></div><br />Look at <a href="http://www.een-japan.eu" ><span style="text-decoration:underline"><strong>http://www.een-japan.eu</strong></span></a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><img src="/img/logos/centre_mini.png" /> <strong>EU-Japan Business Round Table</strong><br />Press Release, visit of co-Chairmen to Prime Minister Noda to call for strong leadership and commitment in EU-Japan trade talks, 28 November 2011<br /><img src="/img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://documents.eu-japan.eu/roundtable/press_releases/press_release_28112011_en.pdf" target="_blank">Details</a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><strong>Prezi Named “Rising Star” in the Deloitte Technology Fast 50</strong><br />Prezi CEO Peter ARVAI participated in Vulcanus in Japan 2002-2003.<br /><img src="/img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://blog.prezi.com/2011/10/18/prezi-named-rising-star-in-the-deloitte-technology-fast-50/" target="_blank">Details</a>';
*/
pausecontent[0]='<strong>NEXT EVENTS</strong><br />'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><img src="/img/logos/centre_mini.png" /> <strong>Ensuring future mobility</strong> Seminar<br /> 17 February 2012, Alsace, France<br /><img src="/img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://www.eu-japan.eu/global/events/future-mobility-workshop-17022012.html?year=2012" target="_blank">Details</a>'+  
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><strong>Business Forum Japan: After 150 years far from the end... </strong><br />Motives, strategies and general conditions for a business engagement in Japan. 5 March 2012 - Dusseldorf, Germany<br /><img src="/img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://documents.eu-japan.eu/seminars/europe/Dusseldorf_CCI/Einladungsflyer_Japan.pdf" target="_blank">Details</a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><strong>1-year Executive Training Programme</strong><br />Next training cycle: November 2012 – November 2013<br /><span style="color:#CC0000">Application deadline: 31/05/2012</span><br /><img src="/img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://www.euetp.eu" target="_blank">Details</a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><strong>NEXT TRAINING COURSE<br />FOR EU COMPANIES</strong><br /><hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><img src="/img/logos/centre_mini.png" /> <strong>4/5-week training programme in Japan</strong> helping EU companies take full advantage of Japanese business opportunities and provides an in-depth approach to examine Japanese industrial structure, business practices and management through lectures, field trips and individual company visits. Call for applications for <strong>HRTP (Human Resources Training Programme)</strong>.<br />14/05/2012 - 08/06/2012 or 15/06/2012 (5th week is optional)<br /><span style="color:#CC0000">Application deadline: 16/02/2012</span><br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="global/business-training/human-resources-training-programme.html" title="HRTP"><span style="text-decoration:underline">Details</span></a>';
/*pausecontent[2]='<strong>REPORT RELEASED</strong><br /><hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><!--<img src="/img/logos/centre_mini.png" /><strong>A personal view on the future of EU-Japan trade relations</strong> by Professor Moreira (Chairman of the European Parliament’s International Trade Committee)<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://documents.eu-japan.eu/seminars/reports/seminar_moreira_18102011_eu.pdf" title="A personal view on the future of EU-Japan trade relations"><span style="text-decoration:underline">Details</span></a>-->'+
'Reports are available here.<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://www.eu-japan.eu/global/reports.html"><span style="text-decoration:underline">Details</span></a>';*/
pausecontent[1]='<strong>J-Bilat Newsletter</strong><br />November/December issue is now available<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://www.j-bilat.eu/documents/newsletter/newsletter20_nov_dec2011.pdf" target="_blank"><span style="text-decoration:underline">Details</span></a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><strong>Japanese dimension of the FP7 work programme 2012</strong><br />Calls for proposals, with a budget of over €5.3 billion were launched on 20 July. The main focus of the calls is the integration of research with innovation to tackle societal challenges and create sustainable jobs and growth by giving Europe a lead in the key technology markets of the future. All of the calls are open for the participation of non-European researchers and/or research organisations working alongside their EU counterparts.<br /><br />The following link provides researchers working in Japan with a brief overview of these current calls, and highlight some specific topics which may be of particular interest:<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://ec.europa.eu/research/iscp/pdf/wp2012/japan.pdf#view=fit&pagemode=none" title="Japanese dimension of the FP7 work programme 2012"><span style="text-decoration:underline">Details</span></a> <br />Full information on the calls can be found on the Participant Portal.<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://ec.europa.eu/research/participants/portal/page/fp7_calls" title="FP7 calls"><span style="text-decoration:underline">Details</span></a> <br />Japanese researchers are also encouraged to liaise with J-Bilat:<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://www.j-bilat.eu/" title="J-Bilat"><span style="text-decoration:underline">Details</span></a>'



var pausecontent3=new Array()
/*pausecontent3[0]='<strong>セミナー</strong><br /><strong>EUの研究開発政策における国際協力と連携強化に向けた日本企業への期待</strong><br /><span style="color:#CC0000">2011年12月1日（木）、ベルギー・ブリュッセル</span><br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://www.eu-japan.eu/global/events/seminar_01122011.html?year=2011&evtl=ja" title="seminar"><span style="text-decoration:underline">詳細</span></a>';*/
pausecontent3[0]='<strong>J-BILAT 月刊ニュースレター</strong><br />第19号 | 2011年11/12月。<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://www.j-bilat.eu/documents/newsletter/newsletter20_nov_dec2011.pdf" target="_blank"><span style="text-decoration:underline">詳細</span></a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><strong>研究開発協力</strong><br /><img src="/img/logos/centre_mini.png" />日本におけるFP7情報サービス事業(J-BILAT)<br />J-BILATは日本-EU間の科学技術研究協力の促進、強化、発展を目的としたEU側予算によるプロジェクトです。<br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://www.j-bilat.eu" title="J-Bilat"><span style="text-decoration:underline">詳細</span></a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><img src="/img/logos/centre_mini.png" /><strong>プロジェクトの成果要約（2010年1月〜2011年6月）</strong><br /><img src="img/icons/bullet_toggle_plus.png" alt="details" class="icon" /> <a href="http://www.j-bilat.eu/documents/executive_summary/report1.pdf" target="_blank"><span style="text-decoration:underline">詳細</span></a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /><strong>2012年FP7計画(work programme)の日本向け案内</strong><br />7月20日、約53億ユーロの予算規模をもつFP7の公募が発表されました。 これら公募は、将来的にキーとなる技術の市場で欧州を優位に立たせることにより、社会的課題に取り組み、持続的な雇用創出と成長の実現につなげることを目的に、研究とイノベーションの融合に重点を置いています。'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" />直近の公募概要および日本在住の研究者にとって特に興味深いと考えられるテーマに関する情報<br /><img src="img/icons/bullet_toggle_plus.png" alt="詳細" class="icon" /><a href="http://ec.europa.eu/research/iscp/pdf/wp2012/japan.pdf#view=fit&pagemode=none" title="Japanese dimension of the FP7 work programme 2012"><span style="text-decoration:underline">詳細</span></a> <br />全ての公募の詳細（The Participant Portal上）<br /><img src="img/icons/bullet_toggle_plus.png" alt="詳細" class="icon" /><a href="http://ec.europa.eu/research/participants/portal/page/fp7_calls" title="FP7 calls"><span style="text-decoration:underline">詳細</span></a>';
pausecontent3[1]='<img src="/img/logos/centre_mini.png" /> <strong>日・EU ビジネス・ラウンドテーブル</strong><br />2011年11月28日 日・EU貿易交渉における力強いリーダーシップとコミットメントを野田佳彦総理大臣に要請<br /><img src="/img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://documents.eu-japan.eu/roundtable/press_releases/press_release_28112011_ja.pdf" target="_blank">詳細</a>'+
'<hr style="color:#CCCCCC;background-color:#CCCCCC;height:1px;" /> <strong>出版物</strong><br /><img src="/img/logos/centre_mini.png" />EUへの直接投資（英語）<br />海外直接投資受け入れに関するEUおよび各加盟国の政策、窓口機関等を取りまとめたガイド。2010年7月発行。<br /><img src="/img/icons/bullet_toggle_plus.png" alt="details" class="icon" /><a href="http://documents.eu-japan.eu/fdi/guide.pdf" target="_blank">詳細</a>';








/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

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))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
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) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

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)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

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"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
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){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


