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

var pausecontent2=new Array()
pausecontent2[0]='<a href="speaches/06_16_2010.html">Understanding the water resources is vital to Afghanistan. A joint effort between the USGS and AGS has provided a deeper understanding of water resources in the Kabul Basin.</a>'
    
pausecontent2[1]='<a href="speaches/03-31-2010.html">Conceptual ideas for establishing the Foundation for Afghanistan, a non-profit, non-partisan, non-governmental organization including a brief discuss the Foundation’s preliminary mission, the need for such a Foundation ...</a>'

pausecontent2[2]='<a href="speaches/03_19_2010.html">Afghanistan’s Ambassador to the United States Said Jawad joined President and Mrs. George W. Bush at the Bush Presidential Library at Southern Methodist University (SMU) Thursday and Friday to speak on championing  ...</a>'

pausecontent2[3]='<a href="speaches/03_18_2010.html">We have come a long way in Afghanistan, but we are not out of the woods. Under the gender apartheid of the Taliban, women were deprived of all basic human rights. Today, Afghans enjoy more political, economic and social ...</a>'

pausecontent2[4]='<a href="articles/03_08_2010.html">Calling for global support of gender equality in Afghanistan, Ambassador Said Jawad said the women of his country have made significant advances, but cautioned much work remained.</a>'

pausecontent2[5]='<a href="articles/03_08_2010-2.html">Clearly, Afghan women are agents of democratic changes, yet their full potential still remains untapped. In order to fully materialize potential, we need to further invest in education and economic empowerment ...</a>'

pausecontent2[6]='<a href="speaches/02_24_2010.html">Ambassador Jawad commends Caroline’s work in Afghanistan, as well as the good work of the New Hudson Foundation which has implemented a number of critically needed aid programs to assist women and children.</a>'

 pausecontent2[7]='<a href="speaches/02_23_2010.html">Japan’s assistance over the past eight years has helped change the lives of millions of needy Afghan civilians, especially women and children.</a>'
     
	 pausecontent2[8]='<a href="speaches/02_23_2010-2.html">Despite feelings of despair and frustration in some letters to a popular radio show, these Afghan voices are full of optimism for a better future for our people.</a>'
    
	pausecontent2[9]='<a href="speaches/09_16_2009.html">By providing a laptop to a child, we are connecting him with his peers all over the world, and encouraging him to share and collaborate, two very important values to build a peaceful, pluralistic and prosperous society.</a>'
     pausecontent2[10]='<a href="speaches/05_29_2008.html">Under the caring leadership of the First Lady, Mrs. Bush, the Ayenda Foundation has been working with the U.S.-Afghan Women&acute;s Council to put together broken lives and reverse the trauma of war and poverty by ...</a>'
	 
      pausecontent2[11]='<a href="speaches/11_5_2007.html">Please do not forget that, no matter how distant other lands, peoples and cultures may be, you cannot overlook their struggle or their hopes and desires for peace and prosperity. Their destiny is interlinked with yours. </a>'
	  
      pausecontent2[12]='<a href="speaches/10_24_2007.html">Rosanne Klass chose the road less traveled, and her unique experience as an American woman teaching in Afghanistan in the 1950s has inspired countless others to discover the Afghanistan that exists beyond the headlines.</a>'
	  
     pausecontent2[13]='<a href="speaches/10_16_2007.html">The questions that face us today is: how and where will we train the next generation of Afghan artists and musicians? I cannot imagine many partnerships ...</a>'
	 
     pausecontent2[14]='<a href="speaches/10_01_2007.html">The Friedrich Ebert Foundation and the Media Tech centers have been doing noble work throughout Afghanistan, including sponsoring the very first photography exhibition in the northern Afghan province of Kunduz.</a>'
    pausecontent2[15]='<a href="speaches/06_26_2006.html">Today, Afghanistan has begun its difficult but successful journey into a peaceful, pluralistic and prosperous society but still faces challenges in the state building process.</a>'
	
      pausecontent2[16]='<a href="speaches/5_23_2006.html">Today, Afghanistan is once more playing its historic role in bridging cultures, countries and civilizations. Over 60 counties are helping rebuild Afghanistan. 36 countries have troops in Afghanistan. </a>'
	  
      pausecontent2[17]='<a href="speaches/5_12_2006.html">Afghans today enjoy more political, economic, and social rights than at any time in the history of the country. Free press is flourishing. Where extremists have tried to build walls, our strategy for the future is to build bridges.</a>'
	  
      pausecontent2[18]='<a href="speaches/4_17_2006.html">What took our archaeologists 70 years to discover took extremists less than a decade to sell off, burn, mutilate and demolish. The hollow cavities where the Giant Buddhas once stood in Bamiyan are a testament to the suffering ...</a>'
	  
     pausecontent2[19]='<a href="speaches/4_04_2006.html">Afghans are determined to rebuild their country and President Karzai is committed to work with the United States of America and the international community, as well as the Afghan and International NGO’S to further ...</a>'
	 
     pausecontent2[20]='<a href="speaches/04_04_2006.html">We believe that trade and investment not only provides for the much needed economic growth in the region, but also is key to regional stability. We have signed onto numerous agreements and entered into a number of new ...</a>'
	 
      pausecontent2[21]='<a href="speaches/3_02_2006.html">Among our numerous challenges, the task of rebuilding our education system has stood out. We have made some progress. Student enrollment in universities has leaped tenfold from 4,000 in 2002 to 40,000 in 2005.</a>'
     
     pausecontent2[22]='<a href="speaches/2_15_2006.html">As part of the standing U.S. commitment toward Afghanistan, US Trade & Development Agency has played an important role in assisting Afghanistan with economic development. </a>'
	 
     pausecontent2[23]='<a href="speaches/01_30_2006.html">Now, with the execution of the Afghanistan Compact and the launching of the National Development Strategy, we are proving that the Afghan Government is not only committed, but also acquiring significant capacity to ... </a>'
	 
      pausecontent2[24]='<a href="speaches/06_24_2005.html">The U.S.-Afghanistan Strategic Partnership supports Afghanistan&acute;s initiatives to restore the country&acute;s historic role as a land bridge connecting Central and South Asia. </a>'
	  
    pausecontent2[25]='<a href="speaches/06_22_2005.html">In Afghanistan, two generations have lost the opportunity to acquire education and training due to three decades of invasion, war and violence. We have built hundreds of schools, however only 29% of schools ...</a>'
	
      pausecontent2[26]='<a href="speaches/04_15_2005.html">Afghanistan has historically been a strong nation, but the state institutions are systematically destroyed in the past 30 years by invasion, war, terror and violence.  With the partnership of the international community ...</a>'
	  
      pausecontent2[27]='<a href="speaches/03_07_2005.html">Afghan women have made significant progress in securing their rights in Afghanistan. The new constitution of Afghanistan provides for equal rights and full participation of women in all spheres of life ... </a>'
	  
      pausecontent2[28]='<a href="speaches/01_12_2005.html">Afghan women have made significant progress in securing their rights in Afghanistan. The new constitution of Afghanistan provides for equal rights and full participation of women in all spheres of life, but we are still ...  </a>'
    
      pausecontent2[29]='<a href="speaches/11_18_2004.html">The Afghanistan Business Dialogue is an initiative of the Afghan Embassy, Afghan American Chamber of Commerce and the Afghanistan International Chamber of Commerce. The dialogue includes at least  ... </a>'	        
      
      pausecontent2[30]='<a href="speaches/11_15_2004.html">Today, hope, peace, education, and democracy are replacing despair, destruction, and tyranny in Afghanistan. Tangible results of reconstruction and infrastructure building are visible throughout the country.</a>'
	  
      pausecontent2[31]='<a href="speaches/10_21_2004.html">When 8.4 million Muslims, Afghan men and women, proudly and patiently lined up to vote, they not only demonstrated their courage, competence, and commitment to democracy, but also their determination to stand on ...</a>'
	  
      pausecontent2[32]='<a href="speaches/10_18_2004.html">Success in Afghanistan is helping the world become a safer place. Afghanistan’s transition and successful advance on the path to democracy and state-building will impact ...</a>'
	  
      pausecontent2[33]='<a href="speaches/10_05_2004.html">The Embassy of Afghanistan hopes that this dialogue will help facilitate the sharing of information and ideas and will help build a strong coalition of U.S. companies interested in Afghanistan.</a>'
	  
      pausecontent2[34]='<a href="speaches/08_18_2004.html">While in the past, success in Afghanistan was set in the context of preventing negative results, such as spread of terrorism and violation of human and gender rights, now...</a>'
	  
     pausecontent2[35]='<a href="speaches/08_03_2004.html">Afghans were deprived of their basic human rights by foreign invasions, 3 decades of war, violence, and the terror and tyranny of Taliban. Access to basic health services was denied to most Afghans.  </a>'
	 
      pausecontent2[36]='<a href="speaches/06_22_2004.html">I wish to take this opportunity to thank the entire Georgetown University body: the University’s leadership, faculty, students, and alumni for your sincere assistance and commitment to the reconstruction of Afghanistan. </a>'
	  
      pausecontent2[37]='<a href="speaches/05_25_2004.html">The fight against terrorism is not just military, it is economic. Investing in Afghanistan&acute;s future is good economics. Return on limited international investment in Afghanistan has been tremendously good, as ...</a>'
	  
     pausecontent2[38]='<a href="speaches/05_25_2004_2.html">The eagerness of the international community and the efforts of the Government of Afghanistan to bring economic stability to the country have laid the foundation for successful business development.  </a>'
	 
     pausecontent2[39]='<a href="speaches/05_13_2004.html">Afghanistan is a mosaic of various beautiful and rich cultures at the cross-roads of Asia and once was a center and hub of learning and commerce, connecting China with the Middle East and India with Europe ... </a>'
	 
     pausecontent2[40]='<a href="speaches/05_06_2004.html">The film “Osama” illustrates a look into Afghanistan’s dark recent past, and the struggles, of millions of Afghans, who suffered under terror, tyranny, and Taliban. It shows how long before September 11 ...</a>'
	 
      pausecontent2[41]='<a href="speaches/04_30_2004.html">No other country in the world has lost so much of its cultural heritage than Afghanistan, especially with the ancient Buddha status in Bamiyan which was destroyed by the Taliban regime. The Association for  ...</a>'
	  
	  pausecontent2[42]='<a href="speaches/04_29_2004.html">Teachers are our hope for Afghanistan’s bright future. Not only do they educate Afghan children and promote gender equality, but every one of them also serves as role models.</a>'
	  
      pausecontent2[43]='<a href="speaches/04_24_2004.html">Afghanistan has a severe problem with un-exploded ordnance and land mines. Afghanistan is littered with perhaps nine million landmines. During the Soviet invasion, up to 30 million landmines and the so called butterfly ...</a>'
	  
     pausecontent2[44]='<a href="speaches/04_20_2004.html">On January 4, 2004, President Karzai signed our new Constitution into law, marking another significant milestone, under the Bonn Agreement. Five hundred and two men and women delegates adopted with near ...</a>'
	 
      pausecontent2[45]='<a href="speaches/04_20_2004_2.html">Afghanistan has a severe problem with un-exploded ordnance and land mines. Afghanistan is littered with perhaps nine million landmines. During the Soviet invasion, up to 30 million landmines and the so called ...</a>'
	  
     pausecontent2[46]='<a href="speaches/04_13_2004.html">Historically the term nation-building is identified with unifying diverse ethnic groups within a state and welding the different segments of the local populace into a new identity at the national level. </a>'
      
      pausecontent2[47]='<a href="speaches/03_09_2004.html">While our common interest in defeating terrorism and strengthening peace and security forms the bedrock of our partnership, our plans to rebuild Afghanistan with a democratic state that guarantees the safety and ...</a>'
      
	  pausecontent2[48]='<a href="speaches/02_20_2004.html">President Karzai made the rehabilitation of roads a first priority with the subsequent plan to construct 1440 miles of a ring road connecting major cities with extension to links to the neighboring countries. </a>'
	  
	 pausecontent2[49]='<a href="speaches/02_19_2004.html">“Osama” is based on the true story of a young Afghan girl who was forced to disguise herself as a boy to find a job and help earn money for her family. In one moving scene, life becomes so unbearable for the women ... </a>'
	 
      pausecontent2[50]='<a href="speaches/02_12_2004.html">Even though Osama was the first film produced and filmed in Afghanistan since the Taliban took over in 1996, it has received significant international recognition, including the Camera d’Or Special Mention at Cannes ...</a>'
	  
      pausecontent2[51]='<a href="speaches/12_03_2003.html">I am honored to present you the Letter of Credence, by which His Excellency Hamid Karzai, President of the Transitional Islamic State of Afghanistan, has appointed me Ambassador Extraordinary and ...</a>'

      pausecontent2[52]='<a href="speaches/12_04_2003.html">We are fully committed to an open market economy and see the private sector as the true engine for growth. We have moved aggressively to create the legal and financial framework of an environment conducive to private sector growth.</a>'
	  
      pausecontent2[53]='<a href="speaches/11_10_2003.html">Afghans are determined to rebuild their country and President Karzai and the Afghan government are committed to work with the United States of America and the international community to further reinforce ... </a>'
	  
      pausecontent2[54]='<a href="speaches/01_27_2003.html">The next milestone for our people is to implement the new constitution and set the stage for free and fair national elections. The challenges that we are facing are enormous.</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()}, 5000)
}

// -------------------------------------------------------------------
// 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()}, 150)
}
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
}


