// title and description
var cad_uber_title = "Central Asia Diary" ;

/* MAIN PAGE */
// lead story
var cad_country = "uzbekistan" ;
var cad_headline = "U.S. Plants Footprint in Shaky Central Asia" ;
var cad_headline_url = getUrl("A64817-2002Aug26") ;
var cad_headline_blurb = "The American base in the arid hills of southwestern Uzbekistan is not imposing. About 1,000 U.S. troops live and work here, handling tons of supplies for the war in Afghanistan." ;

// gallery
var main_img_caption = "An Uzbek worker checks IDs as soldiers and personnel make their way through the food lines in the air-conditioned mess tent at the K2 military base.  (Lois Raimondo/Washington Post)" ;

//put in gallery url when it becomes available
var main_gallery_url = "http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/index.htm" ;
// var main_gallery_url = "http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/index.htm" ;


//getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/K2/1.htm) ;

var main_img = new Image() ;
main_img.src = getUrl("http://media.washingtonpost.com/wp-srv/photo/world/centralasiadiary/images/K2290.jpg") ;
main_img.width = "290" ;
main_img.height = "220" ;

var dispatches = new Array(
"A64817-2002Aug26","8/27 U.S. Military Plants Footprint",
"A44012-2002Aug21","8/21 Capital on the Steppes",
"A12724-2002Aug13","8/13 Muzzled Media",
"A43561-2002Aug4","8/5 Troubled Krygyzstan",
"A31157-2002Aug1","8/2 Kazakh Traditions",
"A28698-2002Jul31","8/1 Optimistic Tajiks",
"A5308-2002Jul26","7/26 Heroin Trafficking",
"A56219-2002Jul24","7/24 Another Q&A",
"A41635-2002Jul21","7/22 Kazakh Repression",
"A7197-2002Jul15","7/15 Volatile Fergana Valley",
"A44896-2002Jul9","7/10 On the Road Q&A",
"A20154-2002Jul3","7/9 Tolkuchka: Crowded Markets",
"A36723-2002Jul7","7/8 Ashkhabad: Personality Cult",
"A8008-2002Jul1","7/2 Merv: Golden Era Remnants",
"A5383-2002Jun30","7/1 Tashkent: Lure of U.S. Ties",
"A61294-2002Jun28","6/29 Khanabad: U.S. Military Base",
"A37406-2002Jun24","6/25 Tashkent: Food and Flowers",
"A32225-2002Jun23","6/23 On the Road Q&A",
"A12724-2002Jun19","6/20 Tashkent: Flood of Heroin", 
"A229-2002Jun17","6/18 Tashkent: Starved for Cash",
"A63745-2002Jun17","6/17 Intro: An Unknown Land"
);

/* SHOULDER BOXES */
// test shoulder box
var kazakhstan_img = new Image() ;
kazakhstan_img.src = getUrl("I12258-2002Aug29") ;
kazakhstan_img.width = "212" ;
kazakhstan_img.height = "136" ;
var kazakhstan_img_caption = "Falcon trainer Gerzhan Turdakinovich, 24, at a falcon-breeding farm outside of Almaty, Kazakhstan." ;
var kazakhstan_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/kazakhstan/1.htm") ;
var kazakhstan_dispatches = dispatches ; 

var astana_img = new Image() ;
astana_img.src = getUrl("I44489-2002Aug21") ;
astana_img.width = "212" ;
astana_img.height = "172" ;
var astana_img_caption = "New office buildings are going up all over Astana, the new capital of astana" ;
var astana_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/astana/1.htm") ;
var astana_dispatches = dispatches ;

var tajikistan_img = new Image() ;
tajikistan_img.src = getUrl("I15889-2002Aug30") ;
tajikistan_img.width = "212" ;
tajikistan_img.height = "166" ;
var tajikistan_img_caption = "Children play in the courtyard of a housing complex in Dushanbe, Tajikistan." ;
var tajikistan_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/index.htm") ;
var tajikistan_dispatches = dispatches ;

var drugs_img = new Image() ;
drugs_img.src = getUrl("I5553-2002Jul26") ;
drugs_img.width = "212" ;
drugs_img.height = "152" ;
var drugs_img_caption = "The first group of fifty Kyrghyz heroin addicts taking part in a methadone trial project listen to the head doctor as he describes the process. Fifty percent of this group tested positive for HIV-AIDS." ;
var drugs_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/drugs/1.htm") ;
var drugs_dispatches = dispatches ;

var turkmenistan_img = new Image() ;
turkmenistan_img.src = getUrl("I39982-2002Jul08") ;
turkmenistan_img.width = "212" ;
turkmenistan_img.height = "196" ;
var turkmenistan_img_caption = "A gold-plated statue of President Saparmurad Niyazov in the center of Ashkhabad, Turkmenistan." ;
var turkmenistan_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/turkmenistan/1.htm") ;
var turkmenistan_dispatches = dispatches ;

var fergana_img = new Image() ;
fergana_img.src = getUrl("I8441-2002Jul15") ;
fergana_img.width = "212" ;
fergana_img.height = "188" ;
var fergana_img_caption = "The Fergana Valley's rugged hills and cooling waters have attracted a wide variety of peoples and languages over the centuries. But since 1991, the valley has been divided into three different countries, hindering the economy and heightening political tensions." ;
var fergana_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/fergana/1.htm") ;
var fergana_dispatches = dispatches ;

var uzbekistan_img = new Image() ;
uzbekistan_img.src = getUrl("I42911-2002Jun25") ;
uzbekistan_img.width = "212" ;
uzbekistan_img.height = "195" ;
var uzbekistan_img_caption = "A spice and nut stall at the weekend market in Andijan, Uzbekistan." ;
var uzbekistan_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/uzbekistan/1.htm") ;
var uzbekistan_dispatches = dispatches ;

var k2_img = new Image() ;
k2_img.src = getUrl("I57466-2002Jun27") ;
k2_img.width = "212" ;
k2_img.height = "160" ;
var k2_img_caption = "An American guard post controls traffic into the Khanabad air base, located in a desert in southern k2. The base is central to the U.S. war effort in Afghanistan. " ;
var k2_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/K2/1.htm") ;
var k2_dispatches = dispatches ;

var kyrgyzstan_img = new Image() ;
kyrgyzstan_img.src = getUrl("I40369-2002Sep05") ;
kyrgyzstan_img.width = "212" ;
kyrgyzstan_img.height = "158" ;
var kyrgyzstan_img_caption = "Kyrgyz women, all wives of men working at the horse stable, live in a boarding house on the grounds of the stable." ;
var kyrgyzstan_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/kyrgyzstan/1.htm") ;
var kyrgyzstan_dispatches = dispatches ;

var healer_img = new Image() ;
healer_img.src = getUrl("I56974-2002Sep09") ;
healer_img.width = "212" ;
healer_img.height = "150" ;
var healer_img_caption = "People seeking cures for physical, mental and general health attend daily \"healings\" conducted by Dr. Jumakhon Nosiri." ;
var healer_gallery_url = getUrl("http://www.washingtonpost.com/wp-srv/photo/world/centralasiadiary/index.htm") ;
var healer_dispatches = dispatches ;

/* FUNCTIONS */
// DO NOT TOUCH //
function getUrl(fragment)
{
  var url = new String(fragment) ;
  if ( fragment.indexOf("I") == 0 )
  {
    url = "http://media.washingtonpost.com/wp-dyn/images/" + fragment ;
  }
  else if ( fragment.indexOf("A") == 0 )
  {
    url = "http://www.washingtonpost.com/wp-dyn/articles/" + fragment + ".html" ;
  }

  return url ;
}

function renderDispatchPulldown()
{
  document.write('<form>') ;
  document.write('<select onchange="if(selectedIndex!=0) { window.location.href=this[selectedIndex].value }">') ;
  document.write('<option>Previous Dispatches') ;
  for(var i=0; i<dispatches.length;i=i+2)
  {
    var dispatch_url = getUrl(dispatches[i]) ;
    var dispatch_title = dispatches[i+1] ;
    document.write('<option value="'+dispatch_url+'">'+dispatch_title) ;
  }
  document.write('</select>') ;
  document.write('</form>') ;
}