/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify image paths and optional link (set link to "" for no link):
var slides=Array();
var n=0;
// =============== HORIZONTAL ==========================
slides[n++]=["AugustaTopCompressed.jpg", "Augusta ’88 Model is a recreation of one of the earliest dulcimers known to have been made in Virginia. Steel tuning pins, dogwood soundholes are of my design."]
slides[n++]=["DCP_1040.JPG","Terry Leonino of the band Magpie commissioned a Magpie dulcimer with magpie soundholes and shell magpie logo on a flat head."];
//slides[n++]=["DCP_1040.JPG","This is a close-up of the Augusta ’88 Model headstock with black steel pins."];
slides[n++]=["Hereford_4.jpg","This is a custom Hereford Model designed for Rancher Andy Wilkins. It is walnut teardrop with spaulted maple top, a herford bull and cow are inlayed on the fretboard and the RW brand on the flat headstock"];
slides[n++]=["concertmaple2.jpg","Curly maple Concert Model with dogwood tree of life, carved fiddlehead scroll and honey maple stain "];
slides[n++]=["SpeigleTopCompressed.jpg","All curly maple Concert model with full length tree of life built for Speigle in Switzerland."];
slides[n++]=["WCyT3.jpg","Walnut teardrop with sinker cypress top, right angle tuners."];
slides[n++]=["WNC.jpg","Walnut Concert Model with wormy chestnut top, shell inlay on flat head"];
slides[n++]=["nymphtop.jpg","Walnut teardrop with spaulted curly maple top, nymph inlay on flat head."];
slides[n++]=["giftcompressed.jpg","Walnut Concert Model with butternut top and dogwood tree of life."];
slides[n++]=["DCP_0110.JPG","My one thousandth dulcimer is an all original design of shape and soundholes to match, shorter string length, L.R. Baggs pickup, ebony overlay fretboard, planetary tuners in a carved fiddlehead scroll. This is the first Concert Model (December 1990) and is featured in many of the Mill Run Dulcimer Band’s recordings."];
slides[n++]=["MapleFrontFLASH.JPG","All curly maple Concert Model, natural (unstained) finish."];
slides[n++]=["KoaTeardrop.gif","A teardrop dulcimer made from Koa, a rare Hawaiian wood.","KoaTeardrop.jpg"];
slides[n++]=["KeithYoungGalax.gif","A Keith Young Galax style dulcimer with a Gum top.","KeithYoungGalax.jpg"];
slides[n++]=["redgumsmoke.gif","A Teardrop dulcimer with Red Gum top with a wonderfully figured grain.","redgumsmoke.jpg"];
slides[n++]=["walnut-sweetgum-FRONT.jpg","A walnut hourglass with a sweetgum top and a shell inlay cat licking its paws.","walnut-sweetgum-FRONT.jpg"];
slides[n++]=["walnut-chestnut-concert-tol-front.jpg","A walnut/chestnut Concert model with short tree of life in mother of pearl and Paua abalone.","walnut-chestnut-concert-tol-composite.jpg"];
slides[n++]=["EdelweissKYBackpack.jpg", "A backpack model (24 in. vibrating string length) with walnut with spruce top, flat head with KY and edelweiss shell inlay."];
slides[n++]=["headdetailhalf2.jpg","Calla lily shell inlay on flat head."];
slides[n++]=["FranMoonAndStars.jpg","Walnut teardrop dulcimer with Spalted Maple top and ebony overlay on the fretboard and head.  The Man in the Moon and a star adorn the flat head in mother-of-pearl and stars serve as position markers on the fretboard.  Owner Fran Fran Molinengo.", "FranMoonAndStars.jpg"];
slides[n++]=["kitty-concert.jpg", ""]

var hLimit=slides.length; //16;


// =============== COLUMN 1 ==========================
slides[n++]=["Stella.jpg","Stella Dukos helped design the moon, sun, and stars ornamentation on this dulcimer that she dedicated and named in honor of her mother EFSTRATTEA. "];
slides[n++]=["DSC_0334.JPG","Debra Heare is happy with her custom all walnut Dogwood Model Backpack. It features a dogwood tree of life and dogwood soundholes."];
slides[n++]=["LucySorensenCOMPRESSED.jpg","Lucy Sorenson and her all wanut teardrop"];
slides[n++]=["Cuno.jpg","Cuno Bommmer from Switzerland and the dulcimer I made him. It is a walnut Concert Model with a full length dogwood tree of life with a special nymph blossom at the top."];
slides[n++]=["rshell.jpg","Richard Shell, a happy customer."];

var vLimit=slides.length - hLimit;



//slides[n++]=["AHarp.jpg", "Curly maple autoharp with spruce top, 15 bar2 key diatonic, black pins, fine tuning system, cherry strap buttons, black binding."]
//slides[n++]=["ShatzAHcompressed.JPG","Custom autoharp for Dan Schatz is a 14 bar2 key diatonic made of curly koa."];

// =============== COLUMN 2 ==========================
slides[n++]=["FranSunConcert.gif","Walnut concert model, sweetgum top, ebony overlay with sun, moon and stars position markers, chrome right angle vintage tuning machines.  Fran Molinengo is the proud owner","FranSunConcert.jpg"];
slides[n++]=["CarleenWalnutTeardrop.gif","Walnut teardrop, sweetgum top, ebony overlay, flat head with tulip inlay, 4 position markers. Owner Carleen Moye.","CarleenWalnutTeardrop.jpg"];

slides[n++]=["PaulBostic.gif",
  "Meet Paul Bostick. He is holding his new Early Virginia Model dulcimer (see the"+
  " <a href=../earlydulcimer.html>Roots page</a>)"+
  " that he uses with a Civil War era reenactment group in Oklahoma. He wears period costume as an"+
  " everyday person and wanders around playing music. He has found that an offer to play awhile in"+
  " any given camp is a sure way of getting free coffee all day.",
    "PaulBostic.jpg"];
slides[n++]=["PaulPossingerAndEVA.JPG",
  "This one is my version of an Early Virginia dulcimer c. 1750.  It's a walnut instrument "+
  "with a spaulted poplar top, and wild turkey wing feather quill \"switch\" and custom noter."+
  " Paul Possinger is the proud owner.", "PaulPossingerAndEVA.jpg"];
slides[n++]=["buttler-kookaburra.jpg","Here's Bill Buttler with his custom-built Kookaburra-themed dulcimer in Australia."];
slides[n++]=["emily-hibiscus.jpg","Here's Emily holding her new cherry hourglass with western red cedar top. She designed the hibiscus soundholes.  Notice the 1 &frac12;  and 6 &frac12; frets and the Grover vintage right angle tuners with butterbean knobs.<br><img src='slides/emily-hibiscus-butterbean.jpg>"];
slides[n++]=["limberjackok.jpg","...your Limber Jack was a huge favorite at the History Day.  Lots of 'really cool' and 'neat'.  And all without batteries!. Paul Bostick"];

var vLimit2=slides.length;

// =============== COLUMN 3 ==========================
slides[n++]=["InlayPegHead.jpg","Close-up of tulip and KY logo inlay on flat rosewood overlay head."];
slides[n++]=["nymph3.jpg","A close-up of nymph inlay on flat head"];
slides[n++]=["KittyHead.jpg","Here kitty..."];
slides[n++]=["3banjos.jpg","Three Appalachian Fretless Banjos, all cherry, two with 26 inch vibrating string length, and a short one with 23.5 inch strings.  The two on the left are strung with nylon, and the other has steel strings."];
slides[n++]=["BJhead1.JPG","Fancy custom inlay on banjimer head"];
slides[n++]=["matnoflash.jpg","My friend Matt learning how to make a mountain dulcimer."];


// slide, thumbnail, original


//Preload images ("yes" or "no"):
var preloadimg="no"

//Set optional link target to be added to all images with a link:
var optlinktarget="gallerydetail"

//Set image border width
var imgborderwidth=0

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"

///////No need to edit beyond here/////

if (preloadimg=="yes"){
for (x=0; x<slides.length; x++){
var myimage=new Image()
myimage.src=slides[x][0]
}
}

function myMin(a,b) {
  if(a < b) return a;
  return b;
}

function writeThumbs2(){
  var col=0;
  for (index=0; index<slides.length; index++){
    writeThumb2(slides, index, 0);
  }
}

function writeThumb2(slides, index, br){
  document.write(
"<a title=\""+slides[index][1]+"\" href=\"#\" onClick=\"lightbox("+index+")\"><img border=0 src=thumbs/"+slides[index][0]+"></a>");
  if(br) document.write("<br>");
}

function lightbox(index) {
	//var html = "<img src='"+slides[index][0]+"'>";
	$.fn.colorbox({title: '', //slides[index][1], 
								html:returnimgcode2(slides[index]), width:"800", height:"660", scrolling: true, opacity: "0.3"});
	
}

function justfinished(jfpage) {
	//var html = "<img src='"+slides[index][0]+"'>";
	$.fn.colorbox({title: '', 
								href:jfpage, width:"900", height:"660", scrolling: true, iframe: "true", opacity: "0.3"});
	
}

function writeThumbs(){
  var col=0;
  for (index=0; index<hLimit; index++){
    writeThumb(slides, index, 0);
  }
  document.write("<br>");
  for (index=hLimit; index < Math.min(hLimit+vLimit,slides.length); index++){
    writeThumb(slides, index, 1);
  }

  if(slides.length >= hLimit+vLimit) {
    document.write('<div id=leavemealone style="width:130px;height:80px;position:absolute;left:670px;top:200px;">');
    for (index=hLimit+vLimit; index < slides.length && index < vLimit2 ; index++) {
      writeThumb(slides, index, 1);
    }
    document.write('</div>');
    if(slides.length >= vLimit2) {
      document.write('<div id=leavemealone2 style="width:100px;height:80px;position:absolute;left:760px;top:200px;">');
      for (index=vLimit2; index < slides.length ; index++)
        writeThumb(slides, index, 1);
      document.write('</div>');
      document.write('</div>');
    }
  }
}

function writeThumb(slides, index, br){
  document.write(
"<a title=\""+slides[index][1]+"\" href=\"#\" onClick=\"modifyimage('dynloadarea', "+index+")\"><img border=0 src=thumbs/"+slides[index][0]+"></a>");
  if(br) document.write("<br>");
}


function returnimgcode(theimg){
var imghtml=""
imageURL = theimg.length == 3 ? theimg[2] : theimg[0];
if (theimg[1]!="")
imghtml='<div style="width:500">'+theimg[1]+'</div><br>'+
  //'<a href="'+imageURL+'" target="'+optlinktarget+'">';
  '<span onClick="reopenWindow(imageURL, \''+optlinktarget+'\',400,700)">';
imghtml+='<img src="slides/'+imageURL+'" border="'+imgborderwidth+'">'
if (theimg[1]!="")
imghtml+='</span>'
return imghtml
}

function returnimgcode2(theimg){
imageURL = theimg.length == 3 ? theimg[2] : theimg[0];
var imghtml="<center><table><tr><td><img src='slides/"+imageURL+"' border="+imgborderwidth+">";
if (theimg[1]!="")
	imghtml += '<td style="width:200;">'+theimg[1]+'</td>';
imghtml+='</table></center>';
return imghtml
}

function quip(quote) {
  var imgobj=document.getElementById('dynloadarea')
  imgobj.innerHTML=quote;
}


function modifyimage(loadarea, imgindex){
  if (document.getElementById){
  var imgobj=document.getElementById(loadarea)
  if (imgobj.filters && window.createPopup){
    imgobj.style.filter=filterstring
    imgobj.filters[0].Apply()
   }
  imgobj.innerHTML=returnimgcode(slides[imgindex])
  if (imgobj.filters && window.createPopup)
    imgobj.filters[0].Play()
  return false
}
}

var mywindows = new Array();
function pushwindow(aname, awindow) {
  for(i=0;i<mywindows.length-1;i+=2)
    if(mywindows[i] == aname) {
      mywindows[i+1]=awindow;
      return awindow;
    }
  mywindows[mywindows.length]=aname;
  mywindows[mywindows.length]=awindow;
  return awindow;
}

function reopenWindow(url, windowname,w,h)
{
  var reopenedW =
   pushwindow(windowname, window.open(url,windowname,
    'toolbar=no, location=no, directories=no, status=no, resizable=yes, menubar=no, scrollbars=yes, width='+w+', height='+h));
  if(reopenedW ) {
    reopenedW.focus();
    reopenedW.resizeTo(w,h);
  }

  return false;
}

