var current_section = "paintings";

var paintings_urls = [
                ["paintings/_MG_3418", "The Wind Has a Mind of Its Own", "72x36&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3433", "Falling With Grace", "72x36&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3456", "Slip Into Silence", "24x36&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3466", "One Snip and It&#146;s Over", "24x36&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3462", "One Snip and It&#146;s Over, detail", "oil on wood panel", "2012"],
                ["paintings/_MG_3470", "Sororal Security", "12x12&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3472", "Flowers That Fly", "12x12&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3474", "A Learning in Her Eye", "12x12&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3501", "Floating Towards Ecstasy", "12x36&rdquo;, oil on wood panel", "2012"],
                ["paintings/_MG_3497", "Floating Towards Ecstasy, detail", "oil on wood panel", "2012"],
                ["paintings/_MG_0992", "", "Installation View, Rydell Exhibition, Santa Cruz Museum of Art and History", "2012"],
                ["paintings/_MG_34702", "Winds of Fate", "20x7&#146;, Painted mural and mixed media, Rydell Exhibition, Santa Cruz Museum of Art", "2012"],
		["paintings/paint19", "Birth of Twilight", "27x7&#146;, site-specific installation at Monterey Peninsula College, wall painting, oil paintings, mixed media", "2011"],
		["paintings/paint21", "Birth of Twilight", "27x7&#146;, site-specific installation at Monterey Peninsula College, wall painting, oil paintings, mixed media", "2011"],
		["paintings/paint20", "Birth of Twilight", "27x7&#146;, site-specific installation at Monterey Peninsula College, wall painting, oil paintings, mixed media", "2011"],
		["paintings/paint22", "Birth of Twilight", "27x7&#146;, site-specific installation at Monterey Peninsula College, wall painting, oil paintings, mixed media", "2011"],
		["paintings/paint23", "(Brooches) Riding the Westerlies", "24x33&rdquo;", "2011"],
		["paintings/paint9", "(Brooches) An Overnight Transformation", "24x33&rdquo;", "2011"],
		["paintings/paint10", "(Brooches) Birth of a Monsoon", "24x33&rdquo;", "2011"],
		["paintings/paint11", "(Brooches) Winds of Fortune", "24x33&rdquo;", "2011"],
		["paintings/paint12", "(Brooches) Capture the Moment", "24x33&rdquo;", "2011"],
		["paintings/paint13", "(Brooches) Watches and Warnings", "24x33&rdquo;", "2011"],
		["paintings/paint14", "(Brooches) Low Pressure Cycle", "24x33&rdquo;", "2011"],
		["paintings/paint15", "(Brooches) Prevent Seasonal Hazards", "24x33&rdquo;", "2011"],
		["paintings/paint16", "(Brooches) Forecasting Luck", "24x33&rdquo;", "2011"],
		["paintings/paint17", "(Brooches) Thunder from Above", "24x33&rdquo;", "2011"],
		["paintings/_MG_3452", "Lakhesis Descending (Rabbit&#146;s Foot Brings Good Luck)", "24x36&rdquo;, oil on wood panel", "2011"],
		["paintings/paint4", "Thousand Points of Light", "30x40&rdquo;, oil on wood panel", "2011"],
		["paintings/paint5", "Thousand Points of Light, detail", "30x40&rdquo;, oil on wood panel", "2011"],
		["paintings/paint1", "Instructions Not Included", "30x40&rdquo;, oil on wood panel", "2011"],
		["paintings/paint2", "Instructions Not Included, detail", "30x40&rdquo;, oil on wood panel", "2011"],
		["paintings/paint6", "Pull Tab to Inflate", "30x40&rdquo;, oil on wood panel", "2011"],
		["paintings/_MG_3731", "Safety in Numbers", "24x30&rdquo;, oil on wood panel", "2011"],
		["paintings/_MG_6222", "The Over, The Under II", "30x40&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6214", "The Over, The Under I", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6219", "Memory Keeper", "24x30&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6224", "You Are Thousands, You are one", "30x40&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6205", "The Weight of Starlight", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6217", "Helpless Reverence/Life Savers", "12x24&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6203", "Helpless Reverence", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6211", "Lifesavers", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6304", "Side view: Lifesavers", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6208", "Preserve", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6308", "Side view: Preserve", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/_MG_6207", "Standard Measure", "12x12&rdquo;, oil on wood panel", "2010"],
		["paintings/yasmina", "Yasmina", "30x40&rdquo;, oil on wood panel", "2009"],
		["paintings/orangepainting", "This Segment of Chance", "36x48&rdquo;, oil on wood panel", "2009"],
		["paintings/bluegirdle", "Blue Girdle of the World", "24x48&rdquo;, oil on wood panel", "2009"],
		["paintings/pullherfromthecase", "Pull Her from the Case", "30x30&rdquo;, oil on wood panel", "2009"],
		["paintings/ornamentaltemperaments", "Ornamental Temperaments", "24x36&rdquo;, oil on wood panel", "2009"],
		["paintings/betelguise", "Betelguise", "12x12&rdquo;, oil on wood panel", "2009"],
		["paintings/simonetta", "Simonetta", "12x12&rdquo;, oil on wood panel", "2009"],
		["paintings/amoena", "Amoena", "12x12&rdquo;, oil on wood panel", "2009"],
		["paintings/ahming", "Ahming", "12x12&rdquo;, oil on wood panel", "2009"],
		["paintings/priya", "Priya", "12x12&rdquo;, oil on wood panel", "2009"],
		["paintings/odetta", "Odetta", "12x12&rdquo;, oil on wood panel", "2009"],
  	["paintings/painting11", "Short Chain, Rare Brooch", "12x24&rdquo;, oil on wood panel", "2008"],
		["paintings/painting09", "Clotho&rsquo;s Way with Wind", "12x24&rdquo;, oil on wood panel", "2008"],
		["paintings/painting08", "Hovering Tempest", "36x48&rdquo;, oil on wood panel", "2008"],
		["paintings/painting07", "Everything Lies in Silence", "36x48&rdquo;, oil on wood panel", "2008"],
		["paintings/painting06", "Necessary Gambles", "36x48&rdquo;, oil on wood panel", "2008"],
		["paintings/painting05", "Spreading Its Heavy Perfume", "12x24&rdquo;, oil on wood panel", "2008"],
		["paintings/painting04", "Heavenly Westerlies", "12x36&rdquo;, oil on wood panel", "2008"],
		["paintings/painting03", "Heavy Snow will Follow", "12x36&rdquo;, oil on wood panel", "2008"],
		["paintings/painting02", "Stormy Skies", "12x24&rdquo;, oil on wood panel", "2008"],
		["paintings/painting01", "In Search of the Elixir", "36x48&rdquo;, oil on wood panel", "2008"],
    ["paintings/Watery_Hours", "Watery Hours", "12x36&rdquo;, oil on wood panel", "2008"],
		["paintings/painting10", "Tears of Atropos", "12x36&rdquo;, oil on wood panel", "2008"],
		["paintings/painting00", "Giving Wind a Face", "oil on wood panel", "2008"],
		["paintings/Temple_of_Air", "Temple of Air", "12x36&rdquo;, oil on wood panel", "2008"],
    ["paintings/andalucia_plaza", "Andalucia Plaza", "24x48&rdquo;, oil on wood panel", "2007"],
    ["paintings/quiveringearth", "Over Quivering Earth", "14x36&rdquo;, oil on wood panel", "2007"],
		["paintings/cameos", "Cameos", "40x40&rdquo;, oil on wood panel", "2007"],
    ["paintings/luxuryofguessing", "The Luxury of Guessing", "40x40&rdquo;, oil on wood panel", "2007"],
		["paintings/betweenheavenandearth", "Between Heaven and Earth", "&rdquo;, oil on wood panel", "2007"],
    ["paintings/paratithepoint", "Para Ti / The Point ", "24x48&rdquo;, oil on wood panel", "2007"],
    ["paintings/unforgettable", "Among the Unforgettable", "12x36&rdquo;, oil on wood panel", "2007"],
    ["paintings/likesalt", "Like Salt upon Her Lashes", "24x48&rdquo;, oil on wood panel", "2007"],
    ["paintings/Wrath_of_Lacheius", "Wrath of Lacheius", "12x36&rdquo;, oil on wood panel", "2007"],
		["paintings/Secret_Language", "Secret Language", "12x36&rdquo;, oil on wood panel", "2007"],
		["paintings/heavenearth2", "Between Heaven Earth 2", "&rdquo;, oil on wood panel", "2007"],
    ["paintings/hislips", "Raise Them to His Lips", "12x36&rdquo;, oil on wood panel", "2007"],
		["paintings/Lucky_Day", "Lucky Day", "12x36&rdquo;, oil on wood panel", "2007"],
    ["paintings/sunset-strip-1", "Sunset Strip", "oil on wood panel", "2004"],
		["paintings/coastalbeauty", "Coastal Beauty", "12x36&rdquo;, oil on wood panel", ""],
		["paintings/vintageornament", "Vintage Ornament", "oil on wood panel", ""],
		["paintings/wornbeauty1", "Worn Beauty", "oil on wood panel", ""],
		["paintings/the-goddess-series", "The Goddess Series", "oil on wood panel", ""],
		["paintings/thegoddessseriesclose", "The Goddess Series, detail", "oil on wood panel", ""],
		["paintings/do-not-feather", "Do Not Feather", "oil on wood panel", ""],
		["paintings/Semi-precious-Pendants", "Semi Precious Pendants", "oil on wood panel", ""],
		["paintings/pearls", "String of Pearls", "12x36&rdquo;, oil on wood panel", ""],
		["paintings/dreams-of-spring", "Dreams of Spring", "oil on wood panel", ""],
		["paintings/amberandtheshadowgirls", "Amber and the Shadow Girls", "oil on wood panel", ""],
		["paintings/idealbeauties", "Ideal Beauties", "12x36&rdquo;, oil on wood panel", ""],
		["paintings/from-stone-to-flesh", "From Stone to Flesh", "oil on wood panel", ""],
		["paintings/imported-gemstones", "Imported Gemstones", "oil on wood panel", ""],
		["paintings/Lucky-Charms", "Lucky Charms", "oil on wood panel", ""]
	];


var works_on_paper_urls = [
		["worksonpaper/_MG_6230", "Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6231", "Detail: Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6237", "Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6247", "Detail: Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6251", "Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6255", "Detail: Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6257", "Detail: Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6261", "Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6276", "Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6281", "Detail: Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6285", "Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6287", "Detail: Fictitious Jewelry Series", "22x33&rdquo;, gouache on paper", "2010"],
		["worksonpaper/_MG_6295", "Fogs and Clouds", "8x11&rdquo;, mixed media", "2010"],
		["worksonpaper/_MG_6296", "Fogs and Clouds", "8x11&rdquo;, mixed media", "2010"],
		["worksonpaper/_MG_6301", "Fogs and Clouds", "8x11&rdquo;, mixed media", "2010"],
		["worksonpaper/workonpaper1", "Teevarani", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper3", "Charunela", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper2", "Dailia, Gentle Soul", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper5", "Shamiso", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper4", "Dhriti", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper10", "Naiyla, The Dreamer", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper11", "Preuss", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper9", "Firelei", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper7", "Zenobia", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/workonpaper6", "Tsotha", "30x40&rdquo;, watercolor", "2009"],
		["worksonpaper/drawing5", "Untitled", "13x17&rdquo;, watercolor, gouache, and pencil on paper", "2009"],
		["worksonpaper/drawing3", "Untitled", "13x17&rdquo;, watercolor, gouache, and pencil on paper", "2009"],
		["worksonpaper/drawing11", "Untitled", "13x17&rdquo;, watercolor, gouache, and pencil on paper", "2009"],
		["worksonpaper/drawing12", "Untitled", "13x17&rdquo;, watercolor, gouache, and pencil on paper", "2009"],
		["worksonpaper/drawing18", "Untitled", "13x17&rdquo;, watercolor, gouache, and pencil on paper", "2009"],
		["worksonpaper/drawing13", "Untitled", "13x17&rdquo;, watercolor, gouache, and pencil on paper", "2009"],
		["worksonpaper/drawing6", "Untitled", "13x17&rdquo;, watercolor, gouache, and pencil on paper", "2009"],
		["worksonpaper/drawing59", "Jane", "xerox transfer, pencil, and watercolor", "2009"],
		["worksonpaper/drawing60", "Bridget", "xerox transfer, pencil, and watercolor", "2009"],
		["worksonpaper/drawing62", "Sophia", "xerox transfer, pencil, and watercolor", "2009"],
		["worksonpaper/drawing64", "Ava", "xerox transfer, pencil, and watercolor", "2009"],
];

function initImage(container, url, title, description, year) {
  var img_div = document.createElement("div");
  img_div.className = "thm_div";
  img_div.innerHTML = "<img src='" + url + "_t.jpg' " +
                      "onclick=\"showImage('" + url + "', '" + title + "', '" + description + "', '" + year + "')\">"; 
  container.appendChild(img_div);  
}

function showImage(url, title, description, year) {
  var selected_image_container = document.getElementById(current_section + "_selected_image");
  selected_image_container.innerHTML =
      "<img class='selected_image' src='" + url + ".jpg'>" +
      "<div class='selected_image_title'>" + title + "</div>" +                               
      "<div class='selected_image_description'>" + description + "</div>" +                               
      "<div class='selected_image_year'>" + year + "</div>";                               
}

function initArtwork() {
  showArtwork();
}

function showArtwork(xml) {
  for (var i=0; i < paintings_urls.length; i++) {
    var year = paintings_urls[i][3];
    if ((year == "") || (parseInt(year) < 2006)) {
      year = "2006";
    }
    var container = document.getElementById("paintings_" + year + "_year");
    initImage(container,
              paintings_urls[i][0],
	      paintings_urls[i][1],
              paintings_urls[i][2],
              paintings_urls[i][3]);
  }
  for (var i=0; i < works_on_paper_urls.length; i++) {
    var year = works_on_paper_urls[i][3];
    var container = document.getElementById("works_on_paper_" + year + "_year");
    initImage(container,
              works_on_paper_urls[i][0],
	      works_on_paper_urls[i][1],
              works_on_paper_urls[i][2],
              works_on_paper_urls[i][3]);
  }
}
function showSection(section_id) {
	var container = document.getElementById(section_id);
	document.getElementById("paintings").style.display = "none";
	document.getElementById("works_on_paper").style.display = "none";
	document.getElementById("reviews").style.display = "none";
	document.getElementById("statement").style.display = "none";
	document.getElementById("resume").style.display = "none";
	container.style.display = "block";
	var navitem = document.getElementById(section_id + "_navitem");
	document.getElementById("paintings_navitem").className = "navitem";
	document.getElementById("works_on_paper_navitem").className = "navitem";
	document.getElementById("reviews_navitem").className = "navitem";
	document.getElementById("statement_navitem").className = "navitem";
	document.getElementById("resume_navitem").className = "navitem";
  navitem.className = "navitem selected_navitem";
  current_section = section_id;
}
function showYearSection(name, year) {
	var container = document.getElementById(name + "_" + year + "_year");
        hideYearSections(name, year);
	container.style.display = "block";
	var navitem = document.getElementById(name + "_" + year + "_yearnavitem");
        hideYearNavSections(name, year);
	navitem.className = "yearnavitem selected_yearnavitem";
}

function hideYearSections(name, year) {
  for (i=2006; i < 2013; i++) {
     elem = document.getElementById(name + "_" + i + "_year");
     if (elem != null) {
	elem.style.display = "none";
     }
  } 
}

function hideYearNavSections(name, year) {
  for (i=2006; i < 2013; i++) {
     elem = document.getElementById(name + "_" + i + "_yearnavitem");
     if (elem != null) {
	elem.className = "yearnavitem";
     }
  } 
}

function showReviewSection(review) {
	var container = document.getElementById(review + "_review");
	document.getElementById("rydell_review").style.display = "none";
	document.getElementById("artshift_review").style.display = "none";
	document.getElementById("oregonian_review").style.display = "none";
	document.getElementById("oregonian2_review").style.display = "none";
	document.getElementById("wilamette_review").style.display = "none";
	document.getElementById("artweek_review").style.display = "none";
	document.getElementById("oregonian3_review").style.display = "none";
	container.style.display = "block";
	var navitem = document.getElementById(review + "_navitem");
	document.getElementById("rydell_navitem").className= "reviews_navitem";
	document.getElementById("artshift_navitem").className= "reviews_navitem";
	document.getElementById("oregonian_navitem").className = "reviews_navitem";
	document.getElementById("oregonian2_navitem").className = "reviews_navitem";
	document.getElementById("wilamette_navitem").className = "reviews_navitem";
	document.getElementById("artweek_navitem").className = "reviews_navitem";
	document.getElementById("oregonian3_navitem").className = "reviews_navitem";
  navitem.className = "reviews_navitem selected_reviews_navitem";
}




